From f6d24a780bcb56bf0ea5ff3f195b9d4d4a442d97 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 9 Dec 1995 20:43:53 +0000 Subject: [PATCH] Staticize. --- sys/netinet/igmp.c | 12 ++++++------ sys/netinet/in.c | 13 +++++++------ sys/netinet/raw_ip.c | 8 ++++---- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index cbbe46225ff..95664b2089d 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)igmp.c 8.1 (Berkeley) 7/19/93 - * $Id: igmp.c,v 1.13 1995/11/14 20:33:52 phk Exp $ + * $Id: igmp.c,v 1.14 1995/12/02 19:37:52 bde Exp $ */ /* @@ -67,11 +67,11 @@ #include #include -extern int fill_rti __P((struct in_multi *inm)); -extern struct router_info * +static int fill_rti __P((struct in_multi *inm)); +static struct router_info * find_rti __P((struct ifnet *ifp)); -struct igmpstat igmpstat; +static struct igmpstat igmpstat; SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_RD, &igmpstat, igmpstat, ""); @@ -100,7 +100,7 @@ igmp_init() Head = (struct router_info *) 0; } -int +static int fill_rti(inm) struct in_multi *inm; { @@ -135,7 +135,7 @@ fill_rti(inm) return IGMP_HOST_NEW_MEMBERSHIP_REPORT; } -struct router_info * +static struct router_info * find_rti(ifp) struct ifnet *ifp; { diff --git a/sys/netinet/in.c b/sys/netinet/in.c index db5f97c0226..c1b2301c141 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.c 8.4 (Berkeley) 1/9/95 - * $Id: in.c,v 1.18 1995/11/14 20:33:56 phk Exp $ + * $Id: in.c,v 1.19 1995/11/20 12:28:21 phk Exp $ */ #include @@ -42,6 +42,8 @@ #include #include #include +#include +#include #include #include @@ -70,10 +72,9 @@ static int in_ifinit __P((struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int)); static void in_ifscrub __P((struct ifnet *, struct in_ifaddr *)); -#ifndef SUBNETSARELOCAL -#define SUBNETSARELOCAL 1 -#endif -int subnetsarelocal = SUBNETSARELOCAL; +static int subnetsarelocal = 1; +SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, + &subnetsarelocal, 0, ""); /* * Return 1 if an internet address is for a ``local'' host * (one to which we have a connection). If subnetsarelocal @@ -139,7 +140,7 @@ struct sockaddr_in *ap; } } -int in_interfaces; /* number of external internet interfaces */ +static int in_interfaces; /* number of external internet interfaces */ /* * Generic internet control operations (ioctl's). diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 6a656b0608c..97c48e06155 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 - * $Id: raw_ip.c,v 1.23 1995/10/21 02:12:20 davidg Exp $ + * $Id: raw_ip.c,v 1.24 1995/11/14 20:34:23 phk Exp $ */ #include @@ -57,8 +57,8 @@ #include -struct inpcbhead ripcb; -struct inpcbinfo ripcbinfo; +static struct inpcbhead ripcb; +static struct inpcbinfo ripcbinfo; /* * Nominal space allocated to a raw ip socket. @@ -86,7 +86,7 @@ rip_init() ripcbinfo.hashbase = phashinit(1, M_PCB, &ripcbinfo.hashsize); } -struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET }; +static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET }; /* * Setup generic address and protocol structures * for raw_input routine, then pass them along with