diff options
Diffstat (limited to 'ospfd/ospf_snmp.c')
-rw-r--r-- | ospfd/ospf_snmp.c | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 28826254e..7464b14b1 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -220,32 +220,32 @@ static oid ospf_trap_oid[] = {OSPF2MIB, 16, 2}; /* Not reverse mappable! */ static struct in_addr ospf_empty_addr = {.s_addr = 0}; /* Hook functions. */ -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, +static uint8_t *ospfGeneralGroup(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, +static uint8_t *ospfAreaEntry(struct variable *, oid *, size_t *, int, size_t *, + WriteMethod **); +static uint8_t *ospfStubAreaEntry(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 *, +static uint8_t *ospfLsdbEntry(struct variable *, oid *, size_t *, int, size_t *, + WriteMethod **); +static uint8_t *ospfAreaRangeEntry(struct variable *, oid *, size_t *, int, + size_t *, WriteMethod **); +static uint8_t *ospfHostEntry(struct variable *, oid *, size_t *, int, size_t *, + WriteMethod **); +static uint8_t *ospfIfEntry(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, +static uint8_t *ospfIfMetricEntry(struct variable *, oid *, size_t *, int, + size_t *, WriteMethod **); +static uint8_t *ospfVirtIfEntry(struct variable *, oid *, size_t *, int, size_t *, WriteMethod **); -static u_char *ospfAreaAggregateEntry(struct variable *, oid *, size_t *, int, - size_t *, WriteMethod **); +static uint8_t *ospfNbrEntry(struct variable *, oid *, size_t *, int, size_t *, + WriteMethod **); +static uint8_t *ospfVirtNbrEntry(struct variable *, oid *, size_t *, int, + size_t *, WriteMethod **); +static uint8_t *ospfExtLsdbEntry(struct variable *, oid *, size_t *, int, + size_t *, WriteMethod **); +static uint8_t *ospfAreaAggregateEntry(struct variable *, oid *, size_t *, int, + size_t *, WriteMethod **); static struct variable ospf_variables[] = { /* OSPF general variables */ @@ -526,9 +526,9 @@ static int ospf_admin_stat(struct ospf *ospf) return 0; } -static u_char *ospfGeneralGroup(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfGeneralGroup(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf *ospf; @@ -695,9 +695,9 @@ static struct ospf_area *ospfAreaLookup(struct variable *v, oid name[], return NULL; } -static u_char *ospfAreaEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfAreaEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_area *area; struct in_addr addr; @@ -834,9 +834,9 @@ static struct ospf_area *ospfStubAreaLookup(struct variable *v, oid name[], return NULL; } -static u_char *ospfStubAreaEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfStubAreaEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_area *area; struct in_addr addr; @@ -883,7 +883,7 @@ static u_char *ospfStubAreaEntry(struct variable *v, oid *name, size_t *length, return NULL; } -static struct ospf_lsa *lsdb_lookup_next(struct ospf_area *area, u_char *type, +static struct ospf_lsa *lsdb_lookup_next(struct ospf_area *area, uint8_t *type, int type_next, struct in_addr *ls_id, int ls_id_next, struct in_addr *router_id, @@ -919,7 +919,7 @@ static struct ospf_lsa *lsdb_lookup_next(struct ospf_area *area, u_char *type, 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, + uint8_t *type, struct in_addr *ls_id, struct in_addr *router_id, int exact) { struct ospf *ospf; @@ -1057,14 +1057,14 @@ static struct ospf_lsa *ospfLsdbLookup(struct variable *v, oid *name, return NULL; } -static u_char *ospfLsdbEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfLsdbEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_lsa *lsa; struct lsa_header *lsah; struct in_addr area_id; - u_char type; + uint8_t type; struct in_addr ls_id; struct in_addr router_id; struct ospf *ospf; @@ -1118,7 +1118,7 @@ static u_char *ospfLsdbEntry(struct variable *v, oid *name, size_t *length, break; case OSPFLSDBADVERTISEMENT: /* 8 */ *var_len = ntohs(lsah->length); - return (u_char *)lsah; + return (uint8_t *)lsah; break; default: return NULL; @@ -1222,9 +1222,9 @@ static struct ospf_area_range *ospfAreaRangeLookup(struct variable *v, return NULL; } -static u_char *ospfAreaRangeEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfAreaRangeEntry(struct variable *v, oid *name, + size_t *length, int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_area_range *range; struct in_addr area_id; @@ -1329,9 +1329,9 @@ static struct ospf_nbr_nbma *ospfHostLookup(struct variable *v, oid *name, return NULL; } -static u_char *ospfHostEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfHostEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_nbr_nbma *nbr_nbma; struct ospf_interface *oi; @@ -1654,9 +1654,9 @@ static struct ospf_interface *ospfIfLookup(struct variable *v, oid *name, return NULL; } -static u_char *ospfIfEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfIfEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { ifindex_t ifindex; struct in_addr ifaddr; @@ -1734,7 +1734,7 @@ static u_char *ospfIfEntry(struct variable *v, oid *name, size_t *length, break; case OSPFIFAUTHKEY: /* 16 */ *var_len = 0; - return (u_char *)OSPF_IF_PARAM(oi, auth_simple); + return (uint8_t *)OSPF_IF_PARAM(oi, auth_simple); break; case OSPFIFSTATUS: /* 17 */ return SNMP_INTEGER(SNMP_VALID); @@ -1821,9 +1821,9 @@ static struct ospf_interface *ospfIfMetricLookup(struct variable *v, oid *name, return NULL; } -static u_char *ospfIfMetricEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfIfMetricEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { /* Currently we support metric 1 only. */ ifindex_t ifindex; @@ -2014,9 +2014,9 @@ ospfVirtIfLookup(struct variable *v, oid *name, size_t *length, return NULL; } -static u_char *ospfVirtIfEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfVirtIfEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_vl_data *vl_data; struct ospf_interface *oi; @@ -2065,7 +2065,7 @@ static u_char *ospfVirtIfEntry(struct variable *v, oid *name, size_t *length, break; case OSPFVIRTIFAUTHKEY: *var_len = 0; - return (u_char *)OSPF_IF_PARAM(oi, auth_simple); + return (uint8_t *)OSPF_IF_PARAM(oi, auth_simple); break; case OSPFVIRTIFSTATUS: return SNMP_INTEGER(SNMP_VALID); @@ -2215,7 +2215,7 @@ ospfNbrState OBJECT-TYPE full (8) } */ -static int32_t ospf_snmp_neighbor_state(u_char nst) +static int32_t ospf_snmp_neighbor_state(uint8_t nst) { switch (nst) { case NSM_Attempt: @@ -2237,9 +2237,9 @@ static int32_t 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) +static uint8_t *ospfNbrEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct in_addr nbr_addr; ifindex_t ifindex; @@ -2302,9 +2302,9 @@ static u_char *ospfNbrEntry(struct variable *v, oid *name, size_t *length, return NULL; } -static u_char *ospfVirtNbrEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfVirtNbrEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_vl_data *vl_data; struct in_addr area_id; @@ -2330,28 +2330,28 @@ static u_char *ospfVirtNbrEntry(struct variable *v, oid *name, size_t *length, /* Return the current value of the variable */ switch (v->magic) { case OSPFVIRTNBRAREA: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBRRTRID: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBRIPADDR: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBROPTIONS: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBRSTATE: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBREVENTS: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBRLSRETRANSQLEN: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFVIRTNBRHELLOSUPPRESSED: - return (u_char *)NULL; + return (uint8_t *)NULL; break; default: return NULL; @@ -2361,14 +2361,14 @@ static u_char *ospfVirtNbrEntry(struct variable *v, oid *name, size_t *length, } static struct ospf_lsa *ospfExtLsdbLookup(struct variable *v, oid *name, - size_t *length, u_char *type, + size_t *length, uint8_t *type, struct in_addr *ls_id, struct in_addr *router_id, int exact) { int first; oid *offset; int offsetlen; - u_char lsa_type; + uint8_t lsa_type; unsigned int len; struct ospf_lsa *lsa; struct ospf *ospf; @@ -2450,13 +2450,13 @@ static struct ospf_lsa *ospfExtLsdbLookup(struct variable *v, oid *name, return NULL; } -static u_char *ospfExtLsdbEntry(struct variable *v, oid *name, size_t *length, - int exact, size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfExtLsdbEntry(struct variable *v, oid *name, size_t *length, + int exact, size_t *var_len, + WriteMethod **write_method) { struct ospf_lsa *lsa; struct lsa_header *lsah; - u_char type; + uint8_t type; struct in_addr ls_id; struct in_addr router_id; struct ospf *ospf; @@ -2503,7 +2503,7 @@ static u_char *ospfExtLsdbEntry(struct variable *v, oid *name, size_t *length, break; case OSPFEXTLSDBADVERTISEMENT: *var_len = ntohs(lsah->length); - return (u_char *)lsah; + return (uint8_t *)lsah; break; default: return NULL; @@ -2512,10 +2512,10 @@ static u_char *ospfExtLsdbEntry(struct variable *v, oid *name, size_t *length, return NULL; } -static u_char *ospfAreaAggregateEntry(struct variable *v, oid *name, - size_t *length, int exact, - size_t *var_len, - WriteMethod **write_method) +static uint8_t *ospfAreaAggregateEntry(struct variable *v, oid *name, + size_t *length, int exact, + size_t *var_len, + WriteMethod **write_method) { if (smux_header_table(v, name, length, exact, var_len, write_method) == MATCH_FAILED) @@ -2524,22 +2524,22 @@ static u_char *ospfAreaAggregateEntry(struct variable *v, oid *name, /* Return the current value of the variable */ switch (v->magic) { case OSPFAREAAGGREGATEAREAID: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFAREAAGGREGATELSDBTYPE: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFAREAAGGREGATENET: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFAREAAGGREGATEMASK: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFAREAAGGREGATESTATUS: - return (u_char *)NULL; + return (uint8_t *)NULL; break; case OSPFAREAAGGREGATEEFFECT: - return (u_char *)NULL; + return (uint8_t *)NULL; break; default: return NULL; |