libcoap 4.3.5-develop-0bcd592
Loading...
Searching...
No Matches
coap_net.h
Go to the documentation of this file.
1/*
2 * coap_net.h -- CoAP context interface
3 *
4 * Copyright (C) 2010-2026 Olaf Bergmann <bergmann@tzi.org>
5 *
6 * SPDX-License-Identifier: BSD-2-Clause
7 *
8 * This file is part of the CoAP library libcoap. Please see README for terms
9 * of use.
10 */
11
17#ifndef COAP_NET_H_
18#define COAP_NET_H_
19
20#if !defined(WITH_LWIP) && !defined(WITH_CONTIKI) && !defined(RIOT_VERSION) && !defined(_WIN32)
21#include <sys/select.h>
22#endif /* ! WITH_LWIP && ! WITH_CONTIKI && ! RIOT_VERSION && ! _WIN32 */
23
24#ifdef WITH_LWIP
25#include <lwip/ip_addr.h>
26#endif
27
28#if defined(__ZEPHYR__) && !defined(__unix__) && !defined(__linux__)
29#include <zephyr/net/socket_select.h>
30#define fd_set zsock_fd_set
31#endif
32
33#include "coap_io.h"
34#include "coap_dtls.h"
35#include "coap_event.h"
36#include "coap_pdu.h"
37#include "coap_session.h"
38#include "coap_debug.h"
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
55
68 const coap_pdu_t *sent,
69 const coap_pdu_t *received,
70 const coap_mid_t mid);
71
80typedef void (*coap_nack_handler_t)(coap_session_t *session,
81 const coap_pdu_t *sent,
82 const coap_nack_reason_t reason,
83 const coap_mid_t mid);
84
92typedef void (*coap_ping_handler_t)(coap_session_t *session,
93 const coap_pdu_t *received,
94 const coap_mid_t mid);
95
103typedef void (*coap_pong_handler_t)(coap_session_t *session,
104 const coap_pdu_t *received,
105 const coap_mid_t mid);
106
115typedef coap_resource_t *(*coap_resource_dynamic_create_t)(coap_session_t *session,
116 const coap_pdu_t *request);
117
134 coap_pdu_t *pdu,
135 coap_resource_t *resource,
136 coap_binary_t **body_data,
137 size_t length,
138 const uint8_t *data,
139 size_t offset,
140 size_t total);
141
151
162 coap_nack_handler_t handler);
163
172 coap_ping_handler_t handler);
173
182 coap_pong_handler_t handler);
183
199 coap_resource_dynamic_create_t create_handler,
200 uint32_t dynamic_max);
201
215
228 coap_option_num_t number);
229
234
249COAP_API int coap_context_set_psk(coap_context_t *context, const char *hint,
250 const uint8_t *key, size_t key_len);
251
262 coap_dtls_spsk_t *setup_data);
263
274 const coap_dtls_pki_t *setup_data);
275
288 const char *ca_file,
289 const char *ca_dir);
290
299
316void coap_context_set_keepalive(coap_context_t *context, unsigned int seconds);
317
326int coap_context_set_cid_tuple_change(coap_context_t *context, uint8_t every);
327
335 uint32_t max_body_size);
336
345 size_t max_token_size);
346
355int coap_context_get_coap_fd(const coap_context_t *context);
356
367 unsigned int max_idle_sessions);
368
376unsigned int coap_context_get_max_idle_sessions(const coap_context_t *context);
377
387 unsigned int session_timeout);
388
406 unsigned int reconnect_time);
407
430 unsigned int reconnect_time,
431 uint8_t retry_count);
439unsigned int coap_context_get_session_timeout(const coap_context_t *context);
440
441/*
442 * Stop sending out observe subscriptons when calling coap_free_context().
443 *
444 * If this is not called, then 5.03 messages are sent out for every observe
445 * subscription when the context is freed off.
446 *
447 * @param context The coap_context_t object.
448 */
450
462 unsigned int csm_timeout);
463
474
485 unsigned int csm_timeout_ms);
486
494unsigned int coap_context_get_csm_timeout_ms(const coap_context_t *context);
495
503 uint32_t csm_max_message_size);
504
513
524 unsigned int max_handshake_sessions);
525
534
545
555
567COAP_DEPRECATED void coap_set_app_data(coap_context_t *context, void *data);
568
581
600 coap_pdu_code_t code,
601 coap_opt_filter_t *opts);
602
619 const coap_pdu_t *request,
620 coap_pdu_code_t code,
621 coap_opt_filter_t *opts);
622
635 coap_pdu_type_t type);
636
649
662
675
676#define coap_send_large(session, pdu) coap_send(session, pdu)
677
678/*
679 * Send a request PDU and wait for the response PDU.
680 *
681 * @param session The CoAP session.
682 * @param request_pdu The requesting PDU. If this PDU contains the Observe
683 * option, the unsolocited responses will get handled by the
684 * defined response handler. This PDU must be freed off by the
685 * caller after processing.
686 * @param response_pdu If there is a response, the response PDU is put here.
687 * This PDU must be freed off by the caller after processing.
688 * @param timeout_ms Positive maximum number of milliseconds to wait for response
689 * packet following the request. If there is a large block transfer
690 * this timeout is for between each request and response.
691 *
692 * @return 0 or +ve Time in function in ms after successful transfer (which can be
693 * bigger than timeout_ms).
694 * -1 Invalid timeout parameter
695 * -2 Failed to transmit PDU
696 * -3 Nack or Event handler invoked, cancelling request
697 * -4 coap_io_process returned error (fail to re-lock or select())
698 * -5 Response not received in the given time
699 * -6 Terminated by user
700 * -7 Client mode code not enabled
701 */
702COAP_API int coap_send_recv(coap_session_t *session, coap_pdu_t *request_pdu,
703 coap_pdu_t **response_pdu, uint32_t timeout_ms);
704
708void coap_send_recv_terminate(void);
709
721 coap_event_t event,
722 coap_session_t *session);
734
739void coap_ticks(coap_tick_t *);
740
752COAP_API int coap_join_mcast_group_intf(coap_context_t *ctx, const char *groupname,
753 const char *ifname);
754
755#define coap_join_mcast_group(ctx, groupname) \
756 (coap_join_mcast_group_intf(ctx, groupname, NULL))
757
769int coap_mcast_set_hops(coap_session_t *session, size_t hops);
770
779
790 void *data);
791
808COAP_API void *coap_context_set_app_data2(coap_context_t *context, void *data,
810
820void *coap_context_get_app_data(const coap_context_t *context);
821
831#define COAP_IO_WAIT 0
832#define COAP_IO_NO_WAIT ((uint32_t)-1)
833
862COAP_API int coap_io_process(coap_context_t *ctx, uint32_t timeout_ms);
863
864#if !defined(WITH_LWIP) && !defined(RIOT_VERSION) && !defined(WITH_CONTIKI)
892COAP_API int coap_io_process_with_fds(coap_context_t *ctx, uint32_t timeout_ms,
893 int nfds, fd_set *readfds, fd_set *writefds,
894 fd_set *exceptfds);
895#endif /* ! WITH_LWIP && ! RIOT_VERSION && ! WITH_CONTIKI */
896
910
945 coap_socket_t *sockets[],
946 unsigned int max_sockets,
947 unsigned int *num_sockets,
948 coap_tick_t now
949 );
950
965
986
987struct epoll_event;
988
1002COAP_API void coap_io_do_epoll(coap_context_t *ctx, struct epoll_event *events,
1003 size_t nevents);
1004
1013typedef void (*coap_io_process_thread_t)(void *arg);
1014
1039 coap_io_process_thread_t main_loop_code,
1040 void *main_loop_code_arg, uint32_t timeout_ms,
1041 uint32_t thread_count);
1042
1051
1063 uint32_t thread_count);
1064
1071
1083
1084/*
1085 * Get the current libcoap usage of file descriptors that are in a read or write pending state.
1086 *
1087 * @param context The current CoAP context.
1088 * @param read_fds Array to populate with file descriptors in the read pending state.
1089 * @param have_read_fds Updated wth the number of fds found in read pending state.
1090 * @param max_read_fds Maximum size of read_fds[] array.
1091 * @param write_fds Array to populate with file descriptors in the write pending state.
1092 * @param have_write_fds Updated wth the number of fds found in write pending state.
1093 * @param max_write_fds Maximum size of write_fds[] array.
1094 * @param rem_timeout_ms Remaining timeout time to next libcoap activity in milli-secs.
1095 *
1096 * @return @c 1 if successful, else @c 0 if error.
1097 */
1098COAP_API unsigned int coap_io_get_fds(coap_context_t *context, coap_fd_t read_fds[],
1099 unsigned int *have_read_fds,
1100 unsigned int max_read_fds,
1101 coap_fd_t write_fds[],
1102 unsigned int *have_write_fds,
1103 unsigned int max_write_fds,
1104 unsigned int *rem_timeout_ms);
1105
1116
1126
1129#if defined(WITH_LWIP) || defined(WITH_LWIP_MAN_CHECK) || defined(__DOXYGEN__)
1147
1159typedef int (*coap_lwip_input_wait_handler_t)(void *arg, uint32_t milli_secs);
1160
1172 void *input_arg);
1173
1175#endif /* WITH_LWIP || WITH_LWIP_MAN_CHECK || defined(__DOXYGEN__) */
1176
1196#define coap_run_once(ctx, timeout_ms) coap_io_process(ctx, timeout_ms)
1197
1216#define coap_write(ctx, sockets, max_sockets, num_sockets, now) \
1217 coap_io_prepare_io(ctx, sockets, max_sockets, num_sockets, now)
1218
1229#define coap_read(ctx, now) coap_io_do_io(ctx, now)
1230
1231/* Old definitions which may be hanging around in old code - be helpful! */
1232#define COAP_RUN_NONBLOCK COAP_RUN_NONBLOCK_deprecated_use_COAP_IO_NO_WAIT
1233#define COAP_RUN_BLOCK COAP_RUN_BLOCK_deprecated_use_COAP_IO_WAIT
1234
1235#ifdef __cplusplus
1236}
1237#endif
1238
1239#endif /* COAP_NET_H_ */
CoAP Logging support.
CoAP DTLS support.
Event handling.
struct coap_resource_t coap_resource_t
Default network I/O functions.
uint16_t coap_socket_flags_t
Definition coap_io.h:55
coap_nack_reason_t
Definition coap_io.h:64
int coap_fd_t
Definition coap_io.h:49
#define COAP_API
uint16_t coap_option_num_t
Definition coap_option.h:37
Pre-defined constants that reflect defaults for CoAP.
Defines the application visible session information.
COAP_API int coap_io_process(coap_context_t *ctx, uint32_t timeout_ms)
The main I/O processing function.
COAP_API int coap_io_pending(coap_context_t *context)
Check to see if there is any i/o pending for the context.
Definition coap_io.c:870
int coap_io_process_configure_threads(coap_context_t *context, uint32_t thread_count)
Configure a defined number of threads to do the alternate coap_io_process() work with traffic load ba...
void coap_io_process_terminate_loop(void)
Terminate all the additional threads created by coap_io_process_loop() and break out of the main thre...
void coap_io_process_remove_threads(coap_context_t *context)
Release the coap_io_process() worker threads.
COAP_API int coap_io_process_loop(coap_context_t *context, coap_io_process_thread_t main_loop_code, void *main_loop_code_arg, uint32_t timeout_ms, uint32_t thread_count)
Do the coap_io_process() across thread_count threads.
COAP_API unsigned int coap_io_get_fds(coap_context_t *context, coap_fd_t read_fds[], unsigned int *have_read_fds, unsigned int max_read_fds, coap_fd_t write_fds[], unsigned int *have_write_fds, unsigned int max_write_fds, unsigned int *rem_timeout_ms)
Definition coap_io.c:733
COAP_API unsigned int coap_io_prepare_io(coap_context_t *ctx, coap_socket_t *sockets[], unsigned int max_sockets, unsigned int *num_sockets, coap_tick_t now)
Iterates through all the coap_socket_t structures embedded in endpoints or sessions associated with t...
Definition coap_io.c:270
COAP_API void coap_socket_set_flags(coap_socket_t *socket, coap_socket_flags_t flags)
Set the libcoap internal flags for a socket.
Definition coap_io.c:956
COAP_API unsigned int coap_io_prepare_epoll(coap_context_t *ctx, coap_tick_t now)
Any now timed out delayed packet is transmitted, along with any packets associated with requested obs...
Definition coap_io.c:209
COAP_API coap_fd_t coap_socket_get_fd(coap_socket_t *socket)
Get the libcoap internal file descriptor for a socket.
Definition coap_io.c:941
COAP_API int coap_io_process_with_fds(coap_context_t *ctx, uint32_t timeout_ms, int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
The main message processing loop with additional fds for internal select.
void(* coap_io_process_thread_t)(void *arg)
Main thread coap_io_process_loop activity.
Definition coap_net.h:1013
COAP_API void coap_io_do_epoll(coap_context_t *ctx, struct epoll_event *events, size_t nevents)
Process all the epoll events.
Definition coap_net.c:2830
COAP_API void coap_io_do_io(coap_context_t *ctx, coap_tick_t now)
Processes any outstanding read, write, accept or connect I/O as indicated in the coap_socket_t struct...
Definition coap_net.c:2764
COAP_API coap_socket_flags_t coap_socket_get_flags(coap_socket_t *socket)
Get the libcoap internal flags for a socket.
Definition coap_io.c:951
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Definition coap_time.h:149
void coap_context_set_session_timeout(coap_context_t *context, unsigned int session_timeout)
Set the session timeout value.
Definition coap_net.c:570
unsigned int coap_context_get_max_handshake_sessions(const coap_context_t *context)
Get the session timeout value.
Definition coap_net.c:517
COAP_API int coap_join_mcast_group_intf(coap_context_t *ctx, const char *groupname, const char *ifname)
Function interface for joining a multicast group for listening for the currently defined endpoints th...
void(* coap_pong_handler_t)(coap_session_t *session, const coap_pdu_t *received, const coap_mid_t mid)
Received Pong handler that is used as callback in coap_context_t.
Definition coap_net.h:103
unsigned int coap_context_get_max_idle_sessions(const coap_context_t *context)
Get the maximum idle sessions count.
Definition coap_net.c:506
COAP_API int coap_send_recv(coap_session_t *session, coap_pdu_t *request_pdu, coap_pdu_t **response_pdu, uint32_t timeout_ms)
Definition coap_net.c:2155
coap_context_t * coap_new_context(const coap_address_t *listen_addr)
Creates a new coap_context_t object that will hold the CoAP stack status.
Definition coap_net.c:718
COAP_API coap_mid_t coap_send(coap_session_t *session, coap_pdu_t *pdu)
Sends a CoAP message to given peer.
Definition coap_net.c:1486
COAP_API int coap_context_set_pki(coap_context_t *context, const coap_dtls_pki_t *setup_data)
Set the context's default PKI information for a server.
void coap_mcast_per_resource(coap_context_t *context)
Function interface to enable processing mcast requests on a per resource basis.
coap_response_t(* coap_response_handler_t)(coap_session_t *session, const coap_pdu_t *sent, const coap_pdu_t *received, const coap_mid_t mid)
Response handler that is used as callback in coap_context_t.
Definition coap_net.h:67
void coap_context_set_max_body_size(coap_context_t *context, uint32_t max_body_size)
Set the maximum supported body size.
Definition coap_net.c:480
COAP_API coap_mid_t coap_send_error(coap_session_t *session, const coap_pdu_t *request, coap_pdu_code_t code, coap_opt_filter_t *opts)
Sends an error response with code code for request request to dst.
Definition coap_net.c:1174
void coap_context_set_csm_max_message_size(coap_context_t *context, uint32_t csm_max_message_size)
Set the CSM max session size value.
Definition coap_net.c:552
COAP_DEPRECATED void coap_context_set_csm_timeout(coap_context_t *context, unsigned int csm_timeout)
Set the CSM timeout value.
Definition coap_net.c:524
void coap_send_recv_terminate(void)
Terminate any active coap_send_recv() sessions.
Definition coap_net.c:2150
coap_resource_t *(* coap_resource_dynamic_create_t)(coap_session_t *session, const coap_pdu_t *request)
Definition of resource dynamic creation handler function.
Definition coap_net.h:115
void coap_register_response_handler(coap_context_t *context, coap_response_handler_t handler)
Registers a new message handler that is called whenever a response is received.
Definition coap_net.c:5273
COAP_API void * coap_context_set_app_data2(coap_context_t *context, void *data, coap_app_data_free_callback_t callback)
Stores data with the given context, returning the previously stored value or NULL.
Definition coap_net.c:697
coap_pdu_t * coap_new_error_response(const coap_pdu_t *request, coap_pdu_code_t code, coap_opt_filter_t *opts)
Creates a new ACK PDU with specified error code.
Definition coap_net.c:3186
void coap_register_block_data_handler(coap_context_t *context, coap_block_data_handler_t handler)
Sets up a handler that is called for each received block during a block-wise transfer when COAP_BLOCK...
void coap_context_set_max_handshake_sessions(coap_context_t *context, unsigned int max_handshake_sessions)
Set the maximum number of sessions in (D)TLS handshake value.
Definition coap_net.c:511
int coap_context_get_coap_fd(const coap_context_t *context)
Get the libcoap internal file descriptor for using in an application's select() or returned as an eve...
Definition coap_net.c:610
void coap_register_dynamic_resource_handler(coap_context_t *context, coap_resource_dynamic_create_t create_handler, uint32_t dynamic_max)
Sets up a handler for calling when an unknown resource is requested.
Definition coap_net.c:5313
COAP_DEPRECATED void coap_set_app_data(coap_context_t *context, void *data)
Definition coap_net.c:810
int coap_mcast_set_hops(coap_session_t *session, size_t hops)
Function interface for defining the hop count (ttl) for sending multicast traffic.
coap_response_t
Definition coap_net.h:51
void(* coap_ping_handler_t)(coap_session_t *session, const coap_pdu_t *received, const coap_mid_t mid)
Received Ping handler that is used as callback in coap_context_t.
Definition coap_net.h:92
coap_response_t(* coap_block_data_handler_t)(coap_session_t *session, coap_pdu_t *pdu, coap_resource_t *resource, coap_binary_t **body_data, size_t length, const uint8_t *data, size_t offset, size_t total)
Definition of the block data handler function.
Definition coap_net.h:133
void coap_ticks(coap_tick_t *)
Returns the current value of an internal tick counter.
Definition coap_time.c:90
COAP_API void coap_free_context(coap_context_t *context)
CoAP stack context must be released with coap_free_context().
Definition coap_net.c:824
void(* coap_nack_handler_t)(coap_session_t *session, const coap_pdu_t *sent, const coap_nack_reason_t reason, const coap_mid_t mid)
Negative Acknowedge handler that is used as callback in coap_context_t.
Definition coap_net.h:80
void coap_context_set_shutdown_no_observe(coap_context_t *context)
Definition coap_net.c:601
void * coap_context_get_app_data(const coap_context_t *context)
Returns any application-specific data that has been stored with context using the function coap_conte...
Definition coap_net.c:691
COAP_API int coap_context_set_pki_root_cas(coap_context_t *context, const char *ca_file, const char *ca_dir)
Set the context's default Root CA information for a client or server.
Definition coap_net.c:423
COAP_DEPRECATED void coap_context_set_app_data(coap_context_t *context, void *data)
Stores data with the given context.
Definition coap_net.c:683
uint32_t coap_context_get_csm_max_message_size(const coap_context_t *context)
Get the CSM max session size value.
Definition coap_net.c:565
unsigned int coap_context_get_session_timeout(const coap_context_t *context)
Get the session timeout value.
Definition coap_net.c:596
COAP_API int coap_context_set_psk(coap_context_t *context, const char *hint, const uint8_t *key, size_t key_len)
Set the context's default PSK hint and/or key for a server.
COAP_API coap_mid_t coap_send_ack(coap_session_t *session, const coap_pdu_t *request)
Sends an ACK message with code 0 for the specified request to dst.
Definition coap_net.c:1097
unsigned int coap_context_get_csm_timeout_ms(const coap_context_t *context)
Get the CSM timeout value.
Definition coap_net.c:547
COAP_API uint16_t coap_new_message_id(coap_session_t *session)
Returns a new message id and updates session->tx_mid accordingly.
void coap_register_ping_handler(coap_context_t *context, coap_ping_handler_t handler)
Registers a new message handler that is called whenever a CoAP Ping message is received.
Definition coap_net.c:5301
COAP_API int coap_context_set_psk2(coap_context_t *context, coap_dtls_spsk_t *setup_data)
Set the context's default PSK hint and/or key for a server.
COAP_DEPRECATED void * coap_get_app_data(const coap_context_t *context)
Definition coap_net.c:818
int coap_context_set_cid_tuple_change(coap_context_t *context, uint8_t every)
Set the Connection ID client tuple frequency change for testing CIDs.
Definition coap_net.c:469
void coap_context_set_max_idle_sessions(coap_context_t *context, unsigned int max_idle_sessions)
Set the maximum idle sessions count.
Definition coap_net.c:500
COAP_API coap_mid_t coap_send_message_type(coap_session_t *session, const coap_pdu_t *request, coap_pdu_type_t type)
Helper function to create and send a message with type (usually ACK or RST).
Definition coap_net.c:1205
COAP_API coap_mid_t coap_send_rst(coap_session_t *session, const coap_pdu_t *request)
Sends an RST message with code 0 for the specified request to dst.
Definition coap_net.c:1082
void coap_context_set_session_reconnect_time2(coap_context_t *context, unsigned int reconnect_time, uint8_t retry_count)
Set the session reconnect delay time after a working client session has failed.
Definition coap_net.c:582
void coap_context_set_keepalive(coap_context_t *context, unsigned int seconds)
Set the context keepalive timer for sessions.
Definition coap_net.c:464
COAP_API int coap_can_exit(coap_context_t *context)
Returns 1 if there are no messages to send or to dispatch in the context's queues.
Definition coap_net.c:5103
COAP_API void coap_register_option(coap_context_t *context, coap_option_num_t number)
Registers the option number number with the given context object context.
Definition coap_net.c:5322
COAP_DEPRECATED unsigned int coap_context_get_csm_timeout(const coap_context_t *context)
Get the CSM timeout value.
Definition coap_net.c:531
COAP_API int coap_context_load_pki_trust_store(coap_context_t *context)
Load the hosts's default trusted CAs for a client or server.
Definition coap_net.c:445
void coap_context_set_session_reconnect_time(coap_context_t *context, unsigned int reconnect_time)
Set the session reconnect delay time after a working client session has failed.
Definition coap_net.c:576
void coap_register_pong_handler(coap_context_t *context, coap_pong_handler_t handler)
Registers a new message handler that is called whenever a CoAP Pong message is received.
Definition coap_net.c:5307
void coap_context_set_max_token_size(coap_context_t *context, size_t max_token_size)
Set the maximum token size (RFC8974).
Definition coap_net.c:489
COAP_API int coap_handle_event(coap_context_t *context, coap_event_t event, coap_session_t *session)
Invokes the event handler of context for the given event and data.
Definition coap_net.c:5012
void coap_register_nack_handler(coap_context_t *context, coap_nack_handler_t handler)
Registers a new message handler that is called whenever a confirmable message (request or response) i...
Definition coap_net.c:5295
void coap_context_set_csm_timeout_ms(coap_context_t *context, unsigned int csm_timeout_ms)
Set the CSM timeout value.
Definition coap_net.c:537
@ COAP_RESPONSE_FAIL
Response not liked - send CoAP RST packet.
Definition coap_net.h:52
@ COAP_RESPONSE_OK
Response is fine.
Definition coap_net.h:53
coap_event_t
Scalar type to represent different events, e.g.
Definition coap_event.h:36
coap_log_t
Logging type.
Definition coap_debug.h:56
void coap_lwip_set_input_wait_handler(coap_context_t *context, coap_lwip_input_wait_handler_t handler, void *input_arg)
Set up a wait / timeout callback handler for use when the application calls coap_io_process().
int(* coap_lwip_input_wait_handler_t)(void *arg, uint32_t milli_secs)
LwIP callback handler that can be used to wait / timeout for the next input packet.
Definition coap_net.h:1159
void coap_lwip_dump_memory_pools(coap_log_t log_level)
Dump the current state of the LwIP memory pools.
int coap_mid_t
coap_mid_t is used to store the CoAP Message ID of a CoAP PDU.
Definition coap_pdu.h:266
coap_pdu_code_t
Set of codes available for a PDU.
Definition coap_pdu.h:330
coap_pdu_type_t
CoAP PDU message type definitions.
Definition coap_pdu.h:70
void(* coap_app_data_free_callback_t)(void *data)
Callback to free off the app data when the entry is being deleted / freed off.
#define COAP_DEPRECATED
Definition libcoap.h:66
Multi-purpose address abstraction.
CoAP binary data definition.
Definition coap_str.h:57
The CoAP stack's global state is stored in a coap_context_t object.
The structure used for defining the PKI setup data to be used.
Definition coap_dtls.h:316
The structure used for defining the Server PSK setup data to be used.
Definition coap_dtls.h:505
structure for CoAP PDUs
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...