lwIP
2.1.0
Lightweight IP stack
|
Functions | |
err_t | snmp_ans1_enc_tlv (struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv) |
err_t | snmp_asn1_enc_raw (struct snmp_pbuf_stream *pbuf_stream, const u8_t *raw, u16_t raw_len) |
err_t | snmp_asn1_enc_u32t (struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, u32_t value) |
err_t | snmp_asn1_enc_s32t (struct snmp_pbuf_stream *pbuf_stream, u16_t octets_needed, s32_t value) |
err_t | snmp_asn1_enc_oid (struct snmp_pbuf_stream *pbuf_stream, const u32_t *oid, u16_t oid_len) |
void | snmp_asn1_enc_length_cnt (u16_t length, u8_t *octets_needed) |
void | snmp_asn1_enc_u32t_cnt (u32_t value, u16_t *octets_needed) |
void | snmp_asn1_enc_s32t_cnt (s32_t value, u16_t *octets_needed) |
void | snmp_asn1_enc_oid_cnt (const u32_t *oid, u16_t oid_len, u16_t *octets_needed) |
err_t | snmp_asn1_dec_tlv (struct snmp_pbuf_stream *pbuf_stream, struct snmp_asn1_tlv *tlv) |
err_t | snmp_asn1_dec_u32t (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *value) |
err_t | snmp_asn1_dec_s32t (struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value) |
err_t | snmp_asn1_dec_oid (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u32_t *oid, u8_t *oid_len, u8_t oid_max_len) |
err_t | snmp_asn1_dec_raw (struct snmp_pbuf_stream *pbuf_stream, u16_t len, u8_t *buf, u16_t *buf_len, u16_t buf_max_len) |
Abstract Syntax Notation One (ISO 8824, 8825) encoding
err_t snmp_ans1_enc_tlv | ( | struct snmp_pbuf_stream * | pbuf_stream, |
struct snmp_asn1_tlv * | tlv | ||
) |
Encodes a TLV into a pbuf stream.
pbuf_stream | points to a pbuf stream |
tlv | TLV to encode |
err_t snmp_asn1_dec_oid | ( | struct snmp_pbuf_stream * | pbuf_stream, |
u16_t | len, | ||
u32_t * | oid, | ||
u8_t * | oid_len, | ||
u8_t | oid_max_len | ||
) |
Decodes object identifier from incoming message into array of u32_t.
pbuf_stream | points to a pbuf stream |
len | length of the coded object identifier |
oid | return decoded object identifier |
oid_len | return decoded object identifier length |
oid_max_len | size of oid buffer |
err_t snmp_asn1_dec_raw | ( | struct snmp_pbuf_stream * | pbuf_stream, |
u16_t | len, | ||
u8_t * | buf, | ||
u16_t * | buf_len, | ||
u16_t | buf_max_len | ||
) |
Decodes (copies) raw data (ip-addresses, octet strings, opaque encoding) from incoming message into array.
pbuf_stream | points to a pbuf stream |
len | length of the coded raw data (zero is valid, e.g. empty string!) |
buf | return raw bytes |
buf_len | returns length of the raw return value |
buf_max_len | buffer size |
err_t snmp_asn1_dec_s32t | ( | struct snmp_pbuf_stream * | pbuf_stream, |
u16_t | len, | ||
s32_t * | value | ||
) |
Decodes integer into s32_t.
pbuf_stream | points to a pbuf stream |
len | length of the coded integer field |
value | return host order integer |
err_t snmp_asn1_dec_tlv | ( | struct snmp_pbuf_stream * | pbuf_stream, |
struct snmp_asn1_tlv * | tlv | ||
) |
Decodes a TLV from a pbuf stream.
pbuf_stream | points to a pbuf stream |
tlv | returns decoded TLV |
err_t snmp_asn1_dec_u32t | ( | struct snmp_pbuf_stream * | pbuf_stream, |
u16_t | len, | ||
u32_t * | value | ||
) |
Decodes positive integer (counter, gauge, timeticks) into u32_t.
pbuf_stream | points to a pbuf stream |
len | length of the coded integer field |
value | return host order integer |
void snmp_asn1_enc_length_cnt | ( | u16_t | length, |
u8_t * | octets_needed | ||
) |
Returns octet count for length.
length | parameter length |
octets_needed | points to the return value |
err_t snmp_asn1_enc_oid | ( | struct snmp_pbuf_stream * | pbuf_stream, |
const u32_t * | oid, | ||
u16_t | oid_len | ||
) |
Encodes object identifier into a pbuf chained ASN1 msg.
pbuf_stream | points to a pbuf stream |
oid | points to object identifier array |
oid_len | object identifier array length |
void snmp_asn1_enc_oid_cnt | ( | const u32_t * | oid, |
u16_t | oid_len, | ||
u16_t * | octets_needed | ||
) |
Returns octet count for an object identifier.
oid | points to object identifier array |
oid_len | object identifier array length |
octets_needed | points to the return value |
err_t snmp_asn1_enc_raw | ( | struct snmp_pbuf_stream * | pbuf_stream, |
const u8_t * | raw, | ||
u16_t | raw_len | ||
) |
Encodes raw data (octet string, opaque) into a pbuf chained ASN1 msg.
pbuf_stream | points to a pbuf stream |
raw_len | raw data length |
raw | points raw data |
err_t snmp_asn1_enc_s32t | ( | struct snmp_pbuf_stream * | pbuf_stream, |
u16_t | octets_needed, | ||
s32_t | value | ||
) |
Encodes s32_t integer into a pbuf chained ASN1 msg.
pbuf_stream | points to a pbuf stream |
octets_needed | encoding length (from snmp_asn1_enc_s32t_cnt()) |
value | is the host order s32_t value to be encoded |
void snmp_asn1_enc_s32t_cnt | ( | s32_t | value, |
u16_t * | octets_needed | ||
) |
Returns octet count for an s32_t.
value | value to be encoded |
octets_needed | points to the return value |
err_t snmp_asn1_enc_u32t | ( | struct snmp_pbuf_stream * | pbuf_stream, |
u16_t | octets_needed, | ||
u32_t | value | ||
) |
Encodes u32_t (counter, gauge, timeticks) into a pbuf chained ASN1 msg.
pbuf_stream | points to a pbuf stream |
octets_needed | encoding length (from snmp_asn1_enc_u32t_cnt()) |
value | is the host order u32_t value to be encoded |
void snmp_asn1_enc_u32t_cnt | ( | u32_t | value, |
u16_t * | octets_needed | ||
) |
Returns octet count for an u32_t.
value | value to be encoded |
octets_needed | points to the return value |