Re: svn commit: r186393 - head/sys/netinet6

2008-12-23 Thread Bjoern A. Zeeb

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 v4int (struct mbuf *, struct socket *)
v6int (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.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r186393 - head/sys/netinet6

2008-12-22 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Dec 22 12:54:52 2008
New Revision: 186393
URL: http://svn.freebsd.org/changeset/base/186393

Log:
  Correct variable name in comment.
  
  MFC after:4 weeks

Modified:
  head/sys/netinet6/ip6_input.c

Modified: head/sys/netinet6/ip6_input.c
==
--- head/sys/netinet6/ip6_input.c   Mon Dec 22 07:11:15 2008
(r186392)
+++ head/sys/netinet6/ip6_input.c   Mon Dec 22 12:54:52 2008
(r186393)
@@ -248,7 +248,7 @@ ip6_init(void)
if (pr == 0)
panic(ip6_init);
 
-   /* Initialize the entire ip_protox[] array to IPPROTO_RAW. */
+   /* Initialize the entire ip6_protox[] array to IPPROTO_RAW. */
for (i = 0; i  IPPROTO_MAX; i++)
ip6_protox[i] = pr - inet6sw;
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org