diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-05-25 09:21:21 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-05-25 09:21:21 +0000 |
commit | 2469c867a164210ce96143517059f21db7f1fd17 (patch) | |
tree | 9179427ac860211c445df663fd2b86267366bfba /sys/net | |
parent | cb0aba89af15a48e2655e898a503946ac4cb42ae (diff) | |
download | FreeBSD-src-2469c867a164210ce96143517059f21db7f1fd17.zip FreeBSD-src-2469c867a164210ce96143517059f21db7f1fd17.tar.gz |
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/bpf_filter.c | 7 | ||||
-rw-r--r-- | sys/net/bpfdesc.h | 2 | ||||
-rw-r--r-- | sys/net/if.h | 10 | ||||
-rw-r--r-- | sys/net/if_loop.c | 8 | ||||
-rw-r--r-- | sys/net/if_sl.c | 6 | ||||
-rw-r--r-- | sys/net/netisr.h | 21 | ||||
-rw-r--r-- | sys/net/radix.c | 2 | ||||
-rw-r--r-- | sys/net/route.c | 2 | ||||
-rw-r--r-- | sys/net/route.h | 2 | ||||
-rw-r--r-- | sys/net/rtsock.c | 4 |
10 files changed, 23 insertions, 41 deletions
diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c index 6a30a66..cfae776 100644 --- a/sys/net/bpf_filter.c +++ b/sys/net/bpf_filter.c @@ -174,7 +174,7 @@ bpf_filter(pc, p, wirelen, buflen) u_int wirelen; register u_int buflen; { - register u_long A, X; + register u_long A = 0, X = 0; register int k; long mem[BPF_MEMWORDS]; @@ -183,10 +183,7 @@ bpf_filter(pc, p, wirelen, buflen) * No filter means accept all. */ return (u_int)-1; -#ifdef lint - A = 0; - X = 0; -#endif + --pc; while (1) { ++pc; diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h index a13320e..36e3d26 100644 --- a/sys/net/bpfdesc.h +++ b/sys/net/bpfdesc.h @@ -40,6 +40,8 @@ * @(#) $Header: bpfdesc.h,v 1.9 91/10/27 21:22:38 mccanne Exp $ (LBL) */ +#include <sys/select.h> + /* * Descriptor associated with each open bpf file. */ diff --git a/sys/net/if.h b/sys/net/if.h index c27c4f9..e0bf795 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -114,20 +114,20 @@ struct ifnet { struct timeval ifi_lastchange;/* last updated */ } if_data; /* procedure handles */ - int (*if_init) /* init routine */ + void (*if_init) /* init routine */ __P((int)); int (*if_output) /* output routine (enqueue) */ __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); - int (*if_start) /* initiate output routine */ + void (*if_start) /* initiate output routine */ __P((struct ifnet *)); int (*if_done) /* output complete routine */ __P((struct ifnet *)); /* (XXX not used; fake prototype) */ int (*if_ioctl) /* ioctl routine */ __P((struct ifnet *, int, caddr_t)); - int (*if_reset) + void (*if_reset) __P((int)); /* new autoconfig will permit removal */ - int (*if_watchdog) /* timer routine */ + void (*if_watchdog) /* timer routine */ __P((int)); struct ifqueue { struct mbuf *ifq_head; @@ -356,7 +356,7 @@ void ifafree __P((struct ifaddr *)); void link_rtrequest __P((int, struct rtentry *, struct sockaddr *)); int loioctl __P((struct ifnet *, int, caddr_t)); -void loopattach __P((int)); +void loopattach __P((void)); int looutput __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); void lortrequest __P((int, struct rtentry *, struct sockaddr *)); diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index f09295e..3b9ee74 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -78,14 +78,10 @@ struct ifnet loif; /* ARGSUSED */ void -loopattach(n) - int n; +loopattach(void) { register struct ifnet *ifp = &loif; -#ifdef lint - n = n; /* Highlander: there can only be one... */ -#endif ifp->if_name = "lo"; ifp->if_mtu = LOMTU; ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST; @@ -100,6 +96,8 @@ loopattach(n) #endif } +TEXT_SET(pseudo_set, loopattach); + int looutput(ifp, m, dst, rt) struct ifnet *ifp; diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 56ce96f..46ae9ad 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -209,6 +209,8 @@ slattach() } } +TEXT_SET(pseudo_set, slattach); + static int slinit(sc) register struct sl_softc *sc; @@ -397,7 +399,7 @@ slstart(tp) struct mbuf *m2; #if NBPFILTER > 0 u_char bpfbuf[SLMTU + SLIP_HDRLEN]; - register int len; + register int len = 0; #endif extern int cfreecount; @@ -479,6 +481,7 @@ slstart(tp) #endif sc->sc_if.if_lastchange = time; +#if 0 /* * If system is getting low on clists, just flush our * output queue (if the stuff was important, it'll get @@ -489,6 +492,7 @@ slstart(tp) sc->sc_if.if_collisions++; continue; } +#endif /* * The extra FRAME_END will start up a new packet, and thus * will flush any accumulated garbage. We do this whenever diff --git a/sys/net/netisr.h b/sys/net/netisr.h index e2e4653..03c5288 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -61,27 +61,8 @@ #define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); } -#ifdef i386 -/* XXX Temporary -- soon to vanish - wfj */ -#define NETISR_SCLK 11 /* softclock */ -#define NETISR_AST 12 /* ast -- resched */ - -#undef schednetisr -#define schednetisr(anisr) {\ - if(netisr == 0) { \ - softem++; \ - } \ - netisr |= 1<<(anisr); \ -} -#ifndef LOCORE -#ifdef KERNEL -int softem; -#endif -#endif -#endif /* i386 */ - #ifndef LOCORE #ifdef KERNEL -int netisr; /* scheduling bits for network */ +volatile unsigned int netisr; /* scheduling bits for network */ #endif #endif diff --git a/sys/net/radix.c b/sys/net/radix.c index f182eb7..fb34adb 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -383,7 +383,7 @@ rn_addroute(v_arg, n_arg, head, treenodes) struct radix_node treenodes[2]; { caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg; - register struct radix_node *t, *x, *tt; + register struct radix_node *t, *x = 0, *tt; struct radix_node *saved_tt, *top = head->rnh_treetop; short b = 0, b_leaf; int mlen, keyduplicated; diff --git a/sys/net/route.c b/sys/net/route.c index 96902da..f37e84c 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -175,7 +175,7 @@ ifafree(ifa) * N.B.: must be called at splnet * */ -int +void rtredirect(dst, gateway, netmask, flags, src, rtp) struct sockaddr *dst, *gateway, *netmask, *src; int flags; diff --git a/sys/net/route.h b/sys/net/route.h index 2fbed9e..92f672c 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -254,7 +254,7 @@ struct rtentry * void rtfree __P((struct rtentry *)); int rtinit __P((struct ifaddr *, int, int)); int rtioctl __P((int, caddr_t, struct proc *)); -int rtredirect __P((struct sockaddr *, struct sockaddr *, +void rtredirect __P((struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct sockaddr *, struct rtentry **)); int rtrequest __P((int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **)); diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index d128121..db0192f 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -618,9 +618,9 @@ rt_newaddrmsg(cmd, ifa, error, rt) register struct rtentry *rt; { struct rt_addrinfo info; - struct sockaddr *sa; + struct sockaddr *sa = 0; int pass; - struct mbuf *m; + struct mbuf *m = 0; struct ifnet *ifp = ifa->ifa_ifp; if (route_cb.any_count == 0) |