|
| void | coap_pdu_clear (coap_pdu_t *pdu, size_t size) |
| | Clears any contents from pdu and resets used_size, and data pointers.
|
| |
| coap_pdu_t * | coap_pdu_init (coap_pdu_type_t type, coap_pdu_code_t code, coap_mid_t mid, size_t size) |
| | Creates a new CoAP PDU with at least enough storage space for the given size maximum message size.
|
| |
| COAP_API coap_pdu_t * | coap_new_pdu (coap_pdu_type_t type, coap_pdu_code_t code, coap_session_t *session) |
| | Creates a new CoAP PDU.
|
| |
| coap_pdu_t * | coap_new_pdu_lkd (coap_pdu_type_t type, coap_pdu_code_t code, coap_session_t *session) |
| | Creates a new CoAP PDU.
|
| |
| void | coap_delete_pdu (coap_pdu_t *pdu) |
| | Dispose of an CoAP PDU and frees associated storage.
|
| |
| COAP_API coap_pdu_t * | coap_pdu_duplicate (const coap_pdu_t *old_pdu, coap_session_t *session, size_t token_length, const uint8_t *token, coap_opt_filter_t *drop_options) |
| | Duplicate an existing PDU.
|
| |
| coap_pdu_t * | coap_pdu_duplicate_lkd (const coap_pdu_t *old_pdu, coap_session_t *session, size_t token_length, const uint8_t *token, coap_opt_filter_t *drop_options) |
| | Duplicate an existing PDU.
|
| |
| int | coap_pdu_resize (coap_pdu_t *pdu, size_t new_size) |
| | Dynamically grows the size of pdu to new_size.
|
| |
| int | coap_pdu_check_resize (coap_pdu_t *pdu, size_t size) |
| | Dynamically grows the size of pdu to new_size if needed.
|
| |
| int | coap_add_token (coap_pdu_t *pdu, size_t len, const uint8_t *data) |
| | Adds token of length len to pdu.
|
| |
| int | coap_update_token (coap_pdu_t *pdu, size_t len, const uint8_t *data) |
| | Updates token in pdu with length len and data.
|
| |
| int | coap_remove_option (coap_pdu_t *pdu, coap_option_num_t number) |
| | Removes (first) option of given number from the pdu.
|
| |
| int | coap_option_check_repeatable (coap_option_num_t number) |
| | Check whether the option is allowed to be repeated or not.
|
| |
| size_t | coap_insert_option (coap_pdu_t *pdu, coap_option_num_t number, size_t len, const uint8_t *data) |
| | Inserts option of given number in the pdu with the appropriate data.
|
| |
| size_t | coap_update_option (coap_pdu_t *pdu, coap_option_num_t number, size_t len, const uint8_t *data) |
| | Updates existing first option of given number in the pdu with the new data.
|
| |
| size_t | coap_add_option (coap_pdu_t *pdu, coap_option_num_t number, size_t len, const uint8_t *data) |
| | Adds option of given number to pdu that is passed as first parameter.
|
| |
| size_t | coap_add_option_internal (coap_pdu_t *pdu, coap_option_num_t number, size_t len, const uint8_t *data) |
| | Adds option of given number to pdu that is passed as first parameter.
|
| |
| int | coap_add_data (coap_pdu_t *pdu, size_t len, const uint8_t *data) |
| | Adds given data to the pdu that is passed as first parameter.
|
| |
| uint8_t * | coap_add_data_after (coap_pdu_t *pdu, size_t len) |
| | Adds given data to the pdu that is passed as first parameter but does not.
|
| |
| int | coap_get_data (const coap_pdu_t *pdu, size_t *len, const uint8_t **data) |
| | Retrieves the length and data pointer of specified PDU.
|
| |
| int | coap_get_data_large (const coap_pdu_t *pdu, size_t *len, const uint8_t **data, size_t *offset, size_t *total) |
| | Retrieves the data from a PDU, with support for large bodies of data that spans multiple PDUs.
|
| |
| const char * | coap_response_phrase (unsigned char code) |
| | Returns a human-readable response phrase for the specified CoAP response code.
|
| |
| static size_t | next_option_safe (coap_opt_t **optp, size_t *length, uint16_t *max_opt) |
| | Advances *optp to next option if still in PDU.
|
| |
| size_t | coap_pdu_parse_header_size (coap_proto_t proto, const uint8_t *data) |
| | Interprets data to determine the number of bytes in the header.
|
| |
| size_t | coap_pdu_parse_size (coap_proto_t proto, const uint8_t *data, size_t length) |
| | Parses data to extract the message size.
|
| |
| int | coap_pdu_parse_header (coap_pdu_t *pdu, coap_proto_t proto) |
| | Decode the protocol specific header for the specified PDU.
|
| |
| static int | coap_pdu_parse_opt_csm (coap_pdu_t *pdu, uint16_t len) |
| |
| static int | coap_pdu_parse_opt_base (coap_pdu_t *pdu, uint16_t len) |
| |
| static int | write_prefix (char **obp, size_t *len, const char *prf, size_t prflen) |
| |
| static int | write_char (char **obp, size_t *len, int c, int printable) |
| |
| int | coap_pdu_parse_opt (coap_pdu_t *pdu) |
| | Verify consistency in the given CoAP PDU structure and locate the data.
|
| |
| int | coap_pdu_parse (coap_proto_t proto, const uint8_t *data, size_t length, coap_pdu_t *pdu) |
| | Parses data into the CoAP PDU structure given in result.
|
| |
| size_t | coap_pdu_encode_header (coap_pdu_t *pdu, coap_proto_t proto) |
| | Compose the protocol specific header for the specified PDU.
|
| |
| coap_pdu_code_t | coap_pdu_get_code (const coap_pdu_t *pdu) |
| | Gets the PDU code associated with pdu.
|
| |
| void | coap_pdu_set_code (coap_pdu_t *pdu, coap_pdu_code_t code) |
| | Sets the PDU code in the pdu.
|
| |
| coap_pdu_type_t | coap_pdu_get_type (const coap_pdu_t *pdu) |
| | Gets the PDU type associated with pdu.
|
| |
| void | coap_pdu_set_type (coap_pdu_t *pdu, coap_pdu_type_t type) |
| | Sets the PDU type in the pdu.
|
| |
| coap_bin_const_t | coap_pdu_get_token (const coap_pdu_t *pdu) |
| | Gets the token associated with pdu.
|
| |
| coap_mid_t | coap_pdu_get_mid (const coap_pdu_t *pdu) |
| | Gets the message id associated with pdu.
|
| |
| void | coap_pdu_set_mid (coap_pdu_t *pdu, coap_mid_t mid) |
| | Sets the message id in the pdu.
|
| |
CoAP PDU handling.
Definition in file coap_pdu.c.