36 #ifndef LWIP_HDR_APPS_SNMP_MSG_H 37 #define LWIP_HDR_APPS_SNMP_MSG_H 57 #define SNMP_IN_PORT 161 61 #ifndef SNMP_TRAP_PORT 62 #define SNMP_TRAP_PORT 162 66 #define SNMP_VERSION_1 0 67 #define SNMP_VERSION_2c 1 72 struct snmp_obj_id oid;
82 struct snmp_varbind_enumerator
84 struct snmp_pbuf_stream pbuf_stream;
88 typedef u8_t snmp_vb_enumerator_err_t;
89 #define SNMP_VB_ENUMERATOR_ERR_OK 0 90 #define SNMP_VB_ENUMERATOR_ERR_EOVB 1 91 #define SNMP_VB_ENUMERATOR_ERR_ASN1ERROR 2 92 #define SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH 3 94 void snmp_vb_enumerator_init(
struct snmp_varbind_enumerator* enumerator,
struct pbuf* p,
u16_t offset,
u16_t length);
95 snmp_vb_enumerator_err_t snmp_vb_enumerator_get_next(
struct snmp_varbind_enumerator* enumerator,
struct snmp_varbind* varbind);
110 u16_t community_strlen;
122 s32_t max_repetitions;
124 struct pbuf *inbound_pbuf;
125 struct snmp_varbind_enumerator inbound_varbind_enumerator;
126 u16_t inbound_varbind_offset;
127 u16_t inbound_varbind_len;
129 struct pbuf *outbound_pbuf;
130 struct snmp_pbuf_stream outbound_pbuf_stream;
131 u16_t outbound_pdu_offset;
132 u16_t outbound_error_status_offset;
133 u16_t outbound_error_index_offset;
134 u16_t outbound_varbind_offset;
140 extern const char *snmp_community;
142 extern const char *snmp_community_write;
144 extern void* snmp_traps_handle;
146 void snmp_receive(
void *handle,
struct pbuf *p,
const ip_addr_t *source_ip,
u16_t port);
#define SNMP_MAX_COMMUNITY_STR_LEN
#define SNMP_MAX_VALUE_SIZE