Functions | |
err_t | snmp_asn1_dec_type (struct pbuf *p, u16_t ofs, u8_t *type) |
err_t | snmp_asn1_dec_length (struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length) |
err_t | snmp_asn1_dec_u32t (struct pbuf *p, u16_t ofs, u16_t len, u32_t *value) |
err_t | snmp_asn1_dec_s32t (struct pbuf *p, u16_t ofs, u16_t len, s32_t *value) |
err_t | snmp_asn1_dec_oid (struct pbuf *p, u16_t ofs, u16_t len, struct snmp_obj_id *oid) |
err_t | snmp_asn1_dec_raw (struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) |
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 (u8_t ident_len, s32_t *ident, u16_t *octets_needed) |
err_t | snmp_asn1_enc_type (struct pbuf *p, u16_t ofs, u8_t type) |
err_t | snmp_asn1_enc_length (struct pbuf *p, u16_t ofs, u16_t length) |
err_t | snmp_asn1_enc_u32t (struct pbuf *p, u16_t ofs, u8_t octets_needed, u32_t value) |
err_t | snmp_asn1_enc_s32t (struct pbuf *p, u16_t ofs, u8_t octets_needed, s32_t value) |
err_t | snmp_asn1_enc_oid (struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident) |
err_t | snmp_asn1_enc_raw (struct pbuf *p, u16_t ofs, u8_t raw_len, u8_t *raw) |
err_t snmp_asn1_dec_length | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t * | octets_used, | |||
u16_t * | length | |||
) |
Decodes length field from incoming pbuf chain into host length.
p | points to a pbuf holding an ASN1 coded length | |
ofs | points to the offset within the pbuf chain of the ASN1 coded length | |
octets_used | returns number of octets used by the length code | |
length | return host order length, upto 64k |
err_t snmp_asn1_dec_oid | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u16_t | len, | |||
struct snmp_obj_id * | oid | |||
) |
Decodes object identifier from incoming message into array of s32_t.
p | points to a pbuf holding an ASN1 coded object identifier | |
ofs | points to the offset within the pbuf chain of the ASN1 coded object identifier | |
len | length of the coded object identifier | |
oid | return object identifier struct |
err_t snmp_asn1_dec_raw | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u16_t | len, | |||
u16_t | raw_len, | |||
u8_t * | raw | |||
) |
Decodes (copies) raw data (ip-addresses, octet strings, opaque encoding) from incoming message into array.
p | points to a pbuf holding an ASN1 coded raw data | |
ofs | points to the offset within the pbuf chain of the ASN1 coded raw data | |
len | length of the coded raw data (zero is valid, e.g. empty string!) | |
raw_len | length of the raw return value | |
raw | return raw bytes |
err_t snmp_asn1_dec_s32t | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u16_t | len, | |||
s32_t * | value | |||
) |
Decodes integer into s32_t.
p | points to a pbuf holding an ASN1 coded integer | |
ofs | points to the offset within the pbuf chain of the ASN1 coded integer | |
len | length of the coded integer field | |
value | return host order integer |
err_t snmp_asn1_dec_type | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t * | type | |||
) |
Retrieves type field from incoming pbuf chain.
p | points to a pbuf holding an ASN1 coded type field | |
ofs | points to the offset within the pbuf chain of the ASN1 coded type field | |
type | return ASN1 type |
err_t snmp_asn1_dec_u32t | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u16_t | len, | |||
u32_t * | value | |||
) |
Decodes positive integer (counter, gauge, timeticks) into u32_t.
p | points to a pbuf holding an ASN1 coded integer | |
ofs | points to the offset within the pbuf chain of the ASN1 coded integer | |
len | length of the coded integer field | |
value | return host order integer |
err_t snmp_asn1_enc_length | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u16_t | length | |||
) |
Encodes host order length field into a pbuf chained ASN1 msg.
p | points to output pbuf to encode length into | |
ofs | points to the offset within the pbuf chain | |
length | is the host order length to be encoded |
void snmp_asn1_enc_length_cnt | ( | u16_t | length, | |
u8_t * | octets_needed | |||
) |
Returns octet count for length.
length | ||
octets_needed | points to the return value |
err_t snmp_asn1_enc_oid | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t | ident_len, | |||
s32_t * | ident | |||
) |
Encodes object identifier into a pbuf chained ASN1 msg.
p | points to output pbuf to encode oid into | |
ofs | points to the offset within the pbuf chain | |
ident_len | object identifier array length | |
ident | points to object identifier array |
void snmp_asn1_enc_oid_cnt | ( | u8_t | ident_len, | |
s32_t * | ident, | |||
u16_t * | octets_needed | |||
) |
Returns octet count for an object identifier.
ident_len | object identifier array length | |
ident | points to object identifier array | |
octets_needed | points to the return value |
err_t snmp_asn1_enc_raw | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t | raw_len, | |||
u8_t * | raw | |||
) |
Encodes raw data (octet string, opaque) into a pbuf chained ASN1 msg.
p | points to output pbuf to encode raw data into | |
ofs | points to the offset within the pbuf chain | |
raw_len | raw data length | |
raw | points raw data |
err_t snmp_asn1_enc_s32t | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t | octets_needed, | |||
s32_t | value | |||
) |
Encodes s32_t integer into a pbuf chained ASN1 msg.
p | points to output pbuf to encode value into | |
ofs | points to the offset within the pbuf chain | |
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 | ||
octets_needed | points to the return value |
err_t snmp_asn1_enc_type | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t | type | |||
) |
Encodes ASN type field into a pbuf chained ASN1 msg.
p | points to output pbuf to encode value into | |
ofs | points to the offset within the pbuf chain | |
type | input ASN1 type |
err_t snmp_asn1_enc_u32t | ( | struct pbuf * | p, | |
u16_t | ofs, | |||
u8_t | octets_needed, | |||
u32_t | value | |||
) |
Encodes u32_t (counter, gauge, timeticks) into a pbuf chained ASN1 msg.
p | points to output pbuf to encode value into | |
ofs | points to the offset within the pbuf chain | |
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 | ||
octets_needed | points to the return value |