データ構造 | |
struct | lookup_cache_s |
struct | lookup_cache_context_s |
マクロ定義 | |
#define | IN_SNMP_VARS_C |
#define | SUBTREE_DEFAULT_CACHE_SIZE 8 |
#define | SUBTREE_MAX_CACHE_SIZE 32 |
型定義 | |
typedef lookup_cache_s | lookup_cache |
typedef lookup_cache_context_s | lookup_cache_context |
関数 | |
NETSNMP_STATIC_INLINE void | invalidate_lookup_cache (const char *context) |
void | netsnmp_set_lookup_cache_size (int newsize) |
set the lookup cache size for optimized agent registration performance. | |
int | netsnmp_get_lookup_cache_size (void) |
retrieves the current value of the lookup cache size | |
void | netsnmp_subtree_free (netsnmp_subtree *a) |
netsnmp_subtree * | netsnmp_subtree_deepcopy (netsnmp_subtree *a) |
subtree_context_cache * | get_top_context_cache (void) |
netsnmp_subtree * | netsnmp_subtree_find_first (const char *context_name) |
netsnmp_subtree * | add_subtree (netsnmp_subtree *new_tree, const char *context_name) |
netsnmp_subtree * | netsnmp_subtree_replace_first (netsnmp_subtree *new_tree, const char *context_name) |
NETSNMP_INLINE void | netsnmp_subtree_change_next (netsnmp_subtree *ptr, netsnmp_subtree *thenext) |
NETSNMP_INLINE void | netsnmp_subtree_change_prev (netsnmp_subtree *ptr, netsnmp_subtree *theprev) |
int | netsnmp_subtree_compare (const netsnmp_subtree *ap, const netsnmp_subtree *bp) |
void | netsnmp_subtree_join (netsnmp_subtree *root) |
netsnmp_subtree * | netsnmp_subtree_split (netsnmp_subtree *current, oid name[], int name_len) |
int | netsnmp_subtree_load (netsnmp_subtree *new_sub, const char *context_name) |
int | netsnmp_register_mib (const char *moduleName, struct variable *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority, int range_subid, oid range_ubound, netsnmp_session *ss, const char *context, int timeout, int flags, netsnmp_handler_registration *reginfo, int perform_callback) |
void | register_mib_reattach (void) |
void | register_mib_detach (void) |
int | register_mib_context (const char *moduleName, struct variable *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority, int range_subid, oid range_ubound, netsnmp_session *ss, const char *context, int timeout, int flags) |
int | register_mib_range (const char *moduleName, struct variable *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority, int range_subid, oid range_ubound, netsnmp_session *ss) |
int | register_mib_priority (const char *moduleName, struct variable *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority) |
int | register_mib (const char *moduleName, struct variable *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen) |
void | netsnmp_subtree_unload (netsnmp_subtree *sub, netsnmp_subtree *prev, const char *context) |
int | unregister_mib_context (oid *name, size_t len, int priority, int range_subid, oid range_ubound, const char *context) |
Unregisters an OID that has an associated context name value. | |
int | netsnmp_unregister_mib_table_row (oid *name, size_t len, int priority, int var_subid, oid range_ubound, const char *context) |
int | unregister_mib_range (oid *name, size_t len, int priority, int range_subid, oid range_ubound) |
int | unregister_mib_priority (oid *name, size_t len, int priority) |
int | unregister_mib (oid *name, size_t len) |
void | unregister_mibs_by_session (netsnmp_session *ss) |
int | in_a_view (oid *name, size_t *namelen, netsnmp_pdu *pdu, int type) |
int | check_access (netsnmp_pdu *pdu) |
int | netsnmp_acm_check_subtree (netsnmp_pdu *pdu, oid *name, size_t namelen) |
checks to see if everything within a given subtree is either: in view, not in view, or possibly both. | |
NETSNMP_STATIC_INLINE lookup_cache_context * | get_context_lookup_cache (const char *context) |
NETSNMP_STATIC_INLINE void | lookup_cache_add (const char *context, netsnmp_subtree *next, netsnmp_subtree *previous) |
NETSNMP_STATIC_INLINE void | lookup_cache_replace (lookup_cache *ptr, netsnmp_subtree *next, netsnmp_subtree *previous) |
NETSNMP_STATIC_INLINE lookup_cache * | lookup_cache_find (const char *context, oid *name, size_t name_len, int *retcmp) |
netsnmp_subtree * | netsnmp_subtree_find_prev (oid *name, size_t len, netsnmp_subtree *subtree, const char *context_name) |
netsnmp_subtree * | netsnmp_subtree_find_next (oid *name, size_t len, netsnmp_subtree *subtree, const char *context_name) |
netsnmp_subtree * | netsnmp_subtree_find (oid *name, size_t len, netsnmp_subtree *subtree, const char *context_name) |
netsnmp_session * | get_session_for_oid (oid *name, size_t len, const char *context_name) |
void | setup_tree (void) |
int | remove_tree_entry (oid *name, size_t len) |
void | shutdown_tree (void) |
void | clear_subtree (netsnmp_subtree *sub) |
void | clear_lookup_cache (void) |
void | clear_context (void) |
void | dump_idx_registry (void) |
void | dump_registry (void) |
RETSIGTYPE | agent_SIGCHLD_handler (int sig) |
int | register_signal (int sig, void(*func)(int)) |
int | unregister_signal (int sig) |
変数 | |
subtree_context_cache * | context_subtrees = NULL |
int | lookup_cache_size = 0 |
int | external_signal_scheduled [NUM_EXTERNAL_SIGS] |
void(*[NUM_EXTERNAL_SIGS]) | external_signal_handler (int) |
int netsnmp_acm_check_subtree | ( | netsnmp_pdu * | pdu, | |
oid * | name, | |||
size_t | namelen | |||
) |
checks to see if everything within a given subtree is either: in view, not in view, or possibly both.
If the entire subtree is not-in-view we can use this information to skip calling the sub-handlers entirely.
agent_registry.c の 1298 行で定義されています。
参照先 view_parameters::check_subtree・view_parameters::errorcode・snmp_pdu::flags・view_parameters::name・view_parameters::namelen・view_parameters::pdu・snmp_call_callbacks()・snmp_pdu::version.
int netsnmp_get_lookup_cache_size | ( | void | ) |
retrieves the current value of the lookup cache size
agent_registry.c の 1371 行で定義されています。
void netsnmp_set_lookup_cache_size | ( | int | newsize | ) |
set the lookup cache size for optimized agent registration performance.
newsize | set to the maximum size of a cache for a given context. Set to 0 to completely disable caching, or to -1 to set to the default cache size (8), or to a number of your chosing. The rough guide is that it should be equal to the maximum number of simultanious managers you expect to talk to the agent (M) times 80% (or so, he says randomly) the average number (N) of varbinds you expect to receive in a given request for a manager. ie, M times N. Bigger does NOT necessarily mean better. Certainly 16 should be an upper limit. 32 is the hard coded limit. |
agent_registry.c の 1358 行で定義されています。
参照先 SUBTREE_DEFAULT_CACHE_SIZE・SUBTREE_MAX_CACHE_SIZE.
参照元 init_master_agent()・netsnmp_register_mib()・unregister_mib_context().
int unregister_mib_context | ( | oid * | name, | |
size_t | len, | |||
int | priority, | |||
int | range_subid, | |||
oid | range_ubound, | |||
const char * | context | |||
) |
Unregisters an OID that has an associated context name value.
Typically used when a module has multiple contexts defined. The parameters priority, range_subid, and range_ubound should be used in conjunction with agentx, see RFC 2741, otherwise these values should always be 0.
name | the specific OID to unregister if it conatins the associated context. | |
len | the length of the OID, use OID_LENGTH macro. | |
priority | a value between 1 and 255, used to achieve a desired configuration when different sessions register identical or overlapping regions. Subagents with no particular knowledge of priority should register with the default value of 127. | |
range_subid | permits specifying a range in place of one of a subtree sub-identifiers. When this value is zero, no range is being specified. | |
range_ubound | the upper bound of a sub-identifier's range. This field is present only if range_subid is not 0. | |
context | a context name that has been created |
agent_registry.c の 964 行で定義されています。
参照先 netsnmp_subtree_s::children・netsnmp_get_lookup_cache_size()・netsnmp_oid_equals()・netsnmp_set_lookup_cache_size()・netsnmp_subtree_find()・netsnmp_subtree_find_first()・NULL.
参照元 netsnmp_register_mib()・netsnmp_unregister_handler()・remove_tree_entry()・unregister_mib_range().