constants.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2024-2025 Carl Seifert
3  * SPDX-FileCopyrightText: 2024-2025 TU Dresden
4  * SPDX-FileCopyrightText: 2018 Freie Universität Berlin
5  * SPDX-License-Identifier: LGPL-2.1-only
6  */
7 
8 #pragma once
9 
10 #include <stdint.h>
11 
12 #include "macros/utils.h"
13 
14 #include "net/unicoap/config.h"
15 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 /* MARK: - CoAP PDUs */
38 typedef enum {
44 
48 #define UNICOAP_PAYLOAD_MARKER (0xFF)
49 
53 #define UNICOAP_ETAG_LENGTH_MAX (8)
54 
64 #define UNICOAP_TOKEN_LENGTH_FIXED_WIDTH 4
67 /* MARK: - RFC 7252 message types */
75 #define UNICOAP_RFC7252_MESSAGE_TYPE_FIXED_WIDTH 3
76 
80 typedef enum {
83 
86 
89 
92 } __attribute__((__packed__)) unicoap_rfc7252_message_type_t;
95 /* MARK: - Message codes */
103 #define UNICOAP_CODE_EMPTY (0)
104 
105 /* This function is needed by this header, yet public use is discouraged. */
106 #ifndef DOXYGEN
110 # define UNICOAP_CODE(suffix, detail) ((CONCAT(UNICOAP_CODE_CLASS_, suffix) << 5) | detail)
111 #endif
112 
118 typedef enum {
121 
124 
127 
130 
133 } __attribute__((__packed__)) unicoap_code_class_t;
134 
138 typedef enum {
141 
144 
147 
150 
153 
156 
159 } __attribute__((__packed__)) unicoap_method_t;
160 
161 /* We want to allow casting the code field in the pdu to this enum.
162  * This enum is used in a union in unicoap_message_t.
163  * The static_asserts in this header guarantee usage of these enums is safe in a union
164  * with an uint8_t code field. */
165 static_assert(sizeof(unicoap_method_t) == sizeof(uint8_t),
166  "Method enum is too wide, please file an issue.");
167 
174 typedef enum {
180 
186 
192 
198 
204 } __attribute__((__packed__)) unicoap_signal_t;
205 
206 static_assert(sizeof(unicoap_signal_t) == sizeof(uint8_t),
207  "Signal enum is too wide, please file an issue.");
208 
212 typedef enum {
218  UNICOAP_STATUS_CREATED = UNICOAP_CODE(RESPONSE_SUCCESS, 1),
219 
225  UNICOAP_STATUS_DELETED = UNICOAP_CODE(RESPONSE_SUCCESS, 2),
226 
232  UNICOAP_STATUS_VALID = UNICOAP_CODE(RESPONSE_SUCCESS, 3),
233 
239  UNICOAP_STATUS_CHANGED = UNICOAP_CODE(RESPONSE_SUCCESS, 4),
240 
246  UNICOAP_STATUS_CONTENT = UNICOAP_CODE(RESPONSE_SUCCESS, 5),
247 
253  UNICOAP_STATUS_CONTINUE = UNICOAP_CODE(RESPONSE_SUCCESS, 31),
254 
260  UNICOAP_STATUS_BAD_REQUEST = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 0),
261 
267  UNICOAP_STATUS_UNAUTHORIZED = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 1),
268 
274  UNICOAP_STATUS_BAD_OPTION = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 2),
275 
281  UNICOAP_STATUS_FORBIDDEN = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 3),
282 
288  UNICOAP_STATUS_PATH_NOT_FOUND = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 4),
289 
295  UNICOAP_STATUS_METHOD_NOT_ALLOWED = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 5),
296 
302  UNICOAP_STATUS_NOT_ACCEPTABLE = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 6),
303 
309  UNICOAP_STATUS_REQUEST_ENTITY_INCOMPLETE = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 8),
310 
316  UNICOAP_STATUS_CONFLICT = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 9),
317 
323  UNICOAP_STATUS_PRECONDITION_FAILED = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 12),
324 
331  UNICOAP_STATUS_REQUEST_ENTITY_TOO_LARGE = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 13),
332 
338  UNICOAP_STATUS_UNSUPPORTED_CONTENT_FORMAT = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 15),
339 
345  UNICOAP_STATUS_UNPROCESSABLE_ENTITY = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 22),
346 
352  UNICOAP_STATUS_TOO_MANY_REQUESTS = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 29),
353 
359  UNICOAP_STATUS_INTERNAL_SERVER_ERROR = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 0),
360 
366  UNICOAP_STATUS_NOT_IMPLEMENTED = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 1),
367 
373  UNICOAP_STATUS_BAD_GATEWAY = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 2),
374 
380  UNICOAP_STATUS_SERVICE_UNAVAILABLE = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 3),
381 
387  UNICOAP_STATUS_GATEWAY_TIMEOUT = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 4),
388 
394  UNICOAP_STATUS_PROXYING_NOT_SUPPORTED = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 5),
395 } __attribute__((__packed__)) unicoap_status_t;
396 
397 static_assert(sizeof(unicoap_status_t) == sizeof(uint8_t),
398  "Status enum is too wide, please file an issue.");
406 /* MARK: - Option numbers */
416 typedef enum {
423 
430 
437 
444 
451 
458 
465 
475 
482 
489 
496 
505 
514 
521 
530 
537 
547 
556 
565 
577 
586 
593 
600 
614 
624 
630 
640 
648 
656 
664 
672 
680 
688 } __attribute__((__packed__)) unicoap_option_number_t;
689 
690 static_assert(sizeof(unicoap_option_number_t) == sizeof(uint16_t),
691  "unicoap_option_number_t has unexpected size");
699 /* MARK: - Content-Format values */
700 /* Please see the generator in iana/contenttype.js */
710 typedef enum {
718 
724 
730 
736 
742 
748 
754 
760 
766 
772 
779 
785 
791 
797 
803 
809 
815 
821 
827 
833 
839 
845 
851 
857 
863 
869 
875 
881 
887 
893 
899 
905 
911 
917 
923 
929 
936 
942 
948 
954 
960 
966 
972 
978 
984 
990 
996 
1002 
1008 
1016 
1023 
1031 
1038 
1046 
1053 
1059 
1065 
1071 
1077 
1083 
1089 
1095 
1101 
1107 
1113 
1119 
1125 
1131 
1137 
1143 
1149 
1155 
1162 
1168 
1174 
1181 
1188 
1195 
1202 
1208 
1214 
1220 
1226 
1232 
1238 
1244 
1250 } __attribute__((__packed__)) unicoap_content_format_t;
1254 #ifdef __cplusplus
1255 }
1256 #endif
#define static_assert(cond,...)
static_assert for c-version < c11
Definition: assert.h:160
Various helper macros.
unicoap_code_class_t
Message code class.
Definition: constants.h:118
unicoap_protocol_version_t
CoAP version number.
Definition: constants.h:38
unicoap_status_t
CoAP response status codes.
Definition: constants.h:212
unicoap_signal_t
CoAP Signal Message Codes (7.xx range)
Definition: constants.h:174
unicoap_rfc7252_message_type_t
RFC 7252 message type.
Definition: constants.h:80
unicoap_method_t
CoAP request method codes (0.xx range)
Definition: constants.h:138
@ UNICOAP_CODE_CLASS_RESPONSE_SUCCESS
Message class for success responses.
Definition: constants.h:123
@ UNICOAP_CODE_CLASS_RESPONSE_CLIENT_FAILURE
Message class for responses indicating a client error.
Definition: constants.h:126
@ UNICOAP_CODE_CLASS_RESPONSE_SERVER_FAILURE
Message class for responses indicating a server error.
Definition: constants.h:129
@ UNICOAP_CODE_CLASS_SIGNAL
Signaling message.
Definition: constants.h:132
@ UNICOAP_CODE_CLASS_REQUEST
Message class for requests.
Definition: constants.h:120
@ UNICOAP_COAP_VERSION_1
Identifier for CoAP version 1 (RFC 7252)
Definition: constants.h:42
@ UNICOAP_STATUS_REQUEST_ENTITY_INCOMPLETE
4.08 Request Entity Incomplete
Definition: constants.h:309
@ UNICOAP_STATUS_GATEWAY_TIMEOUT
5.04 Gateway Timeout
Definition: constants.h:387
@ UNICOAP_STATUS_BAD_GATEWAY
5.02 Bad Gateway
Definition: constants.h:373
@ UNICOAP_STATUS_FORBIDDEN
4.03 Forbidden
Definition: constants.h:281
@ UNICOAP_STATUS_UNPROCESSABLE_ENTITY
Unprocessable Entity.
Definition: constants.h:345
@ UNICOAP_STATUS_PATH_NOT_FOUND
4.04 Not Found
Definition: constants.h:288
@ UNICOAP_STATUS_TOO_MANY_REQUESTS
4.29 Too Many Requests
Definition: constants.h:352
@ UNICOAP_STATUS_CONTINUE
2.31 Continue
Definition: constants.h:253
@ UNICOAP_STATUS_INTERNAL_SERVER_ERROR
5.00 Internal Server Error
Definition: constants.h:359
@ UNICOAP_STATUS_PRECONDITION_FAILED
4.12 Precondition Failed
Definition: constants.h:323
@ UNICOAP_STATUS_CONFLICT
4.09 Conflict
Definition: constants.h:316
@ UNICOAP_STATUS_NOT_IMPLEMENTED
5.01 Not Implemented
Definition: constants.h:366
@ UNICOAP_STATUS_METHOD_NOT_ALLOWED
4.05 Method Not Allowed
Definition: constants.h:295
@ UNICOAP_STATUS_UNSUPPORTED_CONTENT_FORMAT
4.15 Unsupported Content Format
Definition: constants.h:338
@ UNICOAP_STATUS_NOT_ACCEPTABLE
4.06 Not Acceptable
Definition: constants.h:302
@ UNICOAP_STATUS_CONTENT
2.05 Content
Definition: constants.h:246
@ UNICOAP_STATUS_DELETED
2.02 Deleted
Definition: constants.h:225
@ UNICOAP_STATUS_SERVICE_UNAVAILABLE
5.03 Service Unavailable
Definition: constants.h:380
@ UNICOAP_STATUS_REQUEST_ENTITY_TOO_LARGE
4.13 Request Entity Too Large
Definition: constants.h:331
@ UNICOAP_STATUS_CHANGED
2.04 Changed
Definition: constants.h:239
@ UNICOAP_STATUS_PROXYING_NOT_SUPPORTED
5.05 Proxying Not Supported
Definition: constants.h:394
@ UNICOAP_STATUS_BAD_REQUEST
4.00 Bad Request
Definition: constants.h:260
@ UNICOAP_STATUS_UNAUTHORIZED
4.01 Unauthorized
Definition: constants.h:267
@ UNICOAP_STATUS_CREATED
2.01 Create
Definition: constants.h:218
@ UNICOAP_STATUS_BAD_OPTION
4.02 Bad Option
Definition: constants.h:274
@ UNICOAP_STATUS_VALID
2.03 Valid
Definition: constants.h:232
@ UNICOAP_SIGNAL_PING
Ping message.
Definition: constants.h:185
@ UNICOAP_SIGNAL_CAPABILITIES_SETTINGS
Capabilities and settings message (CSM)
Definition: constants.h:179
@ UNICOAP_SIGNAL_PONG
Pong message.
Definition: constants.h:191
@ UNICOAP_SIGNAL_RELEASE
Release message.
Definition: constants.h:197
@ UNICOAP_SIGNAL_ABORT
Abort message.
Definition: constants.h:203
@ UNICOAP_TYPE_RST
An reset message.
Definition: constants.h:91
@ UNICOAP_TYPE_CON
A confirmable message.
Definition: constants.h:82
@ UNICOAP_TYPE_ACK
An acknowledgement message.
Definition: constants.h:88
@ UNICOAP_TYPE_NON
A non-confirmable message.
Definition: constants.h:85
@ UNICOAP_METHOD_PATCH
PATCH request (RFC 8132)
Definition: constants.h:155
@ UNICOAP_METHOD_GET
GET request (no paylod)
Definition: constants.h:140
@ UNICOAP_METHOD_IPATCH
iPATCH request (RFC 8132)
Definition: constants.h:158
@ UNICOAP_METHOD_DELETE
DELETE request (no payload, remove resource)
Definition: constants.h:149
@ UNICOAP_METHOD_FETCH
FETCH request (RFC 8132)
Definition: constants.h:152
@ UNICOAP_METHOD_PUT
PUT request (update resource with payload)
Definition: constants.h:146
@ UNICOAP_METHOD_POST
POST request (resource processes payload)
Definition: constants.h:143
unicoap_content_format_t
Content-Format option values
Definition: constants.h:710
@ UNICOAP_FORMAT_AIF_JSON
Content type application/aif+json
Definition: constants.h:1064
@ UNICOAP_FORMAT_JSON
Content type application/json
Definition: constants.h:790
@ UNICOAP_FORMAT_TEXT
Content type text/plain; charset=utf-8
Definition: constants.h:717
@ UNICOAP_FORMAT_ACE_GROUPCOMM_CBOR
Content type application/ace-groupcomm+cbor
Definition: constants.h:947
@ UNICOAP_FORMAT_XML_ZSTD
Content type application/xml in zstd coding.
Definition: constants.h:1231
@ UNICOAP_FORMAT_TEXT_ZSTD
Content type text/plain;charset=utf-8 in zstd coding.
Definition: constants.h:1225
@ UNICOAP_FORMAT_OSCORE
Content type application/oscore
Definition: constants.h:1136
@ UNICOAP_FORMAT_SENSML_JSON
Content type application/sensml+json
Definition: constants.h:880
@ UNICOAP_FORMAT_SENSML_EXI
Content type application/sensml-exi
Definition: constants.h:904
@ UNICOAP_FORMAT_ACE_TRL_CBOR
Content type application/ace-trl+cbor
Definition: constants.h:953
@ UNICOAP_FORMAT_UCCS_CBOR
Content type application/uccs+cbor
Definition: constants.h:1124
@ UNICOAP_FORMAT_EAT_CWT_PSA_LEGACY
Content type application/eat+cwt; eat_profile=\"tag:psacertified.org,2019:psa\#legacy\\"
Definition: constants.h:1154
@ UNICOAP_FORMAT_MERGE_PATCH_JSON
Content type application/merge-patch+json
Definition: constants.h:802
@ UNICOAP_FORMAT_EDHOC_CBOR_SEQ
Content type application/edhoc+cbor-seq
Definition: constants.h:832
@ UNICOAP_FORMAT_CBOR_DEFLATE
Content type application/cbor in deflate coding.
Definition: constants.h:1201
@ UNICOAP_FORMAT_SENML_XML
Content type application/senml+xml
Definition: constants.h:1070
@ UNICOAP_FORMAT_COSE_SIGN1
Content type application/cose; cose-type=\"cose-sign1\\"
Definition: constants.h:735
@ UNICOAP_FORMAT_OCF_CBOR
Content type application/vnd.ocf+cbor
Definition: constants.h:1130
@ UNICOAP_FORMAT_SDF_JSON
Content type application/sdf+json
Definition: constants.h:1118
@ UNICOAP_FORMAT_CBOR
Content type application/cbor
Definition: constants.h:808
@ UNICOAP_FORMAT_YANG_DATA_CBOR_NAME
Content type application/yang-data+cbor; id=name
Definition: constants.h:1100
@ UNICOAP_FORMAT_EXI
Content type application/exi
Definition: constants.h:784
@ UNICOAP_FORMAT_LINK
Content type application/link-format
Definition: constants.h:765
@ UNICOAP_FORMAT_YANG_SID_JSON
Content type application/yang-sid+json
Definition: constants.h:941
@ UNICOAP_FORMAT_SENSML_XML
Content type application/sensml+xml
Definition: constants.h:1076
@ UNICOAP_FORMAT_PKCS7_MIME_SERVER_GENERATED_KEY
Content type application/pkcs7-mime; smime-type=server-generated-key
Definition: constants.h:1015
@ UNICOAP_FORMAT_COSE_ENCRYPT0
Content type application/cose; cose-type=\"cose-encrypt0\\"
Definition: constants.h:723
@ UNICOAP_FORMAT_COSE_KEY_SET
Content type application/cose-key-set
Definition: constants.h:868
@ UNICOAP_FORMAT_CID_EDHOC_CBOR_SEQ
Content type application/cid-edhoc+cbor-seq
Definition: constants.h:838
@ UNICOAP_FORMAT_EAT_UCS_CBOR
Content type application/eat-ucs+cbor
Definition: constants.h:983
@ UNICOAP_FORMAT_TD_JSON
Content type application/td+json
Definition: constants.h:1106
@ UNICOAP_FORMAT_PKCS7_MIME_CERTS_ONLY
Content type application/pkcs7-mime; smime-type=certs-only
Definition: constants.h:1022
@ UNICOAP_FORMAT_TOC_CBOR_INTEL
Content type application/toc+cbor;profile=2.16.840.1.113741.1.16.1
Definition: constants.h:1180
@ UNICOAP_FORMAT_SENML_ETCH_JSON
Content type application/senml-etch+json
Definition: constants.h:1082
@ UNICOAP_FORMAT_MISSING_BLOCKS_CBOR_SEQ
Content type application/missing-blocks+cbor-seq
Definition: constants.h:1007
@ UNICOAP_FORMAT_PKCS8
Content type application/pkcs8
Definition: constants.h:1030
@ UNICOAP_FORMAT_SENML_EXI
Content type application/senml-exi
Definition: constants.h:898
@ UNICOAP_FORMAT_OMA_LWM2M_TLV
Content type application/vnd.oma.lwm2m+tlv
Definition: constants.h:1207
@ UNICOAP_FORMAT_COAP_GROUP_JSON
Content type application/coap-group+json
Definition: constants.h:916
@ UNICOAP_FORMAT_TEXT_CSS
Content type text/css
Definition: constants.h:1243
@ UNICOAP_FORMAT_IMAGE_JPEG
Content type image/jpeg
Definition: constants.h:753
@ UNICOAP_FORMAT_COSE_KEY
Content type application/cose-key
Definition: constants.h:862
@ UNICOAP_FORMAT_JSON_PATCH_JSON
Content type application/json-patch+json
Definition: constants.h:796
@ UNICOAP_FORMAT_YANG_DATA_CBOR
Content type application/yang-data+cbor
Definition: constants.h:1094
@ UNICOAP_FORMAT_XML
Content type application/xml
Definition: constants.h:771
@ UNICOAP_FORMAT_EAT_CWT_INTEL
Content type application/eat+cwt; eat_profile=2.16.840.1.113741.1.16.1
Definition: constants.h:1161
@ UNICOAP_FORMAT_JSON_ZSTD
Content type application/json in zstd coding.
Definition: constants.h:1237
@ UNICOAP_FORMAT_PKIXCMP
Content type application/pkixcmp
Definition: constants.h:935
@ UNICOAP_FORMAT_COSE_MAC0
Content type application/cose; cose-type=\"cose-mac0\\"
Definition: constants.h:729
@ UNICOAP_FORMAT_IMAGE_PNG
Content type image/png
Definition: constants.h:759
@ UNICOAP_FORMAT_CE_CBOR_INTEL
Content type application/ce+cbor;profile=2.16.840.1.113741.1.16.1
Definition: constants.h:1187
@ UNICOAP_FORMAT_ACE_CBOR
Content type application/ace+cbor
Definition: constants.h:741
@ UNICOAP_FORMAT_SENML_ETCH_CBOR
Content type application/senml-etch+cbor
Definition: constants.h:1088
@ UNICOAP_FORMAT_PKIX_CERT
Content type application/pkix-cert
Definition: constants.h:1052
@ UNICOAP_FORMAT_OMA_LWM2M_CBOR
Content type application/vnd.oma.lwm2m+cbor
Definition: constants.h:1219
@ UNICOAP_FORMAT_JAVASCRIPT
Content type application/javascript
Definition: constants.h:1142
@ UNICOAP_FORMAT_SENML_CBOR
Content type application/senml+cbor
Definition: constants.h:886
@ UNICOAP_FORMAT_SWID_CBOR
Content type application/swid+cbor
Definition: constants.h:928
@ UNICOAP_FORMAT_CONCISE_PROBLEM_DETAILS_CBOR
Content type application/concise-problem-details+cbor
Definition: constants.h:922
@ UNICOAP_FORMAT_AIF_CBOR
Content type application/aif+cbor
Definition: constants.h:1058
@ UNICOAP_FORMAT_IMAGE_GIF
Content type image/gif
Definition: constants.h:747
@ UNICOAP_FORMAT_COSE_MAC
Content type application/cose; cose-type=\"cose-mac\\"
Definition: constants.h:850
@ UNICOAP_FORMAT_COSE_SIGN
Content type application/cose; cose-type=\"cose-sign\\"
Definition: constants.h:856
@ UNICOAP_FORMAT_EAT_CWT_PSA_TFM
Content type application/eat+cwt; eat_profile=\"tag:psacertified.org,2023:psa\#tfm\\"
Definition: constants.h:1148
@ UNICOAP_FORMAT_YANG_DATA_CBOR_SID
Content type application/yang-data+cbor; id=sid
Definition: constants.h:910
@ UNICOAP_FORMAT_IMAGE_SVG_XML
Content type image/svg+xml
Definition: constants.h:1249
@ UNICOAP_FORMAT_SENML_JSON
Content type application/senml+json
Definition: constants.h:874
@ UNICOAP_FORMAT_CBOR_SEQ
Content type application/cbor-seq
Definition: constants.h:826
@ UNICOAP_FORMAT_DOTS_CBOR
Content type application/dots+cbor
Definition: constants.h:1001
@ UNICOAP_FORMAT_EAT_CWT
Content type application/eat+cwt
Definition: constants.h:959
@ UNICOAP_FORMAT_PKCS10
Content type application/pkcs10
Definition: constants.h:1045
@ UNICOAP_FORMAT_COSE_ENCRYPT
Content type application/cose; cose-type=\"cose-encrypt\\"
Definition: constants.h:844
@ UNICOAP_FORMAT_EAT_JWT
Content type application/eat+jwt
Definition: constants.h:965
@ UNICOAP_FORMAT_OMA_LWM2M_JSON
Content type application/vnd.oma.lwm2m+json
Definition: constants.h:1213
@ UNICOAP_FORMAT_CE_CBOR
Content type application/ce+cbor
Definition: constants.h:1173
@ UNICOAP_FORMAT_EAT_BUN_JSON
Content type application/eat-bun+json
Definition: constants.h:977
@ UNICOAP_FORMAT_CWT
Content type application/cwt
Definition: constants.h:814
@ UNICOAP_FORMAT_JSON_DEFLATE
Content type application/json in deflate coding.
Definition: constants.h:1194
@ UNICOAP_FORMAT_CSRATTRS
Content type application/csrattrs
Definition: constants.h:1037
@ UNICOAP_FORMAT_OCTET_STREAM
Content type application/octet-stream
Definition: constants.h:778
@ UNICOAP_FORMAT_TOC_CBOR
Content type application/toc+cbor
Definition: constants.h:1167
@ UNICOAP_FORMAT_SENSML_CBOR
Content type application/sensml+cbor
Definition: constants.h:892
@ UNICOAP_FORMAT_COAP_EAP
Content type application/coap-eap
Definition: constants.h:995
@ UNICOAP_FORMAT_EAT_BUN_CBOR
Content type application/eat-bun+cbor
Definition: constants.h:971
@ UNICOAP_FORMAT_MULTIPART_CORE
Content type application/multipart-core
Definition: constants.h:820
@ UNICOAP_FORMAT_TM_JSON
Content type application/tm+json
Definition: constants.h:1112
@ UNICOAP_FORMAT_EAT_UCS_JSON
Content type application/eat-ucs+json
Definition: constants.h:989
unicoap_option_number_t
CoAP option number.
Definition: constants.h:416
@ UNICOAP_OPTION_URI_PORT
Uri-Port
Definition: constants.h:457
@ UNICOAP_OPTION_MAX_AGE
Max-Age option
Definition: constants.h:495
@ UNICOAP_SIGNALING_ABORT_OPTION_BAD_CSM
Bad-CSM-Option option Applies to 7.05 UNICOAP_SIGNAL_ABORT message.
Definition: constants.h:687
@ UNICOAP_OPTION_REQUEST_TAG
Request-Tag option.
Definition: constants.h:639
@ UNICOAP_OPTION_URI_HOST
Uri-Host option
Definition: constants.h:429
@ UNICOAP_OPTION_CONTENT_FORMAT
Content-Format option
Definition: constants.h:488
@ UNICOAP_OPTION_OBSERVE
Observe option
Definition: constants.h:450
@ UNICOAP_OPTION_ECHO
Echo option.
Definition: constants.h:623
@ UNICOAP_OPTION_IF_MATCH
If-Match option
Definition: constants.h:422
@ UNICOAP_OPTION_NO_RESPONSE
suppress CoAP response
Definition: constants.h:629
@ UNICOAP_OPTION_PROXY_URI
Proxy-Uri option
Definition: constants.h:592
@ UNICOAP_SIGNALING_RELEASE_OPTION_HOLD_OFF
Hold-Off option Applies to 7.04 UNICOAP_SIGNAL_RELEASE message.
Definition: constants.h:679
@ UNICOAP_OPTION_Q_BLOCK2
Q-Block2 option.
Definition: constants.h:585
@ UNICOAP_OPTION_EDHOC
EDHOC option.
Definition: constants.h:546
@ UNICOAP_OPTION_OSCORE
OSCORE option.
Definition: constants.h:474
@ UNICOAP_OPTION_BLOCK2
Block2 option
Definition: constants.h:555
@ UNICOAP_SIGNALING_CSM_OPTION_BLOCKWISE_TRANSFER
Blockwise-Transfer option Applies to 7.01 UNICOAP_SIGNAL_CAPABILITIES_SETTINGS message.
Definition: constants.h:655
@ UNICOAP_OPTION_SIZE2
Size2 option.
Definition: constants.h:576
@ UNICOAP_OPTION_URI_PATH
Uri-Path option
Definition: constants.h:481
@ UNICOAP_OPTION_BLOCK1
Block1 option
Definition: constants.h:564
@ UNICOAP_OPTION_ETAG
ETag option
Definition: constants.h:436
@ UNICOAP_OPTION_LOCATION_QUERY
Location-Query option
Definition: constants.h:536
@ UNICOAP_OPTION_IF_NONE_MATCH
If-None-Match option
Definition: constants.h:443
@ UNICOAP_SIGNALING_PING_PONG_OPTION_CUSTODY
Custody option Applies to 7.02 UNICOAP_SIGNAL_PING and 7.03 UNICOAP_SIGNAL_PONG message.
Definition: constants.h:663
@ UNICOAP_OPTION_LOCATION_PATH
Location-Path option
Definition: constants.h:464
@ UNICOAP_SIGNALING_RELEASE_OPTION_ALTERNATIVE_ADDRESS
Alternative-Address option Applies to 7.04 UNICOAP_SIGNAL_RELEASE message.
Definition: constants.h:671
@ UNICOAP_OPTION_SIZE1
Size1 option.
Definition: constants.h:613
@ UNICOAP_OPTION_Q_BLOCK1
Q-Block1 option
Definition: constants.h:529
@ UNICOAP_OPTION_PROXY_SCHEME
Proxy-Scheme option
Definition: constants.h:599
@ UNICOAP_OPTION_URI_QUERY
Uri-Query option
Definition: constants.h:504
@ UNICOAP_SIGNALING_CSM_OPTION_MAX_MESSAGE_SIZE
Max-Message-Size option Applies to 7.01 UNICOAP_SIGNAL_CAPABILITIES_SETTINGS message.
Definition: constants.h:647
@ UNICOAP_OPTION_HOP_LIMIT
Hop-Limit option
Definition: constants.h:513
@ UNICOAP_OPTION_ACCEPT
Accept option
Definition: constants.h:520
Compile-time configuration parameters.