snmp_alarm man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]



SNMP_ALARM(3)					    SNMP_ALARM(3)

NAME
       snmp_alarm_register,		   snmp_alarm_unregister,
       init_snmp_alarm, int init_alarm_post_config - alarm  func-
       tions

SYNOPSIS
       #include <snmp_alarm.h>

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

	 void
	 snmp_alarm_unregister(unsigned int registrationNumber)

	 void
	 init_snmp_alarm(void)

	 void
	 init_alarm_post_config(0,0,NULL,NULL);

DESCRIPTION
       These functions implement support for a generic timer han-
       dling mechanism for multiple parts of  an  application  to
       register function callbacks to happen at a particular time
       in the future.

USAGE
       The usage is fairly simple and  straight-forward:   Simply
       create  a  function  you want called back at some point in
       the future.  The function definition should be similar to:

       void my_callback_func(unsigned int registrationNumber, void *clientarg);

       Then, call snmp_alarm_register() to register your callback
       to be called seconds from now.	The  flags  field  should
       either  be  SA_REPEAT  or  NULL.	  If  flags  is	 set with
       SA_REPEAT, then the registered callback function	 will  be
       called  every  seconds.	If the SA_REPEAT flag is not set,
       then the function will only be  called  once  and  removed
       from the alarm system registration.

       The  clientarg  parameter  in the registration function is
       used only be th client function and is stored  and  passed
       back directly to them on every call to the system.

       The   snmp_alarm_register()   function  returns	a  unique
       unsigned int (which is also passed to the  callback  func-
       tion  on	 each call), which can then be used to remove the
       callback from the queue at a later  point  in  the  future
       using   the   snmp_alarm_unregister()   function.  If  the

			   26 Jan 2000				1

SNMP_ALARM(3)					    SNMP_ALARM(3)

       snmp_alarm_register() call fails it returns zero.

INITIALIZATION
       The init_snmp_alarm() function initializes  the	routines,
       but  a  call  to init_alarm_post_config() should be called
       even later and sets up the first timer to  initialize  the
       callback function.  These two functions should not be used
       directly by applications, but  are  instead  used  by  the
       init_snmp() function which you should call instead.

NOTES
       Internally,  the snmp_alarm system uses the SIGALRM signal
       and therefore no other part of the application  should  be
       using the regular system based alarm() function.

SEE ALSO
       snmp_api(3)

			   26 Jan 2000				2

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net