Date: Thu, 17 Aug 2000 00:04:04 +1000 (EST) From: Darren Reed <darrenr@reed.wattle.id.au> To: freebsd-net@freebsd.org Subject: inetsw, struct protosw and struct ipprotosw Message-ID: <200008161404.AAA01735@avalon.reed.wattle.id.au>
next in thread | raw e-mail | index | archive | help
Just looking in /sys/netinet and I see this: (freefall:~/src/sys/netinet) grep 'inetsw' *.c | grep protosw in_proto.c:struct ipprotosw inetsw[] = { in_proto.c: (struct protosw *)inetsw, in_proto.c: (struct protosw *)&inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0, ip_fil.c:extern struct protosw inetsw[]; ip_icmp.c:extern struct protosw inetsw[]; ip_input.c:extern struct ipprotosw inetsw[]; ip_mroute.c: extern struct protosw inetsw[]; ip_output.c:extern struct protosw inetsw[]; To me this looks like a recipe for disaster. Why is there "struct ipprotosw inetsw" and "struct protosw inetsw" ? Does this really mean that someone wanted to change "struct protosw" and instead made up "struct ipprotosw" and are trying to squeeze that somehow into "protosw" ? Ideally I should be able to put inetsw into a header file and extern it, but with this, I don't see how that would make sense... Darren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008161404.AAA01735>