svn commit: r186393 - head/sys/netinet6
Bjoern A. Zeeb
bz at FreeBSD.org
Tue Dec 23 22:50:08 UTC 2008
On Tue, 23 Dec 2008, Robert Watson wrote:
Hi,
> In IPv4 we've eliminated use of ipprotosw, although we still have
> ipprotosw.h, which should go away as it's unused; I'd like to see ip6protosw
> go away as well. The domain registration code assumes that when an array of
> protocols are registered, the size of the array entry is sizeof(struct
> protosw), which happens currently to be true for ip6protosw. At least, I
> think. :-)
There is some assert like code under DIAGNOSTICS in there I think.
So from what I could see the main problems just changing to protosw
from ip6protosw are: the pr_input and pr_output routines as they
differ in either return code or arguemnts:
* pr_input v4 void (struct mbuf *, int)
v6 int (struct mbuf **, int *, int)
* pr_output v4 int (struct mbuf *, struct socket *)
v6 int (struct mbuf *, ...)
All the other function pointers seem equal already.
I think the pr_output is solveable more easily as I can see - which
seemed strange only
rip6_output int (struct mbuf *, struct socket *,
struct sockaddr_in6 *, struct mbuf *)
called from raw_usend(m, so), rip6_send(m, so, dst, control) are
defined. I might have missed a few because they weren't yet converted
to c99 style initializers.
pr_input is more of a problem and we may need to break the INET case
to be able to merge the INET6 case to use protosw. I'll further
investigate but this might become a bit disruptive.
/bz
--
Bjoern A. Zeeb The greatest risk is not taking one.
More information about the svn-src-head
mailing list