Loading...
Searching...
No Matches
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#include <stdbool.h>
12
13#include "macros/utils.h"
14
15#include "net/unicoap/config.h"
16
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33/* MARK: - CoAP PDUs */
45
49#define UNICOAP_PAYLOAD_MARKER (0xFF)
50
54#define UNICOAP_ETAG_LENGTH_MAX (8)
55
65#define UNICOAP_TOKEN_LENGTH_FIXED_WIDTH 4
67
68/* MARK: - RFC 7252 message types */
76#define UNICOAP_RFC7252_MESSAGE_TYPE_FIXED_WIDTH 3
77
81typedef enum {
84
87
90
93} __attribute__((__packed__)) unicoap_rfc7252_message_type_t;
94
95
96/* MARK: - Message codes */
104#define UNICOAP_CODE_EMPTY (0)
105
106/* This function is needed by this header, yet public use is discouraged. */
107#ifndef DOXYGEN
111# define UNICOAP_CODE(suffix, detail) ((CONCAT(UNICOAP_CODE_CLASS_, suffix) << 5) | detail)
112#endif
113
135
161
162/* We want to allow casting the code field in the pdu to this enum.
163 * This enum is used in a union in unicoap_message_t.
164 * The static_asserts in this header guarantee usage of these enums is safe in a union
165 * with an uint8_t code field. */
166static_assert(sizeof(unicoap_method_t) == sizeof(uint8_t),
167 "Method enum is too wide, please file an issue.");
168
206
207static_assert(sizeof(unicoap_signal_t) == sizeof(uint8_t),
208 "Signal enum is too wide, please file an issue.");
209
213typedef enum {
219 UNICOAP_STATUS_CREATED = UNICOAP_CODE(RESPONSE_SUCCESS, 1),
220
226 UNICOAP_STATUS_DELETED = UNICOAP_CODE(RESPONSE_SUCCESS, 2),
227
233 UNICOAP_STATUS_VALID = UNICOAP_CODE(RESPONSE_SUCCESS, 3),
234
240 UNICOAP_STATUS_CHANGED = UNICOAP_CODE(RESPONSE_SUCCESS, 4),
241
247 UNICOAP_STATUS_CONTENT = UNICOAP_CODE(RESPONSE_SUCCESS, 5),
248
254 UNICOAP_STATUS_CONTINUE = UNICOAP_CODE(RESPONSE_SUCCESS, 31),
255
261 UNICOAP_STATUS_BAD_REQUEST = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 0),
262
268 UNICOAP_STATUS_UNAUTHORIZED = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 1),
269
275 UNICOAP_STATUS_BAD_OPTION = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 2),
276
282 UNICOAP_STATUS_FORBIDDEN = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 3),
283
289 UNICOAP_STATUS_PATH_NOT_FOUND = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 4),
290
296 UNICOAP_STATUS_METHOD_NOT_ALLOWED = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 5),
297
303 UNICOAP_STATUS_NOT_ACCEPTABLE = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 6),
304
310 UNICOAP_STATUS_REQUEST_ENTITY_INCOMPLETE = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 8),
311
317 UNICOAP_STATUS_CONFLICT = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 9),
318
324 UNICOAP_STATUS_PRECONDITION_FAILED = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 12),
325
332 UNICOAP_STATUS_REQUEST_ENTITY_TOO_LARGE = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 13),
333
339 UNICOAP_STATUS_UNSUPPORTED_CONTENT_FORMAT = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 15),
340
346 UNICOAP_STATUS_UNPROCESSABLE_ENTITY = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 22),
347
353 UNICOAP_STATUS_TOO_MANY_REQUESTS = UNICOAP_CODE(RESPONSE_CLIENT_FAILURE, 29),
354
360 UNICOAP_STATUS_INTERNAL_SERVER_ERROR = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 0),
361
367 UNICOAP_STATUS_NOT_IMPLEMENTED = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 1),
368
374 UNICOAP_STATUS_BAD_GATEWAY = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 2),
375
381 UNICOAP_STATUS_SERVICE_UNAVAILABLE = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 3),
382
388 UNICOAP_STATUS_GATEWAY_TIMEOUT = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 4),
389
395 UNICOAP_STATUS_PROXYING_NOT_SUPPORTED = UNICOAP_CODE(RESPONSE_SERVER_FAILURE, 5),
396} __attribute__((__packed__)) unicoap_status_t;
397
398static_assert(sizeof(unicoap_status_t) == sizeof(uint8_t),
399 "Status enum is too wide, please file an issue.");
402
407/* MARK: - Option numbers */
688
689static_assert(sizeof(unicoap_option_number_t) == sizeof(uint16_t),
690 "unicoap_option_number_t has unexpected size");
693
698/* MARK: - Content-Format values */
699/* Please see the generator in iana/contenttype.js */
709typedef enum {
719
727
735
743
751
759
767
775
783
791
800
808
816
824
832
840
848
856
864
872
880
888
896
904
912
920
928
936
944
952
960
968
976
984
992
1000
1009
1017
1025
1033
1041
1049
1057
1065
1073
1081
1089
1097
1105
1113
1121
1129
1137
1145
1153
1161
1169
1179
1188
1198
1207
1217
1226
1234
1242
1250
1258
1266
1274
1282
1290
1298
1306
1314
1322
1330
1338
1346
1354
1362
1370
1379
1387
1395
1403
1411
1419
1427
1435
1444
1452
1460
1468
1476
1485
1494
1503
1512
1520
1528
1536
1544
1552
1560
1568
1576
1584
1592
1600
1608} __attribute__((__packed__)) unicoap_content_format_t;
1609
1616{
1617 return
1618 format == UNICOAP_FORMAT_JSON ||
1621 format == UNICOAP_FORMAT_SENML_JSON ||
1622 format == UNICOAP_FORMAT_SENSML_JSON ||
1624 format == UNICOAP_FORMAT_YANG_SID_JSON ||
1625 format == UNICOAP_FORMAT_EAT_BUN_JSON ||
1626 format == UNICOAP_FORMAT_EAT_UCS_JSON ||
1627 format == UNICOAP_FORMAT_CMW_JSON ||
1628 format == UNICOAP_FORMAT_AIF_JSON ||
1632 format == UNICOAP_FORMAT_TD_JSON ||
1633 format == UNICOAP_FORMAT_TM_JSON ||
1634 format == UNICOAP_FORMAT_SDF_JSON ||
1635 format == UNICOAP_FORMAT_JSON_DEFLATE ||
1637 format == UNICOAP_FORMAT_JSON_ZSTD;
1638}
1639
1646{
1647 return
1648 format == UNICOAP_FORMAT_ACE_CBOR ||
1649 format == UNICOAP_FORMAT_CBOR ||
1650 format == UNICOAP_FORMAT_CBOR_SEQ ||
1653 format == UNICOAP_FORMAT_SENML_CBOR ||
1654 format == UNICOAP_FORMAT_SENSML_CBOR ||
1657 format == UNICOAP_FORMAT_SWID_CBOR ||
1659 format == UNICOAP_FORMAT_ACE_TRL_CBOR ||
1660 format == UNICOAP_FORMAT_EAT_BUN_CBOR ||
1661 format == UNICOAP_FORMAT_EAT_UCS_CBOR ||
1662 format == UNICOAP_FORMAT_DOTS_CBOR ||
1664 format == UNICOAP_FORMAT_CMW_CBOR ||
1665 format == UNICOAP_FORMAT_AIF_CBOR ||
1672 format == UNICOAP_FORMAT_UCCS_CBOR ||
1673 format == UNICOAP_FORMAT_OCF_CBOR ||
1675 format == UNICOAP_FORMAT_TOC_CBOR ||
1676 format == UNICOAP_FORMAT_CE_CBOR ||
1679 format == UNICOAP_FORMAT_CBOR_DEFLATE ||
1681}
1682
1689{
1690 return
1691 format == UNICOAP_FORMAT_XML ||
1692 format == UNICOAP_FORMAT_SENML_XML ||
1693 format == UNICOAP_FORMAT_SENSML_XML ||
1694 format == UNICOAP_FORMAT_XML_ZSTD ||
1696}
1697
1704{
1705 return
1706 format == UNICOAP_FORMAT_TEXT ||
1707 format == UNICOAP_FORMAT_TEXT_CSS ||
1708 format == UNICOAP_FORMAT_JAVASCRIPT ||
1709 format == UNICOAP_FORMAT_LINK ||
1712}
1713
1715
1716#ifdef __cplusplus
1717}
1718#endif
Various helper macros.
unicoap_code_class_t
Message code class.
Definition constants.h:119
unicoap_protocol_version_t
CoAP version number.
Definition constants.h:39
unicoap_status_t
CoAP response status codes.
Definition constants.h:213
unicoap_signal_t
CoAP Signal Message Codes (7.xx range)
Definition constants.h:175
unicoap_rfc7252_message_type_t
RFC 7252 message type.
Definition constants.h:81
unicoap_method_t
CoAP request method codes (0.xx range)
Definition constants.h:139
@ UNICOAP_CODE_CLASS_RESPONSE_SUCCESS
Message class for success responses.
Definition constants.h:124
@ UNICOAP_CODE_CLASS_RESPONSE_CLIENT_FAILURE
Message class for responses indicating a client error.
Definition constants.h:127
@ UNICOAP_CODE_CLASS_RESPONSE_SERVER_FAILURE
Message class for responses indicating a server error.
Definition constants.h:130
@ UNICOAP_CODE_CLASS_SIGNAL
Signaling message.
Definition constants.h:133
@ UNICOAP_CODE_CLASS_REQUEST
Message class for requests.
Definition constants.h:121
@ UNICOAP_COAP_VERSION_1
Identifier for CoAP version 1 (RFC 7252)
Definition constants.h:43
@ UNICOAP_STATUS_REQUEST_ENTITY_INCOMPLETE
4.08 Request Entity Incomplete
Definition constants.h:310
@ UNICOAP_STATUS_GATEWAY_TIMEOUT
5.04 Gateway Timeout
Definition constants.h:388
@ UNICOAP_STATUS_BAD_GATEWAY
5.02 Bad Gateway
Definition constants.h:374
@ UNICOAP_STATUS_FORBIDDEN
4.03 Forbidden
Definition constants.h:282
@ UNICOAP_STATUS_UNPROCESSABLE_ENTITY
Unprocessable Entity.
Definition constants.h:346
@ UNICOAP_STATUS_PATH_NOT_FOUND
4.04 Not Found
Definition constants.h:289
@ UNICOAP_STATUS_TOO_MANY_REQUESTS
4.29 Too Many Requests
Definition constants.h:353
@ UNICOAP_STATUS_CONTINUE
2.31 Continue
Definition constants.h:254
@ UNICOAP_STATUS_INTERNAL_SERVER_ERROR
5.00 Internal Server Error
Definition constants.h:360
@ UNICOAP_STATUS_PRECONDITION_FAILED
4.12 Precondition Failed
Definition constants.h:324
@ UNICOAP_STATUS_CONFLICT
4.09 Conflict
Definition constants.h:317
@ UNICOAP_STATUS_NOT_IMPLEMENTED
5.01 Not Implemented
Definition constants.h:367
@ UNICOAP_STATUS_METHOD_NOT_ALLOWED
4.05 Method Not Allowed
Definition constants.h:296
@ UNICOAP_STATUS_UNSUPPORTED_CONTENT_FORMAT
4.15 Unsupported Content Format
Definition constants.h:339
@ UNICOAP_STATUS_NOT_ACCEPTABLE
4.06 Not Acceptable
Definition constants.h:303
@ UNICOAP_STATUS_CONTENT
2.05 Content
Definition constants.h:247
@ UNICOAP_STATUS_DELETED
2.02 Deleted
Definition constants.h:226
@ UNICOAP_STATUS_SERVICE_UNAVAILABLE
5.03 Service Unavailable
Definition constants.h:381
@ UNICOAP_STATUS_REQUEST_ENTITY_TOO_LARGE
4.13 Request Entity Too Large
Definition constants.h:332
@ UNICOAP_STATUS_CHANGED
2.04 Changed
Definition constants.h:240
@ UNICOAP_STATUS_PROXYING_NOT_SUPPORTED
5.05 Proxying Not Supported
Definition constants.h:395
@ UNICOAP_STATUS_BAD_REQUEST
4.00 Bad Request
Definition constants.h:261
@ UNICOAP_STATUS_UNAUTHORIZED
4.01 Unauthorized
Definition constants.h:268
@ UNICOAP_STATUS_CREATED
2.01 Create
Definition constants.h:219
@ UNICOAP_STATUS_BAD_OPTION
4.02 Bad Option
Definition constants.h:275
@ UNICOAP_STATUS_VALID
2.03 Valid
Definition constants.h:233
@ UNICOAP_SIGNAL_PING
Ping message.
Definition constants.h:186
@ UNICOAP_SIGNAL_CAPABILITIES_SETTINGS
Capabilities and settings message (CSM)
Definition constants.h:180
@ UNICOAP_SIGNAL_PONG
Pong message.
Definition constants.h:192
@ UNICOAP_SIGNAL_RELEASE
Release message.
Definition constants.h:198
@ UNICOAP_SIGNAL_ABORT
Abort message.
Definition constants.h:204
@ UNICOAP_TYPE_RST
An reset message.
Definition constants.h:92
@ UNICOAP_TYPE_CON
A confirmable message.
Definition constants.h:83
@ UNICOAP_TYPE_ACK
An acknowledgement message.
Definition constants.h:89
@ UNICOAP_TYPE_NON
A non-confirmable message.
Definition constants.h:86
@ UNICOAP_METHOD_PATCH
PATCH request (RFC 8132)
Definition constants.h:156
@ UNICOAP_METHOD_GET
GET request (no paylod)
Definition constants.h:141
@ UNICOAP_METHOD_IPATCH
iPATCH request (RFC 8132)
Definition constants.h:159
@ UNICOAP_METHOD_DELETE
DELETE request (no payload, remove resource)
Definition constants.h:150
@ UNICOAP_METHOD_FETCH
FETCH request (RFC 8132)
Definition constants.h:153
@ UNICOAP_METHOD_PUT
PUT request (update resource with payload)
Definition constants.h:147
@ UNICOAP_METHOD_POST
POST request (resource processes payload)
Definition constants.h:144
static bool unicoap_content_format_is_xml(unicoap_content_format_t format)
Determines whether the given Content-Format is based on XML.
Definition constants.h:1688
static bool unicoap_content_format_is_human_readable(unicoap_content_format_t format)
Determines whether the given Content-Format is human-readable.
Definition constants.h:1703
static bool unicoap_content_format_is_cbor(unicoap_content_format_t format)
Determines whether the given Content-Format is based on CBOR.
Definition constants.h:1645
unicoap_content_format_t
Content-Format option values
Definition constants.h:709
static bool unicoap_content_format_is_json(unicoap_content_format_t format)
Determines whether the given Content-Format is based on JSON.
Definition constants.h:1615
@ UNICOAP_FORMAT_AIF_JSON
Content type application/aif+json
Definition constants.h:1241
@ UNICOAP_FORMAT_JSON
Content type application/json
Definition constants.h:815
@ UNICOAP_FORMAT_EAT_CWT_PSA2019_PROFILE
Content type application/eat+cwt; eat_profile="tag:psacertified.org,2019:psa#legacy"
Definition constants.h:1434
@ UNICOAP_FORMAT_SUIT_REPORT_COSE
Content type application/suit-report+cose
Definition constants.h:1096
@ UNICOAP_FORMAT_TEXT
Content type text/plain; charset=utf-8
Definition constants.h:718
@ UNICOAP_FORMAT_ACE_GROUPCOMM_CBOR
Content type application/ace-groupcomm+cbor
Definition constants.h:1024
@ UNICOAP_FORMAT_XML_ZSTD
Content type application/xml in zstd coding.
Definition constants.h:1551
@ UNICOAP_FORMAT_TEXT_ZSTD
Content type text/plain;charset=utf-8 in zstd coding.
Definition constants.h:1543
@ UNICOAP_FORMAT_OSCORE
Content type application/oscore
Definition constants.h:1410
@ UNICOAP_FORMAT_MEASURED_COMPONENT_JSON
Content type application/measured-component+json
Definition constants.h:1281
@ UNICOAP_FORMAT_SENSML_JSON
Content type application/sensml+json
Definition constants.h:935
@ UNICOAP_FORMAT_SENSML_EXI
Content type application/sensml-exi
Definition constants.h:967
@ UNICOAP_FORMAT_AIF_CBOR_CRI_LOCAL_PART
Content type application/aif+cbor;toid=CRI-local-part
Definition constants.h:1249
@ UNICOAP_FORMAT_ACE_TRL_CBOR
Content type application/ace-trl+cbor
Definition constants.h:1032
@ UNICOAP_FORMAT_UCCS_CBOR
Content type application/uccs+cbor
Definition constants.h:1386
@ UNICOAP_FORMAT_MERGE_PATCH_JSON
Content type application/merge-patch+json
Definition constants.h:831
@ UNICOAP_FORMAT_VOUCHER_COSE_
Content type application/voucher+cose (TEMPORARY - registered 2022-04-12, extension registered 2026-0...
Definition constants.h:1394
@ UNICOAP_FORMAT_EDHOC_CBOR_SEQ
Content type application/edhoc+cbor-seq
Definition constants.h:871
@ UNICOAP_FORMAT_CBOR_DEFLATE
Content type application/cbor in deflate coding.
Definition constants.h:1511
@ UNICOAP_FORMAT_SENML_XML
Content type application/senml+xml
Definition constants.h:1305
@ UNICOAP_FORMAT_COSE_SIGN1
Content type application/cose; cose-type="cose-sign1"
Definition constants.h:742
@ UNICOAP_FORMAT_OCF_CBOR
Content type application/vnd.ocf+cbor
Definition constants.h:1402
@ UNICOAP_FORMAT_SDF_JSON
Content type application/sdf+json
Definition constants.h:1369
@ UNICOAP_FORMAT_CBOR
Content type application/cbor
Definition constants.h:839
@ UNICOAP_FORMAT_YANG_DATA_CBOR_NAME
Content type application/yang-data+cbor; id=name
Definition constants.h:1345
@ UNICOAP_FORMAT_EXI
Content type application/exi
Definition constants.h:807
@ UNICOAP_FORMAT_LINK
Content type application/link-format
Definition constants.h:782
@ UNICOAP_FORMAT_YANG_SID_JSON
Content type application/yang-sid+json
Definition constants.h:1016
@ UNICOAP_FORMAT_SENSML_XML
Content type application/sensml+xml
Definition constants.h:1313
@ UNICOAP_FORMAT_PKCS7_MIME_SERVER_GENERATED_KEY
Content type application/pkcs7-mime; smime-type=server-generated-key
Definition constants.h:1178
@ UNICOAP_FORMAT_CMW_COSE
Content type application/cmw+cose
Definition constants.h:1136
@ UNICOAP_FORMAT_TOC_CBOR_PROFILE
Content type application/toc+cbor;profile=2.16.840.1.113741.1.16.1
Definition constants.h:1484
@ UNICOAP_FORMAT_COSE_ENCRYPT0
Content type application/cose; cose-type="cose-encrypt0"
Definition constants.h:726
@ UNICOAP_FORMAT_AIF_CBOR_OSCORE_GNAME_OSCORE_GPERM
Content type application/aif+cbor;toid=oscore-gname;tperm=oscore-gperm
Definition constants.h:1289
@ UNICOAP_FORMAT_COSE_KEY_SET
Content type application/cose-key-set
Definition constants.h:919
@ UNICOAP_FORMAT_CID_EDHOC_CBOR_SEQ
Content type application/cid-edhoc+cbor-seq
Definition constants.h:879
@ UNICOAP_FORMAT_MEASURED_COMPONENT_CBOR
Content type application/measured-component+cbor
Definition constants.h:1273
@ UNICOAP_FORMAT_EAT_UCS_CBOR
Content type application/eat-ucs+cbor
Definition constants.h:1072
@ UNICOAP_FORMAT_TD_JSON
Content type application/td+json
Definition constants.h:1353
@ UNICOAP_FORMAT_SCITT_STATEMENT_COSE
Content type application/scitt-statement+cose
Definition constants.h:1152
@ UNICOAP_FORMAT_PKCS7_MIME_CERTS_ONLY
Content type application/pkcs7-mime; smime-type=certs-only
Definition constants.h:1187
@ UNICOAP_FORMAT_SENML_ETCH_JSON
Content type application/senml-etch+json
Definition constants.h:1321
@ UNICOAP_FORMAT_MISSING_BLOCKS_CBOR_SEQ
Content type application/missing-blocks+cbor-seq
Definition constants.h:1112
@ UNICOAP_FORMAT_PKCS8
Content type application/pkcs8
Definition constants.h:1197
@ UNICOAP_FORMAT_SENML_EXI
Content type application/senml-exi
Definition constants.h:959
@ UNICOAP_FORMAT_OMA_LWM2M_TLV
Content type application/vnd.oma.lwm2m+tlv
Definition constants.h:1519
@ UNICOAP_FORMAT_STATUSLIST_CWT
Content type application/statuslist+cwt
Definition constants.h:1168
@ UNICOAP_FORMAT_COAP_GROUP_JSON
Content type application/coap-group+json
Definition constants.h:983
@ UNICOAP_FORMAT_OMS_CELLULAR_COSE_CONTENT_CBOR
Content type application/vnd.oms.cellular-cose-content+cbor
Definition constants.h:1451
@ UNICOAP_FORMAT_TEXT_CSS
Content type text/css
Definition constants.h:1567
@ UNICOAP_FORMAT_IMAGE_JPEG
Content type image/jpeg
Definition constants.h:766
@ UNICOAP_FORMAT_SCITT_RECEIPT_COSE
Content type application/scitt-receipt+cose
Definition constants.h:1160
@ UNICOAP_FORMAT_COSE_KEY
Content type application/cose-key
Definition constants.h:911
@ UNICOAP_FORMAT_JSON_PATCH_JSON
Content type application/json-patch+json
Definition constants.h:823
@ UNICOAP_FORMAT_AS207960_VAS_TAP_JER
Content type application/vnd.as207960.vas.tap+jer
Definition constants.h:1591
@ UNICOAP_FORMAT_SD_CWT_
Content type application/sd-cwt (TEMPORARY - registered 2025-12-08, expires 2026-12-08)
Definition constants.h:1257
@ UNICOAP_FORMAT_EAT_CWT_PSA2023_PROFILE
Content type application/eat+cwt; eat_profile="tag:psacertified.org,2023:psa#tfm"
Definition constants.h:1426
@ UNICOAP_FORMAT_YANG_DATA_CBOR
Content type application/yang-data+cbor
Definition constants.h:1337
@ UNICOAP_FORMAT_XML
Content type application/xml
Definition constants.h:790
@ UNICOAP_FORMAT_AS207960_VAS_CONFIG_JER
Content type application/vnd.as207960.vas.config+jer
Definition constants.h:1575
@ UNICOAP_FORMAT_KB_CWT_
Content type application/kb+cwt (TEMPORARY - registered 2025-12-08, expires 2026-12-08)
Definition constants.h:1265
@ UNICOAP_FORMAT_JSON_ZSTD
Content type application/json in zstd coding.
Definition constants.h:1559
@ UNICOAP_FORMAT_PKIXCMP
Content type application/pkixcmp
Definition constants.h:1008
@ UNICOAP_FORMAT_COSE_MAC0
Content type application/cose; cose-type="cose-mac0"
Definition constants.h:734
@ UNICOAP_FORMAT_IMAGE_PNG
Content type image/png
Definition constants.h:774
@ UNICOAP_FORMAT_CMW_JWS
Content type application/cmw+jws
Definition constants.h:1144
@ UNICOAP_FORMAT_ACE_CBOR
Content type application/ace+cbor
Definition constants.h:750
@ UNICOAP_FORMAT_SENML_ETCH_CBOR
Content type application/senml-etch+cbor
Definition constants.h:1329
@ UNICOAP_FORMAT_PKIX_CERT
Content type application/pkix-cert
Definition constants.h:1225
@ UNICOAP_FORMAT_OMA_LWM2M_CBOR
Content type application/vnd.oma.lwm2m+cbor
Definition constants.h:1535
@ UNICOAP_FORMAT_CMW_CBOR
Content type application/cmw+cbor
Definition constants.h:1120
@ UNICOAP_FORMAT_JAVASCRIPT
Content type application/javascript
Definition constants.h:1418
@ UNICOAP_FORMAT_SENML_CBOR
Content type application/senml+cbor
Definition constants.h:943
@ UNICOAP_FORMAT_SWID_CBOR
Content type application/swid+cbor
Definition constants.h:999
@ UNICOAP_FORMAT_CONCISE_PROBLEM_DETAILS_CBOR
Content type application/concise-problem-details+cbor
Definition constants.h:991
@ UNICOAP_FORMAT_AIF_CBOR
Content type application/aif+cbor
Definition constants.h:1233
@ UNICOAP_FORMAT_IMAGE_GIF
Content type image/gif
Definition constants.h:758
@ UNICOAP_FORMAT_COSE_MAC
Content type application/cose; cose-type="cose-mac"
Definition constants.h:895
@ UNICOAP_FORMAT_COSE_SIGN
Content type application/cose; cose-type="cose-sign"
Definition constants.h:903
@ UNICOAP_FORMAT_YANG_DATA_CBOR_SID
Content type application/yang-data+cbor; id=sid
Definition constants.h:975
@ UNICOAP_FORMAT_IMAGE_SVG_XML
Content type image/svg+xml
Definition constants.h:1607
@ UNICOAP_FORMAT_SENML_JSON
Content type application/senml+json
Definition constants.h:927
@ UNICOAP_FORMAT_AIF_JSON_OSCORE_GNAME_OSCORE_GPERM
Content type application/aif+json;toid=oscore-gname;tperm=oscore-gperm
Definition constants.h:1297
@ UNICOAP_FORMAT_CBOR_SEQ
Content type application/cbor-seq
Definition constants.h:863
@ UNICOAP_FORMAT_DOTS_CBOR
Content type application/dots+cbor
Definition constants.h:1104
@ UNICOAP_FORMAT_EAT_CWT
Content type application/eat+cwt
Definition constants.h:1040
@ UNICOAP_FORMAT_PKCS10
Content type application/pkcs10
Definition constants.h:1216
@ UNICOAP_FORMAT_COSE_ENCRYPT
Content type application/cose; cose-type="cose-encrypt"
Definition constants.h:887
@ UNICOAP_FORMAT_SYSLOG_MSG
Content type application/syslog-msg
Definition constants.h:1459
@ UNICOAP_FORMAT_CMW_JSON
Content type application/cmw+json
Definition constants.h:1128
@ UNICOAP_FORMAT_EAT_JWT
Content type application/eat+jwt
Definition constants.h:1048
@ UNICOAP_FORMAT_OMA_LWM2M_JSON
Content type application/vnd.oma.lwm2m+json
Definition constants.h:1527
@ UNICOAP_FORMAT_CE_CBOR
Content type application/ce+cbor
Definition constants.h:1475
@ UNICOAP_FORMAT_CE_CBOR_PROFILE
Content type application/ce+cbor;profile=2.16.840.1.113741.1.16.1
Definition constants.h:1493
@ UNICOAP_FORMAT_EAT_BUN_JSON
Content type application/eat-bun+json
Definition constants.h:1064
@ UNICOAP_FORMAT_DNS_MESSAGE
Content type application/dns-message
Definition constants.h:1378
@ UNICOAP_FORMAT_CWT
Content type application/cwt
Definition constants.h:847
@ UNICOAP_FORMAT_JSON_DEFLATE
Content type application/json in deflate coding.
Definition constants.h:1502
@ UNICOAP_FORMAT_CSRATTRS
Content type application/csrattrs
Definition constants.h:1206
@ UNICOAP_FORMAT_OCTET_STREAM
Content type application/octet-stream
Definition constants.h:799
@ UNICOAP_FORMAT_EAT_CWT_PROFILE_PROFILE
Content type application/eat+cwt; eat_profile=2.16.840.1.113741.1.16.1
Definition constants.h:1443
@ UNICOAP_FORMAT_TOC_CBOR
Content type application/toc+cbor
Definition constants.h:1467
@ UNICOAP_FORMAT_SENSML_CBOR
Content type application/sensml+cbor
Definition constants.h:951
@ UNICOAP_FORMAT_AS207960_VAS_TAP_UPER
Content type application/vnd.as207960.vas.tap+uper
Definition constants.h:1599
@ UNICOAP_FORMAT_COAP_EAP
Content type application/coap-eap
Definition constants.h:1088
@ UNICOAP_FORMAT_EAT_BUN_CBOR
Content type application/eat-bun+cbor
Definition constants.h:1056
@ UNICOAP_FORMAT_MULTIPART_CORE
Content type application/multipart-core
Definition constants.h:855
@ UNICOAP_FORMAT_AS207960_VAS_CONFIG_UPER
Content type application/vnd.as207960.vas.config+uper
Definition constants.h:1583
@ UNICOAP_FORMAT_TM_JSON
Content type application/tm+json
Definition constants.h:1361
@ UNICOAP_FORMAT_EAT_UCS_JSON
Content type application/eat-ucs+json
Definition constants.h:1080
unicoap_option_number_t
CoAP option number.
Definition constants.h:415
@ UNICOAP_OPTION_URI_PORT
Uri-Port
Definition constants.h:456
@ UNICOAP_OPTION_MAX_AGE
Max-Age option
Definition constants.h:494
@ UNICOAP_SIGNALING_ABORT_OPTION_BAD_CSM
Bad-CSM-Option option Applies to 7.05 UNICOAP_SIGNAL_ABORT message.
Definition constants.h:686
@ UNICOAP_OPTION_REQUEST_TAG
Request-Tag option.
Definition constants.h:638
@ UNICOAP_OPTION_URI_HOST
Uri-Host option
Definition constants.h:428
@ UNICOAP_OPTION_CONTENT_FORMAT
Content-Format option
Definition constants.h:487
@ UNICOAP_OPTION_OBSERVE
Observe option
Definition constants.h:449
@ UNICOAP_OPTION_ECHO
Echo option.
Definition constants.h:622
@ UNICOAP_OPTION_IF_MATCH
If-Match option
Definition constants.h:421
@ UNICOAP_OPTION_NO_RESPONSE
suppress CoAP response
Definition constants.h:628
@ UNICOAP_OPTION_PROXY_URI
Proxy-Uri option
Definition constants.h:591
@ UNICOAP_SIGNALING_RELEASE_OPTION_HOLD_OFF
Hold-Off option Applies to 7.04 UNICOAP_SIGNAL_RELEASE message.
Definition constants.h:678
@ UNICOAP_OPTION_Q_BLOCK2
Q-Block2 option.
Definition constants.h:584
@ UNICOAP_OPTION_EDHOC
EDHOC option.
Definition constants.h:545
@ UNICOAP_OPTION_OSCORE
OSCORE option.
Definition constants.h:473
@ UNICOAP_OPTION_BLOCK2
Block2 option
Definition constants.h:554
@ UNICOAP_SIGNALING_CSM_OPTION_BLOCKWISE_TRANSFER
Blockwise-Transfer option Applies to 7.01 UNICOAP_SIGNAL_CAPABILITIES_SETTINGS message.
Definition constants.h:654
@ UNICOAP_OPTION_SIZE2
Size2 option.
Definition constants.h:575
@ UNICOAP_OPTION_URI_PATH
Uri-Path option
Definition constants.h:480
@ UNICOAP_OPTION_BLOCK1
Block1 option
Definition constants.h:563
@ UNICOAP_OPTION_ETAG
ETag option
Definition constants.h:435
@ UNICOAP_OPTION_LOCATION_QUERY
Location-Query option
Definition constants.h:535
@ UNICOAP_OPTION_IF_NONE_MATCH
If-None-Match option
Definition constants.h:442
@ 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:662
@ UNICOAP_OPTION_LOCATION_PATH
Location-Path option
Definition constants.h:463
@ UNICOAP_SIGNALING_RELEASE_OPTION_ALTERNATIVE_ADDRESS
Alternative-Address option Applies to 7.04 UNICOAP_SIGNAL_RELEASE message.
Definition constants.h:670
@ UNICOAP_OPTION_SIZE1
Size1 option.
Definition constants.h:612
@ UNICOAP_OPTION_Q_BLOCK1
Q-Block1 option
Definition constants.h:528
@ UNICOAP_OPTION_PROXY_SCHEME
Proxy-Scheme option
Definition constants.h:598
@ UNICOAP_OPTION_URI_QUERY
Uri-Query option
Definition constants.h:503
@ UNICOAP_SIGNALING_CSM_OPTION_MAX_MESSAGE_SIZE
Max-Message-Size option Applies to 7.01 UNICOAP_SIGNAL_CAPABILITIES_SETTINGS message.
Definition constants.h:646
@ UNICOAP_OPTION_HOP_LIMIT
Hop-Limit option
Definition constants.h:512
@ UNICOAP_OPTION_ACCEPT
Accept option
Definition constants.h:519
Compile-time configuration parameters.