generic library based alarm timers for various parts of an application
[The Net-SNMP library]


関数

int init_alarm_post_config (int majorid, int minorid, void *serverarg, void *clientarg)
void init_snmp_alarm (void)
void sa_update_entry (struct snmp_alarm *a)
void snmp_alarm_unregister (unsigned int clientreg)
 This function removes the callback function from a list of registered alarms, unregistering the alarm.
void snmp_alarm_unregister_all (void)
 This function unregisters all alarms currently stored.
snmp_alarmsa_find_next (void)
snmp_alarmsa_find_specific (unsigned int clientreg)
void run_alarms (void)
RETSIGTYPE alarm_handler (int a)
int get_next_alarm_delay_time (struct timeval *delta)
void set_an_alarm (void)
unsigned int snmp_alarm_register (unsigned int when, unsigned int flags, SNMPAlarmCallback *thecallback, void *clientarg)
 This function registers function callbacks to occur at a speciifc time in the future.
unsigned int snmp_alarm_register_hr (struct timeval t, unsigned int flags, SNMPAlarmCallback *cb, void *cd)
 This function offers finer granularity as to when the callback function is called by making use of t->tv_usec value forming the "when" aspect of snmp_alarm_register().

関数

unsigned int snmp_alarm_register ( unsigned int  when,
unsigned int  flags,
SNMPAlarmCallback *  thecallback,
void *  clientarg 
)

This function registers function callbacks to occur at a speciifc time in the future.

引数:
when is an unsigned integer specifying when the callback function will be called in seconds.
flags is an unsigned integer that specifies how frequent the callback function is called in seconds. Should be SA_REPEAT or 0. If flags is set with SA_REPEAT, then the registered callback function will be called every SA_REPEAT seconds. If flags is 0 then the function will only be called once and then removed from the registered alarm list.
thecallback is a pointer SNMPAlarmCallback which is the callback function being stored and registered.
clientarg is a void pointer used by the callback function. This pointer is assigned to snmp_alarm->clientarg and passed into the callback function for the client's specifc needs.
戻り値:
Returns a unique unsigned integer(which is also passed as the first argument of each callback), which can then be used to remove the callback from the list at a later point in the future using the snmp_alarm_unregister() function. If memory could not be allocated for the snmp_alarm struct 0 is returned.
参照:
snmp_alarm_unregister

snmp_alarm_register_hr

snmp_alarm_unregister_all

例:
delayed_instance.cnotification.c.

snmp_alarm.c404 行で定義されています。

参照先 NULLsa_update_entry()set_an_alarm()SNMP_MALLOC_STRUCT.

参照元 netsnmp_cache_timer_start().

unsigned int snmp_alarm_register_hr ( struct timeval  t,
unsigned int  flags,
SNMPAlarmCallback *  cb,
void *  cd 
)

This function offers finer granularity as to when the callback function is called by making use of t->tv_usec value forming the "when" aspect of snmp_alarm_register().

引数:
t is a timeval structure used to specify when the callback function(alarm) will be called. Adds the ability to specify microseconds. t.tv_sec and t.tv_usec are assigned to snmp_alarm->tv_sec and snmp_alarm->tv_usec respectively internally. The snmp_alarm_register function only assigns seconds(it's when argument).
flags is an unsigned integer that specifies how frequent the callback function is called in seconds. Should be SA_REPEAT or NULL. If flags is set with SA_REPEAT, then the registered callback function will be called every SA_REPEAT seconds. If flags is NULL then the function will only be called once and then removed from the registered alarm list.
cb is a pointer SNMPAlarmCallback which is the callback function being stored and registered.
cd is a void pointer used by the callback function. This pointer is assigned to snmp_alarm->clientarg and passed into the callback function for the client's specifc needs.
戻り値:
Returns a unique unsigned integer(which is also passed as the first argument of each callback), which can then be used to remove the callback from the list at a later point in the future using the snmp_alarm_unregister() function. If memory could not be allocated for the snmp_alarm struct 0 is returned.
参照:
snmp_alarm_register

snmp_alarm_unregister

snmp_alarm_unregister_all

snmp_alarm.c481 行で定義されています。

参照先 NULLsa_update_entry()set_an_alarm()SNMP_MALLOC_STRUCT.

void snmp_alarm_unregister ( unsigned int  clientreg  ) 

This function removes the callback function from a list of registered alarms, unregistering the alarm.

引数:
clientreg is a unique unsigned integer representing a registered alarm which the client wants to unregister.
戻り値:
void
参照:
snmp_alarm_register

snmp_alarm_register_hr

snmp_alarm_unregister_all

snmp_alarm.c151 行で定義されています。

参照先 clientregnextNULL.

参照元 netsnmp_cache_timer_stop()sa_update_entry().

void snmp_alarm_unregister_all ( void   ) 

This function unregisters all alarms currently stored.

戻り値:
void
参照:
snmp_alarm_register

snmp_alarm_register_hr

snmp_alarm_unregister

snmp_alarm.c184 行で定義されています。

参照先 nextNULL.

参照元 snmp_shutdown().


net-snmpに対してSat Sep 5 13:14:29 2009に生成されました。  doxygen 1.4.7