Date: Tue, 23 Dec 2008 22:47:07 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186393 - head/sys/netinet6 Message-ID: <20081223224000.O97918@maildrop.int.zabbadoz.net> In-Reply-To: <alpine.BSF.1.10.0812231201150.90302@fledge.watson.org> References: <200812221254.mBMCsr67061758@svn.freebsd.org> <alpine.BSF.1.10.0812231201150.90302@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081223224000.O97918>