/usr/include/net-snmp/agent/agent_index.h is in libsnmp-dev 5.7.2~dfsg-8.1ubuntu3.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 | #ifndef AGENT_INDEX_H
#define AGENT_INDEX_H
#ifdef __cplusplus
extern "C" {
#endif
#define ALLOCATE_THIS_INDEX 0x0
#define ALLOCATE_ANY_INDEX 0x1
#define ALLOCATE_NEW_INDEX 0x3
/*
* N.B: it's deliberate that NEW_INDEX & ANY_INDEX == ANY_INDEX
*/
#define ANY_INTEGER_INDEX -1
#define ANY_STRING_INDEX NULL
#define ANY_OID_INDEX NULL
#define INDEX_ERR_GENERR -1
#define INDEX_ERR_WRONG_TYPE -2
#define INDEX_ERR_NOT_ALLOCATED -3
#define INDEX_ERR_WRONG_SESSION -4
char *register_string_index(oid *, size_t, char *);
int register_int_index(oid *, size_t, int);
netsnmp_variable_list *register_oid_index(oid *, size_t, oid *, size_t);
netsnmp_variable_list *register_index(netsnmp_variable_list *, int,
netsnmp_session *);
int unregister_string_index(oid *, size_t, char *);
int unregister_int_index(oid *, size_t, int);
int unregister_oid_index(oid *, size_t, oid *, size_t);
int release_index(netsnmp_variable_list *);
int remove_index(netsnmp_variable_list *, netsnmp_session *);
void unregister_index_by_session(netsnmp_session *);
int unregister_index(netsnmp_variable_list *, int,
netsnmp_session *);
unsigned long count_indexes(oid * name, size_t namelen,
int include_unallocated);
#ifdef __cplusplus
}
#endif
#endif /* AGENT_INDEX_H */
|