モジュール | |
utility_handlers | |
Simplify request processing A group of handlers intended to simplify certain aspects of processing a request for a MIB object. | |
leaf_handlers | |
Process individual leaf objects A group of handlers to implement individual leaf objects and instances (both scalar objects, and individual objects and instances within a table). | |
baby_steps | |
Calls your handler in baby_steps for set processing. | |
old_api | |
Calls mib module code written in the old style of code. | |
stash_cache | |
Automatically caches data for certain handlers. | |
table | |
Helps you implement a table. | |
データ構造 | |
struct | netsnmp_mib_handler_s |
the mib handler structure to be registered [詳細] | |
struct | netsnmp_handler_registration_s |
Root registration info. [詳細] | |
struct | netsnmp_handler_args_s |
struct | netsnmp_delegated_cache_s |
struct | netsnmp_mib_handler_s |
the mib handler structure to be registered [詳細] | |
struct | netsnmp_handler_registration_s |
Root registration info. [詳細] | |
マクロ定義 | |
#define | MIB_HANDLER_AUTO_NEXT 0x00000001 |
#define | MIB_HANDLER_AUTO_NEXT_OVERRIDE_ONCE 0x00000002 |
#define | MIB_HANDLER_CUSTOM4 0x10000000 |
#define | MIB_HANDLER_CUSTOM3 0x20000000 |
#define | MIB_HANDLER_CUSTOM2 0x40000000 |
#define | MIB_HANDLER_CUSTOM1 0x80000000 |
#define | HANDLER_CAN_GETANDGETNEXT 0x01 |
#define | HANDLER_CAN_SET 0x02 |
#define | HANDLER_CAN_GETBULK 0x04 |
#define | HANDLER_CAN_NOT_CREATE 0x08 |
#define | HANDLER_CAN_BABY_STEP 0x10 |
#define | HANDLER_CAN_STASH 0x20 |
#define | HANDLER_CAN_RONLY (HANDLER_CAN_GETANDGETNEXT) |
#define | HANDLER_CAN_RWRITE (HANDLER_CAN_GETANDGETNEXT | HANDLER_CAN_SET) |
#define | HANDLER_CAN_SET_ONLY (HANDLER_CAN_SET | HANDLER_CAN_NOT_CREATE) |
#define | HANDLER_CAN_DEFAULT (HANDLER_CAN_RONLY | HANDLER_CAN_NOT_CREATE) |
#define | REQUEST_IS_DELEGATED 1 |
#define | REQUEST_IS_NOT_DELEGATED 0 |
型定義 | |
typedef netsnmp_mib_handler_s | netsnmp_mib_handler |
Typedefs the netsnmp_mib_handler_s struct into netsnmp_mib_handler | |
typedef netsnmp_handler_registration_s | netsnmp_handler_registration |
Typedefs the netsnmp_handler_registration_s struct into netsnmp_handler_registration | |
typedef int( | Netsnmp_Node_Handler )(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) |
typedef netsnmp_handler_args_s | netsnmp_handler_args |
typedef netsnmp_delegated_cache_s | netsnmp_delegated_cache |
関数 | |
netsnmp_mib_handler * | netsnmp_create_handler (const char *name, Netsnmp_Node_Handler *handler_access_method) |
creates a netsnmp_mib_handler structure given a name and a access method. | |
netsnmp_handler_registration * | netsnmp_handler_registration_create (const char *name, netsnmp_mib_handler *handler, oid *reg_oid, size_t reg_oid_len, int modes) |
creates a handler registration structure given a name, a access_method function, a registration location oid and the modes the handler supports. | |
netsnmp_handler_registration * | netsnmp_create_handler_registration (const char *name, Netsnmp_Node_Handler *handler_access_method, oid *reg_oid, size_t reg_oid_len, int modes) |
int | netsnmp_register_handler (netsnmp_handler_registration *reginfo) |
register a handler, as defined by the netsnmp_handler_registration pointer. | |
int | netsnmp_unregister_handler (netsnmp_handler_registration *reginfo) |
unregister a handler, as defined by the netsnmp_handler_registration pointer. | |
int | netsnmp_register_handler_nocallback (netsnmp_handler_registration *reginfo) |
register a handler, as defined by the netsnmp_handler_registration pointer. | |
int | netsnmp_inject_handler_before (netsnmp_handler_registration *reginfo, netsnmp_mib_handler *handler, const char *before_what) |
inject a new handler into the calling chain of the handlers definedy by the netsnmp_handler_registration pointer. | |
int | netsnmp_inject_handler (netsnmp_handler_registration *reginfo, netsnmp_mib_handler *handler) |
inject a new handler into the calling chain of the handlers definedy by the netsnmp_handler_registration pointer. | |
NETSNMP_INLINE int | netsnmp_call_handler (netsnmp_mib_handler *next_handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) |
calls a handler with with appropriate NULL checking of arguments, etc. | |
int | netsnmp_call_handlers (netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) |
NETSNMP_INLINE int | netsnmp_call_next_handler (netsnmp_mib_handler *current, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) |
calls the next handler in the chain after the current one with with appropriate NULL checking, etc. | |
NETSNMP_INLINE int | netsnmp_call_next_handler_one_request (netsnmp_mib_handler *current, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) |
calls the next handler in the chain after the current one with with appropriate NULL checking, etc. | |
void | netsnmp_handler_free (netsnmp_mib_handler *handler) |
free's the resourceses associated with a given handler | |
netsnmp_mib_handler * | netsnmp_handler_dup (netsnmp_mib_handler *handler) |
dulpicates a handler and all subsequent handlers see also _clone_handler | |
void | netsnmp_handler_registration_free (netsnmp_handler_registration *reginfo) |
free the resources associated with a handler registration object | |
netsnmp_handler_registration * | netsnmp_handler_registration_dup (netsnmp_handler_registration *reginfo) |
duplicates the handler registration object | |
NETSNMP_INLINE netsnmp_delegated_cache * | netsnmp_create_delegated_cache (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests, void *localinfo) |
creates a cache of information which can be saved for future reference. | |
NETSNMP_INLINE netsnmp_delegated_cache * | netsnmp_handler_check_cache (netsnmp_delegated_cache *dcache) |
check's a given cache and returns it if it is still valid (ie, the agent still considers it to be an outstanding request. | |
NETSNMP_INLINE void | netsnmp_free_delegated_cache (netsnmp_delegated_cache *dcache) |
frees a cache once you're finished using it | |
void | netsnmp_handler_mark_requests_as_delegated (netsnmp_request_info *requests, int isdelegated) |
marks a list of requests as delegated (or not if isdelegaded = 0) | |
NETSNMP_INLINE void | netsnmp_request_add_list_data (netsnmp_request_info *request, netsnmp_data_list *node) |
add data to a request that can be extracted later by submodules | |
NETSNMP_INLINE int | netsnmp_request_remove_list_data (netsnmp_request_info *request, const char *name) |
remove data from a request | |
NETSNMP_INLINE void * | netsnmp_request_get_list_data (netsnmp_request_info *request, const char *name) |
extract data from a request that was added previously by a parent module | |
NETSNMP_INLINE void | netsnmp_free_request_data_set (netsnmp_request_info *request) |
Free the extra data stored in a request | |
NETSNMP_INLINE void | netsnmp_free_request_data_sets (netsnmp_request_info *request) |
Free the extra data stored in a bunch of requests (all data in the chain) | |
netsnmp_mib_handler * | netsnmp_find_handler_by_name (netsnmp_handler_registration *reginfo, const char *name) |
Returns a handler from a chain based on the name | |
void * | netsnmp_find_handler_data_by_name (netsnmp_handler_registration *reginfo, const char *name) |
Returns a handler's void * pointer from a chain based on the name. | |
void | handler_free_callback (void *free) |
void | netsnmp_register_handler_by_name (const char *name, netsnmp_mib_handler *handler) |
registers a given handler by name so that it can be found easily later. | |
void | netsnmp_clear_handler_list (void) |
clears the entire handler-registration list | |
void | netsnmp_inject_handler_into_subtree (netsnmp_subtree *tp, const char *name, netsnmp_mib_handler *handler, const char *before_what) |
void | parse_injectHandler_conf (const char *token, char *cptr) |
void | netsnmp_init_handler_conf (void) |
void * | netsnmp_handler_get_parent_data (netsnmp_request_info *, const char *) |
This worked well at the time but in todays world of subagents, device instrumentation, low resource consumption, etc, it just isn't flexible enough. "handlers" are here to fix all that.
With the rewrite of the agent internals for the net-snmp 5.0 release, we introduce a modular calling scheme that allows agent modules to be written in a very flexible manner, and more importantly allows reuse of code in a decent way (and without the memory and speed overheads of OO languages like C++).
Functionally, the notion of what a handler does is the same as the older api: A handler is created and then registered with the main agent at a given OID in the OID tree and gets called any time a request is made that it should respond to. You probably should use one of the convenience helpers instead of doing anything else yourself though:
Most importantly, though, is that the handlers are built on the notion of modularity and reuse. Specifically, rather than do all the really hard work (like parsing table indexes out of an incoming oid request) in each module, the API is designed to make it easy to write "helper" handlers that merely process some aspect of the request before passing it along to the final handler that returns the real answer. Most people will want to make use of the instance, table, table_iterator, table_data, or table_dataset helpers to make their life easier. These "helpers" interpert important aspects of the request and pass them on to you.
For instance, the table helper is designed to hand you a list of extracted index values from an incoming request. THe table_iterator helper is built on top of the table helper, and is designed to help you iterate through data stored elsewhere (like in a kernel) that is not in OID lexographical order (ie, don't write your own index/oid sorting routine, use this helper instead). The beauty of the table_iterator helper, as well as the instance helper is that they take care of the complex GETNEXT processing entirely for you and hand you everything you need to merely return the data as if it was a GET request. Much less code and hair pulling. I've pulled all my hair out to help you so that only one of us has to be bald.
Typedefs the netsnmp_handler_registration_s struct into netsnmp_handler_registration
Typedefs the netsnmp_mib_handler_s struct into netsnmp_mib_handler
int netsnmp_call_handler | ( | netsnmp_mib_handler * | next_handler, | |
netsnmp_handler_registration * | reginfo, | |||
netsnmp_agent_request_info * | reqinfo, | |||
netsnmp_request_info * | requests | |||
) |
calls a handler with with appropriate NULL checking of arguments, etc.
agent_handler.c の 387 行で定義されています。
参照先 netsnmp_mib_handler_s::access_method・netsnmp_mib_handler_s::handler_name・MIB_HANDLER_AUTO_NEXT・MIB_HANDLER_AUTO_NEXT_OVERRIDE_ONCE・netsnmp_agent_request_info_s::mode・netsnmp_mib_handler_s::next・NULL・snmp_log().
参照元 netsnmp_call_handlers()・netsnmp_call_next_handler()・netsnmp_call_next_handler_one_request()・netsnmp_mode_end_call_helper()・netsnmp_multiplexer_helper_handler().
int netsnmp_call_next_handler | ( | netsnmp_mib_handler * | current, | |
netsnmp_handler_registration * | reginfo, | |||
netsnmp_agent_request_info * | reqinfo, | |||
netsnmp_request_info * | requests | |||
) |
calls the next handler in the chain after the current one with with appropriate NULL checking, etc.
agent_handler.c の 517 行で定義されています。
参照先 netsnmp_call_handler()・netsnmp_mib_handler_s::next・NULL・snmp_log().
参照元 _netsnmp_stash_cache_load()・netsnmp_bulk_to_next_helper()・netsnmp_debug_helper()・netsnmp_instance_counter32_handler()・netsnmp_instance_helper_handler()・netsnmp_instance_int_handler()・netsnmp_instance_long_handler()・netsnmp_instance_num_file_handler()・netsnmp_instance_ulong_handler()・netsnmp_mode_end_call_helper()・netsnmp_row_merge_helper_handler()・netsnmp_scalar_group_helper_handler()・netsnmp_scalar_helper_handler()・netsnmp_serialize_helper_handler()・netsnmp_stash_to_next_helper()・table_helper_handler().
int netsnmp_call_next_handler_one_request | ( | netsnmp_mib_handler * | current, | |
netsnmp_handler_registration * | reginfo, | |||
netsnmp_agent_request_info * | reqinfo, | |||
netsnmp_request_info * | requests | |||
) |
calls the next handler in the chain after the current one with with appropriate NULL checking, etc.
agent_handler.c の 539 行で定義されています。
参照先 netsnmp_call_handler()・netsnmp_mib_handler_s::next・netsnmp_request_info_s::next・NULL・snmp_log().
void netsnmp_clear_handler_list | ( | void | ) |
clears the entire handler-registration list
agent_handler.c の 898 行で定義されています。
参照先 netsnmp_free_all_list_data()・NULL.
参照元 shutdown_agent().
NETSNMP_INLINE netsnmp_delegated_cache * netsnmp_create_delegated_cache | ( | netsnmp_mib_handler * | handler, | |
netsnmp_handler_registration * | reginfo, | |||
netsnmp_agent_request_info * | reqinfo, | |||
netsnmp_request_info * | requests, | |||
void * | localinfo | |||
) |
creates a cache of information which can be saved for future reference.
Use netsnmp_handler_check_cache() later to make sure it's still valid before referencing it in the future.
agent_handler.c の 689 行で定義されています。
参照先 netsnmp_agent_request_info_s::asp・netsnmp_delegated_cache_s::handler・netsnmp_delegated_cache_s::localinfo・netsnmp_agent_session_s::pdu・netsnmp_delegated_cache_s::reginfo・netsnmp_delegated_cache_s::reqinfo・netsnmp_delegated_cache_s::requests・SNMP_MALLOC_TYPEDEF・netsnmp_delegated_cache_s::transaction_id・snmp_pdu::transid.
netsnmp_mib_handler * netsnmp_create_handler | ( | const char * | name, | |
Netsnmp_Node_Handler * | handler_access_method | |||
) |
creates a netsnmp_mib_handler structure given a name and a access method.
The returned handler should then be registered.
name | is the handler name and is copied then assigned to netsnmp_mib_handler->handler_name | |
handler_access_method | is a function pointer used as the access method for this handler registration instance for whatever required needs. |
agent_handler.c の 105 行で定義されています。
参照先 netsnmp_mib_handler_s::access_method・netsnmp_mib_handler_s::handler_name・NULL・SNMP_FREE・SNMP_MALLOC_TYPEDEF.
参照元 get_old_api_handler()・netsnmp_baby_steps_access_multiplexer_get()・netsnmp_baby_steps_handler_get()・netsnmp_cache_handler_get()・netsnmp_container_table_handler_get()・netsnmp_create_handler_registration()・netsnmp_get_bulk_to_next_handler()・netsnmp_get_debug_handler()・netsnmp_get_instance_handler()・netsnmp_get_mode_end_call_handler()・netsnmp_get_multiplexer_handler()・netsnmp_get_read_only_handler()・netsnmp_get_row_merge_handler()・netsnmp_get_scalar_group_handler()・netsnmp_get_scalar_handler()・netsnmp_get_serialize_handler()・netsnmp_get_stash_to_next_handler()・netsnmp_get_table_data_handler()・netsnmp_get_table_data_set_handler()・netsnmp_get_table_handler()・netsnmp_get_table_iterator_handler()・netsnmp_get_tdata_handler()・netsnmp_get_timed_bare_stash_cache_handler()・netsnmp_get_watched_spinlock_handler()・netsnmp_get_watched_timestamp_handler()・netsnmp_get_watcher_handler()・netsnmp_sparse_table_handler_get()・netsnmp_sparse_table_register()・netsnmp_table_array_register().
netsnmp_mib_handler * netsnmp_find_handler_by_name | ( | netsnmp_handler_registration * | reginfo, | |
const char * | name | |||
) |
Returns a handler from a chain based on the name
agent_handler.c の 831 行で定義されています。
参照先 netsnmp_handler_registration_s::handler・netsnmp_mib_handler_s::handler_name・netsnmp_mib_handler_s::next・NULL.
void * netsnmp_find_handler_data_by_name | ( | netsnmp_handler_registration * | reginfo, | |
const char * | name | |||
) |
Returns a handler's void * pointer from a chain based on the name.
This probably shouldn't be used by the general public as the void * data may change as a handler evolves. Handlers should really advertise some function for you to use instead.
agent_handler.c の 848 行で定義されています。
参照先 netsnmp_mib_handler_s::myvoid・netsnmp_find_handler_by_name()・NULL.
NETSNMP_INLINE void netsnmp_free_delegated_cache | ( | netsnmp_delegated_cache * | dcache | ) |
NETSNMP_INLINE void netsnmp_free_request_data_set | ( | netsnmp_request_info * | request | ) |
Free the extra data stored in a request
agent_handler.c の 813 行で定義されています。
参照先 netsnmp_free_list_data()・netsnmp_request_info_s::parent_data.
NETSNMP_INLINE void netsnmp_free_request_data_sets | ( | netsnmp_request_info * | request | ) |
Free the extra data stored in a bunch of requests (all data in the chain)
agent_handler.c の 821 行で定義されています。
参照先 netsnmp_free_all_list_data()・NULL・netsnmp_request_info_s::parent_data.
参照元 free_agent_snmp_session()・get_set_cache()・netsnmp_add_varbind_to_cache()・netsnmp_delete_request_infos().
NETSNMP_INLINE netsnmp_delegated_cache * netsnmp_handler_check_cache | ( | netsnmp_delegated_cache * | dcache | ) |
check's a given cache and returns it if it is still valid (ie, the agent still considers it to be an outstanding request.
Returns NULL if it's no longer valid.
agent_handler.c の 713 行で定義されています。
参照先 netsnmp_check_transaction_id()・NULL・netsnmp_delegated_cache_s::transaction_id.
netsnmp_mib_handler * netsnmp_handler_dup | ( | netsnmp_mib_handler * | handler | ) |
dulpicates a handler and all subsequent handlers see also _clone_handler
agent_handler.c の 584 行で定義されています。
参照先 netsnmp_mib_handler_s::myvoid・netsnmp_handler_free()・netsnmp_mib_handler_s::next・NULL・netsnmp_mib_handler_s::prev.
void netsnmp_handler_free | ( | netsnmp_mib_handler * | handler | ) |
free's the resourceses associated with a given handler
make sure we aren't pointing to ourselves.
XXX : segv here at shutdown if SHUTDOWN_AGENT_CLEANLY defined. About 30 functions down the stack, starting in clear_context() -> clear_subtree()
agent_handler.c の 562 行で定義されています。
参照先 netsnmp_mib_handler_s::handler_name・netsnmp_mib_handler_s::next・NULL・SNMP_FREE.
参照元 handler_free_callback()・netsnmp_baby_steps_handler_get()・netsnmp_get_scalar_group_handler()・netsnmp_get_timed_bare_stash_cache_handler()・netsnmp_handler_dup()・netsnmp_handler_registration_free().
void netsnmp_handler_mark_requests_as_delegated | ( | netsnmp_request_info * | requests, | |
int | isdelegated | |||
) |
marks a list of requests as delegated (or not if isdelegaded = 0)
agent_handler.c の 741 行で定義されています。
参照先 netsnmp_request_info_s::delegated・netsnmp_request_info_s::next.
netsnmp_handler_registration * netsnmp_handler_registration_create | ( | const char * | name, | |
netsnmp_mib_handler * | handler, | |||
oid * | reg_oid, | |||
size_t | reg_oid_len, | |||
int | modes | |||
) |
creates a handler registration structure given a name, a access_method function, a registration location oid and the modes the handler supports.
If modes == 0, then modes will automatically be set to the default value of only HANDLER_CAN_DEFAULT, which is by default read-only GET and GETNEXT requests. A hander which supports sets but not row creation should set us a mode of HANDLER_CAN_SET_ONLY.
name | is the handler name and is copied then assigned to netsnmp_handler_registration->handlerName. | |
handler | is a function pointer used as the access method for this handler registration instance for whatever required needs. | |
reg_oid | is the registration location oid. | |
reg_oid_len | is the length of reg_oid, can use the macro, OID_LENGTH | |
modes | is used to configure read/write access. If modes == 0, then modes will automatically be set to the default value of only HANDLER_CAN_DEFAULT, which is by default read-only GET and GETNEXT requests. The other two mode options are read only, HANDLER_CAN_RONLY, and read/write, HANDLER_CAN_RWRITE. |
agent_handler.c の 163 行で定義されています。
参照先 netsnmp_handler_registration_s::handler・HANDLER_CAN_DEFAULT・netsnmp_handler_registration_s::handlerName・memdup()・netsnmp_handler_registration_s::modes・NULL・netsnmp_handler_registration_s::priority・netsnmp_handler_registration_s::rootoid・netsnmp_handler_registration_s::rootoid_len・SNMP_MALLOC_TYPEDEF.
netsnmp_handler_registration * netsnmp_handler_registration_dup | ( | netsnmp_handler_registration * | reginfo | ) |
duplicates the handler registration object
agent_handler.c の 627 行で定義されています。
参照先 netsnmp_handler_registration_s::contextName・netsnmp_handler_registration_s::handler・netsnmp_handler_registration_s::handlerName・memdup()・netsnmp_handler_registration_s::modes・netsnmp_handler_dup()・netsnmp_handler_registration_free()・NULL・netsnmp_handler_registration_s::priority・netsnmp_handler_registration_s::range_subid・netsnmp_handler_registration_s::range_ubound・netsnmp_handler_registration_s::rootoid・netsnmp_handler_registration_s::rootoid_len・netsnmp_handler_registration_s::timeout.
void netsnmp_handler_registration_free | ( | netsnmp_handler_registration * | reginfo | ) |
free the resources associated with a handler registration object
agent_handler.c の 613 行で定義されています。
参照先 netsnmp_handler_registration_s::contextName・netsnmp_handler_registration_s::handler・netsnmp_handler_registration_s::handlerName・netsnmp_handler_free()・NULL・netsnmp_handler_registration_s::rootoid・netsnmp_handler_registration_s::rootoid_len・SNMP_FREE.
参照元 netsnmp_handler_registration_dup()・netsnmp_register_mib()・netsnmp_register_mib_table_row()・netsnmp_subtree_free()・unregister_mibs_by_session().
int netsnmp_inject_handler | ( | netsnmp_handler_registration * | reginfo, | |
netsnmp_mib_handler * | handler | |||
) |
inject a new handler into the calling chain of the handlers definedy by the netsnmp_handler_registration pointer.
The new handler is injected at the top of the list and hence will be the new handler to be called first.
agent_handler.c の 379 行で定義されています。
参照先 netsnmp_inject_handler_before()・NULL.
参照元 netsnmp_cache_handler_register()・netsnmp_container_table_register()・netsnmp_register_cache_handler()・netsnmp_register_handler()・netsnmp_register_instance()・netsnmp_register_read_only_instance()・netsnmp_register_read_only_scalar()・netsnmp_register_read_only_table_data()・netsnmp_register_row_merge()・netsnmp_register_scalar()・netsnmp_register_scalar_group()・netsnmp_register_serialize()・netsnmp_register_table()・netsnmp_register_table_data()・netsnmp_register_table_data_set()・netsnmp_register_table_iterator()・netsnmp_register_watched_instance()・netsnmp_register_watched_scalar()・netsnmp_register_watched_spinlock()・netsnmp_sparse_table_register()・netsnmp_table_array_register()・netsnmp_tdata_register()・netsnmp_watched_timestamp_register().
int netsnmp_inject_handler_before | ( | netsnmp_handler_registration * | reginfo, | |
netsnmp_mib_handler * | handler, | |||
const char * | before_what | |||
) |
inject a new handler into the calling chain of the handlers definedy by the netsnmp_handler_registration pointer.
The new handler is injected after the before_what handler, or if NULL at the top of the list and hence will be the new handler to be called first.
agent_handler.c の 322 行で定義されています。
参照先 netsnmp_handler_registration_s::handler・netsnmp_mib_handler_s::handler_name・netsnmp_mib_handler_s::next・NULL・netsnmp_mib_handler_s::prev・snmp_log().
参照元 netsnmp_inject_handler()・netsnmp_inject_handler_into_subtree().
int netsnmp_register_handler | ( | netsnmp_handler_registration * | reginfo | ) |
register a handler, as defined by the netsnmp_handler_registration pointer.
agent_handler.c の 202 行で定義されています。
参照先 netsnmp_handler_registration_s::contextName・netsnmp_handler_registration_s::handler・HANDLER_CAN_DEFAULT・HANDLER_CAN_GETBULK・netsnmp_mib_handler_s::handler_name・netsnmp_handler_registration_s::handlerName・netsnmp_handler_registration_s::modes・netsnmp_get_bulk_to_next_handler()・netsnmp_inject_handler()・netsnmp_register_mib()・netsnmp_mib_handler_s::next・NULL・netsnmp_handler_registration_s::priority・netsnmp_handler_registration_s::range_subid・netsnmp_handler_registration_s::range_ubound・netsnmp_handler_registration_s::rootoid・netsnmp_handler_registration_s::rootoid_len・snmp_log()・netsnmp_handler_registration_s::timeout.
参照元 netsnmp_cache_handler_register()・netsnmp_register_cache_handler()・netsnmp_register_old_api()・netsnmp_register_row_merge()・netsnmp_register_serialize()・netsnmp_register_table()・netsnmp_sparse_table_register().
void netsnmp_register_handler_by_name | ( | const char * | name, | |
netsnmp_mib_handler * | handler | |||
) |
registers a given handler by name so that it can be found easily later.
agent_handler.c の 886 行で定義されています。
参照先 handler_free_callback()・netsnmp_add_list_data()・netsnmp_create_data_list().
参照元 netsnmp_baby_steps_handler_init()・netsnmp_init_bulk_to_next_helper()・netsnmp_init_debug_helper()・netsnmp_init_read_only_helper()・netsnmp_init_row_merge()・netsnmp_init_serialize()・netsnmp_init_stash_cache_helper().
int netsnmp_register_handler_nocallback | ( | netsnmp_handler_registration * | reginfo | ) |
register a handler, as defined by the netsnmp_handler_registration pointer.
agent_handler.c の 270 行で定義されています。
参照先 netsnmp_handler_registration_s::contextName・netsnmp_handler_registration_s::handler・HANDLER_CAN_DEFAULT・netsnmp_mib_handler_s::handler_name・netsnmp_handler_registration_s::modes・netsnmp_register_mib()・netsnmp_mib_handler_s::next・NULL・netsnmp_handler_registration_s::priority・netsnmp_handler_registration_s::range_subid・netsnmp_handler_registration_s::range_ubound・netsnmp_handler_registration_s::rootoid・netsnmp_handler_registration_s::rootoid_len・snmp_log()・netsnmp_handler_registration_s::timeout.
NETSNMP_INLINE void netsnmp_request_add_list_data | ( | netsnmp_request_info * | request, | |
netsnmp_data_list * | node | |||
) |
add data to a request that can be extracted later by submodules
request | the netsnmp request info structure | |
node | this is the data to be added to the linked list request->parent_data |
agent_handler.c の 761 行で定義されています。
参照先 netsnmp_add_list_data()・netsnmp_request_info_s::parent_data.
参照元 _netsnmp_tdata_helper_handler()・netsnmp_container_table_row_insert()・netsnmp_insert_iterator_context()・netsnmp_insert_table_row()・netsnmp_instance_int_handler()・netsnmp_instance_long_handler()・netsnmp_instance_num_file_handler()・netsnmp_instance_ulong_handler()・netsnmp_table_data_helper_handler()・netsnmp_table_data_set_helper_handler()・netsnmp_table_iterator_helper_handler()・netsnmp_watcher_helper_handler()・table_helper_handler().
NETSNMP_INLINE void * netsnmp_request_get_list_data | ( | netsnmp_request_info * | request, | |
const char * | name | |||
) |
extract data from a request that was added previously by a parent module
request | the netsnmp request info function | |
name | used to compare against the request->parent_data->name value, if a match is found request->parent_data->data is returned |
agent_handler.c の 803 行で定義されています。
参照先 netsnmp_get_list_data()・NULL・netsnmp_request_info_s::parent_data.
参照元 netsnmp_container_table_container_extract()・netsnmp_container_table_extract_context()・netsnmp_container_table_row_extract()・netsnmp_extract_array_context()・netsnmp_extract_iterator_context()・netsnmp_extract_table()・netsnmp_extract_table_data_set()・netsnmp_extract_table_info()・netsnmp_extract_table_row()・netsnmp_instance_int_handler()・netsnmp_instance_long_handler()・netsnmp_instance_num_file_handler()・netsnmp_instance_ulong_handler()・netsnmp_table_iterator_helper_handler()・netsnmp_tdata_extract_container()・netsnmp_tdata_extract_table()・netsnmp_watcher_helper_handler().
NETSNMP_INLINE int netsnmp_request_remove_list_data | ( | netsnmp_request_info * | request, | |
const char * | name | |||
) |
remove data from a request
request | the netsnmp request info structure | |
name | this is the name of the previously added data |
agent_handler.c の 782 行で定義されています。
参照先 netsnmp_remove_list_node()・NULL・netsnmp_request_info_s::parent_data.
int netsnmp_unregister_handler | ( | netsnmp_handler_registration * | reginfo | ) |
unregister a handler, as defined by the netsnmp_handler_registration pointer.
agent_handler.c の 260 行で定義されています。
参照先 netsnmp_handler_registration_s::contextName・netsnmp_handler_registration_s::priority・netsnmp_handler_registration_s::range_subid・netsnmp_handler_registration_s::range_ubound・netsnmp_handler_registration_s::rootoid・netsnmp_handler_registration_s::rootoid_len・unregister_mib_context().