libcoap 4.3.2rc2

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 */
91 typedef struct oscore_ctx_t oscore_ctx_t;
92#include "oscore/oscore.h"
93#include "oscore/oscore_cbor.h"
94#include "oscore/oscore_cose.h"
95#include "oscore/oscore_context.h"
96#include "oscore/oscore_crypto.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"
108#include "coap_hashkey_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"
118#include "coap_resource_internal.h"
119#include "coap_session_internal.h"
120#include "coap_subscribe_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.h
Primary include file.
coap_asn1_internal.h
CoAP ASN.1 internal information.
coap_async_internal.h
CoAP async internal information.
coap_block_internal.h
CoAP block internal information.
coap_cache_internal.h
CoAP cache internal information.
coap_crypto_internal.h
COAP crypto internal information.
coap_dtls_internal.h
Internal CoAP DTLS support.
coap_hashkey_internal.h
Definition of hash key type and helper functions.
coap_io_internal.h
Internal network I/O functions.
coap_layers_internal.h
Internal layer I/O functions.
coap_mutex_internal.h
CoAP mutex mechanism wrapper.
coap_net_internal.h
CoAP context internal information.
coap_netif_internal.h
Internal CoAP Netif support.
coap_oscore_internal.h
CoAP OSCORE internal information.
coap_pdu_internal.h
CoAP PDU internal information.
coap_resource_internal.h
Generic resource internal handling.
coap_session_internal.h
CoAP session internal information.
coap_subscribe_internal.h
CoAP subscribe internal information.
coap_tcp_internal.h
CoAP TCP internal information.
coap_uri_internal.h
CoAP URI internal information.
coap_ws_internal.h
Internal CoAP WebSockets support.
oscore.h
An implementation of the Object Security for Constrained RESTful Environments (RFC 8613).
oscore_cbor.h
An implementation of the Concise Binary Object Representation (RFC).
oscore_context.h
An implementation of the Object Security for Constrained RESTful Enviornments (RFC 8613).
oscore_cose.h
An implementation of the CBOR Object Signing and Encryption (RFC).
oscore_crypto.h
An implementation of the Hash Based Key Derivation Function (RFC) and wrappers for AES-CCM*.
oscore_ctx_t
Definition: oscore_context.h:84