summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-14 09:55:16 +0000
committerphk <phk@FreeBSD.org>1995-12-14 09:55:16 +0000
commit9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e (patch)
tree9887f4bf5939f3591e9b3a4f6e1865f9a1f810d8 /sys/net
parent63ec2c0ae9b44c5394bae5d6ee7fea5be9659585 (diff)
downloadFreeBSD-src-9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e.zip
FreeBSD-src-9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e.tar.gz
Another mega commit to staticize things.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c27
-rw-r--r--sys/net/bpfdesc.h6
-rw-r--r--sys/net/if_ppp.c12
-rw-r--r--sys/net/if_sl.c24
-rw-r--r--sys/net/if_slvar.h12
-rw-r--r--sys/net/if_sppp.h2
-rw-r--r--sys/net/if_spppsubr.c77
-rw-r--r--sys/net/ppp_tty.c32
-rw-r--r--sys/net/radix.c34
-rw-r--r--sys/net/radix.h12
-rw-r--r--sys/net/raw_cb.c6
-rw-r--r--sys/net/route.c15
-rw-r--r--sys/net/route.h5
13 files changed, 133 insertions, 131 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 8a0c213..9db72e7 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -37,7 +37,7 @@
*
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
*
- * $Id: bpf.c,v 1.19 1995/12/08 11:18:01 julian Exp $
+ * $Id: bpf.c,v 1.20 1995/12/08 23:21:46 phk Exp $
*/
#include "bpfilter.h"
@@ -80,6 +80,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/conf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -105,27 +106,16 @@ static caddr_t bpf_alloc();
/*
* The default read buffer size is patchable.
*/
-int bpf_bufsize = BPF_BUFSIZE;
+static int bpf_bufsize = BPF_BUFSIZE;
+SYSCTL_INT(_debug, OID_AUTO, bpf_bufsize, CTLFLAG_RW,
+ &bpf_bufsize, 0, "");
/*
* bpf_iflist is the list of interfaces; each corresponds to an ifnet
* bpf_dtab holds the descriptors, indexed by minor device #
*/
-struct bpf_if *bpf_iflist;
-struct bpf_d bpf_dtab[NBPFILTER];
-
-#if BSD >= 199207
-/*
- * bpfilterattach() is called at boot time in new systems. We do
- * nothing here since old systems will not call this.
- */
-/* ARGSUSED */
-void
-bpfilterattach(n)
- int n;
-{
-}
-#endif
+static struct bpf_if *bpf_iflist;
+static struct bpf_d bpf_dtab[NBPFILTER];
static int bpf_allocbufs __P((struct bpf_d *));
static void bpf_attachd __P((struct bpf_d *d, struct bpf_if *bp));
@@ -141,6 +131,7 @@ static inline void
static void catchpacket __P((struct bpf_d *, u_char *, u_int,
u_int, void (*)(const void *, void *, u_int)));
static void reset_d __P((struct bpf_d *));
+static int bpf_setf __P((struct bpf_d *, struct bpf_program *));
static d_open_t bpfopen;
static d_close_t bpfclose;
@@ -875,7 +866,7 @@ bpfioctl(dev, cmd, addr, flags, p)
* Set d's packet filter program to fp. If this file already has a filter,
* free it and replace it. Returns EINVAL for bogus requests.
*/
-int
+static int
bpf_setf(d, fp)
struct bpf_d *d;
struct bpf_program *fp;
diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h
index a0cf3b3..0474c8a 100644
--- a/sys/net/bpfdesc.h
+++ b/sys/net/bpfdesc.h
@@ -37,7 +37,7 @@
*
* @(#)bpfdesc.h 8.1 (Berkeley) 6/10/93
*
- * $Id: bpfdesc.h,v 1.4 1994/08/21 05:11:39 paul Exp $
+ * $Id: bpfdesc.h,v 1.5 1995/06/15 18:11:00 pst Exp $
*/
#ifndef _NET_BPFDESC_H_
@@ -101,8 +101,4 @@ struct bpf_if {
struct ifnet *bif_ifp; /* correspoding interface */
};
-#ifdef KERNEL
-int bpf_setf __P((struct bpf_d *, struct bpf_program *));
-#endif
-
#endif
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index f4b42cb..9c3d976 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.27 1995/11/03 08:42:21 peter Exp $ */
+/* $Id: if_ppp.c,v 1.28 1995/11/13 22:09:39 peter Exp $ */
/* from if_ppp.c,v 1.5 1995/08/16 01:36:38 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@@ -127,8 +127,8 @@
static void pppattach __P((void *));
PSEUDO_SET(pppattach, if_ppp);
-int pppsioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
-void pppintr __P((void));
+static int pppsioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
+static void pppintr __P((void));
static void ppp_requeue __P((struct ppp_softc *));
static void ppp_outpkt __P((struct ppp_softc *));
@@ -167,7 +167,7 @@ static void pppdumpm __P((struct mbuf *m0));
extern struct compressor ppp_bsd_compress;
-struct compressor *ppp_compressors[8] = {
+static struct compressor *ppp_compressors[8] = {
#if DO_BSD_COMPRESS
&ppp_bsd_compress,
#endif
@@ -469,7 +469,7 @@ pppioctl(sc, cmd, data, flag, p)
/*
* Process an ioctl request to the ppp network interface.
*/
-int
+static int
pppsioctl(ifp, cmd, data)
register struct ifnet *ifp;
int cmd;
@@ -833,7 +833,7 @@ ppp_dequeue(sc)
/*
* Software interrupt routine, called at splnet.
*/
-void
+static void
pppintr()
{
struct ppp_softc *sc;
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index acfa65e..a88f6b3 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.33 1995/10/31 19:22:30 peter Exp $
+ * $Id: if_sl.c,v 1.34 1995/11/05 20:25:55 bde Exp $
*/
/*
@@ -188,6 +188,14 @@ static int slinit __P((struct sl_softc *));
static struct mbuf *sl_btom __P((struct sl_softc *, int));
static timeout_t sl_keepalive;
static timeout_t sl_outfill;
+static int slclose __P((struct tty *,int));
+static int slinput __P((int, struct tty *));
+static int slioctl __P((struct ifnet *, int, caddr_t));
+static int sltioctl __P((struct tty *, int, caddr_t, int, struct proc *));
+static int slopen __P((dev_t, struct tty *));
+static int sloutput __P((struct ifnet *,
+ struct mbuf *, struct sockaddr *, struct rtentry *));
+static int slstart __P((struct tty *));
static struct linesw slipdisc = {
slopen, slclose, l_noread, l_nowrite,
@@ -251,7 +259,7 @@ slinit(sc)
* Attach the given tty to the first available sl unit.
*/
/* ARGSUSED */
-int
+static int
slopen(dev, tp)
dev_t dev;
register struct tty *tp;
@@ -306,7 +314,7 @@ slopen(dev, tp)
* Line specific close routine.
* Detach the tty from the sl unit.
*/
-int
+static int
slclose(tp,flag)
struct tty *tp;
int flag;
@@ -351,7 +359,7 @@ slclose(tp,flag)
* Provide a way to get the sl unit number.
*/
/* ARGSUSED */
-int
+static int
sltioctl(tp, cmd, data, flag, p)
struct tty *tp;
int cmd;
@@ -416,7 +424,7 @@ sltioctl(tp, cmd, data, flag, p)
* will cause us to not compress "background" packets, because
* ordering gets trashed. It can be done for all packets in slstart.
*/
-int
+static int
sloutput(ifp, m, dst, rtp)
struct ifnet *ifp;
register struct mbuf *m;
@@ -477,7 +485,7 @@ sloutput(ifp, m, dst, rtp)
* to send from the interface queue and map it to
* the interface before starting output.
*/
-int
+static int
slstart(tp)
register struct tty *tp;
{
@@ -715,7 +723,7 @@ sl_btom(sc, len)
/*
* tty interface receiver interrupt.
*/
-int
+static int
slinput(c, tp)
register int c;
register struct tty *tp;
@@ -894,7 +902,7 @@ newpack:
/*
* Process an ioctl request.
*/
-int
+static int
slioctl(ifp, cmd, data)
register struct ifnet *ifp;
int cmd;
diff --git a/sys/net/if_slvar.h b/sys/net/if_slvar.h
index f3e22c6..d6089e4 100644
--- a/sys/net/if_slvar.h
+++ b/sys/net/if_slvar.h
@@ -32,7 +32,7 @@
*
* @(#)if_slvar.h 8.3 (Berkeley) 2/1/94
*
- * $Id: if_slvar.h,v 1.6 1995/05/30 08:08:13 rgrimes Exp $
+ * $Id: if_slvar.h,v 1.7 1995/08/30 00:33:21 bde Exp $
*/
#ifndef _NET_IF_SLVAR_H_
@@ -74,15 +74,5 @@ struct sl_softc {
#define SC_NOICMP IFF_LINK1 /* supress ICMP traffic */
#define SC_AUTOCOMP IFF_LINK2 /* auto-enable TCP compression */
-#ifdef KERNEL
-int slclose __P((struct tty *,int));
-int slinput __P((int, struct tty *));
-int slioctl __P((struct ifnet *, int, caddr_t));
-int sltioctl __P((struct tty *, int, caddr_t, int, struct proc *));
-int slopen __P((dev_t, struct tty *));
-int sloutput __P((struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *));
-int slstart __P((struct tty *));
-#endif /* KERNEL */
#endif
diff --git a/sys/net/if_sppp.h b/sys/net/if_sppp.h
index 5a4d173..95197d7 100644
--- a/sys/net/if_sppp.h
+++ b/sys/net/if_sppp.h
@@ -62,8 +62,6 @@ struct sppp {
void sppp_attach (struct ifnet *ifp);
void sppp_detach (struct ifnet *ifp);
void sppp_input (struct ifnet *ifp, struct mbuf *m);
-int sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt);
int sppp_ioctl (struct ifnet *ifp, int cmd, void *data);
struct mbuf *sppp_dequeue (struct ifnet *ifp);
int sppp_isempty (struct ifnet *ifp);
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index de87679..b7ab6ab 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -132,7 +132,7 @@ struct cisco_packet {
};
#define CISCO_PACKET_LEN 18
-struct sppp *spppq;
+static struct sppp *spppq;
/*
* The following disgusting hack gets around the problem that IP TOS
@@ -156,21 +156,23 @@ static u_short interactive_ports[8] = {
untimeout (sppp_cp_timeout, (void*) (p)); \
(p)->pp_flags &= ~PP_TIMO; }
-void sppp_keepalive (void *dummy);
-void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
+static void sppp_keepalive (void *dummy);
+static void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
u_char ident, u_short len, void *data);
-void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2);
-void sppp_lcp_input (struct sppp *sp, struct mbuf *m);
-void sppp_cisco_input (struct sppp *sp, struct mbuf *m);
-void sppp_ipcp_input (struct sppp *sp, struct mbuf *m);
-void sppp_lcp_open (struct sppp *sp);
-void sppp_ipcp_open (struct sppp *sp);
-int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
+static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2);
+static void sppp_lcp_input (struct sppp *sp, struct mbuf *m);
+static void sppp_cisco_input (struct sppp *sp, struct mbuf *m);
+static void sppp_ipcp_input (struct sppp *sp, struct mbuf *m);
+static void sppp_lcp_open (struct sppp *sp);
+static void sppp_ipcp_open (struct sppp *sp);
+static int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
int len, u_long *magic);
-void sppp_cp_timeout (void *arg);
-char *sppp_lcp_type_name (u_char type);
-char *sppp_ipcp_type_name (u_char type);
-void sppp_print_bytes (u_char *p, u_short len);
+static void sppp_cp_timeout (void *arg);
+static char *sppp_lcp_type_name (u_char type);
+static char *sppp_ipcp_type_name (u_char type);
+static void sppp_print_bytes (u_char *p, u_short len);
+static int sppp_output (struct ifnet *ifp, struct mbuf *m,
+ struct sockaddr *dst, struct rtentry *rt);
/*
* Flush interface queue.
@@ -354,7 +356,8 @@ invalid: if (ifp->if_flags & IFF_DEBUG)
/*
* Enqueue transmit packet.
*/
-int sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt)
+static int
+sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt)
{
struct sppp *sp = (struct sppp*) ifp;
struct ppp_header *h;
@@ -439,8 +442,8 @@ int sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct
goto nosupport;
h->protocol = htons (PPP_ISO);
break;
-#endif
nosupport:
+#endif
default:
m_freem (m);
splx (s);
@@ -496,7 +499,8 @@ void sppp_attach (struct ifnet *ifp)
sp->ipcp.state = IPCP_STATE_CLOSED;
}
-void sppp_detach (struct ifnet *ifp)
+void
+sppp_detach (struct ifnet *ifp)
{
struct sppp **q, *p, *sp = (struct sppp*) ifp;
@@ -527,7 +531,8 @@ void sppp_flush (struct ifnet *ifp)
/*
* Check if the output queue is empty.
*/
-int sppp_isempty (struct ifnet *ifp)
+int
+sppp_isempty (struct ifnet *ifp)
{
struct sppp *sp = (struct sppp*) ifp;
int empty, s = splimp ();
@@ -836,7 +841,8 @@ badreq:
/*
* Handle incoming Cisco keepalive protocol packets.
*/
-void sppp_cisco_input (struct sppp *sp, struct mbuf *m)
+static void
+sppp_cisco_input (struct sppp *sp, struct mbuf *m)
{
struct cisco_packet *h;
struct ifaddr *ifa;
@@ -911,7 +917,8 @@ void sppp_cisco_input (struct sppp *sp, struct mbuf *m)
/*
* Send PPP LCP packet.
*/
-void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
+static void
+sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
u_char ident, u_short len, void *data)
{
struct ppp_header *h;
@@ -963,7 +970,8 @@ void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
/*
* Send Cisco keepalive packet.
*/
-void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
+static void
+sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
{
struct ppp_header *h;
struct cisco_packet *ch;
@@ -1008,7 +1016,8 @@ void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
/*
* Process an ioctl request. Called on low priority level.
*/
-int sppp_ioctl (struct ifnet *ifp, int cmd, void *data)
+int
+sppp_ioctl (struct ifnet *ifp, int cmd, void *data)
{
struct ifreq *ifr = (struct ifreq*) data;
struct sppp *sp = (struct sppp*) ifp;
@@ -1090,7 +1099,8 @@ int sppp_ioctl (struct ifnet *ifp, int cmd, void *data)
* If the request contains unknown options, build and
* send Configure-reject packet, containing only unknown options.
*/
-int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
+static int
+sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
int len, u_long *magic)
{
u_char *buf, *r, *p;
@@ -1136,7 +1146,8 @@ int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
return (rlen == 0);
}
-void sppp_ipcp_input (struct sppp *sp, struct mbuf *m)
+static void
+sppp_ipcp_input (struct sppp *sp, struct mbuf *m)
{
struct lcp_header *h;
struct ifnet *ifp = &sp->pp_if;
@@ -1236,7 +1247,8 @@ void sppp_ipcp_input (struct sppp *sp, struct mbuf *m)
}
}
-void sppp_lcp_open (struct sppp *sp)
+static void
+sppp_lcp_open (struct sppp *sp)
{
char opt[6];
@@ -1254,7 +1266,8 @@ void sppp_lcp_open (struct sppp *sp)
TIMO (sp, 2);
}
-void sppp_ipcp_open (struct sppp *sp)
+static void
+sppp_ipcp_open (struct sppp *sp)
{
sp->ipcp.confid = ++sp->pp_seq;
sppp_cp_send (sp, PPP_IPCP, IPCP_CONF_REQ, sp->ipcp.confid, 0, 0);
@@ -1264,7 +1277,8 @@ void sppp_ipcp_open (struct sppp *sp)
/*
* Process PPP control protocol timeouts.
*/
-void sppp_cp_timeout (void *arg)
+static void
+sppp_cp_timeout (void *arg)
{
struct sppp *sp = (struct sppp*) arg;
int s = splimp ();
@@ -1313,7 +1327,8 @@ void sppp_cp_timeout (void *arg)
splx (s);
}
-char *sppp_lcp_type_name (u_char type)
+static char
+*sppp_lcp_type_name (u_char type)
{
static char buf [8];
switch (type) {
@@ -1333,7 +1348,8 @@ char *sppp_lcp_type_name (u_char type)
return (buf);
}
-char *sppp_ipcp_type_name (u_char type)
+static char
+*sppp_ipcp_type_name (u_char type)
{
static char buf [8];
switch (type) {
@@ -1349,7 +1365,8 @@ char *sppp_ipcp_type_name (u_char type)
return (buf);
}
-void sppp_print_bytes (u_char *p, u_short len)
+static void
+sppp_print_bytes (u_char *p, u_short len)
{
printf (" %x", *p++);
while (--len > 0)
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index fff10e4..98b837d 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -70,7 +70,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: ppp_tty.c,v 1.2 1995/10/31 20:24:14 peter Exp $ */
+/* $Id: ppp_tty.c,v 1.3 1995/11/01 00:58:43 peter Exp $ */
/* from Id: ppp_tty.c,v 1.3 1995/08/16 01:36:40 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@@ -115,17 +115,17 @@
#include <net/if_ppp.h>
#include <net/if_pppvar.h>
-void pppasyncattach __P((void *));
+static void pppasyncattach __P((void *));
PSEUDO_SET(pppasyncattach, ppp_tty);
-int pppopen __P((dev_t dev, struct tty *tp));
-int pppclose __P((struct tty *tp, int flag));
-int pppread __P((struct tty *tp, struct uio *uio, int flag));
-int pppwrite __P((struct tty *tp, struct uio *uio, int flag));
-int ppptioctl __P((struct tty *tp, int cmd, caddr_t data, int flag,
+static int pppopen __P((dev_t dev, struct tty *tp));
+static int pppclose __P((struct tty *tp, int flag));
+static int pppread __P((struct tty *tp, struct uio *uio, int flag));
+static int pppwrite __P((struct tty *tp, struct uio *uio, int flag));
+static int ppptioctl __P((struct tty *tp, int cmd, caddr_t data, int flag,
struct proc *));
-int pppinput __P((int c, struct tty *tp));
-int pppstart __P((struct tty *tp));
+static int pppinput __P((int c, struct tty *tp));
+static int pppstart __P((struct tty *tp));
static u_short pppfcs __P((u_short fcs, u_char *cp, int len));
static void pppasyncstart __P((struct ppp_softc *));
@@ -205,7 +205,7 @@ pppasyncattach(dummy)
* Called from device open routine or ttioctl() at >= splsofttty()
*/
/* ARGSUSED */
-int
+static int
pppopen(dev, tp)
dev_t dev;
register struct tty *tp;
@@ -275,7 +275,7 @@ pppopen(dev, tp)
* Detach the tty from the ppp unit.
* Mimics part of ttyclose().
*/
-int
+static int
pppclose(tp, flag)
struct tty *tp;
int flag;
@@ -347,7 +347,7 @@ register struct ppp_softc *sc;
* called at no spl from the device driver in the response to user-level
* reads on the tty file descriptor (ie: pppd).
*/
-int
+static int
pppread(tp, uio, flag)
register struct tty *tp;
struct uio *uio;
@@ -406,7 +406,7 @@ pppread(tp, uio, flag)
* called at no spl from the device driver in the response to user-level
* writes on the tty file descriptor (ie: pppd).
*/
-int
+static int
pppwrite(tp, uio, flag)
register struct tty *tp;
struct uio *uio;
@@ -465,7 +465,7 @@ pppwrite(tp, uio, flag)
* the line specific l_ioctl routine from their ioctl routines.
*/
/* ARGSUSED */
-int
+static int
ppptioctl(tp, cmd, data, flag, p)
struct tty *tp;
caddr_t data;
@@ -621,7 +621,7 @@ pppasyncctlp(sc)
* Harmless to be called while the upper netisr code is preempted, but we
* do not want to be preempted by it again.
*/
-int
+static int
pppstart(tp)
register struct tty *tp;
{
@@ -864,7 +864,7 @@ static unsigned paritytab[8] = {
* Only guaranteed to be at splsofttty() or spltty()
* This is safe to be called while the upper half's netisr is preempted.
*/
-int
+static int
pppinput(c, tp)
int c;
register struct tty *tp;
diff --git a/sys/net/radix.c b/sys/net/radix.c
index dc307b2..5c99886 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)radix.c 8.4 (Berkeley) 11/2/94
- * $Id: radix.c,v 1.9 1995/05/30 08:08:20 rgrimes Exp $
+ * $Id: radix.c,v 1.10 1995/12/02 19:37:31 bde Exp $
*/
/*
@@ -51,15 +51,23 @@
#include <net/radix.h>
#endif
-extern struct radix_node *
+static struct radix_node *
rn_lookup __P((void *v_arg, void *m_arg,
struct radix_node_head *head));
-extern int rn_walktree_from __P((struct radix_node_head *h, void *a,
+static int rn_walktree_from __P((struct radix_node_head *h, void *a,
void *m, walktree_f_t *f, void *w));
+static int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
+static struct radix_node
+ *rn_delete __P((void *, void *, struct radix_node_head *)),
+ *rn_insert __P((void *, struct radix_node_head *, int *,
+ struct radix_node [2])),
+ *rn_newpair __P((void *, int, struct radix_node[2])),
+ *rn_search __P((void *, struct radix_node *)),
+ *rn_search_m __P((void *, struct radix_node *, void *));
-int max_keylen;
-struct radix_mask *rn_mkfreelist;
-struct radix_node_head *mask_rnhead;
+static int max_keylen;
+static struct radix_mask *rn_mkfreelist;
+static struct radix_node_head *mask_rnhead;
static char *addmask_key;
static char normal_chars[] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, -1};
static char *rn_zeros, *rn_ones;
@@ -109,7 +117,7 @@ static int rn_satsifies_leaf __P((char *trial, struct radix_node *leaf,
* that governs a subtree.
*/
-struct radix_node *
+static struct radix_node *
rn_search(v_arg, head)
void *v_arg;
struct radix_node *head;
@@ -126,7 +134,7 @@ rn_search(v_arg, head)
return (x);
};
-struct radix_node *
+static struct radix_node *
rn_search_m(v_arg, head, m_arg)
struct radix_node *head;
void *v_arg, *m_arg;
@@ -322,7 +330,7 @@ int rn_saveinfo;
int rn_debug = 1;
#endif
-struct radix_node *
+static struct radix_node *
rn_newpair(v, b, nodes)
void *v;
int b;
@@ -340,7 +348,7 @@ rn_newpair(v, b, nodes)
return t;
}
-struct radix_node *
+static struct radix_node *
rn_insert(v_arg, head, dupentry, nodes)
void *v_arg;
struct radix_node_head *head;
@@ -665,7 +673,7 @@ on2:
return tt;
}
-struct radix_node *
+static struct radix_node *
rn_delete(v_arg, netmask_arg, head)
void *v_arg, *netmask_arg;
struct radix_node_head *head;
@@ -829,7 +837,7 @@ out:
* This is the same as rn_walktree() except for the parameters and the
* exit.
*/
-int
+static int
rn_walktree_from(h, a, m, f, w)
struct radix_node_head *h;
void *a, *m;
@@ -919,7 +927,7 @@ rn_walktree_from(h, a, m, f, w)
return 0;
}
-int
+static int
rn_walktree(h, f, w)
struct radix_node_head *h;
walktree_f_t *f;
diff --git a/sys/net/radix.h b/sys/net/radix.h
index 2384936..1899b93 100644
--- a/sys/net/radix.h
+++ b/sys/net/radix.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)radix.h 8.2 (Berkeley) 10/31/94
- * $Id$
+ * $Id: radix.h,v 1.8 1995/04/28 23:01:37 pst Exp $
*/
#ifndef _RADIX_H_
@@ -155,17 +155,11 @@ extern struct radix_node_head *mask_rnhead;
void rn_init __P((void));
int rn_inithead __P((void **, int));
int rn_refines __P((void *, void *));
-int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
struct radix_node
*rn_addmask __P((void *, int, int)),
*rn_addroute __P((void *, void *, struct radix_node_head *,
struct radix_node [2])),
- *rn_delete __P((void *, void *, struct radix_node_head *)),
- *rn_insert __P((void *, struct radix_node_head *, int *,
- struct radix_node [2])),
- *rn_match __P((void *, struct radix_node_head *)),
- *rn_newpair __P((void *, int, struct radix_node[2])),
- *rn_search __P((void *, struct radix_node *)),
- *rn_search_m __P((void *, struct radix_node *, void *));
+ *rn_match __P((void *, struct radix_node_head *));
+
#endif /* _RADIX_H_ */
diff --git a/sys/net/raw_cb.c b/sys/net/raw_cb.c
index 0471e1c..e124811 100644
--- a/sys/net/raw_cb.c
+++ b/sys/net/raw_cb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
- * $Id: raw_cb.c,v 1.5 1995/07/29 11:40:59 bde Exp $
+ * $Id: raw_cb.c,v 1.6 1995/12/03 13:44:58 bde Exp $
*/
#include <sys/param.h>
@@ -59,8 +59,8 @@
*/
struct rawcb rawcb;
-u_long raw_sendspace = RAWSNDQ;
-u_long raw_recvspace = RAWRCVQ;
+static u_long raw_sendspace = RAWSNDQ;
+static u_long raw_recvspace = RAWRCVQ;
/*
* Allocate a control block and a nominal amount
diff --git a/sys/net/route.c b/sys/net/route.c
index 1164fbf..d6b2d38c 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.2 (Berkeley) 11/15/93
- * $Id: route.c,v 1.27 1995/10/29 15:32:14 phk Exp $
+ * $Id: route.c,v 1.28 1995/12/02 19:28:24 bde Exp $
*/
#include <sys/param.h>
@@ -56,13 +56,16 @@
#define SA(p) ((struct sockaddr *)(p))
struct route_cb route_cb;
-struct rtstat rtstat;
+static struct rtstat rtstat;
struct radix_node_head *rt_tables[AF_MAX+1];
-int rttrash; /* routes not in table but not freed */
-struct sockaddr wildcard; /* zero valued cookie for wildcard searches */
+static int rttrash; /* routes not in table but not freed */
-void
+static void rt_maskedcopy __P((struct sockaddr *,
+ struct sockaddr *, struct sockaddr *));
+static void rtable_init __P((void **));
+
+static void
rtable_init(table)
void **table;
{
@@ -700,7 +703,7 @@ rt_setgate(rt0, dst, gate)
return 0;
}
-void
+static void
rt_maskedcopy(src, dst, netmask)
struct sockaddr *src, *dst, *netmask;
{
diff --git a/sys/net/route.h b/sys/net/route.h
index 3924220..55b2738 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.h 8.3 (Berkeley) 4/19/94
- * $Id: route.h,v 1.17 1995/10/26 20:30:24 julian Exp $
+ * $Id: route.h,v 1.18 1995/11/16 19:00:09 phk Exp $
*/
#ifndef _NET_ROUTE_H_
@@ -261,13 +261,10 @@ extern struct radix_node_head *rt_tables[AF_MAX+1];
void route_init __P((void));
void rt_ifmsg __P((struct ifnet *));
-void rt_maskedcopy __P((struct sockaddr *,
- struct sockaddr *, struct sockaddr *));
void rt_missmsg __P((int, struct rt_addrinfo *, int, int));
void rt_newaddrmsg __P((int, struct ifaddr *, int, struct rtentry *));
int rt_setgate __P((struct rtentry *,
struct sockaddr *, struct sockaddr *));
-void rtable_init __P((void **));
void rtalloc __P((struct route *));
void rtalloc_ign __P((struct route *, unsigned long));
struct rtentry *
OpenPOWER on IntegriCloud