summaryrefslogtreecommitdiffstats
path: root/sbin/routed/if.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2009-04-05 15:55:09 +0000
committerphk <phk@FreeBSD.org>2009-04-05 15:55:09 +0000
commit0aa4473504e30b8c42fde93c3e832d615620f0c0 (patch)
tree6feb868b340092763bc9b967ac76d4decc89314e /sbin/routed/if.c
parent30d15f06f1df7487f207c55cacbc1ea43eb39559 (diff)
downloadFreeBSD-src-0aa4473504e30b8c42fde93c3e832d615620f0c0.zip
FreeBSD-src-0aa4473504e30b8c42fde93c3e832d615620f0c0.tar.gz
Modernize prototypes (ie: no extern)
Make lots of stuff static.
Diffstat (limited to 'sbin/routed/if.c')
-rw-r--r--sbin/routed/if.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/sbin/routed/if.c b/sbin/routed/if.c
index 69ca3cb..9b05457 100644
--- a/sbin/routed/if.c
+++ b/sbin/routed/if.c
@@ -51,11 +51,11 @@ struct ifhead remote_if = LIST_HEAD_INITIALIZER(ifnet); /* remote interfaces */
*/
#define AHASH_LEN 211 /* must be prime */
#define AHASH(a) &ahash_tbl[(a)%AHASH_LEN]
-struct interface *ahash_tbl[AHASH_LEN];
+static struct interface *ahash_tbl[AHASH_LEN];
#define BHASH_LEN 211 /* must be prime */
#define BHASH(a) &bhash_tbl[(a)%BHASH_LEN]
-struct interface *bhash_tbl[BHASH_LEN];
+static struct interface *bhash_tbl[BHASH_LEN];
/* hash for physical interface names.
@@ -63,13 +63,13 @@ struct interface *bhash_tbl[BHASH_LEN];
* aliases are put on the end of the hash chains.
*/
#define NHASH_LEN 97
-struct interface *nhash_tbl[NHASH_LEN];
+static struct interface *nhash_tbl[NHASH_LEN];
int tot_interfaces; /* # of remote and local interfaces */
int rip_interfaces; /* # of interfaces doing RIP */
-int foundloopback; /* valid flag for loopaddr */
+static int foundloopback; /* valid flag for loopaddr */
naddr loopaddr; /* our address on loopback */
-struct rt_spare loop_rts;
+static struct rt_spare loop_rts;
struct timeval ifinit_timer;
static struct timeval last_ifinit;
@@ -78,9 +78,12 @@ static struct timeval last_ifinit;
&& timercmp(&ifinit_timer, &now, >))
int have_ripv1_out; /* have a RIPv1 interface */
-int have_ripv1_in;
+static int have_ripv1_in;
+static void if_bad(struct interface *);
+static int addrouteforif(struct interface *);
+
static struct interface**
nhash(char *p)
{
@@ -173,7 +176,7 @@ ifwithaddr(naddr addr,
/* find the interface with a name
*/
-struct interface *
+static struct interface *
ifwithname(char *name, /* "ec0" or whatever */
naddr addr) /* 0 or network address */
{
@@ -535,7 +538,7 @@ if_sick(struct interface *ifp)
/* Mark an interface dead.
*/
-void
+static void
if_bad(struct interface *ifp)
{
struct interface *ifp1;
@@ -1309,7 +1312,7 @@ check_net_syn(struct interface *ifp)
* Create route to other end if a point-to-point link,
* otherwise a route to this (sub)network.
*/
-int /* 0=bad interface */
+static int /* 0=bad interface */
addrouteforif(struct interface *ifp)
{
struct rt_entry *rt;
OpenPOWER on IntegriCloud