libcoap 4.3.5-develop-e78a250
Loading...
Searching...
No Matches
coap_internal.h
Go to the documentation of this file.
1/*
2 * coap_internal.h -- Structures, Enums & Functions that are not exposed to
3 * application programming
4 *
5 * Copyright (C) 2019-2025 Jon Shallow <supjps-libcoap@jpshallow.com>
6 *
7 * SPDX-License-Identifier: BSD-2-Clause
8 *
9 * This file is part of the CoAP library libcoap. Please see README for terms
10 * of use.
11 */
12
13/*
14 * All libcoap library files should include this file which then pulls in all
15 * of the other appropriate header files.
16 *
17 * Note: This file should never be included in application code (with the
18 * possible exception of internal test suites).
19 */
20
26#ifndef COAP_INTERNAL_H_
27#define COAP_INTERNAL_H_
28
29#include "coap_config.h"
30
31/*
32 * Correctly set up assert() based on NDEBUG for libcoap
33 */
34#if defined(HAVE_ASSERT_H) && !defined(assert)
35# include <assert.h>
36#endif
37
38#ifdef HAVE_INTTYPES_H
39#include <inttypes.h>
40#else /* ! HAVE_INTTYPES_H */
41#ifndef PRIx32
42#define PRIx32 "x"
43#endif /* ! PRIx32 */
44#ifndef PRIu32
45#define PRIu32 "u"
46#endif /* ! PRIu32 */
47#ifndef PRIx64
48#define PRIx64 "lx"
49#endif /* ! PRIx64 */
50#ifndef PRIu64
51#define PRIu64 "lu"
52#endif /* ! PRIu64 */
53#endif /* ! HAVE_INTTYPES_H */
54/*
55 * To handle compilers / libraries that cannot handle %zu/%zd formats.
56 * Define these separately to whatver the complier / library can work with.
57 */
58#ifndef PRIuS
59#define PRIuS "zu"
60#endif /* PRIuS */
61#ifndef PRIdS
62#define PRIdS "zd"
63#endif /* PRIdS */
64
65#if defined(HAVE_ERRNO_H)
66# include <errno.h>
67#endif
68
69/* By default without either configured, these need to be set */
70#if ! COAP_SERVER_SUPPORT
71#if ! COAP_CLIENT_SUPPORT
72#define COAP_SERVER_SUPPORT 1
73#define COAP_CLIENT_SUPPORT 1
74#endif /* ! COAP_CLIENT_SUPPORT */
75#endif /* ! COAP_SERVER_SUPPORT */
76
77/* By default without either configured, these need to be set */
78#if ! COAP_IPV4_SUPPORT
79#if ! COAP_IPV6_SUPPORT
80#define COAP_IPV4_SUPPORT 1
81#define COAP_IPV6_SUPPORT 1
82#endif /* ! COAP_IPV6_SUPPORT */
83#endif /* ! COAP_IPV4_SUPPORT */
84
85#if ! COAP_SERVER_SUPPORT
86#if COAP_ASYNC_SUPPORT
87/* ASYNC is only there for Server code */
88#undef COAP_ASYNC_SUPPORT
89#define COAP_ASYNC_SUPPORT 0
90#endif /* COAP_ASYNC_SUPPORT */
91#endif /* ! COAP_SERVER_SUPPORT */
92
93#include "coap3/coap.h"
94
95/*
96 * Include all the header files that are for internal use only.
97 */
98
99#if COAP_OSCORE_SUPPORT
100/* Specific OSCORE general .h files */
101typedef struct oscore_ctx_t oscore_ctx_t;
102#include "oscore/oscore.h"
103#include "oscore/oscore_cbor.h"
104#include "oscore/oscore_cose.h"
106#include "oscore/oscore_crypto.h"
107#endif /* COAP_OSCORE_SUPPORT */
108
109/* Specifically defined internal .h files */
110#include "coap_asn1_internal.h"
111#include "coap_async_internal.h"
112#include "coap_block_internal.h"
113#include "coap_cache_internal.h"
114#if COAP_OSCORE_SUPPORT || COAP_WS_SUPPORT
115#include "coap_crypto_internal.h"
116#endif /* COAP_OSCORE_SUPPORT || COAP_WS_SUPPORT */
117#include "coap_debug_internal.h"
118#include "coap_dgrm_internal.h"
119#include "coap_dtls_internal.h"
121#include "coap_io_internal.h"
122#include "coap_layers_internal.h"
123#include "coap_mutex_internal.h"
124#include "coap_net_internal.h"
125#include "coap_netif_internal.h"
126#if COAP_OSCORE_SUPPORT
127#include "coap_oscore_internal.h"
128#endif /* COAP_OSCORE_SUPPORT */
129#include "coap_pdu_internal.h"
130#include "coap_prng_internal.h"
131#include "coap_proxy_internal.h"
134#include "coap_sha1_internal.h"
135#include "coap_strm_internal.h"
138#include "coap_uri_internal.h"
139#include "coap_utlist_internal.h"
140#include "coap_uthash_internal.h"
141#include "coap_ws_internal.h"
142
143#endif /* COAP_INTERNAL_H_ */
Primary include file.
CoAP ASN.1 internal information.
CoAP async internal information.
CoAP block internal information.
CoAP cache internal information.
COAP crypto internal information.
CoAP Logging support internal information.
CoAP Datagram (UDP) internal information.
Internal CoAP DTLS support.
Definition of hash key type and helper functions.
Internal network I/O functions.
Internal layer I/O functions.
CoAP mutex mechanism wrapper.
CoAP context internal information.
Internal CoAP Netif support.
CoAP OSCORE internal information.
CoAP PDU internal information.
Internal Pseudo Random Numbers.
CoAP Proxy internal information.
Generic resource internal handling.
CoAP session internal information.
Provides SHA1 support for WebSockets.
CoAP Stream (TCP) internal information.
CoAP subscribe internal information.
CoAP mapping of locking functions.
CoAP URI internal information.
Internal CoAP WebSockets support.
An implementation of the Object Security for Constrained RESTful Environments (RFC 8613).
An implementation of the Concise Binary Object Representation (RFC).
An implementation of the Object Security for Constrained RESTful Enviornments (RFC 8613).
An implementation of the CBOR Object Signing and Encryption (RFC).
An implementation of the Hash Based Key Derivation Function (RFC) and wrappers for AES-CCM*.