38#ifndef LWIP_HDR_APPS_SNMP_MSG_H
39#define LWIP_HDR_APPS_SNMP_MSG_H
61#define SNMP_VERSION_1 0
62#define SNMP_VERSION_2c 1
63#define SNMP_VERSION_3 3
65struct snmp_varbind_enumerator {
66 struct snmp_pbuf_stream pbuf_stream;
71 SNMP_VB_ENUMERATOR_ERR_OK = 0,
72 SNMP_VB_ENUMERATOR_ERR_EOVB = 1,
73 SNMP_VB_ENUMERATOR_ERR_ASN1ERROR = 2,
74 SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH = 3
75} snmp_vb_enumerator_err_t;
78snmp_vb_enumerator_err_t snmp_vb_enumerator_get_next(
struct snmp_varbind_enumerator *enumerator,
struct snmp_varbind *varbind);
92 u16_t community_strlen;
104 s32_t max_repetitions;
107 u8_t request_out_type;
113 s32_t msg_security_model;
114 u8_t msg_authoritative_engine_id[SNMP_V3_MAX_ENGINE_ID_LENGTH];
115 u8_t msg_authoritative_engine_id_len;
116 s32_t msg_authoritative_engine_boots;
117 s32_t msg_authoritative_engine_time;
118 u8_t msg_user_name[SNMP_V3_MAX_USER_LENGTH];
119 u8_t msg_user_name_len;
120 u8_t msg_authentication_parameters[SNMP_V3_MAX_AUTH_PARAM_LENGTH];
121 u8_t msg_authentication_parameters_len;
122 u8_t msg_privacy_parameters[SNMP_V3_MAX_PRIV_PARAM_LENGTH];
123 u8_t msg_privacy_parameters_len;
124 u8_t context_engine_id[SNMP_V3_MAX_ENGINE_ID_LENGTH];
125 u8_t context_engine_id_len;
126 u8_t context_name[SNMP_V3_MAX_ENGINE_ID_LENGTH];
127 u8_t context_name_len;
130 struct pbuf *inbound_pbuf;
131 struct snmp_varbind_enumerator inbound_varbind_enumerator;
132 u16_t inbound_varbind_offset;
133 u16_t inbound_varbind_len;
134 u16_t inbound_padding_len;
136 struct pbuf *outbound_pbuf;
137 struct snmp_pbuf_stream outbound_pbuf_stream;
138 u16_t outbound_pdu_offset;
139 u16_t outbound_error_status_offset;
140 u16_t outbound_error_index_offset;
141 u16_t outbound_varbind_offset;
143 u16_t outbound_msg_global_data_offset;
144 u16_t outbound_msg_global_data_end;
145 u16_t outbound_msg_security_parameters_str_offset;
146 u16_t outbound_msg_security_parameters_seq_offset;
147 u16_t outbound_msg_security_parameters_end;
148 u16_t outbound_msg_authentication_parameters_offset;
149 u16_t outbound_scoped_pdu_seq_offset;
150 u16_t outbound_scoped_pdu_string_offset;
157struct snmp_varbind_len {
163 u16_t value_value_len;
167extern const char *snmp_community;
169extern const char *snmp_community_write;
171extern void *snmp_traps_handle;
176err_t snmp_varbind_length(
struct snmp_varbind *varbind,
struct snmp_varbind_len *
len);
177err_t snmp_append_outbound_varbind(
struct snmp_pbuf_stream *pbuf_stream,
struct snmp_varbind *varbind);
static const WCHAR version[]
GLuint GLsizei GLsizei * length
#define SNMP_MAX_COMMUNITY_STR_LEN
#define SNMP_MAX_VALUE_SIZE