|
Contiki-NG
|
This group contains the BER implementation. More...
Macros | |
| #define | BER_DATA_TYPE_EOC 0x00 |
| End-of-Content. More... | |
| #define | BER_DATA_TYPE_INTEGER 0x02 |
| Integer. More... | |
| #define | BER_DATA_TYPE_OCTET_STRING 0x04 |
| Octet String. More... | |
| #define | BER_DATA_TYPE_NULL 0x05 |
| Null. More... | |
| #define | BER_DATA_TYPE_OBJECT_IDENTIFIER 0x06 |
| Object Identifier. More... | |
| #define | BER_DATA_TYPE_SEQUENCE 0x30 |
| Sequence. More... | |
| #define | BER_DATA_TYPE_TIMETICKS 0x43 |
| TimeTicks. More... | |
| #define | BER_DATA_TYPE_NO_SUCH_INSTANCE 0x81 |
| No Such Instance. More... | |
| #define | BER_DATA_TYPE_END_OF_MIB_VIEW 0x82 |
| End of MIB View. More... | |
| #define | BER_DATA_TYPE_PDU_GET_REQUEST 0xA0 |
| PDU Get Request. More... | |
| #define | BER_DATA_TYPE_PDU_GET_NEXT_REQUEST 0xA1 |
| PDU Get Next Request. More... | |
| #define | BER_DATA_TYPE_PDU_GET_RESPONSE 0xA2 |
| PDU Get Reponse. More... | |
| #define | BER_DATA_TYPE_PDU_SET_REQUEST 0xA3 |
| PDU Set Request. More... | |
| #define | BER_DATA_TYPE_PDU_TRAP 0xA4 |
| PDU Trap. More... | |
| #define | BER_DATA_TYPE_PDU_GET_BULK 0xA5 |
| PDU Get Bulk. More... | |
Functions | |
| int | snmp_ber_encode_type (snmp_packet_t *snmp_packet, uint8_t type) |
| Encodes a type. More... | |
| int | snmp_ber_encode_length (snmp_packet_t *snmp_packet, uint16_t length) |
| Encodes the length. More... | |
| int | snmp_ber_encode_integer (snmp_packet_t *snmp_packet, uint32_t integer) |
| Encodes an integer. More... | |
| int | snmp_ber_encode_timeticks (snmp_packet_t *snmp_packet, uint32_t timeticks) |
| Encodes a timeticks. More... | |
| int | snmp_ber_encode_string_len (snmp_packet_t *snmp_packet, const char *str, uint32_t length) |
| Encodes a string. More... | |
| int | snmp_ber_encode_oid (snmp_packet_t *snmp_packet, snmp_oid_t *oid) |
| Encodes a Oid. More... | |
| int | snmp_ber_encode_null (snmp_packet_t *snmp_packet, uint8_t type) |
| Encodes a null. More... | |
| int | snmp_ber_decode_type (snmp_packet_t *snmp_packet, uint8_t *type) |
| Decodes a type. More... | |
| int | snmp_ber_decode_length (snmp_packet_t *snmp_packet, uint8_t *length) |
| Decodes a length. More... | |
| int | snmp_ber_decode_integer (snmp_packet_t *snmp_packet, uint32_t *integer) |
| Decodes an integer. More... | |
| int | snmp_ber_decode_timeticks (snmp_packet_t *snmp_packet, uint32_t *timeticks) |
| Decodes a timeticks. More... | |
| int | snmp_ber_decode_string_len_buffer (snmp_packet_t *snmp_packet, const char **str, uint32_t *length) |
| Decodes a string. More... | |
| int | snmp_ber_decode_null (snmp_packet_t *snmp_packet) |
| Decodes a null. More... | |
| int | snmp_ber_decode_oid (snmp_packet_t *snmp_packet, snmp_oid_t *oid) |
| Decodes an OID. More... | |
This group contains the BER implementation.
| #define BER_DATA_TYPE_END_OF_MIB_VIEW 0x82 |
End of MIB View.
Definition at line 114 of file snmp-ber.h.
| #define BER_DATA_TYPE_EOC 0x00 |
End-of-Content.
Definition at line 66 of file snmp-ber.h.
| #define BER_DATA_TYPE_INTEGER 0x02 |
Integer.
Definition at line 72 of file snmp-ber.h.
| #define BER_DATA_TYPE_NO_SUCH_INSTANCE 0x81 |
No Such Instance.
Definition at line 108 of file snmp-ber.h.
| #define BER_DATA_TYPE_NULL 0x05 |
Null.
Definition at line 84 of file snmp-ber.h.
| #define BER_DATA_TYPE_OBJECT_IDENTIFIER 0x06 |
| #define BER_DATA_TYPE_OCTET_STRING 0x04 |
| #define BER_DATA_TYPE_PDU_GET_BULK 0xA5 |
PDU Get Bulk.
Definition at line 150 of file snmp-ber.h.
| #define BER_DATA_TYPE_PDU_GET_NEXT_REQUEST 0xA1 |
PDU Get Next Request.
Definition at line 126 of file snmp-ber.h.
| #define BER_DATA_TYPE_PDU_GET_REQUEST 0xA0 |
PDU Get Request.
Definition at line 120 of file snmp-ber.h.
| #define BER_DATA_TYPE_PDU_GET_RESPONSE 0xA2 |
PDU Get Reponse.
Definition at line 132 of file snmp-ber.h.
| #define BER_DATA_TYPE_PDU_SET_REQUEST 0xA3 |
PDU Set Request.
Definition at line 138 of file snmp-ber.h.
| #define BER_DATA_TYPE_PDU_TRAP 0xA4 |
PDU Trap.
Definition at line 144 of file snmp-ber.h.
| #define BER_DATA_TYPE_SEQUENCE 0x30 |
Sequence.
Definition at line 96 of file snmp-ber.h.
| #define BER_DATA_TYPE_TIMETICKS 0x43 |
| int snmp_ber_decode_integer | ( | snmp_packet_t * | snmp_packet, |
| uint32_t * | integer | ||
| ) |
Decodes an integer.
| snmp_packet | A pointer to the snmp packet |
| integer | A pointer to the integer |
Definition at line 353 of file snmp-ber.c.
| int snmp_ber_decode_length | ( | snmp_packet_t * | snmp_packet, |
| uint8_t * | length | ||
| ) |
Decodes a length.
| snmp_packet | A pointer to the snmp packet |
| length | A pointer to the length |
Definition at line 334 of file snmp-ber.c.
References snmp_packet_t::in, and snmp_packet_t::used.
| int snmp_ber_decode_null | ( | snmp_packet_t * | snmp_packet | ) |
Decodes a null.
| snmp_packet | A pointer to the snmp packet |
Definition at line 494 of file snmp-ber.c.
References snmp_packet_t::in, and snmp_packet_t::used.
| int snmp_ber_decode_oid | ( | snmp_packet_t * | snmp_packet, |
| snmp_oid_t * | oid | ||
| ) |
Decodes an OID.
| snmp_packet | pointer to the snmp packet |
| oid | A pointer to the OID |
Definition at line 432 of file snmp-ber.c.
| int snmp_ber_decode_string_len_buffer | ( | snmp_packet_t * | snmp_packet, |
| const char ** | str, | ||
| uint32_t * | length | ||
| ) |
Decodes a string.
| snmp_packet | A pointer to the snmp packet |
| str | A pointer to the string |
| length | A pointer to the string length |
Definition at line 359 of file snmp-ber.c.
| int snmp_ber_decode_timeticks | ( | snmp_packet_t * | snmp_packet, |
| uint32_t * | timeticks | ||
| ) |
Decodes a timeticks.
| snmp_packet | A pointer to the snmp packet |
| timeticks | A pointer to the timeticks |
Definition at line 347 of file snmp-ber.c.
| int snmp_ber_decode_type | ( | snmp_packet_t * | snmp_packet, |
| uint8_t * | type | ||
| ) |
Decodes a type.
| snmp_packet | A pointer to the snmp packet |
| type | A pointer to the type |
Definition at line 321 of file snmp-ber.c.
References snmp_packet_t::in, and snmp_packet_t::used.
| int snmp_ber_encode_integer | ( | snmp_packet_t * | snmp_packet, |
| uint32_t | integer | ||
| ) |
Encodes an integer.
| snmp_packet | A pointer to the snmp packet |
| integer | A integer |
Definition at line 152 of file snmp-ber.c.
| int snmp_ber_encode_length | ( | snmp_packet_t * | snmp_packet, |
| uint16_t | length | ||
| ) |
Encodes the length.
| snmp_packet | A pointer to the snmp packet |
| length | A length |
Definition at line 96 of file snmp-ber.c.
References snmp_packet_t::max, snmp_packet_t::out, and snmp_packet_t::used.
| int snmp_ber_encode_null | ( | snmp_packet_t * | snmp_packet, |
| uint8_t | type | ||
| ) |
Encodes a null.
| snmp_packet | A pointer to the snmp packet |
| type | A type |
Definition at line 259 of file snmp-ber.c.
References snmp_packet_t::max, snmp_packet_t::out, snmp_ber_encode_type(), and snmp_packet_t::used.
| int snmp_ber_encode_oid | ( | snmp_packet_t * | snmp_packet, |
| snmp_oid_t * | oid | ||
| ) |
Encodes a Oid.
| snmp_packet | A pointer to the snmp packet |
| oid | A OID |
Definition at line 186 of file snmp-ber.c.
| int snmp_ber_encode_string_len | ( | snmp_packet_t * | snmp_packet, |
| const char * | str, | ||
| uint32_t | length | ||
| ) |
Encodes a string.
| snmp_packet | A pointer to the snmp packet |
| str | A string |
| length | The string length |
Definition at line 158 of file snmp-ber.c.
| int snmp_ber_encode_timeticks | ( | snmp_packet_t * | snmp_packet, |
| uint32_t | timeticks | ||
| ) |
Encodes a timeticks.
| snmp_packet | A pointer to the snmp packet |
| timeticks | A TimeTicks |
Definition at line 146 of file snmp-ber.c.
| int snmp_ber_encode_type | ( | snmp_packet_t * | snmp_packet, |
| uint8_t | type | ||
| ) |
Encodes a type.
| snmp_packet | A pointer to the snmp packet |
| type | A type |
Definition at line 83 of file snmp-ber.c.
References snmp_packet_t::max, snmp_packet_t::out, and snmp_packet_t::used.
Referenced by snmp_ber_encode_null().
1.8.13