/usr/include/net-snmp/library/snmp_alarm.h is in libsnmp-dev 5.4.3~dfsg-2.4ubuntu1.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | #ifndef SNMP_ALARM_H
#define SNMP_ALARM_H
#ifdef __cplusplus
extern "C" {
#endif
typedef void (SNMPAlarmCallback) (unsigned int clientreg,
void *clientarg);
/*
* alarm flags
*/
#define SA_REPEAT 0x01 /* keep repeating every X seconds */
struct snmp_alarm {
struct timeval t;
unsigned int flags;
unsigned int clientreg;
struct timeval t_last;
struct timeval t_next;
void *clientarg;
SNMPAlarmCallback *thecallback;
struct snmp_alarm *next;
};
/*
* the ones you should need
*/
void snmp_alarm_unregister(unsigned int clientreg);
void snmp_alarm_unregister_all(void);
unsigned int snmp_alarm_register(unsigned int when,
unsigned int flags,
SNMPAlarmCallback * thecallback,
void *clientarg);
unsigned int snmp_alarm_register_hr(struct timeval t,
unsigned int flags,
SNMPAlarmCallback * cb,
void *cd);
/*
* the ones you shouldn't
*/
void init_snmp_alarm(void);
int init_alarm_post_config(int majorid, int minorid,
void *serverarg,
void *clientarg);
void sa_update_entry(struct snmp_alarm *alrm);
struct snmp_alarm *sa_find_next(void);
void run_alarms(void);
RETSIGTYPE alarm_handler(int a);
void set_an_alarm(void);
int get_next_alarm_delay_time(struct timeval *delta);
#ifdef __cplusplus
}
#endif
#endif /* SNMP_ALARM_H */
|