From 8614fb12a086744dd48ec24276a40dc8caaf8b27 Mon Sep 17 00:00:00 2001 From: Max Laier Date: Sun, 18 Apr 2004 18:59:44 +0000 Subject: [PATCH] Make if_(un)route static in if.c as they are called from if_up/if_down only. This is also cleanup to make locking easier. Reviewed by: luigi Approved by: bms(mentor) --- sys/net/if.c | 6 ++++-- sys/net/if_var.h | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 576912931658..ba51a06941fd 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -83,7 +83,9 @@ static void if_init(void *); static void if_check(void *); static int if_findindex(struct ifnet *); static void if_qflush(struct ifqueue *); +static void if_route(struct ifnet *, int flag, int fam); static void if_slowtimo(void *); +static void if_unroute(struct ifnet *, int flag, int fam); static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static int if_rtdel(struct radix_node *, void *); static struct if_clone *if_clone_lookup(const char *, int *); @@ -1124,7 +1126,7 @@ link_rtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info) * the transition. * NOTE: must be called at splnet or eqivalent. */ -void +static void if_unroute(struct ifnet *ifp, int flag, int fam) { struct ifaddr *ifa; @@ -1143,7 +1145,7 @@ if_unroute(struct ifnet *ifp, int flag, int fam) * the transition. * NOTE: must be called at splnet or eqivalent. */ -void +static void if_route(struct ifnet *ifp, int flag, int fam) { struct ifaddr *ifa; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 989f8c5b11fe..3d3cad53eb34 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -471,9 +471,7 @@ void if_detach(struct ifnet *); void if_down(struct ifnet *); void if_initname(struct ifnet *, const char *, int); int if_printf(struct ifnet *, const char *, ...) __printflike(2, 3); -void if_route(struct ifnet *, int flag, int fam); int if_setlladdr(struct ifnet *, const u_char *, int); -void if_unroute(struct ifnet *, int flag, int fam); void if_up(struct ifnet *); /*void ifinit(void);*/ /* declared in systm.h for main() */ int ifioctl(struct socket *, u_long, caddr_t, struct thread *);