summaryrefslogtreecommitdiffstats
path: root/ripd/rip_snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/rip_snmp.c')
-rw-r--r--ripd/rip_snmp.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index 45bb2e377..917e532e0 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -88,14 +88,14 @@ static oid rip_oid[] = {RIPV2MIB};
static struct route_table *rip_ifaddr_table;
/* Hook functions. */
-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 **);
+static uint8_t *rip2Globals(struct variable *, oid[], size_t *, int, size_t *,
+ WriteMethod **);
+static uint8_t *rip2IfStatEntry(struct variable *, oid[], size_t *, int,
+ size_t *, WriteMethod **);
+static uint8_t *rip2IfConfAddress(struct variable *, oid[], size_t *, int,
+ size_t *, WriteMethod **);
+static uint8_t *rip2PeerTable(struct variable *, oid[], size_t *, int, size_t *,
+ WriteMethod **);
static struct variable rip_variables[] = {
/* RIP Global Counters. */
@@ -152,9 +152,9 @@ static struct variable rip_variables[] = {
extern struct thread_master *master;
-static u_char *rip2Globals(struct variable *v, oid name[], size_t *length,
- int exact, size_t *var_len,
- WriteMethod **write_method)
+static uint8_t *rip2Globals(struct variable *v, oid name[], size_t *length,
+ int exact, size_t *var_len,
+ WriteMethod **write_method)
{
if (smux_header_generic(v, name, length, exact, var_len, write_method)
== MATCH_FAILED)
@@ -336,9 +336,9 @@ static struct rip_peer *rip2PeerLookup(struct variable *v, oid name[],
return NULL;
}
-static u_char *rip2IfStatEntry(struct variable *v, oid name[], size_t *length,
- int exact, size_t *var_len,
- WriteMethod **write_method)
+static uint8_t *rip2IfStatEntry(struct variable *v, oid name[], size_t *length,
+ int exact, size_t *var_len,
+ WriteMethod **write_method)
{
struct interface *ifp;
struct rip_interface *ri;
@@ -365,20 +365,20 @@ static u_char *rip2IfStatEntry(struct variable *v, oid name[], size_t *length,
break;
case RIP2IFSTATRCVBADPACKETS:
*var_len = sizeof(long);
- return (u_char *)&ri->recv_badpackets;
+ return (uint8_t *)&ri->recv_badpackets;
case RIP2IFSTATRCVBADROUTES:
*var_len = sizeof(long);
- return (u_char *)&ri->recv_badroutes;
+ return (uint8_t *)&ri->recv_badroutes;
case RIP2IFSTATSENTUPDATES:
*var_len = sizeof(long);
- return (u_char *)&ri->sent_updates;
+ return (uint8_t *)&ri->sent_updates;
case RIP2IFSTATSTATUS:
*var_len = sizeof(long);
v->type = ASN_INTEGER;
- return (u_char *)&valid;
+ return (uint8_t *)&valid;
default:
return NULL;
@@ -435,15 +435,15 @@ static long rip2IfConfReceive(struct rip_interface *ri)
return doNotReceive;
}
-static u_char *rip2IfConfAddress(struct variable *v, oid name[], size_t *length,
- int exact, size_t *val_len,
- WriteMethod **write_method)
+static uint8_t *rip2IfConfAddress(struct variable *v, oid name[],
+ size_t *length, int exact, size_t *val_len,
+ WriteMethod **write_method)
{
static struct in_addr addr;
static long valid = SNMP_INVALID;
static long domain = 0;
static long config = 0;
- static u_int auth = 0;
+ static unsigned int auth = 0;
struct interface *ifp;
struct rip_interface *ri;
@@ -464,43 +464,43 @@ static u_char *rip2IfConfAddress(struct variable *v, oid name[], size_t *length,
switch (v->magic) {
case RIP2IFCONFADDRESS:
*val_len = sizeof(struct in_addr);
- return (u_char *)&addr;
+ return (uint8_t *)&addr;
case RIP2IFCONFDOMAIN:
*val_len = 2;
- return (u_char *)&domain;
+ return (uint8_t *)&domain;
case RIP2IFCONFAUTHTYPE:
auth = ri->auth_type;
*val_len = sizeof(long);
v->type = ASN_INTEGER;
- return (u_char *)&auth;
+ return (uint8_t *)&auth;
case RIP2IFCONFAUTHKEY:
*val_len = 0;
- return (u_char *)&domain;
+ return (uint8_t *)&domain;
case RIP2IFCONFSEND:
config = rip2IfConfSend(ri);
*val_len = sizeof(long);
v->type = ASN_INTEGER;
- return (u_char *)&config;
+ return (uint8_t *)&config;
case RIP2IFCONFRECEIVE:
config = rip2IfConfReceive(ri);
*val_len = sizeof(long);
v->type = ASN_INTEGER;
- return (u_char *)&config;
+ return (uint8_t *)&config;
case RIP2IFCONFDEFAULTMETRIC:
*val_len = sizeof(long);
v->type = ASN_INTEGER;
- return (u_char *)&ifp->metric;
+ return (uint8_t *)&ifp->metric;
case RIP2IFCONFSTATUS:
*val_len = sizeof(long);
v->type = ASN_INTEGER;
- return (u_char *)&valid;
+ return (uint8_t *)&valid;
case RIP2IFCONFSRCADDRESS:
*val_len = sizeof(struct in_addr);
- return (u_char *)&addr;
+ return (uint8_t *)&addr;
default:
return NULL;
@@ -508,9 +508,9 @@ static u_char *rip2IfConfAddress(struct variable *v, oid name[], size_t *length,
return NULL;
}
-static u_char *rip2PeerTable(struct variable *v, oid name[], size_t *length,
- int exact, size_t *val_len,
- WriteMethod **write_method)
+static uint8_t *rip2PeerTable(struct variable *v, oid name[], size_t *length,
+ int exact, size_t *val_len,
+ WriteMethod **write_method)
{
static struct in_addr addr;
static int domain = 0;
@@ -533,11 +533,11 @@ static u_char *rip2PeerTable(struct variable *v, oid name[], size_t *length,
switch (v->magic) {
case RIP2PEERADDRESS:
*val_len = sizeof(struct in_addr);
- return (u_char *)&peer->addr;
+ return (uint8_t *)&peer->addr;
case RIP2PEERDOMAIN:
*val_len = 2;
- return (u_char *)&domain;
+ return (uint8_t *)&domain;
case RIP2PEERLASTUPDATE:
#if 0
@@ -548,23 +548,23 @@ static u_char *rip2PeerTable(struct variable *v, oid name[], size_t *length,
*/
*val_len = sizeof (time_t);
uptime = peer->uptime; /* now - snmp_agent_startup - peer->uptime */
- return (u_char *) &uptime;
+ return (uint8_t *) &uptime;
#else
- return (u_char *)NULL;
+ return (uint8_t *)NULL;
#endif
case RIP2PEERVERSION:
*val_len = sizeof(int);
version = peer->version;
- return (u_char *)&version;
+ return (uint8_t *)&version;
case RIP2PEERRCVBADPACKETS:
*val_len = sizeof(int);
- return (u_char *)&peer->recv_badpackets;
+ return (uint8_t *)&peer->recv_badpackets;
case RIP2PEERRCVBADROUTES:
*val_len = sizeof(int);
- return (u_char *)&peer->recv_badroutes;
+ return (uint8_t *)&peer->recv_badroutes;
default:
return NULL;