54#define SNMP_IS_INFORM 1
60 const struct snmp_obj_id *enterprise;
90static u16_t snmp_trap_varbind_sum(
struct snmp_msg_trap *trap,
struct snmp_varbind *varbinds);
91static u16_t snmp_trap_header_sum(
struct snmp_msg_trap *trap,
u16_t vb_len);
92static err_t snmp_trap_header_enc(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream);
93static err_t snmp_trap_varbind_enc(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream,
struct snmp_varbind *varbinds);
94static u16_t snmp_trap_header_sum_v1_specific(
struct snmp_msg_trap *trap);
95static u16_t snmp_trap_header_sum_v2c_specific(
struct snmp_msg_trap *trap);
96static err_t snmp_trap_header_enc_v1_specific(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream);
97static err_t snmp_trap_header_enc_v2c_specific(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream);
98static err_t snmp_prepare_trap_oid(
struct snmp_obj_id *dest_snmp_trap_oid,
const struct snmp_obj_id *eoid,
s32_t generic_trap,
s32_t specific_trap);
99static void snmp_prepare_necessary_msg_fields(
struct snmp_msg_trap *trap_msg,
const struct snmp_obj_id *eoid,
s32_t generic_trap,
s32_t specific_trap,
struct snmp_varbind *varbinds);
100static err_t snmp_send_msg(
struct snmp_msg_trap *trap_msg,
struct snmp_varbind *varbinds,
u16_t tot_len,
ip_addr_t *dip);
102#define BUILD_EXEC(code) \
103 if ((code) != ERR_OK) { \
104 LWIP_DEBUGF(SNMP_DEBUG, ("SNMP error during creation of outbound trap frame!\n")); \
109extern const char *snmp_community_trap;
111void *snmp_traps_handle;
126static u8_t snmp_auth_traps_enabled = 0;
129static u8_t snmp_default_trap_version = SNMP_VERSION_1;
132static s32_t req_id = 1;
145 LWIP_ASSERT_SNMP_LOCKED();
147 trap_dst[dst_idx].enable =
enable;
162 LWIP_ASSERT_SNMP_LOCKED();
179 snmp_auth_traps_enabled =
enable;
189snmp_get_auth_traps_enabled(
void)
191 return snmp_auth_traps_enabled;
206snmp_set_default_trap_version(
u8_t snmp_version)
208 snmp_default_trap_version = snmp_version;
221snmp_get_default_trap_version(
void)
223 return snmp_default_trap_version;
238snmp_prepare_trap_oid(
struct snmp_obj_id *dest_snmp_trap_oid,
const struct snmp_obj_id *eoid,
s32_t generic_trap,
s32_t specific_trap)
241 const u32_t snmpTrapOID[] = {1, 3, 6, 1, 6, 3, 1, 1, 5};
243 if (generic_trap == SNMP_GENTRAP_ENTERPRISE_SPECIFIC) {
245 MEMCPY(dest_snmp_trap_oid, snmp_get_device_enterprise_oid(),
sizeof(*dest_snmp_trap_oid));
247 MEMCPY(dest_snmp_trap_oid, eoid,
sizeof(*dest_snmp_trap_oid));
250 dest_snmp_trap_oid->id[dest_snmp_trap_oid->len++] = 0;
251 dest_snmp_trap_oid->id[dest_snmp_trap_oid->len++] = specific_trap;
255 }
else if ((generic_trap >= SNMP_GENTRAP_COLDSTART) && (generic_trap < SNMP_GENTRAP_ENTERPRISE_SPECIFIC)) {
256 if (
sizeof(dest_snmp_trap_oid->id) >=
sizeof(snmpTrapOID)) {
257 MEMCPY(&dest_snmp_trap_oid->id, snmpTrapOID ,
sizeof(snmpTrapOID));
259 dest_snmp_trap_oid->id[dest_snmp_trap_oid->len++] = specific_trap + 1;
280snmp_prepare_necessary_msg_fields(
struct snmp_msg_trap *trap_msg,
const struct snmp_obj_id *eoid,
s32_t generic_trap,
s32_t specific_trap,
struct snmp_varbind *varbinds)
282 if (trap_msg->snmp_version == SNMP_VERSION_1) {
283 trap_msg->enterprise = (eoid ==
NULL) ? snmp_get_device_enterprise_oid() : eoid;
284 trap_msg->gen_trap = generic_trap;
285 trap_msg->spc_trap = (generic_trap == SNMP_GENTRAP_ENTERPRISE_SPECIFIC) ? specific_trap : 0;
287 }
else if (trap_msg->snmp_version == SNMP_VERSION_2c) {
303snmp_send_msg(
struct snmp_msg_trap *trap_msg,
struct snmp_varbind *varbinds,
u16_t tot_len,
ip_addr_t *dip)
310 struct snmp_pbuf_stream pbuf_stream;
311 snmp_pbuf_stream_init(&pbuf_stream,
p, 0, tot_len);
314 BUILD_EXEC( snmp_trap_header_enc(trap_msg, &pbuf_stream) );
315 BUILD_EXEC( snmp_trap_varbind_enc(trap_msg, &pbuf_stream, varbinds) );
317 snmp_stats.outtraps++;
318 snmp_stats.outpkts++;
347snmp_send_trap_or_notification_or_inform_generic(
struct snmp_msg_trap *trap_msg,
const struct snmp_obj_id *eoid,
s32_t generic_trap,
s32_t specific_trap,
struct snmp_varbind *varbinds)
349 struct snmp_trap_dst *td =
NULL;
354 struct snmp_varbind *original_varbinds = varbinds;
355 struct snmp_varbind *original_prev =
NULL;
356 struct snmp_varbind snmp_v2_special_varbinds[] = {
363 {1, 3, 6, 1, 2, 1, 1, 3}
365 SNMP_ASN1_TYPE_TIMETICKS,
375 {1, 3, 6, 1, 6, 3, 1, 1, 4, 1}
377 SNMP_ASN1_TYPE_OBJECT_ID,
383 LWIP_ASSERT_SNMP_LOCKED();
385 snmp_v2_special_varbinds[0].next = &snmp_v2_special_varbinds[1];
386 snmp_v2_special_varbinds[1].prev = &snmp_v2_special_varbinds[0];
388 snmp_v2_special_varbinds[0].value = &
timestamp;
390 snmp_v2_special_varbinds[1].next = varbinds;
393 if (trap_msg->snmp_version == SNMP_VERSION_2c) {
394 struct snmp_obj_id snmp_trap_oid = { 0 };
395 err = snmp_prepare_trap_oid(&snmp_trap_oid, eoid, generic_trap, specific_trap);
397 snmp_v2_special_varbinds[1].value_len = snmp_trap_oid.len *
sizeof(snmp_trap_oid.id[0]);
398 snmp_v2_special_varbinds[1].value = snmp_trap_oid.id;
399 if (varbinds !=
NULL) {
400 original_prev = varbinds->prev;
401 varbinds->prev = &snmp_v2_special_varbinds[1];
403 varbinds = snmp_v2_special_varbinds;
410 if (snmp_get_local_ip_for_dst(snmp_traps_handle, &td->dip, &trap_msg->sip)) {
411 snmp_prepare_necessary_msg_fields(trap_msg, eoid, generic_trap, specific_trap, varbinds);
414 tot_len = snmp_trap_varbind_sum(trap_msg, varbinds);
415 tot_len = snmp_trap_header_sum(trap_msg, tot_len);
418 err = snmp_send_msg(trap_msg, varbinds, tot_len, &td->dip);
425 if ((trap_msg->snmp_version == SNMP_VERSION_2c) && (original_varbinds !=
NULL)) {
426 original_varbinds->prev = original_prev;
449snmp_send_trap(
const struct snmp_obj_id* oid,
s32_t generic_trap,
s32_t specific_trap,
struct snmp_varbind *varbinds)
451 struct snmp_msg_trap trap_msg = {0};
452 trap_msg.snmp_version = snmp_default_trap_version;
453 trap_msg.trap_or_inform = SNMP_IS_TRAP;
454 return snmp_send_trap_or_notification_or_inform_generic(&trap_msg, oid, generic_trap, specific_trap, varbinds);
464snmp_send_trap_generic(
s32_t generic_trap)
467 struct snmp_msg_trap trap_msg = {0};
468 trap_msg.snmp_version = snmp_default_trap_version;
469 trap_msg.trap_or_inform = SNMP_IS_TRAP;
471 if(snmp_default_trap_version == SNMP_VERSION_1) {
472 static const struct snmp_obj_id oid = { 7, { 1, 3, 6, 1, 2, 1, 11 } };
473 err = snmp_send_trap_or_notification_or_inform_generic(&trap_msg, &oid, generic_trap, 0,
NULL);
474 }
else if (snmp_default_trap_version == SNMP_VERSION_2c) {
475 err = snmp_send_trap_or_notification_or_inform_generic(&trap_msg,
NULL, generic_trap, 0,
NULL);
490snmp_send_trap_specific(
s32_t specific_trap,
struct snmp_varbind *varbinds)
492 struct snmp_msg_trap trap_msg = {0};
493 trap_msg.snmp_version = snmp_default_trap_version;
494 trap_msg.trap_or_inform = SNMP_IS_TRAP;
495 return snmp_send_trap_or_notification_or_inform_generic(&trap_msg,
NULL, SNMP_GENTRAP_ENTERPRISE_SPECIFIC, specific_trap, varbinds);
504snmp_coldstart_trap(
void)
506 snmp_send_trap_generic(SNMP_GENTRAP_COLDSTART);
515snmp_authfail_trap(
void)
517 if (snmp_auth_traps_enabled != 0) {
518 snmp_send_trap_generic(SNMP_GENTRAP_AUTH_FAILURE);
531snmp_trap_varbind_sum(
struct snmp_msg_trap *trap,
struct snmp_varbind *varbinds)
533 struct snmp_varbind *varbind;
539 while (varbind !=
NULL) {
540 struct snmp_varbind_len
len;
542 if (snmp_varbind_length(varbind, &
len) ==
ERR_OK) {
543 tot_len += 1 +
len.vb_len_len +
len.vb_value_len;
546 varbind = varbind->next;
549 trap->vbseqlen = tot_len;
550 snmp_asn1_enc_length_cnt(trap->vbseqlen, &tot_len_len);
551 tot_len += 1 + tot_len_len;
564snmp_trap_header_sum_v1_specific(
struct snmp_msg_trap *trap)
570 snmp_asn1_enc_u32t_cnt(trap->ts, &
len);
571 snmp_asn1_enc_length_cnt(
len, &lenlen);
572 tot_len += 1 +
len + lenlen;
574 snmp_asn1_enc_s32t_cnt(trap->spc_trap, &
len);
575 snmp_asn1_enc_length_cnt(
len, &lenlen);
576 tot_len += 1 +
len + lenlen;
578 snmp_asn1_enc_s32t_cnt(trap->gen_trap, &
len);
579 snmp_asn1_enc_length_cnt(
len, &lenlen);
580 tot_len += 1 +
len + lenlen;
588 len =
sizeof(ip_2_ip4(&trap->sip)->addr);
591 snmp_asn1_enc_length_cnt(
len, &lenlen);
592 tot_len += 1 +
len + lenlen;
594 snmp_asn1_enc_oid_cnt(trap->enterprise->id, trap->enterprise->len, &
len);
595 snmp_asn1_enc_length_cnt(
len, &lenlen);
596 tot_len += 1 +
len + lenlen;
609snmp_trap_header_sum_v2c_specific(
struct snmp_msg_trap *trap)
615 snmp_asn1_enc_u32t_cnt(req_id, &
len);
616 snmp_asn1_enc_length_cnt(
len, &lenlen);
617 tot_len += 1 +
len + lenlen;
618 snmp_asn1_enc_u32t_cnt(trap->error_status, &
len);
619 snmp_asn1_enc_length_cnt(
len, &lenlen);
620 tot_len += 1 +
len + lenlen;
621 snmp_asn1_enc_u32t_cnt(trap->error_index, &
len);
622 snmp_asn1_enc_length_cnt(
len, &lenlen);
623 tot_len += 1 +
len + lenlen;
638snmp_trap_header_sum(
struct snmp_msg_trap *trap,
u16_t vb_len)
640 u16_t tot_len = vb_len;
644 if (trap->snmp_version == SNMP_VERSION_1) {
645 tot_len += snmp_trap_header_sum_v1_specific(trap);
646 }
else if (trap->snmp_version == SNMP_VERSION_2c) {
647 tot_len += snmp_trap_header_sum_v2c_specific(trap);
649 trap->pdulen = tot_len;
650 snmp_asn1_enc_length_cnt(trap->pdulen, &lenlen);
651 tot_len += 1 + lenlen;
654 snmp_asn1_enc_length_cnt(trap->comlen, &lenlen);
655 tot_len += 1 + lenlen + trap->comlen;
657 snmp_asn1_enc_s32t_cnt(trap->snmp_version, &
len);
658 snmp_asn1_enc_length_cnt(
len, &lenlen);
659 tot_len += 1 +
len + lenlen;
661 trap->seqlen = tot_len;
662 snmp_asn1_enc_length_cnt(trap->seqlen, &lenlen);
663 tot_len += 1 + lenlen;
677snmp_trap_varbind_enc(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream,
struct snmp_varbind *varbinds)
679 struct snmp_asn1_tlv tlv;
680 struct snmp_varbind *varbind;
684 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 0, trap->vbseqlen);
685 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
687 while (varbind !=
NULL) {
688 BUILD_EXEC( snmp_append_outbound_varbind(pbuf_stream, varbind) );
690 varbind = varbind->next;
704snmp_trap_header_enc_pdu(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream)
706 struct snmp_asn1_tlv tlv;
708 if (trap->snmp_version == SNMP_VERSION_1) {
710 SNMP_ASN1_SET_TLV_PARAMS(tlv, (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_TRAP), 0, trap->pdulen);
711 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
712 }
else if ((trap->snmp_version == SNMP_VERSION_2c) && (trap->trap_or_inform == SNMP_IS_INFORM)) {
714 SNMP_ASN1_SET_TLV_PARAMS(tlv, (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_INFORM_REQ), 0, trap->pdulen);
715 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
716 }
else if (trap->snmp_version == SNMP_VERSION_2c) {
718 SNMP_ASN1_SET_TLV_PARAMS(tlv, (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_V2_TRAP), 0, trap->pdulen);
719 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
733snmp_trap_header_enc_v1_specific(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream)
735 struct snmp_asn1_tlv tlv;
737 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OBJECT_ID, 0, 0);
738 snmp_asn1_enc_oid_cnt(trap->enterprise->id, trap->enterprise->len, &tlv.value_len);
739 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
740 BUILD_EXEC( snmp_asn1_enc_oid(pbuf_stream, trap->enterprise->id, trap->enterprise->len) );
745 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_IPADDR, 0,
sizeof(
ip_2_ip6(&trap->sip)->addr));
746 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
747 BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, (
const u8_t *)&
ip_2_ip6(&trap->sip)->addr,
sizeof(
ip_2_ip6(&trap->sip)->addr)) );
751 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_IPADDR, 0,
sizeof(ip_2_ip4(&trap->sip)->addr));
752 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
753 BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, (
const u8_t *)&ip_2_ip4(&trap->sip)->addr,
sizeof(ip_2_ip4(&trap->sip)->addr)) );
758 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0);
759 snmp_asn1_enc_s32t_cnt(trap->gen_trap, &tlv.value_len);
760 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
761 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->gen_trap) );
764 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0);
765 snmp_asn1_enc_s32t_cnt(trap->spc_trap, &tlv.value_len);
766 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
767 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->spc_trap) );
770 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_TIMETICKS, 0, 0);
771 snmp_asn1_enc_s32t_cnt(trap->ts, &tlv.value_len);
772 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
773 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->ts) );
787snmp_trap_header_enc_v2c_specific(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream)
789 struct snmp_asn1_tlv tlv;
791 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0);
792 snmp_asn1_enc_s32t_cnt(req_id, &tlv.value_len);
793 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
794 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, req_id) );
797 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0);
798 snmp_asn1_enc_s32t_cnt(trap->error_status, &tlv.value_len);
799 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
800 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->error_status) );
803 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0);
804 snmp_asn1_enc_s32t_cnt(trap->error_index, &tlv.value_len);
805 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
806 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->error_index) );
820snmp_trap_header_enc(
struct snmp_msg_trap *trap,
struct snmp_pbuf_stream *pbuf_stream)
822 struct snmp_asn1_tlv tlv;
825 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 0, trap->seqlen);
826 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
829 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0);
830 snmp_asn1_enc_s32t_cnt(trap->snmp_version, &tlv.value_len);
831 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
832 BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->snmp_version) );
835 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, trap->comlen);
836 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) );
837 BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, (
const u8_t *)snmp_community_trap, trap->comlen) );
840 BUILD_EXEC( snmp_trap_header_enc_pdu(trap, pbuf_stream) );
841 if (trap->snmp_version == SNMP_VERSION_1) {
843 BUILD_EXEC( snmp_trap_header_enc_v1_specific(trap, pbuf_stream) );
844 }
else if (SNMP_VERSION_2c == trap->snmp_version) {
846 BUILD_EXEC( snmp_trap_header_enc_v2c_specific(trap, pbuf_stream) );
861snmp_send_inform_specific(
s32_t specific_trap,
struct snmp_varbind *varbinds,
s32_t *ptr_request_id)
863 return snmp_send_inform(
NULL, SNMP_GENTRAP_ENTERPRISE_SPECIFIC, specific_trap, varbinds, ptr_request_id);
875snmp_send_inform_generic(
s32_t generic_trap,
struct snmp_varbind *varbinds,
s32_t *ptr_request_id)
877 return snmp_send_inform(
NULL, generic_trap, 0, varbinds, ptr_request_id);
891snmp_send_inform(
const struct snmp_obj_id* oid,
s32_t generic_trap,
s32_t specific_trap,
struct snmp_varbind *varbinds,
s32_t *ptr_request_id)
893 struct snmp_msg_trap trap_msg = {0};
894 trap_msg.snmp_version = SNMP_VERSION_2c;
895 trap_msg.trap_or_inform = SNMP_IS_INFORM;
896 *ptr_request_id = req_id;
897 return snmp_send_trap_or_notification_or_inform_generic(&trap_msg, oid, generic_trap, specific_trap, varbinds);
ACPI_SIZE strlen(const char *String)
#define LWIP_ARRAYSIZE(x)
#define MIB2_COPY_SYSUPTIME_TO(ptrToVal)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
@ LWIP_IANA_PORT_SNMP_TRAP
struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
u8_t pbuf_free(struct pbuf *p)
#define SNMP_MAX_OBJ_ID_LEN
#define SNMP_TRAP_DESTINATIONS
#define IP_IS_V6_VAL(ipaddr)
#define ip_addr_isany(ipaddr)
#define ip_addr_set(dest, src)
#define MEMCPY(DST, SRC, BYTES)