typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef struct FILE FILE;
typedef unsigned long fd_set;
typedef unsigned long size_t;
#include <net-snmp/net-snmp-config.h>
typedef struct timeval timeval;
typedef struct netsnmp_large_fd_set_s {
unsigned lfs_setsize;
fd_set *lfs_setptr;
fd_set lfs_set;
} netsnmp_large_fd_set;
typedef u_long oid;
typedef union {
long *integer;
u_char *string;
oid *objid;
u_char *bitstring;
struct counter64 *counter64;
#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
float *floatVal;
double *doubleVal;
#endif
} netsnmp_vardata;
#define MAX_OID_LEN 128
typedef struct variable_list {
struct variable_list *next_variable;
oid *name;
size_t name_length;
u_char type;
netsnmp_vardata val;
size_t val_len;
oid name_loc[MAX_OID_LEN];
u_char buf[40];
void *data;
void (*dataFreeHook)(void *);
int index;
} netsnmp_variable_list;
typedef struct snmp_pdu {
#define non_repeaters errstat
#define max_repetitions errindex
long version;
int command;
long reqid;
long msgid;
long transid;
long sessid;
long errstat;
long errindex;
u_long time;
u_long flags;
int securityModel;
int securityLevel;
int msgParseModel;
void *transport_data;
int transport_data_length;
const oid *tDomain;
size_t tDomainLen;
netsnmp_variable_list *variables;
u_char *community;
size_t community_len;
oid *enterprise;
size_t enterprise_length;
long trap_type;
long specific_type;
unsigned char agent_addr[4];
u_char *contextEngineID;
size_t contextEngineIDLen;
char *contextName;
size_t contextNameLen;
u_char *securityEngineID;
size_t securityEngineIDLen;
char *securityName;
size_t securityNameLen;
int priority;
int range_subid;
void *securityStateRef;
} netsnmp_pdu;
struct snmp_session;
typedef struct snmp_session netsnmp_session;
#define USM_AUTH_KU_LEN 32
#define USM_PRIV_KU_LEN 32
typedef int (*snmp_callback) (int, netsnmp_session *, int,
netsnmp_pdu *, void *);
typedef int (*netsnmp_callback) (int, netsnmp_session *, int,
netsnmp_pdu *, void *);
struct netsnmp_container_s;
struct snmp_session {
long version;
int retries;
long timeout;
u_long flags;
struct snmp_session *subsession;
struct snmp_session *next;
char *peername;
u_short remote_port;
char *localname;
u_short local_port;
u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);
netsnmp_callback callback;
void *callback_magic;
int s_errno;
int s_snmp_errno;
long sessid;
u_char *community;
size_t community_len;
size_t rcvMsgMaxSize;
size_t sndMsgMaxSize;
u_char isAuthoritative;
u_char *contextEngineID;
size_t contextEngineIDLen;
u_int engineBoots;
u_int engineTime;
char *contextName;
size_t contextNameLen;
u_char *securityEngineID;
size_t securityEngineIDLen;
char *securityName;
size_t securityNameLen;
oid *securityAuthProto;
size_t securityAuthProtoLen;
u_char securityAuthKey[USM_AUTH_KU_LEN];
size_t securityAuthKeyLen;
u_char *securityAuthLocalKey;
size_t securityAuthLocalKeyLen;
oid *securityPrivProto;
size_t securityPrivProtoLen;
u_char securityPrivKey[USM_PRIV_KU_LEN];
size_t securityPrivKeyLen;
u_char *securityPrivLocalKey;
size_t securityPrivLocalKeyLen;
int securityModel;
int securityLevel;
char *paramName;
void *securityInfo;
struct netsnmp_container_s *transport_configuration;
void *myvoid;
};
NETSNMP_IMPORT
void snmp_sess_init(netsnmp_session *);
NETSNMP_IMPORT
netsnmp_session *snmp_open(netsnmp_session *);
NETSNMP_IMPORT
int snmp_close(netsnmp_session *);
NETSNMP_IMPORT
int snmp_close_sessions(void);
NETSNMP_IMPORT
int snmp_send(netsnmp_session *, netsnmp_pdu *);
NETSNMP_IMPORT
int snmp_async_send(netsnmp_session *, netsnmp_pdu *,
netsnmp_callback, void *);
NETSNMP_IMPORT
void snmp_read(fd_set *);
NETSNMP_IMPORT
void snmp_read2(netsnmp_large_fd_set *);
NETSNMP_IMPORT
int snmp_synch_response(netsnmp_session *, netsnmp_pdu *,
netsnmp_pdu **);
NETSNMP_IMPORT
int snmp_select_info(int *, fd_set *, struct timeval *,
int *);
NETSNMP_IMPORT
int snmp_select_info2(int *, netsnmp_large_fd_set *,
struct timeval *, int *);
#define NETSNMP_SELECT_NOFLAGS 0x00
#define NETSNMP_SELECT_NOALARMS 0x01
NETSNMP_IMPORT
int snmp_sess_select_info_flags(void *, int *, fd_set *,
struct timeval *, int *, int);
int snmp_sess_select_info2_flags(void *, int *,
netsnmp_large_fd_set *,
struct timeval *, int *, int);
NETSNMP_IMPORT
void snmp_timeout(void);
NETSNMP_IMPORT
void *snmp_sess_open(netsnmp_session *);
NETSNMP_IMPORT
void *snmp_sess_pointer(netsnmp_session *);
NETSNMP_IMPORT
netsnmp_session *snmp_sess_session(void *);
NETSNMP_IMPORT
netsnmp_session *snmp_sess_session_lookup(void *);
NETSNMP_IMPORT
int snmp_sess_send(void *, netsnmp_pdu *);
NETSNMP_IMPORT
int snmp_sess_async_send(void *, netsnmp_pdu *,
netsnmp_callback, void *);
NETSNMP_IMPORT
int snmp_sess_select_info(void *, int *, fd_set *,
struct timeval *, int *);
NETSNMP_IMPORT
int snmp_sess_select_info2(void *, int *,
netsnmp_large_fd_set *,
struct timeval *, int *);
NETSNMP_IMPORT
int snmp_sess_read(void *, fd_set *);
NETSNMP_IMPORT
int snmp_sess_read2(void *,
netsnmp_large_fd_set *);
NETSNMP_IMPORT
void snmp_sess_timeout(void *);
NETSNMP_IMPORT
int snmp_sess_close(void *);
NETSNMP_IMPORT
int snmp_sess_synch_response(void *, netsnmp_pdu *,
netsnmp_pdu **);
NETSNMP_IMPORT
netsnmp_pdu *snmp_pdu_create(int type);
NETSNMP_IMPORT
netsnmp_pdu *snmp_clone_pdu(netsnmp_pdu *pdu);
NETSNMP_IMPORT
netsnmp_pdu *snmp_fix_pdu( netsnmp_pdu *pdu, int idx);
NETSNMP_IMPORT
void snmp_free_pdu( netsnmp_pdu *pdu);
NETSNMP_IMPORT
int add_mibdir(const char *);
NETSNMP_IMPORT
void netsnmp_init_mib(void);
#ifndef NETSNMP_NO_LEGACY_DEFINITIONS
NETSNMP_IMPORT
void init_mib(void);
NETSNMP_IMPORT
void init_mib_internals(void);
#endif
NETSNMP_IMPORT
void shutdown_mib(void);
NETSNMP_IMPORT
struct tree *netsnmp_read_module(const char *);
#ifndef NETSNMP_NO_LEGACY_DEFINITIONS
NETSNMP_IMPORT
struct tree *read_module(const char *);
#endif
NETSNMP_IMPORT
struct tree *read_mib(const char *);
NETSNMP_IMPORT
struct tree *read_all_mibs(void);
NETSNMP_IMPORT
void add_module_replacement(const char *, const char *,
const char *, int);
NETSNMP_IMPORT
void snmp_set_mib_warnings(int);
NETSNMP_IMPORT
void snmp_set_mib_errors(int);
NETSNMP_IMPORT
void snmp_set_save_descriptions(int);
NETSNMP_IMPORT
int read_objid(const char *, oid *, size_t *);
NETSNMP_IMPORT
oid *snmp_parse_oid(const char *, oid *, size_t *);
NETSNMP_IMPORT
int get_module_node(const char *, const char *, oid *, size_t *);
NETSNMP_IMPORT
void print_mib(FILE * fp);
NETSNMP_IMPORT
void print_objid(const oid * objid, size_t objidlen);
NETSNMP_IMPORT
void fprint_objid(FILE * fp,
const oid * objid, size_t objidlen);
NETSNMP_IMPORT
int snprint_objid(char *buf, size_t buf_len,
const oid * objid, size_t objidlen);
NETSNMP_IMPORT
void print_description(oid * objid, size_t objidlen, int width);
NETSNMP_IMPORT
void fprint_description(FILE * fp,
oid * objid, size_t objidlen, int width);
NETSNMP_IMPORT
int snprint_description(char *buf, size_t buf_len,
oid * objid, size_t objidlen, int width);
NETSNMP_IMPORT
netsnmp_variable_list *
snmp_pdu_add_variable(netsnmp_pdu *pdu,
const oid * name, size_t name_length,
u_char type,
const void * value, size_t len);
NETSNMP_IMPORT
netsnmp_variable_list *
snmp_varlist_add_variable(netsnmp_variable_list ** varlist,
const oid * name, size_t name_length,
u_char type,
const void * value, size_t len);
NETSNMP_IMPORT
netsnmp_variable_list *
snmp_add_null_var(netsnmp_pdu *pdu,
const oid * name, size_t name_length);
NETSNMP_IMPORT
netsnmp_variable_list *
snmp_clone_varbind(netsnmp_variable_list * varlist);
NETSNMP_IMPORT
int snmp_set_var_objid(netsnmp_variable_list * var,
const oid * name, size_t name_length);
NETSNMP_IMPORT
int snmp_set_var_value(netsnmp_variable_list * var,
const void * value, size_t len);
NETSNMP_IMPORT
int snmp_set_var_typed_value(netsnmp_variable_list * var,
u_char type,
const void * value, size_t len);
NETSNMP_IMPORT
int snmp_set_var_typed_integer(netsnmp_variable_list * var,
u_char type, long val);
NETSNMP_IMPORT
void print_variable(const oid * objid, size_t objidlen,
const netsnmp_variable_list * variable);
NETSNMP_IMPORT
void fprint_variable(FILE * fp,
const oid * objid, size_t objidlen,
const netsnmp_variable_list * variable);
NETSNMP_IMPORT
int snprint_variable(char *buf, size_t buf_len,
const oid * objid, size_t objidlen,
const netsnmp_variable_list * variable);
NETSNMP_IMPORT
void print_value(const oid * objid, size_t objidlen,
const netsnmp_variable_list * variable);
NETSNMP_IMPORT
void fprint_value(FILE * fp,
const oid * objid, size_t objidlen,
const netsnmp_variable_list * variable);
NETSNMP_IMPORT
int snprint_value(char *buf, size_t buf_len,
const oid * objid, size_t objidlen,
const netsnmp_variable_list * variable);
NETSNMP_IMPORT
void snmp_free_var( netsnmp_variable_list *var);
NETSNMP_IMPORT
void snmp_free_varbind(netsnmp_variable_list *varlist);
NETSNMP_IMPORT
struct config_line *register_config_handler(const char *filePrefix,
const char *token,
void (*parser) (const char *, char *),
void (*releaser) (void),
const char *usageLine);
NETSNMP_IMPORT
struct config_line *register_const_config_handler(const char *filePrefix,
const char *token,
void (*parser) (const char *, const char *),
void (*releaser) (void),
const char *usageLine);
NETSNMP_IMPORT
struct config_line *register_prenetsnmp_mib_handler(const char *filePrefix,
const char *token,
void (*parser) (const char *, char *),
void (*releaser) (void),
const char *usageLine);
NETSNMP_IMPORT
void unregister_config_handler(const char *filePrefix, const char *token);
void register_mib_handlers(void);
void unregister_all_config_handlers(void);
NETSNMP_IMPORT
struct config_line *register_app_config_handler(
const char *token,
void (*parser) (const char *, char *),
void (*releaser) (void),
const char *usageLine);
NETSNMP_IMPORT
struct config_line *register_app_prenetsnmp_mib_handler(
const char *token,
void (*parser) (const char *, char *),
void (*releaser) (void),
const char *usageLine);
NETSNMP_IMPORT
void unregister_app_config_handler( const char *token);
NETSNMP_IMPORT
void read_configs(void);
NETSNMP_IMPORT
void read_premib_configs(void);
NETSNMP_IMPORT
void read_config_print_usage(const char *lead);
NETSNMP_IMPORT
void config_perror(const char *);
NETSNMP_IMPORT
void config_pwarn(const char *);
NETSNMP_IMPORT
void snmp_error(netsnmp_session *sess, int *clib_errorno,
int *snmp_errorno, char **errstring);
NETSNMP_IMPORT
void snmp_sess_error( void *sess, int *clib_errorno,
int *snmp_errorno, char **errstring);
NETSNMP_IMPORT
const char *snmp_api_errstring(int snmp_errorno);
NETSNMP_IMPORT
const char *snmp_errstring(int snmp_errorno);
NETSNMP_IMPORT
void snmp_perror(const char *msg);
NETSNMP_IMPORT
void snmp_sess_perror(const char *msg, netsnmp_session *sess);
NETSNMP_IMPORT
void snmp_log_perror(const char *msg);
#define _LOG_ATTR __attribute__ ((__format__ (__printf__, 2, 3)))
NETSNMP_IMPORT
int snmp_log( int priority, const char *format, ...) _LOG_ATTR;
NETSNMP_IMPORT
int snmp_get_do_logging( void);
NETSNMP_IMPORT
void netsnmp_logging_restart(void);
NETSNMP_IMPORT
void snmp_disable_log( void);
NETSNMP_IMPORT
void shutdown_snmp_logging( void);
NETSNMP_IMPORT void *netsnmp_malloc(size_t size);
NETSNMP_IMPORT void *netsnmp_calloc(size_t nelem, size_t elsize);
NETSNMP_IMPORT void *netsnmp_realloc(void *ptr, size_t size);
NETSNMP_IMPORT void netsnmp_free(void *ptr);
NETSNMP_IMPORT char *netsnmp_strdup(const char *s1);
NETSNMP_IMPORT void snmp_free_var_internals(netsnmp_variable_list *);
NETSNMP_IMPORT
long snmp_get_next_msgid(void);
NETSNMP_IMPORT
long snmp_get_next_reqid(void);
NETSNMP_IMPORT
long snmp_get_next_sessid(void);
NETSNMP_IMPORT
long snmp_get_next_transid(void);
NETSNMP_IMPORT
int snmp_oid_compare(const oid *, size_t, const oid *,
size_t);
NETSNMP_IMPORT
int snmp_oid_ncompare(const oid *, size_t, const oid *,
size_t, size_t);
NETSNMP_IMPORT
int snmp_oidtree_compare(const oid *, size_t, const oid *,
size_t);
NETSNMP_IMPORT
int snmp_oidsubtree_compare(const oid *, size_t, const oid *,
size_t);
NETSNMP_IMPORT
int netsnmp_oid_compare_ll(const oid * in_name1,
size_t len1, const oid * in_name2,
size_t len2, size_t *offpt);
NETSNMP_IMPORT
int netsnmp_oid_equals(const oid *, size_t, const oid *,
size_t);
NETSNMP_IMPORT
int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
size_t);
NETSNMP_IMPORT
int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
size_t);
NETSNMP_IMPORT
int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
const oid * in_name2, size_t len2);
NETSNMP_IMPORT
void init_snmp(const char *);
NETSNMP_IMPORT
u_char *snmp_pdu_build(netsnmp_pdu *, u_char *, size_t *);
#ifdef NETSNMP_USE_REVERSE_ASNENCODING
NETSNMP_IMPORT
u_char *snmp_pdu_rbuild(netsnmp_pdu *, u_char *, size_t *);
#endif
NETSNMP_IMPORT
int snmpv3_parse(netsnmp_pdu *, u_char *, size_t *,
u_char **, netsnmp_session *);
NETSNMP_IMPORT
int snmpv3_packet_build(netsnmp_session *,
netsnmp_pdu *pdu, u_char * packet,
size_t * out_length,
u_char * pdu_data,
size_t pdu_data_len);
NETSNMP_IMPORT
int snmpv3_packet_rbuild(netsnmp_session *,
netsnmp_pdu *pdu, u_char * packet,
size_t * out_length,
u_char * pdu_data,
size_t pdu_data_len);
NETSNMP_IMPORT
int snmpv3_make_report(netsnmp_pdu *pdu, int error);
NETSNMP_IMPORT
int snmpv3_get_report_type(netsnmp_pdu *pdu);
NETSNMP_IMPORT
int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
size_t * length);
NETSNMP_IMPORT
u_char *snmpv3_scopedPDU_parse(netsnmp_pdu *pdu, u_char * cp,
size_t * length);
NETSNMP_IMPORT
void snmp_store_needed(const char *type);
NETSNMP_IMPORT
void snmp_store_if_needed(void);
NETSNMP_IMPORT
void snmp_store(const char *type);
NETSNMP_IMPORT
void snmp_shutdown(const char *type);
NETSNMP_IMPORT
int snmp_add_var(netsnmp_pdu *, const oid *, size_t, char,
const char *);
NETSNMP_IMPORT
oid *snmp_duplicate_objid(const oid * objToCopy, size_t);
NETSNMP_IMPORT
int create_user_from_session(netsnmp_session * session);
NETSNMP_IMPORT
int snmpv3_probe_contextEngineID_rfc5343(void *slp,
netsnmp_session *session);
NETSNMP_IMPORT
int snmpv3_packet_realloc_rbuild(u_char ** pkt, size_t * pkt_len,
size_t * offset,
netsnmp_session * session,
netsnmp_pdu *pdu, u_char * pdu_data,
size_t pdu_data_len);
NETSNMP_IMPORT
int snmp_pdu_realloc_rbuild(u_char ** pkt, size_t * pkt_len,
size_t * offset, netsnmp_pdu *pdu);
NETSNMP_IMPORT
netsnmp_session *snmp_open_ex(netsnmp_session *,
int (*fpre_parse) (netsnmp_session *,
struct
netsnmp_transport_s *,
void *, int),
int (*fparse) (netsnmp_session *,
netsnmp_pdu *, u_char *,
size_t),
int (*fpost_parse) (netsnmp_session *,
netsnmp_pdu *, int),
int (*fbuild) (netsnmp_session *,
netsnmp_pdu *, u_char *,
size_t *),
int (*frbuild) (netsnmp_session *,
netsnmp_pdu *, u_char **,
size_t *, size_t *),
int (*fcheck) (u_char *, size_t));
NETSNMP_IMPORT
void snmp_set_do_debugging(int);
NETSNMP_IMPORT
int snmp_get_do_debugging(void);
NETSNMP_IMPORT
void netsnmp_sess_log_error(int priority,
const char *prog_string,
netsnmp_session * ss);
NETSNMP_IMPORT
const char * snmp_pdu_type(int type);
NETSNMP_IMPORT
struct netsnmp_transport_s *snmp_sess_transport(void *);
NETSNMP_IMPORT
void snmp_sess_transport_set(void *,
struct netsnmp_transport_s *);
NETSNMP_IMPORT int
netsnmp_sess_config_transport(struct netsnmp_container_s *transport_configuration,
struct netsnmp_transport_s *transport);
NETSNMP_IMPORT int
netsnmp_sess_config_and_open_transport(netsnmp_session *in_session,
struct netsnmp_transport_s *transport);
NETSNMP_IMPORT
void *snmp_sess_add_ex(netsnmp_session *,
struct netsnmp_transport_s *,
int (*fpre_parse) (netsnmp_session *,
struct
netsnmp_transport_s
*, void *, int),
int (*fparse) (netsnmp_session *,
struct snmp_pdu *,
u_char *, size_t),
int (*fpost_parse) (netsnmp_session *,
struct snmp_pdu *,
int),
int (*fbuild) (netsnmp_session *,
struct snmp_pdu *,
u_char *, size_t *),
int (*frbuild) (netsnmp_session *,
struct snmp_pdu *,
u_char **, size_t *,
size_t *),
int (*fcheck) (u_char *, size_t),
netsnmp_pdu *(*fcreate_pdu) (struct
netsnmp_transport_s
*,
void *,
size_t));
NETSNMP_IMPORT
void *snmp_sess_add(netsnmp_session *,
struct netsnmp_transport_s *,
int (*fpre_parse) (netsnmp_session *,
struct
netsnmp_transport_s *,
void *, int),
int (*fpost_parse) (netsnmp_session *,
netsnmp_pdu *, int));
NETSNMP_IMPORT
netsnmp_session *snmp_add(netsnmp_session *,
struct netsnmp_transport_s *,
int (*fpre_parse) (netsnmp_session *,
struct netsnmp_transport_s
*, void *, int),
int (*fpost_parse) (netsnmp_session *,
netsnmp_pdu *, int));
NETSNMP_IMPORT
netsnmp_session *snmp_add_full(netsnmp_session * in_session,
struct netsnmp_transport_s *transport,
int (*fpre_parse) (netsnmp_session *,
struct
netsnmp_transport_s
*, void *, int),
int (*fparse) (netsnmp_session *,
netsnmp_pdu *, u_char *,
size_t),
int (*fpost_parse) (netsnmp_session *,
netsnmp_pdu *, int),
int (*fbuild) (netsnmp_session *,
netsnmp_pdu *, u_char *,
size_t *),
int (*frbuild) (netsnmp_session *,
netsnmp_pdu *,
u_char **, size_t *,
size_t *),
int (*fcheck) (u_char *, size_t),
netsnmp_pdu *(*fcreate_pdu) (struct
netsnmp_transport_s
*, void *,
size_t)
);
typedef int (SNMPCallback) (int majorID, int minorID,
void *serverarg, void *clientarg);
struct snmp_gen_callback {
SNMPCallback *sc_callback;
void *sc_client_arg;
int priority;
struct snmp_gen_callback *next;
};
NETSNMP_IMPORT
void init_callbacks(void);
NETSNMP_IMPORT
int netsnmp_register_callback(int major, int minor,
SNMPCallback * new_callback,
void *arg, int priority);
NETSNMP_IMPORT
int snmp_register_callback(int major, int minor,
SNMPCallback * new_callback,
void *arg);
NETSNMP_IMPORT
int snmp_call_callbacks(int major, int minor,
void *caller_arg);
NETSNMP_IMPORT
int snmp_callback_available(int major, int minor);
NETSNMP_IMPORT
int snmp_count_callbacks(int major, int minor);
NETSNMP_IMPORT
int snmp_unregister_callback(int major, int minor,
SNMPCallback * new_callback,
void *arg, int matchargs);
NETSNMP_IMPORT
void clear_callback (void);
int netsnmp_callback_clear_client_arg(void *, int i, int j);
struct snmp_gen_callback *snmp_callback_list(int major, int minor);
NETSNMP_IMPORT
int setup_engineID(u_char ** eidp, const char *text);
void engineID_conf(const char *word, char *cptr);
void engineBoots_conf(const char *, char *);
void engineIDType_conf(const char *, char *);
void engineIDNic_conf(const char *, char *);
NETSNMP_IMPORT
void init_snmpv3(const char *);
int init_snmpv3_post_config(int majorid, int minorid,
void *serverarg,
void *clientarg);
int init_snmpv3_post_premib_config(int majorid,
int minorid,
void *serverarg,
void *clientarg);
void shutdown_snmpv3(const char *type);
int snmpv3_store(int majorID, int minorID, void *serverarg,
void *clientarg);
NETSNMP_IMPORT
u_long snmpv3_local_snmpEngineBoots(void);
int snmpv3_clone_engineID(u_char **, size_t *, u_char *,
size_t);
NETSNMP_IMPORT
size_t snmpv3_get_engineID(u_char * buf, size_t buflen);
NETSNMP_IMPORT
u_char *snmpv3_generate_engineID(size_t *);
NETSNMP_IMPORT
u_long snmpv3_local_snmpEngineTime(void);
int get_default_secLevel(void);
void snmpv3_set_engineBootsAndTime(int boots, int ttime);
int free_engineID(int majorid, int minorid, void *serverarg,
void *clientarg);
NETSNMP_IMPORT
int parse_secLevel_conf(const char* word, char *cptr);
NETSNMP_IMPORT oid usmNoAuthProtocol[10];
#ifndef NETSNMP_DISABLE_MD5
NETSNMP_IMPORT oid usmHMACMD5AuthProtocol[10];
#endif
NETSNMP_IMPORT oid usmHMACSHA1AuthProtocol[10];
NETSNMP_IMPORT oid usmNoPrivProtocol[10];
#ifndef NETSNMP_DISABLE_DES
NETSNMP_IMPORT oid usmDESPrivProtocol[10];
#endif
NETSNMP_IMPORT oid usmAESPrivProtocol[10];
NETSNMP_IMPORT oid *usmAES128PrivProtocol;
NETSNMP_IMPORT
int generate_Ku(const oid * hashtype, u_int hashtype_len,
const u_char * P, size_t pplen,
u_char * Ku, size_t * kulen);
NETSNMP_IMPORT
int generate_kul(const oid * hashtype, u_int hashtype_len,
const u_char * engineID, size_t engineID_len,
const u_char * Ku, size_t ku_len,
u_char * Kul, size_t * kul_len);
NETSNMP_IMPORT
int encode_keychange(const oid * hashtype,
u_int hashtype_len, u_char * oldkey,
size_t oldkey_len, u_char * newkey,
size_t newkey_len, u_char * kcstring,
size_t * kcstring_len);
NETSNMP_IMPORT
int decode_keychange(const oid * hashtype,
u_int hashtype_len, u_char * oldkey,
size_t oldkey_len, u_char * kcstring,
size_t kcstring_len, u_char * newkey,
size_t * newkey_len);
struct enum_list {
struct enum_list *next;
int value;
char *label;
};
struct range_list {
struct range_list *next;
int low, high;
};
struct index_list {
struct index_list *next;
char *ilabel;
char isimplied;
};
struct varbind_list {
struct varbind_list *next;
char *vblabel;
};
struct tree {
struct tree *child_list;
struct tree *next_peer;
struct tree *next;
struct tree *parent;
char *label;
u_long subid;
int modid;
int number_modules;
int *module_list;
int tc_index;
int type;
int access;
int status;
struct enum_list *enums;
struct range_list *ranges;
struct index_list *indexes;
char *augments;
struct varbind_list *varbinds;
char *hint;
char *units;
int (*printomat) (u_char **, size_t *, size_t *, int,
const netsnmp_variable_list *,
const struct enum_list *, const char *,
const char *);
void (*printer) (char *, const netsnmp_variable_list *, const struct enum_list *, const char *, const char *);
char *description;
char *reference;
int reported;
char *defaultValue;
};
struct module_import {
char *label;
int modid;
};
struct module {
char *name;
char *file;
struct module_import *imports;
int no_imports;
int modid;
struct module *next;
};
struct module_compatability {
const char *old_module;
const char *new_module;
const char *tag;
size_t tag_len;
struct module_compatability *next;
};
#define TYPE_OTHER 0
#define TYPE_OBJID 1
#define TYPE_OCTETSTR 2
#define TYPE_INTEGER 3
#define TYPE_NETADDR 4
#define TYPE_IPADDR 5
#define TYPE_COUNTER 6
#define TYPE_GAUGE 7
#define TYPE_TIMETICKS 8
#define TYPE_OPAQUE 9
#define TYPE_NULL 10
#define TYPE_COUNTER64 11
#define TYPE_BITSTRING 12
#define TYPE_NSAPADDRESS 13
#define TYPE_UINTEGER 14
#define TYPE_UNSIGNED32 15
#define TYPE_INTEGER32 16
#define TYPE_SIMPLE_LAST 16
#define TYPE_TRAPTYPE 20
#define TYPE_NOTIFTYPE 21
#define TYPE_OBJGROUP 22
#define TYPE_NOTIFGROUP 23
#define TYPE_MODID 24
#define TYPE_AGENTCAP 25
#define TYPE_MODCOMP 26
#define TYPE_OBJIDENTITY 27
#define MIB_ACCESS_READONLY 18
#define MIB_ACCESS_READWRITE 19
#define MIB_ACCESS_WRITEONLY 20
#define MIB_ACCESS_NOACCESS 21
#define MIB_ACCESS_NOTIFY 67
#define MIB_ACCESS_CREATE 48
#define MIB_STATUS_MANDATORY 23
#define MIB_STATUS_OPTIONAL 24
#define MIB_STATUS_OBSOLETE 25
#define MIB_STATUS_DEPRECATED 39
#define MIB_STATUS_CURRENT 57
#define ANON "anonymous#"
#define ANON_LEN strlen(ANON)
int netsnmp_unload_module(const char *name);
#ifndef NETSNMP_NO_LEGACY_DEFINITIONS
int unload_module(const char *name);
#endif
void netsnmp_init_mib_internals(void);
void unload_all_mibs(void);
int add_mibfile(const char*, const char*, FILE *);
int which_module(const char *);
NETSNMP_IMPORT
char *module_name(int, char *);
NETSNMP_IMPORT
void print_subtree(FILE *, struct tree *, int);
NETSNMP_IMPORT
void print_ascii_dump_tree(FILE *, struct tree *, int);
NETSNMP_IMPORT
struct tree *find_tree_node(const char *, int);
NETSNMP_IMPORT
const char *get_tc_descriptor(int);
NETSNMP_IMPORT
const char *get_tc_description(int);
NETSNMP_IMPORT
struct tree *find_best_tree_node(const char *, struct tree *,
u_int *);
NETSNMP_IMPORT
struct tree *find_node(const char *, struct tree *);
struct tree *find_node2(const char *, const char *);
NETSNMP_IMPORT
struct module *find_module(int);
void adopt_orphans(void);
NETSNMP_IMPORT
char *snmp_mib_toggle_options(char *options);
NETSNMP_IMPORT
void snmp_mib_toggle_options_usage(const char *lead,
FILE * outf);
NETSNMP_IMPORT
void print_mib(FILE *);
NETSNMP_IMPORT
void print_mib_tree(FILE *, struct tree *, int);
int get_mib_parse_error_count(void);
NETSNMP_IMPORT
int snmp_get_token(FILE * fp, char *token, int maxtlen);
NETSNMP_IMPORT
struct tree *find_best_tree_node(const char *name,
struct tree *tree_top,
u_int * match);