Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: EthernetInterface_ccx
Fork of lwip by
MIB tree access/construction functions. More...
Go to the source code of this file.
Functions | |
| static void | push_node (struct nse *node) |
| Pushes nse struct onto stack. | |
| static void | pop_node (struct nse *node) |
| Pops nse struct from stack. | |
| 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. | |
| void | snmp_oidtoip (s32_t *ident, ip_addr_t *ip) |
| Conversion from oid to lwIP ip_addr. | |
| void | snmp_iptooid (ip_addr_t *ip, s32_t *ident) |
| Conversion from lwIP ip_addr to oid. | |
| 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_rootnode * | snmp_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_node * | snmp_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. | |
| static u8_t | empty_table (struct mib_node *node) |
| Test table for presence of at least one table entry. | |
| struct mib_node * | snmp_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 | |
| const s32_t | prefix [4] = {1, 3, 6, 1} |
| .iso.org.dod.internet address prefix, | |
Detailed Description
MIB tree access/construction functions.
Definition in file mib_structs.c.
Function Documentation
| static u8_t empty_table | ( | struct mib_node * | node ) | [static] |
Test table for presence of at least one table entry.
Definition at line 640 of file mib_structs.c.
| static void pop_node | ( | struct nse * | node ) | [static] |
Pops nse struct from stack.
Definition at line 79 of file mib_structs.c.
| static void push_node | ( | struct nse * | node ) | [static] |
Pushes nse struct onto stack.
Definition at line 64 of file mib_structs.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 683 of file mib_structs.c.
| void snmp_ifindextonetif | ( | s32_t | ifindex, |
| struct netif ** | netif | ||
| ) |
Conversion from ifIndex to lwIP netif.
- Parameters:
-
ifindex is a s32_t object sub-identifier netif points to returned netif struct pointer
Definition at line 95 of file mib_structs.c.
| void snmp_iptooid | ( | ip_addr_t * | ip, |
| s32_t * | ident | ||
| ) |
Conversion from lwIP ip_addr to oid.
- Parameters:
-
ip points to input struct ident points to s32_t ident[4] output
Definition at line 147 of file 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_len the length of the supplied object identifier ident points to the array of sub identifiers oidret points 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 1140 of file 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_len the length of the supplied object identifier ident points to the array of sub identifiers
- Returns:
- 1 if it matches, 0 otherwise
Definition at line 1114 of file 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:
-
rn points to the root node n points to the node to delete
- Returns:
- the nptr to be freed by caller
Definition at line 395 of file 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:
-
rn points to the root node objid is the object sub identifier fn returns 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 338 of file 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:
-
rn points to the root node objid is the object sub identifier insn points 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 216 of file mib_structs.c.
| void snmp_netiftoifindex | ( | struct netif * | netif, |
| s32_t * | ifidx | ||
| ) |
Conversion from lwIP netif to ifIndex.
- Parameters:
-
netif points to a netif struct ifidx points to s32_t object sub-identifier
Definition at line 116 of file mib_structs.c.
| void snmp_oidtoip | ( | s32_t * | ident, |
| ip_addr_t * | ip | ||
| ) |
Conversion from oid to lwIP ip_addr.
- Parameters:
-
ident points to s32_t ident[4] input ip points to output struct
Definition at line 136 of file 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:
-
node points to the root of the tree ('.internet') ident_len the length of the supplied object identifier ident points to the array of sub identifiers np points to the found object instance (return)
- Returns:
- pointer to the requested parent (!) node if success, NULL otherwise
Definition at line 452 of file mib_structs.c.
Variable Documentation
| const s32_t prefix[4] = {1, 3, 6, 1} |
.iso.org.dod.internet address prefix,
- See also:
- snmp_iso_*()
Definition at line 44 of file mib_structs.c.
Generated on Tue Jul 12 2022 20:46:10 by
1.7.2
