libcoap 4.3.3
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-2023 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#if defined(HAVE_ERRNO_H)
56# include <errno.h>
57#endif
58
59/* By default without either configured, these need to be set */
60#ifndef COAP_SERVER_SUPPORT
61#ifndef COAP_CLIENT_SUPPORT
62#define COAP_SERVER_SUPPORT 1
63#define COAP_CLIENT_SUPPORT 1
64#endif /* ! COAP_CLIENT_SUPPORT */
65#endif /* ! COAP_SERVER_SUPPORT */
66
67/* By default without either configured, these need to be set */
68#ifndef COAP_IPV4_SUPPORT
69#ifndef COAP_IPV6_SUPPORT
70#define COAP_IPV4_SUPPORT 1
71#define COAP_IPV6_SUPPORT 1
72#endif /* ! COAP_IPV6_SUPPORT */
73#endif /* ! COAP_IPV4_SUPPORT */
74
75#if ! COAP_SERVER_SUPPORT
76#if COAP_ASYNC_SUPPORT
77/* ASYNC is only there for Server code */
78#undef COAP_ASYNC_SUPPORT
79#define COAP_ASYNC_SUPPORT 0
80#endif /* COAP_ASYNC_SUPPORT */
81#endif /* ! COAP_SERVER_SUPPORT */
82
83#include "coap3/coap.h"
84
85/*
86 * Include all the header files that are for internal use only.
87 */
88
89#if defined(COAP_OSCORE_SUPPORT) || defined(COAP_WS_SUPPORT)
90/* Specific OSCORE general .h files */
91typedef struct oscore_ctx_t oscore_ctx_t;
92#include "oscore/oscore.h"
93#include "oscore/oscore_cbor.h"
94#include "oscore/oscore_cose.h"
97#endif /* COAP_OSCORE_SUPPORT || COAP_WS_SUPPORT */
98
99/* Specifically defined internal .h files */
100#include "coap_asn1_internal.h"
101#include "coap_async_internal.h"
102#include "coap_block_internal.h"
103#include "coap_cache_internal.h"
104#if defined(COAP_OSCORE_SUPPORT) || defined(COAP_WS_SUPPORT)
105#include "coap_crypto_internal.h"
106#endif /* COAP_OSCORE_SUPPORT || COAP_WS_SUPPORT */
107#include "coap_dtls_internal.h"
109#include "coap_io_internal.h"
110#include "coap_layers_internal.h"
111#include "coap_mutex_internal.h"
112#include "coap_net_internal.h"
113#include "coap_netif_internal.h"
114#if COAP_OSCORE_SUPPORT
115#include "coap_oscore_internal.h"
116#endif /* COAP_OSCORE_SUPPORT */
117#include "coap_pdu_internal.h"
121#include "coap_tcp_internal.h"
122#include "coap_uri_internal.h"
123#include "coap_utlist_internal.h"
124#include "coap_uthash_internal.h"
125#include "coap_ws_internal.h"
126
127#endif /* COAP_INTERNAL_H_ */
CoAP ASN.1 internal information.
CoAP async internal information.
CoAP block internal information.
CoAP cache internal information.
COAP crypto 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.
Generic resource internal handling.
CoAP session internal information.
CoAP subscribe internal information.
CoAP TCP internal information.
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*.