diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-07-28 17:23:45 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-07-28 13:27:47 +0200 |
commit | 1c6f50bf2dd960b7007eb254f068968fcdfd3149 (patch) | |
tree | 9fe8fb5c7b3b660fcc9f74f73787852474084626 | |
parent | zebra: fix include for SNMP (diff) | |
download | frr-1c6f50bf2dd960b7007eb254f068968fcdfd3149.tar.xz frr-1c6f50bf2dd960b7007eb254f068968fcdfd3149.zip |
*: snmp: add a load of "static" specifiers
Make it easier to see which bits in *_snmp.c are actually referenced
from non-SNMP parts of the code.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | bgpd/bgp_snmp.c | 8 | ||||
-rw-r--r-- | ospf6d/ospf6_snmp.c | 6 | ||||
-rw-r--r-- | ospfd/ospf_snmp.c | 18 | ||||
-rw-r--r-- | ripd/rip_snmp.c | 6 | ||||
-rw-r--r-- | zebra/zebra_snmp.c | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index 84a527b96..fc5a0eb59 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -116,8 +116,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA SNMP_LOCAL_VARIABLES /* BGP-MIB instances. */ -oid bgp_oid [] = { BGP4MIB }; -oid bgp_trap_oid [] = { BGP4MIB, 0 }; +static oid bgp_oid [] = { BGP4MIB }; +static oid bgp_trap_oid [] = { BGP4MIB, 0 }; /* IP address 0.0.0.0. */ static struct in_addr bgp_empty_addr = { .s_addr = 0 }; @@ -137,7 +137,7 @@ static u_char *bgp4PathAttrTable (struct variable *, oid [], size_t *, int, size_t *, WriteMethod **); /* static u_char *bgpTraps (); */ -struct variable bgp_variables[] = +static struct variable bgp_variables[] = { /* BGP version. */ {BGPVERSION, OCTET_STRING, RONLY, bgpVersion, @@ -831,7 +831,7 @@ bgp4PathAttrTable (struct variable *v, oid name[], size_t *length, } /* BGP Traps. */ -struct trap_object bgpTrapList[] = +static struct trap_object bgpTrapList[] = { {3, {3, 1, BGPPEERLASTERROR}}, {3, {3, 1, BGPPEERSTATE}} diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c index 7423a3733..cf1630bbc 100644 --- a/ospf6d/ospf6_snmp.c +++ b/ospf6d/ospf6_snmp.c @@ -207,8 +207,8 @@ SNMP_LOCAL_VARIABLES /* OSPFv3-MIB instances. */ -oid ospfv3_oid [] = { OSPFv3MIB }; -oid ospfv3_trap_oid [] = { OSPFv3MIB, 0 }; +static oid ospfv3_oid [] = { OSPFv3MIB }; +static oid ospfv3_trap_oid [] = { OSPFv3MIB, 0 }; /* Hook functions. */ static u_char *ospfv3GeneralGroup (struct variable *, oid *, size_t *, @@ -222,7 +222,7 @@ static u_char *ospfv3NbrEntry (struct variable *, oid *, size_t *, static u_char *ospfv3IfEntry (struct variable *, oid *, size_t *, int, size_t *, WriteMethod **); -struct variable ospfv3_variables[] = +static struct variable ospfv3_variables[] = { /* OSPF general variables */ {OSPFv3ROUTERID, UNSIGNED, RWRITE, ospfv3GeneralGroup, diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 163615337..0eaf44b4d 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -209,8 +209,8 @@ SNMP_LOCAL_VARIABLES /* OSPF-MIB instances. */ -oid ospf_oid [] = { OSPF2MIB }; -oid ospf_trap_oid [] = { OSPF2MIB, 16, 2 }; /* Not reverse mappable! */ +static oid ospf_oid [] = { OSPF2MIB }; +static oid ospf_trap_oid [] = { OSPF2MIB, 16, 2 }; /* Not reverse mappable! */ /* IP address 0.0.0.0. */ static struct in_addr ospf_empty_addr = { .s_addr = 0 }; @@ -243,7 +243,7 @@ static u_char *ospfExtLsdbEntry (struct variable *, oid *, size_t *, int, static u_char *ospfAreaAggregateEntry (struct variable *, oid *, size_t *, int, size_t *, WriteMethod **); -struct variable ospf_variables[] = +static struct variable ospf_variables[] = { /* OSPF general variables */ {OSPFROUTERID, IPADDRESS, RWRITE, ospfGeneralGroup, @@ -1408,7 +1408,7 @@ ospfHostEntry (struct variable *v, oid *name, size_t *length, int exact, return NULL; } -struct list *ospf_snmp_iflist; +static struct list *ospf_snmp_iflist; struct ospf_snmp_if { @@ -1912,7 +1912,7 @@ ospfIfMetricEntry (struct variable *v, oid *name, size_t *length, int exact, return NULL; } -struct route_table *ospf_snmp_vl_table; +static struct route_table *ospf_snmp_vl_table; void ospf_snmp_vl_add (struct ospf_vl_data *vl_data) @@ -2618,7 +2618,7 @@ ospfAreaAggregateEntry (struct variable *v, oid *name, size_t *length, #define NBRSTATECHANGE 2 #define VIRTNBRSTATECHANGE 3 -struct trap_object ospfNbrTrapList[] = +static struct trap_object ospfNbrTrapList[] = { {-2, {1, OSPFROUTERID}}, {3, {10, 1, OSPFNBRIPADDR}}, @@ -2627,7 +2627,7 @@ struct trap_object ospfNbrTrapList[] = }; -struct trap_object ospfVirtNbrTrapList[] = +static struct trap_object ospfVirtNbrTrapList[] = { {-2, {1, 1}}, {3, {11, 1, OSPFVIRTNBRAREA}}, @@ -2635,7 +2635,7 @@ struct trap_object ospfVirtNbrTrapList[] = {3, {11, 1, OSPFVIRTNBRSTATE}} }; -struct trap_object ospfIfTrapList[] = +static struct trap_object ospfIfTrapList[] = { {-2, {1, OSPFROUTERID}}, {3, {7, 1, OSPFIFIPADDRESS}}, @@ -2643,7 +2643,7 @@ struct trap_object ospfIfTrapList[] = {3, {7, 1, OSPFIFSTATE}} }; -struct trap_object ospfVirtIfTrapList[] = +static struct trap_object ospfVirtIfTrapList[] = { {-2, {1, OSPFROUTERID}}, {3, {9, 1, OSPFVIRTIFAREAID}}, diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c index 4b7d1b4c5..c28b9379c 100644 --- a/ripd/rip_snmp.c +++ b/ripd/rip_snmp.c @@ -81,10 +81,10 @@ SNMP_LOCAL_VARIABLES /* RIP-MIB instances. */ -oid rip_oid [] = { RIPV2MIB }; +static oid rip_oid [] = { RIPV2MIB }; /* Interface cache table sorted by interface's address. */ -struct route_table *rip_ifaddr_table; +static struct route_table *rip_ifaddr_table; /* Hook functions. */ static u_char *rip2Globals (struct variable *, oid [], size_t *, @@ -96,7 +96,7 @@ static u_char *rip2IfConfAddress (struct variable *, oid [], size_t *, static u_char *rip2PeerTable (struct variable *, oid [], size_t *, int, size_t *, WriteMethod **); -struct variable rip_variables[] = +static struct variable rip_variables[] = { /* RIP Global Counters. */ {RIP2GLOBALROUTECHANGES, COUNTER, RONLY, rip2Globals, diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c index 3ba9fc26a..3186ebf69 100644 --- a/zebra/zebra_snmp.c +++ b/zebra/zebra_snmp.c @@ -85,7 +85,7 @@ #define IPADDRESS ASN_IPADDRESS #define OBJECTIDENTIFIER ASN_OBJECT_ID -oid ipfw_oid [] = { IPFWMIB }; +static oid ipfw_oid [] = { IPFWMIB }; /* Hook functions. */ static u_char * ipFwNumber (struct variable *, oid [], size_t *, @@ -97,7 +97,7 @@ static u_char * ipCidrNumber (struct variable *, oid [], size_t *, static u_char * ipCidrTable (struct variable *, oid [], size_t *, int, size_t *, WriteMethod **); -struct variable zebra_variables[] = +static struct variable zebra_variables[] = { {0, GAUGE32, RONLY, ipFwNumber, 1, {1}}, {IPFORWARDDEST, IPADDRESS, RONLY, ipFwTable, 3, {2, 1, 1}}, |