/third_party/lwip/src/apps/snmp/ |
D | snmp_pbuf_stream.c | 47 snmp_pbuf_stream_init(struct snmp_pbuf_stream *pbuf_stream, struct pbuf *p, u16_t offset, u16_t len… in snmp_pbuf_stream_init() argument 49 pbuf_stream->offset = offset; in snmp_pbuf_stream_init() 50 pbuf_stream->length = length; in snmp_pbuf_stream_init() 51 pbuf_stream->pbuf = p; in snmp_pbuf_stream_init() 57 snmp_pbuf_stream_read(struct snmp_pbuf_stream *pbuf_stream, u8_t *data) in snmp_pbuf_stream_read() argument 59 if (pbuf_stream->length == 0) { in snmp_pbuf_stream_read() 63 if (pbuf_copy_partial(pbuf_stream->pbuf, data, 1, pbuf_stream->offset) == 0) { in snmp_pbuf_stream_read() 67 pbuf_stream->offset++; in snmp_pbuf_stream_read() 68 pbuf_stream->length--; in snmp_pbuf_stream_read() 74 snmp_pbuf_stream_write(struct snmp_pbuf_stream *pbuf_stream, u8_t data) in snmp_pbuf_stream_write() argument [all …]
|
D | snmp_asn1.c | 57 snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv) in snmp_ans1_enc_tlv() argument 72 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, tlv->type)); in snmp_ans1_enc_tlv() 101 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, data)); in snmp_ans1_enc_tlv() 112 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, data)); in snmp_ans1_enc_tlv() 119 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, data)); in snmp_ans1_enc_tlv() 133 snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len) in snmp_asn1_enc_raw() argument 135 PBUF_OP_EXEC(snmp_pbuf_stream_writebuf(pbuf_stream, raw, raw_len)); in snmp_asn1_enc_raw() 151 snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value) in snmp_asn1_enc_u32t() argument 158 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, 0x00)); in snmp_asn1_enc_u32t() 164 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, (u8_t)(value >> (octets_needed << 3)))); in snmp_asn1_enc_u32t() [all …]
|
D | snmp_msg.c | 768 struct snmp_pbuf_stream pbuf_stream; in snmp_parse_inbound_frame() local 778 …IF_PARSE_EXEC(snmp_pbuf_stream_init(&pbuf_stream, request->inbound_pbuf, 0, request->inbound_pbuf-… in snmp_parse_inbound_frame() 781 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame() 782 IF_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_SEQUENCE) && (tlv.value_len == pbuf_stream.length)); in snmp_parse_inbound_frame() 786 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame() 791 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame() 821 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame() 827 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame() 832 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame() 836 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame() [all …]
|
D | snmp_traps.c | 81 static err_t snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream); 82 static err_t snmp_trap_varbind_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream… 211 struct snmp_pbuf_stream pbuf_stream; in snmp_send_trap() local 212 snmp_pbuf_stream_init(&pbuf_stream, p, 0, tot_len); in snmp_send_trap() 215 snmp_trap_header_enc(&trap_msg, &pbuf_stream); in snmp_send_trap() 216 snmp_trap_varbind_enc(&trap_msg, &pbuf_stream, varbinds); in snmp_send_trap() 370 snmp_trap_varbind_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream, struct snmp… in snmp_trap_varbind_enc() argument 378 BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_trap_varbind_enc() 381 BUILD_EXEC( snmp_append_outbound_varbind(pbuf_stream, varbind) ); in snmp_trap_varbind_enc() 393 snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream) in snmp_trap_header_enc() argument [all …]
|
D | snmp_asn1.h | 84 err_t snmp_asn1_dec_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv); 85 err_t snmp_asn1_dec_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value); 86 err_t snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value); 87 err_t snmp_asn1_dec_oid(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len,… 88 err_t snmp_asn1_dec_raw(struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len,… 90 err_t snmp_ans1_enc_tlv(struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv); 96 err_t snmp_asn1_enc_oid(struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len); 97 err_t snmp_asn1_enc_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value); 98 err_t snmp_asn1_enc_u32t(struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value); 99 err_t snmp_asn1_enc_raw(struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len); [all …]
|
D | snmp_pbuf_stream.h | 58 err_t snmp_pbuf_stream_init(struct snmp_pbuf_stream *pbuf_stream, struct pbuf *p, u16_t offset, u16… 59 err_t snmp_pbuf_stream_read(struct snmp_pbuf_stream *pbuf_stream, u8_t *data); 60 err_t snmp_pbuf_stream_write(struct snmp_pbuf_stream *pbuf_stream, u8_t data); 61 err_t snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream *pbuf_stream, const void *buf, u16_t buf_le… 62 err_t snmp_pbuf_stream_writeto(struct snmp_pbuf_stream *pbuf_stream, struct snmp_pbuf_stream *targe… 63 err_t snmp_pbuf_stream_seek(struct snmp_pbuf_stream *pbuf_stream, s32_t offset); 64 err_t snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream *pbuf_stream, u32_t offset);
|
D | snmp_msg.h | 66 struct snmp_pbuf_stream pbuf_stream; member 177 err_t snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind *varbi…
|