summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_snmp.c37
-rw-r--r--lib/smux.c39
-rw-r--r--ospf6d/ospf6_snmp.c9
-rw-r--r--ospfd/ospf_snmp.c98
-rw-r--r--ripd/rip_snmp.c14
-rw-r--r--zebra/zebra_snmp.c31
6 files changed, 127 insertions, 101 deletions
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index f088fbbc..1e37f266 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -43,6 +43,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "bgpd/bgp_attr.h"
#include "bgpd/bgp_route.h"
#include "bgpd/bgp_fsm.h"
+#include "bgpd/bgp_snmp.h"
/* BGP4-MIB described in RFC1657. */
#define BGP4MIB 1,3,6,1,2,1,15
@@ -128,12 +129,18 @@ oid bgp_oid [] = { BGP4MIB };
static struct in_addr bgp_empty_addr = {0};
/* Hook functions. */
-static u_char *bgpVersion ();
-static u_char *bgpLocalAs ();
-static u_char *bgpPeerTable ();
-static u_char *bgpRcvdPathAttrTable ();
-static u_char *bgpIdentifier ();
-static u_char *bgp4PathAttrTable ();
+static u_char *bgpVersion (struct variable *, oid [], size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *bgpLocalAs (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *bgpPeerTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *bgpRcvdPathAttrTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *bgpIdentifier (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *bgp4PathAttrTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
/* static u_char *bgpTraps (); */
struct variable bgp_variables[] =
@@ -277,7 +284,7 @@ bgpLocalAs (struct variable *v, oid name[], size_t *length,
return SNMP_INTEGER (bgp->as);
}
-struct peer *
+static struct peer *
peer_lookup_addr_ipv4 (struct in_addr *src)
{
struct bgp *bgp;
@@ -302,7 +309,7 @@ peer_lookup_addr_ipv4 (struct in_addr *src)
return NULL;
}
-struct peer *
+static struct peer *
bgp_peer_lookup_next (struct in_addr *src)
{
struct bgp *bgp;
@@ -335,7 +342,7 @@ bgp_peer_lookup_next (struct in_addr *src)
return NULL;
}
-struct peer *
+static struct peer *
bgpPeerTable_lookup (struct variable *v, oid name[], size_t *length,
struct in_addr *addr, int exact)
{
@@ -374,7 +381,7 @@ bgpPeerTable_lookup (struct variable *v, oid name[], size_t *length,
}
/* BGP write methods. */
-int
+static int
write_bgpPeerTable (int action, u_char *var_val,
u_char var_val_type, size_t var_val_len,
u_char *statP, oid *name, size_t length,
@@ -446,7 +453,7 @@ write_bgpPeerTable (int action, u_char *var_val,
return SNMP_ERR_NOERROR;
}
-u_char *
+static u_char *
bgpPeerTable (struct variable *v, oid name[], size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
{
@@ -586,7 +593,7 @@ bgpPeerTable (struct variable *v, oid name[], size_t *length,
return NULL;
}
-u_char *
+static u_char *
bgpIdentifier (struct variable *v, oid name[], size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
{
@@ -603,7 +610,7 @@ bgpIdentifier (struct variable *v, oid name[], size_t *length,
return SNMP_IPADDRESS (bgp->router_id);
}
-u_char *
+static u_char *
bgpRcvdPathAttrTable (struct variable *v, oid name[], size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
{
@@ -614,7 +621,7 @@ bgpRcvdPathAttrTable (struct variable *v, oid name[], size_t *length,
return NULL;
}
-struct bgp_info *
+static struct bgp_info *
bgp4PathAttrLookup (struct variable *v, oid name[], size_t *length,
struct bgp *bgp, struct prefix_ipv4 *addr, int exact)
{
@@ -751,7 +758,7 @@ bgp4PathAttrLookup (struct variable *v, oid name[], size_t *length,
return NULL;
}
-u_char *
+static u_char *
bgp4PathAttrTable (struct variable *v, oid name[], size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
{
diff --git a/lib/smux.c b/lib/smux.c
index 95d2e979..54cd3e7f 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -138,7 +138,7 @@ oid_compare (oid *o1, int o1_len, oid *o2, int o2_len)
return 0;
}
-int
+static int
oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)
{
int i;
@@ -156,7 +156,7 @@ oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)
return 0;
}
-void
+static void
smux_oid_dump (const char *prefix, oid *oid, size_t oid_len)
{
unsigned int i;
@@ -173,7 +173,7 @@ smux_oid_dump (const char *prefix, oid *oid, size_t oid_len)
zlog_debug ("%s: %s", prefix, buf);
}
-int
+static int
smux_socket ()
{
int ret;
@@ -268,7 +268,7 @@ smux_socket ()
return sock;
}
-void
+static void
smux_getresp_send (oid objid[], size_t objid_len, long reqid, long errstat,
long errindex, u_char val_type, void *arg, size_t arg_len)
{
@@ -432,7 +432,7 @@ smux_var (u_char *ptr, size_t len, oid objid[], size_t *objid_len,
ucd-snmp smux and as such suppose, that the peer receives in the message
only one variable. Fortunately, IBM seems to do the same in AIX. */
-int
+static int
smux_set (oid *reqid, size_t *reqid_len,
u_char val_type, void *val, size_t val_len, int action)
{
@@ -500,7 +500,7 @@ smux_set (oid *reqid, size_t *reqid_len,
return SNMP_ERR_NOSUCHNAME;
}
-int
+static int
smux_get (oid *reqid, size_t *reqid_len, int exact,
u_char *val_type,void **val, size_t *val_len)
{
@@ -566,7 +566,7 @@ smux_get (oid *reqid, size_t *reqid_len, int exact,
return SNMP_ERR_NOSUCHNAME;
}
-int
+static int
smux_getnext (oid *reqid, size_t *reqid_len, int exact,
u_char *val_type,void **val, size_t *val_len)
{
@@ -885,7 +885,7 @@ process_rest: /* see note below: YYY */
}
/* SMUX message read function. */
-int
+static int
smux_read (struct thread *t)
{
int sock;
@@ -1120,7 +1120,7 @@ smux_trap (oid *name, size_t namelen,
return send (smux_sock, buf, (ptr - buf), 0);
}
-int
+static int
smux_register (int sock)
{
u_char buf[BUFSIZ];
@@ -1177,7 +1177,7 @@ smux_register (int sock)
}
/* Try to connect to SNMP agent. */
-int
+static int
smux_connect (struct thread *t)
{
int ret;
@@ -1233,7 +1233,7 @@ smux_connect (struct thread *t)
}
/* Clear all SMUX related resources. */
-void
+static void
smux_stop ()
{
if (smux_read_thread)
@@ -1276,7 +1276,7 @@ smux_event (enum smux_event event, int sock)
}
}
-int
+static int
smux_str2oid (const char *str, oid *oid, size_t *oid_len)
{
int len;
@@ -1319,7 +1319,7 @@ smux_str2oid (const char *str, oid *oid, size_t *oid_len)
return 0;
}
-oid *
+static oid *
smux_oid_dup (oid *objid, size_t objid_len)
{
oid *new;
@@ -1330,7 +1330,7 @@ smux_oid_dup (oid *objid, size_t objid_len)
return new;
}
-int
+static int
smux_peer_oid (struct vty *vty, const char *oid_str, const char *passwd_str)
{
int ret;
@@ -1394,7 +1394,7 @@ smux_header_generic (struct variable *v, oid *name, size_t *length, int exact,
return MATCH_SUCCEEDED;
}
-int
+static int
smux_peer_default ()
{
if (smux_oid)
@@ -1474,7 +1474,7 @@ ALIAS (no_smux_peer,
"SMUX peering object ID\n"
"SMUX peering password\n")
-int
+static int
config_write_smux (struct vty *vty)
{
int first = 1;
@@ -1511,13 +1511,6 @@ smux_register_mib (const char *descr, struct variable *var,
listnode_add_sort(treelist, tree);
}
-void
-smux_reset ()
-{
- /* Setting configuration to default. */
- smux_peer_default ();
-}
-
/* Compare function to keep treelist sorted */
static int
smux_tree_cmp(struct subtree *tree1, struct subtree *tree2)
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 8d9842ce..3cb26d0c 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -128,9 +128,12 @@ oid ospfv3_oid [] = { OSPFv3MIB };
static struct in_addr ospf6_empty_id = {0};
/* Hook functions. */
-static u_char *ospfv3GeneralGroup ();
-static u_char *ospfv3AreaEntry ();
-static u_char *ospfv3AreaLsdbEntry ();
+static u_char *ospfv3GeneralGroup (struct variable *, oid *, size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *ospfv3AreaEntry (struct variable *, oid *, size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *ospfv3AreaLsdbEntry (struct variable *, oid *, size_t *,
+ int, size_t *, WriteMethod **);
struct variable ospfv3_variables[] =
{
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 476c4aa4..9c54860c 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -53,6 +53,7 @@
#include "ospfd/ospf_flood.h"
#include "ospfd/ospf_ism.h"
#include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_snmp.h"
/* OSPF2-MIB. */
#define OSPF2MIB 1,3,6,1,2,1,14
@@ -220,19 +221,32 @@ oid ospf_oid [] = { OSPF2MIB };
static struct in_addr ospf_empty_addr = {0};
/* Hook functions. */
-static u_char *ospfGeneralGroup ();
-static u_char *ospfAreaEntry ();
-static u_char *ospfStubAreaEntry ();
-static u_char *ospfLsdbEntry ();
-static u_char *ospfAreaRangeEntry ();
-static u_char *ospfHostEntry ();
-static u_char *ospfIfEntry ();
-static u_char *ospfIfMetricEntry ();
-static u_char *ospfVirtIfEntry ();
-static u_char *ospfNbrEntry ();
-static u_char *ospfVirtNbrEntry ();
-static u_char *ospfExtLsdbEntry ();
-static u_char *ospfAreaAggregateEntry ();
+static u_char *ospfGeneralGroup (struct variable *, oid *, size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *ospfAreaEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfStubAreaEntry (struct variable *, oid *, size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *ospfLsdbEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfAreaRangeEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfHostEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfIfEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfIfMetricEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfVirtIfEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfNbrEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfVirtNbrEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfExtLsdbEntry (struct variable *, oid *, size_t *, int,
+ size_t *, WriteMethod **);
+static u_char *ospfAreaAggregateEntry (struct variable *, oid *, size_t *,
+ int, size_t *, WriteMethod **);
struct variable ospf_variables[] =
{
@@ -495,7 +509,7 @@ struct variable ospf_variables[] =
/* The administrative status of OSPF. When OSPF is enbled on at least
one interface return 1. */
-int
+static int
ospf_admin_stat (struct ospf *ospf)
{
struct listnode *node;
@@ -612,7 +626,7 @@ ospfGeneralGroup (struct variable *v, oid *name, size_t *length,
return NULL;
}
-struct ospf_area *
+static struct ospf_area *
ospf_area_lookup_next (struct ospf *ospf, struct in_addr *area_id, int first)
{
struct ospf_area *area;
@@ -643,7 +657,7 @@ ospf_area_lookup_next (struct ospf *ospf, struct in_addr *area_id, int first)
return NULL;
}
-struct ospf_area *
+static struct ospf_area *
ospfAreaLookup (struct variable *v, oid name[], size_t *length,
struct in_addr *addr, int exact)
{
@@ -746,7 +760,7 @@ ospfAreaEntry (struct variable *v, oid *name, size_t *length, int exact,
return NULL;
}
-struct ospf_area *
+static struct ospf_area *
ospf_stub_area_lookup_next (struct in_addr *area_id, int first)
{
struct ospf_area *area;
@@ -776,7 +790,7 @@ ospf_stub_area_lookup_next (struct in_addr *area_id, int first)
return NULL;
}
-struct ospf_area *
+static struct ospf_area *
ospfStubAreaLookup (struct variable *v, oid name[], size_t *length,
struct in_addr *addr, int exact)
{
@@ -877,7 +891,7 @@ ospfStubAreaEntry (struct variable *v, oid *name, size_t *length,
return NULL;
}
-struct ospf_lsa *
+static struct ospf_lsa *
lsdb_lookup_next (struct ospf_area *area, u_char *type, int type_next,
struct in_addr *ls_id, int ls_id_next,
struct in_addr *router_id, int router_id_next)
@@ -912,7 +926,7 @@ lsdb_lookup_next (struct ospf_area *area, u_char *type, int type_next,
return NULL;
}
-struct ospf_lsa *
+static struct ospf_lsa *
ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *area_id, u_char *type,
struct in_addr *ls_id, struct in_addr *router_id, int exact)
@@ -1124,7 +1138,7 @@ ospfLsdbEntry (struct variable *v, oid *name, size_t *length, int exact,
return NULL;
}
-struct ospf_area_range *
+static struct ospf_area_range *
ospfAreaRangeLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *area_id, struct in_addr *range_net,
int exact)
@@ -1273,7 +1287,7 @@ ospfAreaRangeEntry (struct variable *v, oid *name, size_t *length, int exact,
return NULL;
}
-struct ospf_nbr_nbma *
+static struct ospf_nbr_nbma *
ospfHostLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *addr, int exact)
{
@@ -1388,13 +1402,13 @@ struct ospf_snmp_if
struct interface *ifp;
};
-struct ospf_snmp_if *
+static struct ospf_snmp_if *
ospf_snmp_if_new (void)
{
return XCALLOC (0, sizeof (struct ospf_snmp_if));
}
-void
+static void
ospf_snmp_if_free (struct ospf_snmp_if *osif)
{
XFREE (0, osif);
@@ -1484,7 +1498,7 @@ ospf_snmp_if_update (struct interface *ifp)
listnode_add_after (ospf_snmp_iflist, pn, osif);
}
-int
+static int
ospf_snmp_is_if_have_addr (struct interface *ifp)
{
struct listnode *nn;
@@ -1500,7 +1514,7 @@ ospf_snmp_is_if_have_addr (struct interface *ifp)
return 0;
}
-struct ospf_interface *
+static struct ospf_interface *
ospf_snmp_if_lookup (struct in_addr *ifaddr, unsigned int *ifindex)
{
struct listnode *node;
@@ -1524,7 +1538,7 @@ ospf_snmp_if_lookup (struct in_addr *ifaddr, unsigned int *ifindex)
return oi;
}
-struct ospf_interface *
+static struct ospf_interface *
ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
int ifaddr_next, int ifindex_next)
{
@@ -1593,7 +1607,7 @@ ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
return NULL;
}
-int
+static int
ospf_snmp_iftype (struct interface *ifp)
{
#define ospf_snmp_iftype_broadcast 1
@@ -1607,7 +1621,7 @@ ospf_snmp_iftype (struct interface *ifp)
return ospf_snmp_iftype_broadcast;
}
-struct ospf_interface *
+static struct ospf_interface *
ospfIfLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *ifaddr, unsigned int *ifindex, int exact)
{
@@ -1663,7 +1677,7 @@ ospfIfLookup (struct variable *v, oid *name, size_t *length,
static u_char *
ospfIfEntry (struct variable *v, oid *name, size_t *length, int exact,
- size_t *var_len, WriteMethod **write_method)
+ size_t *var_len, WriteMethod **write_method)
{
unsigned int ifindex;
struct in_addr ifaddr;
@@ -1767,7 +1781,7 @@ ospfIfEntry (struct variable *v, oid *name, size_t *length, int exact,
#define OSPF_SNMP_METRIC_VALUE 1
-struct ospf_interface *
+static struct ospf_interface *
ospfIfMetricLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *ifaddr, unsigned int *ifindex, int exact)
{
@@ -1913,7 +1927,7 @@ ospf_snmp_vl_delete (struct ospf_vl_data *vl_data)
route_unlock_node (rn);
}
-struct ospf_vl_data *
+static struct ospf_vl_data *
ospf_snmp_vl_lookup (struct in_addr *area_id, struct in_addr *neighbor)
{
struct prefix_ls lp;
@@ -1936,7 +1950,7 @@ ospf_snmp_vl_lookup (struct in_addr *area_id, struct in_addr *neighbor)
return NULL;
}
-struct ospf_vl_data *
+static struct ospf_vl_data *
ospf_snmp_vl_lookup_next (struct in_addr *area_id, struct in_addr *neighbor,
int first)
{
@@ -1973,7 +1987,7 @@ ospf_snmp_vl_lookup_next (struct in_addr *area_id, struct in_addr *neighbor,
return NULL;
}
-struct ospf_vl_data *
+static struct ospf_vl_data *
ospfVirtIfLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *area_id, struct in_addr *neighbor, int exact)
{
@@ -2023,7 +2037,7 @@ ospfVirtIfLookup (struct variable *v, oid *name, size_t *length,
static u_char *
ospfVirtIfEntry (struct variable *v, oid *name, size_t *length, int exact,
- size_t *var_len, WriteMethod **write_method)
+ size_t *var_len, WriteMethod **write_method)
{
struct ospf_vl_data *vl_data;
struct ospf_interface *oi;
@@ -2087,7 +2101,7 @@ ospfVirtIfEntry (struct variable *v, oid *name, size_t *length, int exact,
return NULL;
}
-struct ospf_neighbor *
+static struct ospf_neighbor *
ospf_snmp_nbr_lookup (struct ospf *ospf, struct in_addr *nbr_addr,
unsigned int *ifindex)
{
@@ -2116,7 +2130,7 @@ ospf_snmp_nbr_lookup (struct ospf *ospf, struct in_addr *nbr_addr,
return NULL;
}
-struct ospf_neighbor *
+static struct ospf_neighbor *
ospf_snmp_nbr_lookup_next (struct in_addr *nbr_addr, unsigned int *ifindex,
int first)
{
@@ -2162,7 +2176,7 @@ ospf_snmp_nbr_lookup_next (struct in_addr *nbr_addr, unsigned int *ifindex,
return NULL;
}
-struct ospf_neighbor *
+static struct ospf_neighbor *
ospfNbrLookup (struct variable *v, oid *name, size_t *length,
struct in_addr *nbr_addr, unsigned int *ifindex, int exact)
{
@@ -2256,7 +2270,7 @@ ospf_snmp_neighbor_state(u_char nst)
static u_char *
ospfNbrEntry (struct variable *v, oid *name, size_t *length, int exact,
- size_t *var_len, WriteMethod **write_method)
+ size_t *var_len, WriteMethod **write_method)
{
struct in_addr nbr_addr;
unsigned int ifindex;
@@ -2318,7 +2332,7 @@ ospfNbrEntry (struct variable *v, oid *name, size_t *length, int exact,
static u_char *
ospfVirtNbrEntry (struct variable *v, oid *name, size_t *length, int exact,
- size_t *var_len, WriteMethod **write_method)
+ size_t *var_len, WriteMethod **write_method)
{
struct ospf_vl_data *vl_data;
struct in_addr area_id;
@@ -2371,7 +2385,7 @@ ospfVirtNbrEntry (struct variable *v, oid *name, size_t *length, int exact,
return NULL;
}
-struct ospf_lsa *
+static struct ospf_lsa *
ospfExtLsdbLookup (struct variable *v, oid *name, size_t *length, u_char *type,
struct in_addr *ls_id, struct in_addr *router_id, int exact)
{
@@ -2464,7 +2478,7 @@ ospfExtLsdbLookup (struct variable *v, oid *name, size_t *length, u_char *type,
static u_char *
ospfExtLsdbEntry (struct variable *v, oid *name, size_t *length, int exact,
- size_t *var_len, WriteMethod **write_method)
+ size_t *var_len, WriteMethod **write_method)
{
struct ospf_lsa *lsa;
struct lsa_header *lsah;
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index d02c7610..61c47c71 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -93,10 +93,14 @@ oid rip_oid [] = { RIPV2MIB };
struct route_table *rip_ifaddr_table;
/* Hook functions. */
-static u_char *rip2Globals ();
-static u_char *rip2IfStatEntry ();
-static u_char *rip2IfConfAddress ();
-static u_char *rip2PeerTable ();
+static u_char *rip2Globals (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *rip2IfStatEntry (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *rip2IfConfAddress (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char *rip2PeerTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
struct variable rip_variables[] =
{
@@ -215,7 +219,7 @@ rip_ifaddr_delete (struct interface *ifp, struct connected *ifc)
}
}
-struct interface *
+static struct interface *
rip_ifaddr_lookup_next (struct in_addr *addr)
{
struct prefix_ipv4 p;
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 7e66e2f6..b7843b26 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -90,10 +90,14 @@ extern struct zebra_t zebrad;
oid ipfw_oid [] = { IPFWMIB };
/* Hook functions. */
-u_char * ipFwNumber ();
-u_char * ipFwTable ();
-u_char * ipCidrNumber ();
-u_char * ipCidrTable ();
+static u_char * ipFwNumber (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char * ipFwTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char * ipCidrNumber (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char * ipCidrTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
struct variable zebra_variables[] =
{
@@ -133,7 +137,7 @@ struct variable zebra_variables[] =
};
-u_char *
+static u_char *
ipFwNumber (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
@@ -158,7 +162,7 @@ ipFwNumber (struct variable *v, oid objid[], size_t *objid_len,
return (u_char *)&result;
}
-u_char *
+static u_char *
ipCidrNumber (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
@@ -183,7 +187,7 @@ ipCidrNumber (struct variable *v, oid objid[], size_t *objid_len,
return (u_char *)&result;
}
-int
+static int
in_addr_cmp(u_char *p1, u_char *p2)
{
int i;
@@ -199,7 +203,7 @@ in_addr_cmp(u_char *p1, u_char *p2)
return 0;
}
-int
+static int
in_addr_add(u_char *p, int num)
{
int i, ip0;
@@ -224,7 +228,8 @@ in_addr_add(u_char *p, int num)
return 1;
}
-int proto_trans(int type)
+static int
+proto_trans(int type)
{
switch (type)
{
@@ -251,7 +256,7 @@ int proto_trans(int type)
}
}
-void
+static void
check_replace(struct route_node *np2, struct rib *rib2,
struct route_node **np, struct rib **rib)
{
@@ -294,7 +299,7 @@ check_replace(struct route_node *np2, struct rib *rib2,
return;
}
-void
+static void
get_fwtable_route_node(struct variable *v, oid objid[], size_t *objid_len,
int exact, struct route_node **np, struct rib **rib)
{
@@ -441,7 +446,7 @@ get_fwtable_route_node(struct variable *v, oid objid[], size_t *objid_len,
return;
}
-u_char *
+static u_char *
ipFwTable (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
@@ -546,7 +551,7 @@ ipFwTable (struct variable *v, oid objid[], size_t *objid_len,
return NULL;
}
-u_char *
+static u_char *
ipCidrTable (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{