diff options
author | paul <paul> | 2005-06-28 12:44:16 +0000 |
---|---|---|
committer | paul <paul> | 2005-06-28 12:44:16 +0000 |
commit | 94f2b3923e9663d0355a829f22e4e31cf68ee7b8 (patch) | |
tree | 59c0291a76b1c97fbb089abb479307f19cdfd4c1 /bgpd/bgp_nexthop.c | |
parent | 7cad40007b9714dba65065916ea68577f9d3d6dd (diff) | |
download | quagga-94f2b3923e9663d0355a829f22e4e31cf68ee7b8.tar.bz2 quagga-94f2b3923e9663d0355a829f22e4e31cf68ee7b8.tar.xz |
2005-06-28 Paul Jakma <paul.jakma@sun.com>
* (global) The great bgpd extern and static'ification.
* bgp_routemap.c: remove unused ROUTE_MATCH_ASPATH_OLD code
(route_set_metric_compile) fix u_int32_t to ULONG_MAX comparison
warnings.
* bgp_route.h: (bgp_process, bgp_withdraw, bgp_update) export these
used by various files which had their own private declarations,
in the case of mplsvpn - incorrect.
Diffstat (limited to 'bgpd/bgp_nexthop.c')
-rw-r--r-- | bgpd/bgp_nexthop.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 20434e11..1f6fef87 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -66,12 +66,9 @@ static struct bgp_table *bgp_connected_table[AFI_MAX]; /* BGP nexthop lookup query client. */ static struct zclient *zlookup = NULL; - -/* BGP process function. */ -int bgp_process (struct bgp *, struct bgp_node *, afi_t, safi_t); /* Add nexthop to the end of the list. */ -void +static void bnc_nexthop_add (struct bgp_nexthop_cache *bnc, struct nexthop *nexthop) { struct nexthop *last; @@ -85,7 +82,7 @@ bnc_nexthop_add (struct bgp_nexthop_cache *bnc, struct nexthop *nexthop) nexthop->prev = last; } -void +static void bnc_nexthop_free (struct bgp_nexthop_cache *bnc) { struct nexthop *nexthop; @@ -98,7 +95,7 @@ bnc_nexthop_free (struct bgp_nexthop_cache *bnc) } } -struct bgp_nexthop_cache * +static struct bgp_nexthop_cache * bnc_new () { struct bgp_nexthop_cache *new; @@ -108,14 +105,14 @@ bnc_new () return new; } -void +static void bnc_free (struct bgp_nexthop_cache *bnc) { bnc_nexthop_free (bnc); XFREE (MTYPE_BGP_NEXTHOP_CACHE, bnc); } -int +static int bgp_nexthop_same (struct nexthop *next1, struct nexthop *next2) { if (next1->type != next2->type) @@ -152,7 +149,7 @@ bgp_nexthop_same (struct nexthop *next1, struct nexthop *next2) return 1; } -int +static int bgp_nexthop_cache_changed (struct bgp_nexthop_cache *bnc1, struct bgp_nexthop_cache *bnc2) { @@ -221,7 +218,7 @@ bgp_nexthop_check_ebgp (afi_t afi, struct attr *attr) #ifdef HAVE_IPV6 /* Check specified next-hop is reachable or not. */ -int +static int bgp_nexthop_lookup_ipv6 (struct peer *peer, struct bgp_info *ri, int *changed, int *metricchanged) { @@ -396,7 +393,7 @@ bgp_nexthop_lookup (afi_t afi, struct peer *peer, struct bgp_info *ri, } /* Reset and free all BGP nexthop cache. */ -void +static void bgp_nexthop_cache_reset (struct bgp_table *table) { struct bgp_node *rn; @@ -411,7 +408,7 @@ bgp_nexthop_cache_reset (struct bgp_table *table) } } -void +static void bgp_scan (afi_t afi, safi_t safi) { struct bgp_node *rn; @@ -518,7 +515,7 @@ bgp_scan (afi_t afi, safi_t safi) } /* BGP scan thread. This thread check nexthop reachability. */ -int +static int bgp_scan_timer (struct thread *t) { bgp_scan_thread = @@ -737,7 +734,7 @@ bgp_nexthop_self (afi_t afi, struct attr *attr) return 0; } -struct bgp_nexthop_cache * +static struct bgp_nexthop_cache * zlookup_read () { struct stream *s; @@ -833,7 +830,7 @@ zlookup_query (struct in_addr addr) } #ifdef HAVE_IPV6 -struct bgp_nexthop_cache * +static struct bgp_nexthop_cache * zlookup_read_ipv6 () { struct stream *s; @@ -936,8 +933,9 @@ zlookup_query_ipv6 (struct in6_addr *addr) } #endif /* HAVE_IPV6 */ -int -bgp_import_check (struct prefix *p, u_int32_t *igpmetric, struct in_addr *igpnexthop) +static int +bgp_import_check (struct prefix *p, u_int32_t *igpmetric, + struct in_addr *igpnexthop) { struct stream *s; int ret; @@ -1024,7 +1022,7 @@ bgp_import_check (struct prefix *p, u_int32_t *igpmetric, struct in_addr *igpnex /* Scan all configured BGP route then check the route exists in IGP or not. */ -int +static int bgp_import (struct thread *t) { struct bgp *bgp; @@ -1089,7 +1087,7 @@ bgp_import (struct thread *t) } /* Connect to zebra for nexthop lookup. */ -int +static int zlookup_connect (struct thread *t) { struct zclient *zlookup; |