|
libcoap 4.3.5-develop-3035cfd
|
Pre-defined constants that reflect defaults for CoAP. More...
Go to the source code of this file.
Data Structures | |
| struct | coap_option |
Macros | |
| #define | COAP_DEFAULT_PORT 5683 /* CoAP default UDP/TCP port */ |
| #define | COAPS_DEFAULT_PORT 5684 /* CoAP default UDP/TCP port for secure transmission */ |
| #define | COAP_DEFAULT_MAX_AGE 60 /* default maximum object lifetime in seconds */ |
| #define | COAP_DEFAULT_MTU 1152 |
| #define | COAP_BERT_BASE 1152 |
| #define | COAP_DEFAULT_HOP_LIMIT 16 |
| #define | COAP_DEFAULT_SCHEME "coap" /* the default scheme for CoAP URIs */ |
| #define | COAP_DEFAULT_URI_WELLKNOWN ".well-known/core" |
| well-known resources URI | |
| #define | COAP_TOKEN_DEFAULT_MAX 8 |
| #define | COAP_TOKEN_EXT_MAX 4096 |
| #define | COAP_RESPONSE_CODE(N) |
| #define | COAP_RESPONSE_CLASS(C) |
| #define | COAP_ERROR_PHRASE_LENGTH 32 |
| maximum length of error phrase | |
| #define | COAP_SIGNALING_CODE(N) |
| #define | COAP_MEDIATYPE_TEXT_PLAIN 0 /* text/plain (UTF-8) */ |
| #define | COAP_MEDIATYPE_APPLICATION_LINK_FORMAT 40 /* application/link-format */ |
| #define | COAP_MEDIATYPE_APPLICATION_XML 41 /* application/xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_OCTET_STREAM 42 /* application/octet-stream */ |
| #define | COAP_MEDIATYPE_APPLICATION_RDF_XML 43 /* application/rdf+xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_EXI 47 /* application/exi */ |
| #define | COAP_MEDIATYPE_APPLICATION_JSON 50 /* application/json */ |
| #define | COAP_MEDIATYPE_APPLICATION_CBOR 60 /* application/cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_CWT 61 /* application/cwt, RFC 8392 */ |
| #define | COAP_MEDIATYPE_APPLICATION_COAP_GROUP_JSON 256 /* application/coap-group+json */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_SIGN 98 /* application/cose; cose-type="cose-sign" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_SIGN1 18 /* application/cose; cose-type="cose-sign1" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT 96 /* application/cose; cose-type="cose-encrypt" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0 16 /* application/cose; cose-type="cose-encrypt0" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_MAC 97 /* application/cose; cose-type="cose-mac" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_MAC0 17 /* application/cose; cose-type="cose-mac0" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_KEY 101 /* application/cose-key */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET 102 /* application/cose-key-set */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_JSON 110 /* application/senml+json */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_JSON 111 /* application/sensml+json */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_CBOR 112 /* application/senml+cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_CBOR 113 /* application/sensml+cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_EXI 114 /* application/senml-exi */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_EXI 115 /* application/sensml-exi */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_XML 310 /* application/senml+xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_XML 311 /* application/sensml+xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_DOTS_CBOR 271 /* application/dots+cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_ACE_CBOR 19 /* application/ace+cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_MB_CBOR_SEQ 272 /* application/missing-blocks+cbor-seq */ |
| #define | COAP_MEDIATYPE_APPLICATION_OSCORE 10001 /* application/oscore */ |
| #define | COAP_INVALID_MID -1 |
| Indicates an invalid message id. | |
| #define | COAP_INVALID_TID COAP_INVALID_MID |
| Indicates an invalid message id. | |
| #define | COAP_OPTION_KEY(option) |
| #define | COAP_OPTION_LENGTH(option) |
| #define | COAP_OPTION_DATA(option) |
Typedefs | |
| typedef enum coap_pdu_type_t | coap_pdu_type_t |
| CoAP PDU message type definitions. | |
| typedef enum coap_request_t | coap_request_t |
| CoAP PDU Request methods. | |
| typedef enum coap_pdu_signaling_proto_t | coap_pdu_signaling_proto_t |
| typedef int | coap_mid_t |
| coap_mid_t is used to store the CoAP Message ID of a CoAP PDU. | |
| typedef enum coap_proto_t | coap_proto_t |
| CoAP protocol types Note: coap_layers_coap[] needs updating if extended. | |
| typedef enum coap_pdu_code_t | coap_pdu_code_t |
| Set of codes available for a PDU. | |
Functions | |
| const char * | coap_response_phrase (unsigned char code) |
Returns a human-readable response phrase for the specified CoAP response code. | |
| 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_API void | coap_delete_pdu (coap_pdu_t *pdu) |
| Dispose of an CoAP PDU and free off 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. | |
| 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. | |
| int | coap_add_token (coap_pdu_t *pdu, size_t len, const uint8_t *data) |
Adds token of length len to pdu. | |
| 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. | |
| 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. | |
| 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. | |
Pre-defined constants that reflect defaults for CoAP.
Definition in file coap_pdu.h.