A version of LWIP, provided for backwards compatibility.

Dependents:   AA_DemoBoard DemoBoard HelloServerDemo DemoBoard_RangeIndicator ... more

Embed: (wiki syntax)

« Back to documentation index

snmp_structs.h File Reference

snmp_structs.h File Reference

Generic MIB tree structures. More...

Go to the source code of this file.

Data Structures

struct  obj_def
 object definition returned by (get_object_def)() More...
struct  mib_node
 node "base class" layout, the mandatory fields for a node More...
struct  mib_array_node
 derived node, points to a fixed size const array of sub-identifiers plus a 'child' pointer More...
struct  mib_ram_array_node
 derived node, points to a fixed size mem_malloced array of sub-identifiers plus a 'child' pointer More...
struct  mib_list_rootnode
 derived node, points to a doubly linked list of sub-identifiers plus a 'child' pointer More...
struct  mib_external_node
 derived node, has access functions for mib object in external memory or device using 'tree_level' and 'idx', with a range 0 . More...

Typedefs

typedef struct mib_node mib_scalar_node
 derived node for scalars .0 index

Functions

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 snmp_oidtoip (s32_t *ident, struct ip_addr *ip)
 Conversion from oid to lwIP ip_addr.
void snmp_iptooid (struct ip_addr *ip, s32_t *ident)
 Conversion from lwIP ip_addr to oid.
void snmp_ifindextonetif (s32_t ifindex, struct netif **netif)
 Conversion from ifIndex to lwIP netif.
void snmp_netiftoifindex (struct netif *netif, s32_t *ifidx)
 Conversion from lwIP netif to ifIndex.
s8_t snmp_mib_node_insert (struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **insn)
 Inserts node in idx list in a sorted (ascending order) fashion and allocates the node if needed.
s8_t snmp_mib_node_find (struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **fn)
 Finds node in idx list and returns deletion mark.
struct mib_list_rootnodesnmp_mib_node_delete (struct mib_list_rootnode *rn, struct mib_list_node *n)
 Removes node from idx list if it has a single child left.
struct mib_nodesnmp_search_tree (struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np)
 Searches tree for the supplied (scalar?) object identifier.
struct mib_nodesnmp_expand_tree (struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret)
 Tree expansion.
u8_t snmp_iso_prefix_tst (u8_t ident_len, s32_t *ident)
 Test object identifier for the iso.org.dod.internet prefix.
u8_t snmp_iso_prefix_expand (u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret)
 Expands object identifier to the iso.org.dod.internet prefix for use in getnext operation.

Variables

struct mib_array_node internet
 export MIB tree from mib2.c

Detailed Description

Generic MIB tree structures.

Definition in file tag/0.2/lwIP/include/lwip/snmp_structs.h.


Typedef Documentation

typedef struct mib_node mib_scalar_node

derived node for scalars .0 index

Definition at line 118 of file tag/0.2/lwIP/include/lwip/snmp_structs.h.


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

Definition at line 2078 of file tag/0.2/lwIP/core/snmp/mib2.c.

struct mib_node* snmp_expand_tree ( struct mib_node node,
u8_t  ident_len,
s32_t *  ident,
struct snmp_obj_id oidret 
) [read]

Tree expansion.

Definition at line 694 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

void snmp_ifindextonetif ( s32_t  ifindex,
struct netif **  netif 
)

Conversion from ifIndex to lwIP netif.

Parameters:
ifindexis a s32_t object sub-identifier
netifpoints to returned netif struct pointer

Definition at line 94 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

void snmp_iptooid ( struct ip_addr *  ip,
s32_t *  ident 
)

Conversion from lwIP ip_addr to oid.

Parameters:
ippoints to input struct
identpoints to s32_t ident[4] output

Definition at line 155 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

u8_t snmp_iso_prefix_expand ( u8_t  ident_len,
s32_t *  ident,
struct snmp_obj_id oidret 
)

Expands object identifier to the iso.org.dod.internet prefix for use in getnext operation.

Parameters:
ident_lenthe length of the supplied object identifier
identpoints to the array of sub identifiers
oidretpoints to returned expanded object identifier
Returns:
1 if it matches, 0 otherwise
Note:
ident_len 0 is allowed, expanding to the first known object id!!

Definition at line 1149 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

u8_t snmp_iso_prefix_tst ( u8_t  ident_len,
s32_t *  ident 
)

Test object identifier for the iso.org.dod.internet prefix.

Parameters:
ident_lenthe length of the supplied object identifier
identpoints to the array of sub identifiers
Returns:
1 if it matches, 0 otherwise

Definition at line 1123 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

struct mib_list_rootnode* snmp_mib_node_delete ( struct mib_list_rootnode rn,
struct mib_list_node *  n 
) [read]

Removes node from idx list if it has a single child left.

Parameters:
rnpoints to the root node
npoints to the node to delete
Returns:
the nptr to be freed by caller

Definition at line 406 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

s8_t snmp_mib_node_find ( struct mib_list_rootnode rn,
s32_t  objid,
struct mib_list_node **  fn 
)

Finds node in idx list and returns deletion mark.

Parameters:
rnpoints to the root node
objidis the object sub identifier
fnreturns pointer to found node
Returns:
0 if not found, 1 if deletable, 2 can't delete (2 or more children), 3 not a list_node

Definition at line 349 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

s8_t snmp_mib_node_insert ( struct mib_list_rootnode rn,
s32_t  objid,
struct mib_list_node **  insn 
)

Inserts node in idx list in a sorted (ascending order) fashion and allocates the node if needed.

Parameters:
rnpoints to the root node
objidis the object sub identifier
insnpoints to a pointer to the inserted node used for constructing the tree.
Returns:
-1 if failed, 1 if inserted, 2 if present.

Definition at line 227 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

void snmp_netiftoifindex ( struct netif netif,
s32_t *  ifidx 
)

Conversion from lwIP netif to ifIndex.

Parameters:
netifpoints to a netif struct
ifidxpoints to s32_t object sub-identifier

Definition at line 115 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

void snmp_oidtoip ( s32_t *  ident,
struct ip_addr *  ip 
)

Conversion from oid to lwIP ip_addr.

Parameters:
identpoints to s32_t ident[4] input
ippoints to output struct

Definition at line 135 of file tag/0.2/lwIP/core/snmp/mib_structs.c.

struct mib_node* snmp_search_tree ( struct mib_node node,
u8_t  ident_len,
s32_t *  ident,
struct snmp_name_ptr *  np 
) [read]

Searches tree for the supplied (scalar?) object identifier.

Parameters:
nodepoints to the root of the tree ('.internet')
ident_lenthe length of the supplied object identifier
identpoints to the array of sub identifiers
nppoints to the found object instance (rerurn)
Returns:
pointer to the requested parent (!) node if success, NULL otherwise

Definition at line 463 of file tag/0.2/lwIP/core/snmp/mib_structs.c.


Variable Documentation

export MIB tree from mib2.c

Definition at line 736 of file tag/0.2/lwIP/core/snmp/mib2.c.