From owner-freebsd-net Wed Aug 16 7: 4:25 2000 Delivered-To: freebsd-net@freebsd.org Received: from darren2.lnk.telstra.net (darren2.lnk.telstra.net [139.130.53.33]) by hub.freebsd.org (Postfix) with ESMTP id A763F37C024 for ; Wed, 16 Aug 2000 07:04:20 -0700 (PDT) (envelope-from darrenr@reed.wattle.id.au) Received: (from root@localhost) by darren2.lnk.telstra.net (8.9.1/8.8.7) id OAA17912 for ; Wed, 16 Aug 2000 14:04:13 GMT From: Darren Reed Message-Id: <200008161404.AAA01735@avalon.reed.wattle.id.au> Subject: inetsw, struct protosw and struct ipprotosw To: freebsd-net@freebsd.org Date: Thu, 17 Aug 2000 00:04:04 +1000 (EST) X-Mailer: ELM [version 2.4ME+ PL37 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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