/usr/include/net-snmp/agent/sysORTable.h is in libsnmp-dev 5.7.3+dfsg-1ubuntu4.2.
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 61 62 | #ifndef NETSNMP_SYSORTABLE_H
#define NETSNMP_SYSORTABLE_H
struct sysORTable {
char *OR_descr;
oid *OR_oid;
size_t OR_oidlen;
netsnmp_session *OR_sess;
u_long OR_uptime;
};
struct register_sysOR_parameters {
char *descr;
oid *name;
size_t namelen;
};
#define SYS_ORTABLE_REGISTERED_OK 0
#define SYS_ORTABLE_REGISTRATION_FAILED -1
#define SYS_ORTABLE_UNREGISTERED_OK 0
#define SYS_ORTABLE_NO_SUCH_REGISTRATION -1
#include <net-snmp/agent/agent_callbacks.h>
#define REGISTER_SYSOR_TABLE(theoid, len, descr) \
do { \
struct sysORTable t; \
t.OR_descr = NETSNMP_REMOVE_CONST(char *, descr); \
t.OR_oid = theoid; \
t.OR_oidlen = len; \
t.OR_sess = NULL; \
t.OR_uptime = 0; \
snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, \
SNMPD_CALLBACK_REQ_REG_SYSOR, &t); \
} while(0);
#define REGISTER_SYSOR_ENTRY(theoid, descr) \
REGISTER_SYSOR_TABLE(theoid, sizeof(theoid) / sizeof(oid), \
descr)
#define UNREGISTER_SYSOR_TABLE(theoid, len) \
do { \
struct sysORTable t; \
t.OR_descr = NULL; \
t.OR_oid = theoid; \
t.OR_oidlen = len; \
t.OR_sess = NULL; \
t.OR_uptime = 0; \
snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, \
SNMPD_CALLBACK_REQ_UNREG_SYSOR, &t); \
} while(0);
#define UNREGISTER_SYSOR_ENTRY(theoid) \
UNREGISTER_SYSOR_TABLE(theoid, sizeof(theoid) / sizeof(oid))
#define UNREGISTER_SYSOR_SESS(sess) \
snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, \
SNMPD_CALLBACK_REQ_UNREG_SYSOR_SESS, \
sess);
#endif /* NETSNMP_SYSORTABLE_H */
|