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 u8_t snmp_v1_enabled(
void);
110 u8_t snmp_v2c_enabled(
void);
111 u8_t snmp_v3_enabled(
void);
112 void snmp_v1_enable(
u8_t enable);
113 void snmp_v2c_enable(
u8_t enable);
114 void snmp_v3_enable(
u8_t enable);
116 const char * snmp_get_community(
void);
117 const char * snmp_get_community_write(
void);
118 const char * snmp_get_community_trap(
void);
119 void snmp_set_community(
const char *
const community);
120 void snmp_set_community_write(
const char *
const community);
121 void snmp_set_community_trap(
const char *
const community);
123 void snmp_coldstart_trap(
void);
124 void snmp_authfail_trap(
void);
126 typedef void (*snmp_write_callback_fct)(
const u32_t* oid,
u8_t oid_len,
void* callback_arg);
127 void snmp_set_write_callback(snmp_write_callback_fct write_callback,
void* callback_arg);
int32_t s32_t
Definition: arch.h:130
uint32_t u32_t
Definition: arch.h:129
uint8_t u8_t
Definition: arch.h:125
uint16_t u16_t
Definition: arch.h:127
s8_t err_t
Definition: err.h:96
ip6_addr_t ip_addr_t
Definition: ip_addr.h:318