mib2.c File Reference


Functions

void ocstrncpy (u8_t *dst, u8_t *src, u8_t n)
void objectidncpy (s32_t *dst, s32_t *src, u8_t n)
void snmp_set_sysdesr (u8_t *str, u8_t *len)
void snmp_set_sysobjid (struct snmp_obj_id *oid)
void snmp_inc_sysuptime (void)
void snmp_set_syscontact (u8_t *ocstr, u8_t *ocstrlen)
void snmp_set_sysname (u8_t *ocstr, u8_t *ocstrlen)
void snmp_set_syslocation (u8_t *ocstr, u8_t *ocstrlen)
void snmp_insert_arpidx_tree (struct netif *ni, struct ip_addr *ip)
void snmp_delete_arpidx_tree (struct netif *ni, struct ip_addr *ip)
void snmp_insert_ipaddridx_tree (struct netif *ni)
void snmp_delete_ipaddridx_tree (struct netif *ni)
void snmp_insert_iprteidx_tree (u8_t dflt, struct netif *ni)
void snmp_delete_iprteidx_tree (u8_t dflt, struct netif *ni)
void snmp_insert_udpidx_tree (struct udp_pcb *pcb)
void snmp_delete_udpidx_tree (struct udp_pcb *pcb)
void noleafs_get_object_def (u8_t ident_len, s32_t *ident, struct obj_def *od)

Variables

struct mib_list_rootnode udp_root
struct mib_list_rootnode tcpconntree_root
struct mib_list_rootnode ipntomtree_root
struct mib_list_rootnode iprtetree_root
struct mib_list_rootnode ipaddrtree_root
struct mib_list_rootnode arptree_root
struct mib_list_rootnode iflist_root
struct mib_array_node internet

Detailed Description

Management Information Base II (RFC1213) objects and functions.

Note:
the object identifiers for this MIB-2 and private MIB tree must be kept in sorted ascending order. This to ensure correct getnext operation.

Function Documentation

void noleafs_get_object_def ( u8_t  ident_len,
s32_t *  ident,
struct obj_def od 
)

dummy function pointers for non-leaf MIB nodes from mib2.c

void objectidncpy ( s32_t *  dst,
s32_t *  src,
u8_t  n 
)

Copy object identifier (s32_t) array.

Parameters:
dst points to destination
src points to source
n number of sub identifiers to copy.

void ocstrncpy ( u8_t *  dst,
u8_t *  src,
u8_t  n 
)

Copy octet string.

Parameters:
dst points to destination
src points to source
n number of octets to copy.

void snmp_delete_arpidx_tree ( struct netif ni,
struct ip_addr *  ip 
)

Removes ARP table indexes (.xIfIndex.xNetAddress) from arp table index trees.

void snmp_delete_ipaddridx_tree ( struct netif ni  ) 

Removes ipAddrTable indexes (.ipAdEntAddr) from index tree.

void snmp_delete_iprteidx_tree ( u8_t  dflt,
struct netif ni 
)

Removes ipRouteTable indexes (.ipRouteDest) from index tree.

Parameters:
dflt non-zero for the default rte, zero for network rte
ni points to network interface for this rte or NULL for default route to be removed.

void snmp_delete_udpidx_tree ( struct udp_pcb *  pcb  ) 

Removes udpTable indexes (.udpLocalAddress.udpLocalPort) from index tree.

void snmp_inc_sysuptime ( void   ) 

Must be called at regular 10 msec interval from a timer interrupt or signal handler depending on your runtime environment.

void snmp_insert_arpidx_tree ( struct netif ni,
struct ip_addr *  ip 
)

Inserts ARP table indexes (.xIfIndex.xNetAddress) into arp table index trees (both atTable and ipNetToMediaTable).

void snmp_insert_ipaddridx_tree ( struct netif ni  ) 

Inserts ipAddrTable indexes (.ipAdEntAddr) into index tree.

void snmp_insert_iprteidx_tree ( u8_t  dflt,
struct netif ni 
)

Inserts ipRouteTable indexes (.ipRouteDest) into index tree.

Parameters:
dflt non-zero for the default rte, zero for network rte
ni points to network interface for this rte
Todo:
record sysuptime for _this_ route when it is installed (needed for ipRouteAge) in the netif.

void snmp_insert_udpidx_tree ( struct udp_pcb *  pcb  ) 

Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) into index tree.

void snmp_set_syscontact ( u8_t *  ocstr,
u8_t *  ocstrlen 
)

Initializes sysContact pointers, e.g. ptrs to non-volatile memory external to lwIP.

Parameters:
ocstr if non-NULL then copy str pointer
ocstrlen points to string length, excluding zero terminator

void snmp_set_sysdesr ( u8_t *  str,
u8_t *  len 
)

Initializes sysDescr pointers.

Parameters:
str if non-NULL then copy str pointer
len points to string length, excluding zero terminator

void snmp_set_syslocation ( u8_t *  ocstr,
u8_t *  ocstrlen 
)

Initializes sysLocation pointers, e.g. ptrs to non-volatile memory external to lwIP.

Parameters:
ocstr if non-NULL then copy str pointer
ocstrlen points to string length, excluding zero terminator

void snmp_set_sysname ( u8_t *  ocstr,
u8_t *  ocstrlen 
)

Initializes sysName pointers, e.g. ptrs to non-volatile memory external to lwIP.

Parameters:
ocstr if non-NULL then copy str pointer
ocstrlen points to string length, excluding zero terminator

void snmp_set_sysobjid ( struct snmp_obj_id oid  ) 

Initializes sysObjectID value.

Parameters:
oid points to stuct snmp_obj_id to copy


Variable Documentation

struct mib_list_rootnode arptree_root

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for atTable

struct mib_list_rootnode iflist_root

Initial value:

 {
  &ifentry_get_object_def,
  &ifentry_get_value,
#if SNMP_SAFE_REQUESTS
  &noleafs_set_test,
  &noleafs_set_value,
#else 
  &ifentry_set_test,
  &ifentry_set_value,
#endif 
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for ifTable

struct mib_array_node internet [read]

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_AR,
  2,
  internet_ids,
  internet_nodes
}
export MIB tree from mib2.c

struct mib_list_rootnode ipaddrtree_root

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for ipAddrTable

struct mib_list_rootnode ipntomtree_root

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for ipNetToMediaTable

struct mib_list_rootnode iprtetree_root

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for ipRouteTable

struct mib_list_rootnode tcpconntree_root

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for tcpConnTable

struct mib_list_rootnode udp_root

Initial value:

 {
  &noleafs_get_object_def,
  &noleafs_get_value,
  &noleafs_set_test,
  &noleafs_set_value,
  MIB_NODE_LR,
  0,
  NULL,
  NULL,
  0
}
index root node for udpTable


Generated on Sun Mar 23 19:22:46 2008 for lwIP 1.3.0 by  doxygen 1.5.4