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.
Dependencies: EthernetInterface NTPClient SDFileSystem TextLCD WebSocketClient mbed-rtos mbed Socket lwip-eth lwip-sys lwip FATFileSystem
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, 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. | |
| 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_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. | |
| 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 | |
| struct mib_array_node | internet |
| export MIB tree from mib2.c | |
Detailed Description
Generic MIB tree structures.
Definition in file snmp_structs.h.
Typedef Documentation
| typedef struct mib_node mib_scalar_node |
derived node for scalars .0 index
Definition at line 124 of file snmp_structs.h.
Function Documentation
| void noleafs_get_object_def | ( | u8_t | ident_len, |
| s32_t * | ident, | ||
| struct obj_def * | od | ||
| ) |
| 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
| struct mib_array_node internet |
Generated on Tue Jul 12 2022 14:08:05 by
1.7.2