39 #ifndef LWIP_HDR_APPS_SNMP_H
40 #define LWIP_HDR_APPS_SNMP_H
57 struct snmp_varbind *next;
59 struct snmp_varbind *prev;
62 struct snmp_obj_id oid;
77 void snmp_set_mibs(
const struct snmp_mib **mibs,
u8_t num_mibs);
79 void snmp_set_device_enterprise_oid(
const struct snmp_obj_id* device_enterprise_oid);
80 const struct snmp_obj_id* snmp_get_device_enterprise_oid(
void);
82 void snmp_trap_dst_enable(
u8_t dst_idx,
u8_t enable);
83 void snmp_trap_dst_ip_set(
u8_t dst_idx,
const ip_addr_t *dst);
86 #define SNMP_GENTRAP_COLDSTART 0
88 #define SNMP_GENTRAP_WARMSTART 1
90 #define SNMP_GENTRAP_LINKDOWN 2
92 #define SNMP_GENTRAP_LINKUP 3
94 #define SNMP_GENTRAP_AUTH_FAILURE 4
96 #define SNMP_GENTRAP_EGP_NEIGHBOR_LOSS 5
98 #define SNMP_GENTRAP_ENTERPRISE_SPECIFIC 6
100 err_t snmp_send_trap_generic(
s32_t generic_trap);
101 err_t snmp_send_trap_specific(
s32_t specific_trap,
struct snmp_varbind *varbinds);
102 err_t snmp_send_trap(
const struct snmp_obj_id* oid,
s32_t generic_trap,
s32_t specific_trap,
struct snmp_varbind *varbinds);
104 #define SNMP_AUTH_TRAPS_DISABLED 0
105 #define SNMP_AUTH_TRAPS_ENABLED 1
106 void snmp_set_auth_traps_enabled(
u8_t enable);
107 u8_t snmp_get_auth_traps_enabled(
void);
109 const char * snmp_get_community(
void);
110 const char * snmp_get_community_write(
void);
111 const char * snmp_get_community_trap(
void);
112 void snmp_set_community(
const char *
const community);
113 void snmp_set_community_write(
const char *
const community);
114 void snmp_set_community_trap(
const char *
const community);
116 void snmp_coldstart_trap(
void);
117 void snmp_authfail_trap(
void);
119 typedef void (*snmp_write_callback_fct)(
const u32_t* oid,
u8_t oid_len,
void* callback_arg);
120 void snmp_set_write_callback(snmp_write_callback_fct write_callback,
void* callback_arg);