net-snmp 5.7
Functions
Maintaining MIB subtrees.
Registry of MIB subtrees, modules, sessions, etc

Maintaining MIB nodes and subtrees. More...

Functions

void netsnmp_subtree_free (netsnmp_subtree *a)
 Frees single subtree item.
netsnmp_subtreenetsnmp_subtree_deepcopy (netsnmp_subtree *a)
 Creates deep copy of a subtree item.
 netsnmp_feature_child_of (netsnmp_subtree_compare, netsnmp_unused)
 Compares OIDs of given subtrees.
void netsnmp_subtree_join (netsnmp_subtree *root)
 Joins the given subtree with the current tree.
netsnmp_subtreenetsnmp_subtree_split (netsnmp_subtree *current, oid name[], int name_len)
 Split the subtree into two at the specified point.
int netsnmp_subtree_load (netsnmp_subtree *new_sub, const char *context_name)
 Loads the subtree under given context name.
netsnmp_subtreenetsnmp_subtree_find_prev (const oid *name, size_t len, netsnmp_subtree *subtree, const char *context_name)
netsnmp_subtreenetsnmp_subtree_find_next (const oid *name, size_t len, netsnmp_subtree *subtree, const char *context_name)
netsnmp_subtreenetsnmp_subtree_find (const oid *name, size_t len, netsnmp_subtree *subtree, const char *context_name)
void clear_subtree (netsnmp_subtree *sub)
 Free the given subtree and all its children.

Detailed Description

Maintaining MIB nodes and subtrees.


Function Documentation

void clear_subtree ( netsnmp_subtree sub)

Free the given subtree and all its children.

Parameters:
subSubtree branch to be cleared and freed. After the call, this pointer is invalid and should be set to NULL.

Definition at line 951 of file agent_registry.c.

netsnmp_feature_child_of ( netsnmp_subtree_compare  ,
netsnmp_unused   
)

Compares OIDs of given subtrees.

Parameters:
ap,bpPointers to the subtrees to be compared.
Returns:
OIDs lexicographical comparison result.
See also:
snmp_oid_compare()

Definition at line 566 of file agent_registry.c.

netsnmp_subtree* netsnmp_subtree_deepcopy ( netsnmp_subtree a)

Creates deep copy of a subtree item.

Duplicates all properties stored in the structure, including Handle Registration structure stored inside the item.

Parameters:
aThe subtree item to copy.
Returns:
deep copy of the subtree item, or NULL on error.

Definition at line 489 of file agent_registry.c.

void netsnmp_subtree_free ( netsnmp_subtree a)

Frees single subtree item.

Deallocated memory for given netsnmp_subtree item, including Handle Registration structure stored inside this item. After calling this function, the pointer is invalid and should be set to NULL.

Parameters:
aThe subtree item to dispose.

Definition at line 460 of file agent_registry.c.

void netsnmp_subtree_join ( netsnmp_subtree root)

Joins the given subtree with the current tree.

Trees are joined and the one supplied as parameter is freed.

Parameters:
rootThe subtree to be merged with current subtree. Do not use the pointer after joining - it may be invalid.

Definition at line 582 of file agent_registry.c.

int netsnmp_subtree_load ( netsnmp_subtree new_sub,
const char *  context_name 
)

Loads the subtree under given context name.

Parameters:
rootThe subtree to be loaded into current subtree.
context_nameText name of the context we're searching for.
Returns:
gives MIB_REGISTERED_OK on success, error code otherwise.

Definition at line 752 of file agent_registry.c.

netsnmp_subtree* netsnmp_subtree_split ( netsnmp_subtree current,
oid  name[],
int  name_len 
)

Split the subtree into two at the specified point.

Subtrees of the given OID and separated and formed into the returned subtree.

Parameters:
currentThe element at which splitting is started.
nameThe OID we'd like to split.
name_lenLength of the OID.
Returns:
head of the new (second) subtree.

Definition at line 640 of file agent_registry.c.