From 1b3f472e51d0a3625a8e7cd1c2126aca25e27b64 Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Tue, 31 Oct 1995 23:36:47 +0000 Subject: [PATCH] Submitted by: Mike Mitchell (mitchell@ref.tfs.com) these patches bring the ipx code up to the point that it compiles cleanly with the -W arguments suggested by bruce. --- sys/conf/NOTES | 6 +++--- sys/i386/conf/LINT | 6 +++--- sys/i386/conf/NOTES | 6 +++--- sys/netipx/ipx.c | 2 +- sys/netipx/ipx.h | 7 ++++--- sys/netipx/ipx_cksum.c | 8 +++++--- sys/netipx/ipx_error.c | 2 +- sys/netipx/ipx_error.h | 2 +- sys/netipx/ipx_if.h | 10 ++++++++-- sys/netipx/ipx_input.c | 2 +- sys/netipx/ipx_ip.c | 9 +++++---- sys/netipx/ipx_ip.h | 4 ++-- sys/netipx/ipx_outputfl.c | 2 +- sys/netipx/ipx_pcb.c | 5 +++-- sys/netipx/ipx_pcb.h | 4 ++-- sys/netipx/ipx_proto.c | 2 +- sys/netipx/ipx_tun.c | 2 +- sys/netipx/ipx_usrreq.c | 2 +- sys/netipx/ipx_var.h | 2 +- sys/netipx/spx.h | 2 +- sys/netipx/spx_debug.c | 2 +- sys/netipx/spx_debug.h | 2 +- sys/netipx/spx_timer.h | 2 +- sys/netipx/spx_usrreq.c | 6 +++--- sys/netipx/spx_var.h | 2 +- 25 files changed, 55 insertions(+), 44 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index a66fc6a07e2e..2194d8614ba7 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.209 1995/10/31 17:00:03 joerg Exp $ +# $Id: LINT,v 1.210 1995/10/31 18:27:45 phk Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -132,8 +132,8 @@ options NS #Xerox NS communications protocols options IPX #IPX/SPX communications protocols options IPXIP #IPX in IP encapsulation (not available) options IPTUNNEL #IP in IPX encapsulation (not available) -#options "IPXPRINTFS=0" #Console Debugging Information -#options "IPX_ERRPRINTFS=0" #Console Debugging Information +options "IPXPRINTFS=0" #IPX/SPX Console Debugging Information +options "IPX_ERRPRINTFS=0" #IPX/SPX Console Debugging Information # These are currently broken and don't compile #options ISO diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index a66fc6a07e2e..2194d8614ba7 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.209 1995/10/31 17:00:03 joerg Exp $ +# $Id: LINT,v 1.210 1995/10/31 18:27:45 phk Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -132,8 +132,8 @@ options NS #Xerox NS communications protocols options IPX #IPX/SPX communications protocols options IPXIP #IPX in IP encapsulation (not available) options IPTUNNEL #IP in IPX encapsulation (not available) -#options "IPXPRINTFS=0" #Console Debugging Information -#options "IPX_ERRPRINTFS=0" #Console Debugging Information +options "IPXPRINTFS=0" #IPX/SPX Console Debugging Information +options "IPX_ERRPRINTFS=0" #IPX/SPX Console Debugging Information # These are currently broken and don't compile #options ISO diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index a66fc6a07e2e..2194d8614ba7 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.209 1995/10/31 17:00:03 joerg Exp $ +# $Id: LINT,v 1.210 1995/10/31 18:27:45 phk Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -132,8 +132,8 @@ options NS #Xerox NS communications protocols options IPX #IPX/SPX communications protocols options IPXIP #IPX in IP encapsulation (not available) options IPTUNNEL #IP in IPX encapsulation (not available) -#options "IPXPRINTFS=0" #Console Debugging Information -#options "IPX_ERRPRINTFS=0" #Console Debugging Information +options "IPXPRINTFS=0" #IPX/SPX Console Debugging Information +options "IPX_ERRPRINTFS=0" #IPX/SPX Console Debugging Information # These are currently broken and don't compile #options ISO diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index f04463ed9185..50239d44916c 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/ipx.h b/sys/netipx/ipx.h index 29838b5b8931..e675274346ab 100644 --- a/sys/netipx/ipx.h +++ b/sys/netipx/ipx.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx.h + * @(#)$Id$ */ #ifndef _NETIPX_IPX_H_ @@ -156,8 +156,6 @@ struct ipx { #ifdef KERNEL -#include - extern int ipxcksum; extern struct domain ipxdomain; extern struct sockaddr_ipx ipx_netmask; @@ -173,6 +171,9 @@ extern long ipx_pexseq; extern u_char ipxctlerrmap[]; extern struct ipxpcb ipxrawpcb; +#include +#include + #include __BEGIN_DECLS diff --git a/sys/netipx/ipx_cksum.c b/sys/netipx/ipx_cksum.c index 6db3c60a1240..3cdf99638e33 100644 --- a/sys/netipx/ipx_cksum.c +++ b/sys/netipx/ipx_cksum.c @@ -31,12 +31,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_cksum.c + * @(#)$Id$ */ #include #include +#include + /* * Checksum routine for Network Systems Protocol Packets (Big-Endian). * @@ -49,8 +51,8 @@ u_short ipx_cksum(m, len) - register struct mbuf *m; - register int len; + struct mbuf *m; + int len; { register u_short *w; register int sum = 0; diff --git a/sys/netipx/ipx_error.c b/sys/netipx/ipx_error.c index 3c06e8ec201b..30057787acc6 100644 --- a/sys/netipx/ipx_error.c +++ b/sys/netipx/ipx_error.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_error.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/ipx_error.h b/sys/netipx/ipx_error.h index 3cc428002979..47c6eb700e8e 100644 --- a/sys/netipx/ipx_error.h +++ b/sys/netipx/ipx_error.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_error.h + * @(#)$Id$ */ #ifndef _NETIPX_IPX_ERROR_H_ diff --git a/sys/netipx/ipx_if.h b/sys/netipx/ipx_if.h index 2c49ec5ed835..daa2bca5bf2a 100644 --- a/sys/netipx/ipx_if.h +++ b/sys/netipx/ipx_if.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_if.h + * @(#)$Id$ */ #ifndef _NETIPX_IPX_IF_H_ @@ -69,7 +69,13 @@ struct ipx_aliasreq { #define IA_SIPX(ia) (&(((struct ipx_ifaddr *)(ia))->ia_addr)) /* This is not the right place for this but where is? */ -#define ETHERTYPE_IPX 0x8137 + +#define ETHERTYPE_IPX_8022 0x00e0 /* Ethernet_802.2 */ +#define ETHERTYPE_IPX_8023 0x0000 /* Ethernet_802.3 */ +#define ETHERTYPE_IPX_II 0x8137 /* Ethernet_II */ +#define ETHERTYPE_IPX_SNAP 0x8137 /* Ethernet_SNAP */ + +#define ETHERTYPE_IPX 0x8137 /* Only Ethernet_II Available */ #ifdef IPXIP struct ipxip_req { diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index 1ad9fa3e00d5..b85137652462 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_input.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c index 6531d9585b3b..b4da78913430 100644 --- a/sys/netipx/ipx_ip.c +++ b/sys/netipx/ipx_ip.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_ip.c + * @(#)$Id$ */ /* @@ -226,12 +226,13 @@ bad: /* ARGSUSED */ int -ipxipoutput(ifn, m, dst) - struct ifnet_en *ifn; +ipxipoutput(ifn_en, m, dst, rt) + struct ifnet *ifn_en; register struct mbuf *m; struct sockaddr *dst; + struct rtentry *rt; { - + register struct ifnet_en *ifn = (struct ifnet_en *)ifn_en; register struct ip *ip; register struct route *ro = &(ifn->ifen_route); register int len = 0; diff --git a/sys/netipx/ipx_ip.h b/sys/netipx/ipx_ip.h index 12c11617ee9f..fb7c6dec5f37 100644 --- a/sys/netipx/ipx_ip.h +++ b/sys/netipx/ipx_ip.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipxip.h + * @(#)$Id$ */ #ifndef __NETIPX_IPXIP_H_ @@ -59,7 +59,7 @@ void ipxip_rtchange __P((struct in_addr *dst)); struct ifnet_en *ipxipattach __P((void)); int ipxipioctl __P((struct ifnet *ifp, int cmd, caddr_t data)); void ipxip_input __P((struct mbuf *m, struct ifnet *ifp)); -int ipxipoutput __P((struct ifnet_en *ifn, struct mbuf *m, struct sockaddr *dst)); +int ipxipoutput __P((struct ifnet *ifn, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt)); void ipxipstart __P((struct ifnet *ifp)); int ipxip_route __P((struct mbuf *m)); int ipxip_free __P((struct ifnet *ifp)); diff --git a/sys/netipx/ipx_outputfl.c b/sys/netipx/ipx_outputfl.c index 74fa9b572726..fcde44225b3a 100644 --- a/sys/netipx/ipx_outputfl.c +++ b/sys/netipx/ipx_outputfl.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_outputfl.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c index d2d625c7ac75..a2951e9f4293 100644 --- a/sys/netipx/ipx_pcb.c +++ b/sys/netipx/ipx_pcb.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_pcb.c + * @(#)$Id$ */ #include @@ -284,8 +284,9 @@ ipx_setpeeraddr(ipxp, nam) void ipx_pcbnotify(dst, errno, notify, param) register struct ipx_addr *dst; + int errno; + void (*notify)(struct ipxpcb *); long param; - int errno, (*notify)(); { register struct ipxpcb *ipxp, *oinp; int s = splimp(); diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h index be70169915f2..810f89c7957e 100644 --- a/sys/netipx/ipx_pcb.h +++ b/sys/netipx/ipx_pcb.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_pcb.h + * @(#)$Id$ */ #ifndef _NETIPX_IPX_PCB_H_ @@ -91,7 +91,7 @@ void ipx_pcbdisconnect __P((struct ipxpcb *ipxp)); void ipx_pcbdetach __P((struct ipxpcb *ipxp)); void ipx_setsockaddr __P((struct ipxpcb *ipxp, struct mbuf *nam)); void ipx_setpeeraddr __P((struct ipxpcb *ipxp, struct mbuf *nam)); -void ipx_pcbnotify __P((struct ipx_addr *dst, int errno, int (*notify)(), long param)); +void ipx_pcbnotify __P((struct ipx_addr *dst, int errno, void (*notify)(struct ipxpcb *), long param)); struct ipxpcb *ipx_pcblookup __P((struct ipx_addr *faddr, int lport, int wildp)); __END_DECLS diff --git a/sys/netipx/ipx_proto.c b/sys/netipx/ipx_proto.c index 6aa2d7f5ffff..e5e23a786f5a 100644 --- a/sys/netipx/ipx_proto.c +++ b/sys/netipx/ipx_proto.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_proto.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/ipx_tun.c b/sys/netipx/ipx_tun.c index e04946c25690..27b406eed252 100644 --- a/sys/netipx/ipx_tun.c +++ b/sys/netipx/ipx_tun.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_tun.c + * @(#)$Id$ */ /* diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c index 7218cf06203e..17e32f263cf3 100644 --- a/sys/netipx/ipx_usrreq.c +++ b/sys/netipx/ipx_usrreq.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_usrreq.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/ipx_var.h b/sys/netipx/ipx_var.h index 09fab3c405b5..9d977f6ed74b 100644 --- a/sys/netipx/ipx_var.h +++ b/sys/netipx/ipx_var.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ipx_var.h + * @(#)$Id$ */ #ifndef _NETIPX_IPX_VAR_H_ diff --git a/sys/netipx/spx.h b/sys/netipx/spx.h index d1b18c1aa21d..0af832da10b0 100644 --- a/sys/netipx/spx.h +++ b/sys/netipx/spx.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)spx.h + * @(#)$Id$ */ #ifndef _NETIPX_SPX_H_ diff --git a/sys/netipx/spx_debug.c b/sys/netipx/spx_debug.c index f392d4145d24..63fa24d48baf 100644 --- a/sys/netipx/spx_debug.c +++ b/sys/netipx/spx_debug.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)spx_debug.c + * @(#)$Id$ */ #include diff --git a/sys/netipx/spx_debug.h b/sys/netipx/spx_debug.h index c0b109da2ec5..9c525129a47c 100644 --- a/sys/netipx/spx_debug.h +++ b/sys/netipx/spx_debug.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)spx_debug.h + * @(#)$Id$ */ #ifndef _NETIPX_SPX_DEBUG_H_ diff --git a/sys/netipx/spx_timer.h b/sys/netipx/spx_timer.h index 8a93c5ca5a54..6abb1f209f95 100644 --- a/sys/netipx/spx_timer.h +++ b/sys/netipx/spx_timer.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)spx_timer.h + * @(#)$Id$ */ #ifndef _NETIPX_SPX_TIMER_H_ diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index bd23028de31d..1df9eb3d918a 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)spx_usrreq.h + * @(#)$Id$ */ #include @@ -620,7 +620,7 @@ spx_ctlinput(cmd, arg) switch (type) { case IPX_ERR_UNREACH_HOST: - ipx_pcbnotify(na, (int)ipxctlerrmap[cmd], spx_abort, (long) 0); + ipx_pcbnotify(na, (int)ipxctlerrmap[cmd], spx_abort, NULL); break; case IPX_ERR_TOO_BIG: @@ -637,7 +637,7 @@ spx_ctlinput(cmd, arg) break; case IPX_ERR_FULLUP: - ipx_pcbnotify(na, 0, spx_quench, (long) 0); + ipx_pcbnotify(na, 0, spx_quench, NULL); break; } } diff --git a/sys/netipx/spx_var.h b/sys/netipx/spx_var.h index 96290dab6c45..b31646bea6ef 100644 --- a/sys/netipx/spx_var.h +++ b/sys/netipx/spx_var.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)spx_var.h + * @(#)$Id$ */ #ifndef _NETIPX_SPX_VAR_H_