net-snmp 5.7
|
Maintain the cache used for locating sub-trees registered under different contexts. More...
Functions | |
subtree_context_cache * | get_top_context_cache (void) |
Returns the top element of context subtrees cache. | |
netsnmp_subtree * | netsnmp_subtree_find_first (const char *context_name) |
Finds the first subtree registered under given context. | |
netsnmp_subtree * | add_subtree (netsnmp_subtree *new_tree, const char *context_name) |
Adds the subtree to Context Cache under given context name. | |
void | netsnmp_remove_subtree (netsnmp_subtree *tree) |
netsnmp_subtree * | netsnmp_subtree_replace_first (netsnmp_subtree *new_tree, const char *context_name) |
Replaces first subtree registered under given context name. | |
void | clear_context (void) |
Completely clears both the Context cache and the Lookup cache. | |
Variables | |
subtree_context_cache * | context_subtrees = NULL |
Maintain the cache used for locating sub-trees registered under different contexts.
netsnmp_subtree* add_subtree | ( | netsnmp_subtree * | new_tree, |
const char * | context_name | ||
) |
Adds the subtree to Context Cache under given context name.
context_name | Text name of the context we're adding. |
new_tree | The subtree to be added. |
Definition at line 336 of file agent_registry.c.
void clear_context | ( | void | ) |
Completely clears both the Context cache and the Lookup cache.
Definition at line 414 of file agent_registry.c.
subtree_context_cache* get_top_context_cache | ( | void | ) |
Returns the top element of context subtrees cache.
Use it if you wish to sweep through the cache elements. Note that the return may be NULL (cache may be empty).
Definition at line 293 of file agent_registry.c.
netsnmp_subtree* netsnmp_subtree_find_first | ( | const char * | context_name | ) |
Finds the first subtree registered under given context.
context_name | Text name of the context we're searching for. |
Definition at line 305 of file agent_registry.c.
netsnmp_subtree* netsnmp_subtree_replace_first | ( | netsnmp_subtree * | new_tree, |
const char * | context_name | ||
) |
Replaces first subtree registered under given context name.
Overwrites a subtree pointer in Context Cache for the context name. The previous subtree pointer is lost. If there's no subtree under the supplied name, then a new cache item is created.
new_tree | The new subtree to be set. |
context_name | Text name of the context we're replacing. It is case sensitive. |
Definition at line 391 of file agent_registry.c.