From 2457c77564e4384d49f9fcfd57b66e3619625e27 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 31 Oct 1995 23:36:47 +0000 Subject: 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 a66fc6a..2194d86 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 a66fc6a..2194d86 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 a66fc6a..2194d86 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 f04463e..50239d4 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 29838b5..e675274 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 6db3c60..3cdf996 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 3c06e8e..3005778 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 3cc4280..47c6eb7 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 2c49ec5..daa2bca 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 1ad9fa3..b851376 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 6531d95..b4da789 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 12c1161..fb7c6de 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 74fa9b5..fcde442 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 d2d625c..a2951e9 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 be70169..810f89c 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 6aa2d7f..e5e23a7 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 e04946c..27b406e 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 7218cf0..17e32f2 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 09fab3c..9d977f6 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 d1b18c1..0af832d 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 f392d41..63fa24d 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 c0b109d..9c52512 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 8a93c5c..6abb1f2 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 bd23028..1df9eb3 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 96290da..b31646b 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_ -- cgit v1.1