マクロ定義 | |
#define | CALLBACK_NAME_LOGGING 1 |
#define | LOCK_PER_CALLBACK_SUBID 1 |
#define | CALLBACK_LOCK(maj, min) ++_locks[major][minor] |
#define | CALLBACK_UNLOCK(maj, min) --_locks[major][minor] |
#define | CALLBACK_LOCK_COUNT(maj, min) _locks[major][minor] |
関数 | |
NETSNMP_STATIC_INLINE int | _callback_lock (int major, int minor, const char *warn, int assert) |
NETSNMP_STATIC_INLINE void | _callback_unlock (int major, int minor) |
void | init_callbacks (void) |
int | snmp_register_callback (int major, int minor, SNMPCallback *new_callback, void *arg) |
This function registers a generic callback function. | |
int | netsnmp_register_callback (int major, int minor, SNMPCallback *new_callback, void *arg, int priority) |
int | snmp_call_callbacks (int major, int minor, void *caller_arg) |
This function calls the callback function for each registered callback of type major and minor. | |
int | snmp_count_callbacks (int major, int minor) |
int | snmp_callback_available (int major, int minor) |
int | snmp_unregister_callback (int major, int minor, SNMPCallback *target, void *arg, int matchargs) |
This function unregisters a specified callback function given a major and minor type. | |
int | netsnmp_callback_clear_client_arg (void *ptr, int i, int j) |
find and clear client args that match ptr | |
void | clear_callback (void) |
snmp_gen_callback * | snmp_callback_list (int major, int minor) |
int netsnmp_callback_clear_client_arg | ( | void * | ptr, | |
int | i, | |||
int | j | |||
) |
find and clear client args that match ptr
ptr | pointer to search for | |
i | callback id to start at | |
j | callback subid to start at |
callback.c の 462 行で定義されています。
参照先 snmp_gen_callback::next・NULL・snmp_gen_callback::sc_callback・snmp_gen_callback::sc_client_arg.
参照元 clear_callback().
int snmp_call_callbacks | ( | int | major, | |
int | minor, | |||
void * | caller_arg | |||
) |
This function calls the callback function for each registered callback of type major and minor.
major | is the SNMP callback major type used | |
minor | is the SNMP callback minor type used | |
caller_arg | is a void pointer which is sent in as the callback's serverarg parameter, if needed. |
callback.c の 286 行で定義されています。
参照先 _callback_lock()・_callback_unlock()・init_callbacks()・snmp_gen_callback::next・NULL・snmp_gen_callback::sc_callback・snmp_gen_callback::sc_client_arg.
参照元 add_trap_session()・check_access()・in_a_view()・log_handler_callback()・netsnmp_acm_check_subtree()・netsnmp_register_mib()・netsnmp_register_mib_table_row()・read_configs()・read_premib_configs()・snmp_shutdown()・snmp_store()・unregister_mibs_by_session().
int snmp_register_callback | ( | int | major, | |
int | minor, | |||
SNMPCallback * | new_callback, | |||
void * | arg | |||
) |
This function registers a generic callback function.
The major and minor values are used to set the new_callback function into a global static multi-dimensional array of type struct snmp_gen_callback. The function makes sure to append this callback function at the end of the link list, snmp_gen_callback->next.
major | is the SNMP callback major type used
|
minor | is the SNMP callback minor type used
| |
new_callback | is the callback function that is registered. | |
arg | when not NULL is a void pointer used whenever new_callback function is exercised. |
callback.c の 218 行で定義されています。
参照先 netsnmp_register_callback().
参照元 init_snmp_alarm()・netsnmp_init_handler_conf()・netsnmp_register_save_list().
int snmp_unregister_callback | ( | int | major, | |
int | minor, | |||
SNMPCallback * | target, | |||
void * | arg, | |||
int | matchargs | |||
) |
This function unregisters a specified callback function given a major and minor type.
Note: no bound checking on major and minor.
major | is the SNMP callback major type used | |
minor | is the SNMP callback minor type used | |
target | is the callback function that will be unregistered. | |
arg | is a void pointer used for comparison against the registered callback's sc_client_arg variable. | |
matchargs | is an integer used to bypass the comparison of arg and the callback's sc_client_arg variable only when matchargs is set to 0. |
set cleanup flag?
callback.c の 406 行で定義されています。
参照先 _callback_lock()・_callback_unlock()・CALLBACK_LOCK_COUNT・init_callbacks()・snmp_gen_callback::next・NULL・snmp_gen_callback::sc_callback・snmp_gen_callback::sc_client_arg・SNMP_FREE.