From owner-freebsd-current Tue Apr 2 08:10:47 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA05440 for current-outgoing; Tue, 2 Apr 1996 08:10:47 -0800 (PST) Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA05432 Tue, 2 Apr 1996 08:10:34 -0800 (PST) Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA04475; Tue, 2 Apr 1996 11:10:32 -0500 Date: Tue, 2 Apr 1996 11:10:32 -0500 From: Garrett Wollman Message-Id: <9604021610.AA04475@halloran-eldar.lcs.mit.edu> To: "Gary Palmer" Cc: FreeBSD-Current Subject: Linker sets & structures for networking code In-Reply-To: <3278.828405118@palmer.demon.co.uk> References: <3278.828405118@palmer.demon.co.uk> Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk < said: > There seems to be something fundamentally WRONG in some of the > networking stuff which I'm not sure how to fix. (I'm going through > LINT trying to fix as many warnings as I can). > People have noticed warnings like: > ../../kern/uipc_proto.c:62: warning: initialization from incompatible pointer type > (the error comes from the `raw_input' initialiser); > /sys/sys/protosw.h defines the input field to be: > void (*pr_input) __P((struct mbuf *, int len)); Every protocol family uses a different convention for calling its input functions. This was not a problem before the age of prototypes; now it is. It has never been clear to me why the lower-layer input functions are listed in the protosw[]s at all, since there is no way that they could sensibly ever get called through protocol processing. (I say ``sensibly'' since it is possible to do something really stupid which would do this; hopefully the added warnings will discourage anyone from attempting it.) > as `0', I can't see how raw_input ever gets call via the localsw > array. It never does; it wouldn't make any sense to do so. -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant