net.h
Go to the documentation of this file.
/*
* net.h -- CoAP network interface
*
* Copyright (C) 2010-2015 Olaf Bergmann <bergmann@tzi.org>
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_NET_H_
#define COAP_NET_H_
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <sys/time.h>
#endif
#include <time.h>
#ifdef WITH_LWIP
#include <lwip/ip_addr.h>
#endif
#include "coap_io.h"
#include "coap_dtls.h"
#include "coap_event.h"
#include "coap_time.h"
#include "option.h"
#include "pdu.h"
#include "prng.h"
#include "coap_session.h"
struct coap_queue_t;
typedef struct coap_queue_t {
struct coap_queue_t *next;
coap_tick_t t;
unsigned char retransmit_cnt;
unsigned int timeout;
coap_session_t *session;
coap_tid_t id;
coap_pdu_t *pdu;
} coap_queue_t;
int coap_insert_node(coap_queue_t **queue, coap_queue_t *node);
int coap_delete_node(coap_queue_t *node);
void coap_delete_all(coap_queue_t *queue);
coap_queue_t *coap_new_node(void);
struct coap_resource_t;
struct coap_context_t;
#ifndef WITHOUT_ASYNC
struct coap_async_state_t;
#endif
typedef void (*coap_response_handler_t)(struct coap_context_t *context,
coap_session_t *session,
coap_pdu_t *sent,
coap_pdu_t *received,
const coap_tid_t id);
typedef void (*coap_nack_handler_t)(struct coap_context_t *context,
coap_session_t *session,
coap_pdu_t *sent,
coap_nack_reason_t reason,
const coap_tid_t id);
typedef void (*coap_ping_handler_t)(struct coap_context_t *context,
coap_session_t *session,
coap_pdu_t *received,
const coap_tid_t id);
typedef void (*coap_pong_handler_t)(struct coap_context_t *context,
coap_session_t *session,
coap_pdu_t *received,
const coap_tid_t id);
typedef struct coap_context_t {
coap_opt_filter_t known_options;
struct coap_resource_t *resources;
struct coap_resource_t *unknown_resource;
#ifndef WITHOUT_ASYNC
struct coap_async_state_t *async_state;
#endif /* WITHOUT_ASYNC */
coap_tick_t sendqueue_basetime;
coap_queue_t *sendqueue;
coap_endpoint_t *endpoint;
coap_session_t *sessions;
#ifdef WITH_CONTIKI
struct uip_udp_conn *conn;
struct etimer retransmit_timer;
struct etimer notify_timer;
#endif /* WITH_CONTIKI */
#ifdef WITH_LWIP
uint8_t timer_configured;
#endif /* WITH_LWIP */
coap_response_handler_t response_handler;
coap_nack_handler_t nack_handler;
coap_ping_handler_t ping_handler;
coap_pong_handler_t pong_handler;
coap_event_handler_t handle_event;
ssize_t (*network_send)(coap_socket_t *sock, const coap_session_t *session, const uint8_t *data, size_t datalen);
ssize_t (*network_read)(coap_socket_t *sock, struct coap_packet_t *packet);
size_t(*get_client_psk)(const coap_session_t *session, const uint8_t *hint, size_t hint_len, uint8_t *identity, size_t *identity_len, size_t max_identity_len, uint8_t *psk, size_t max_psk_len);
size_t(*get_server_psk)(const coap_session_t *session, const uint8_t *identity, size_t identity_len, uint8_t *psk, size_t max_psk_len);
size_t(*get_server_hint)(const coap_session_t *session, uint8_t *hint, size_t max_hint_len);
void *dtls_context;
uint8_t *psk_hint;
size_t psk_hint_len;
uint8_t *psk_key;
size_t psk_key_len;
unsigned int session_timeout;
unsigned int max_idle_sessions;
unsigned int max_handshake_sessions;
unsigned int ping_timeout;
unsigned int csm_timeout;
void *app;
#ifdef COAP_EPOLL_SUPPORT
int epfd;
int eptimerfd;
coap_tick_t next_timeout;
#endif /* COAP_EPOLL_SUPPORT */
} coap_context_t;
COAP_STATIC_INLINE void
coap_register_response_handler(coap_context_t *context,
coap_response_handler_t handler) {
context->response_handler = handler;
}
COAP_STATIC_INLINE void
coap_register_nack_handler(coap_context_t *context,
coap_nack_handler_t handler) {
context->nack_handler = handler;
}
COAP_STATIC_INLINE void
coap_register_ping_handler(coap_context_t *context,
coap_ping_handler_t handler) {
context->ping_handler = handler;
}
COAP_STATIC_INLINE void
coap_register_pong_handler(coap_context_t *context,
coap_pong_handler_t handler) {
context->pong_handler = handler;
}
COAP_STATIC_INLINE void
coap_register_option(coap_context_t *ctx, uint16_t type) {
coap_option_setb(ctx->known_options, type);
}
unsigned int coap_adjust_basetime(coap_context_t *ctx, coap_tick_t now);
coap_queue_t *coap_peek_next( coap_context_t *context );
coap_queue_t *coap_pop_next( coap_context_t *context );
coap_context_t *coap_new_context(const coap_address_t *listen_addr);
int coap_context_set_psk( coap_context_t *context, const char *hint,
const uint8_t *key, size_t key_len );
int
coap_context_set_pki(coap_context_t *context,
coap_dtls_pki_t *setup_data);
int
coap_context_set_pki_root_cas(coap_context_t *context,
const char *ca_file,
const char *ca_dir);
void coap_context_set_keepalive(coap_context_t *context, unsigned int seconds);
int coap_context_get_coap_fd(coap_context_t *context);
COAP_STATIC_INLINE uint16_t
coap_new_message_id(coap_session_t *session) {
return ++session->tx_mid;
}
void coap_free_context(coap_context_t *context);
void coap_set_app_data(coap_context_t *context, void *data);
void *coap_get_app_data(const coap_context_t *context);
coap_pdu_t *coap_new_error_response(coap_pdu_t *request,
unsigned char code,
coap_opt_filter_t opts);
coap_tid_t coap_send_error(coap_session_t *session,
coap_pdu_t *request,
unsigned char code,
coap_opt_filter_t opts);
coap_tid_t
coap_send_message_type(coap_session_t *session, coap_pdu_t *request, unsigned char type);
coap_tid_t coap_send_ack(coap_session_t *session, coap_pdu_t *request);
COAP_STATIC_INLINE coap_tid_t
coap_send_rst(coap_session_t *session, coap_pdu_t *request) {
return coap_send_message_type(session, request, COAP_MESSAGE_RST);
}
coap_tid_t coap_send( coap_session_t *session, coap_pdu_t *pdu );
coap_tid_t coap_retransmit(coap_context_t *context, coap_queue_t *node);
unsigned int
coap_write(coap_context_t *ctx,
coap_socket_t *sockets[],
unsigned int max_sockets,
unsigned int *num_sockets,
coap_tick_t now
);
void coap_read(coap_context_t *ctx, coap_tick_t now);
#define COAP_RUN_BLOCK 0
#define COAP_RUN_NONBLOCK 1
int coap_run_once( coap_context_t *ctx, unsigned int timeout_ms );
unsigned int
coap_io_prepare_epoll(coap_context_t *ctx, coap_tick_t now);
struct epoll_event;
void coap_io_do_events(coap_context_t *ctx, struct epoll_event* events,
size_t nevents);
int coap_handle_dgram(coap_context_t *ctx, coap_session_t *session, uint8_t *data, size_t data_len);
int coap_handle_event(coap_context_t *context,
coap_event_t event,
coap_session_t *session);
int coap_remove_from_queue(coap_queue_t **queue,
coap_session_t *session,
coap_tid_t id,
coap_queue_t **node);
coap_tid_t
coap_wait_ack( coap_context_t *context, coap_session_t *session,
coap_queue_t *node);
coap_queue_t *coap_find_transaction(coap_queue_t *queue, coap_session_t *session, coap_tid_t id);
void coap_cancel_all_messages(coap_context_t *context,
coap_session_t *session,
const uint8_t *token,
size_t token_length);
void
coap_cancel_session_messages(coap_context_t *context,
coap_session_t *session,
coap_nack_reason_t reason);
void coap_dispatch(coap_context_t *context, coap_session_t *session,
coap_pdu_t *pdu);
int coap_can_exit(coap_context_t *context);
void coap_ticks(coap_tick_t *);
int coap_option_check_critical(coap_context_t *ctx,
coap_pdu_t *pdu,
coap_opt_filter_t unknown);
coap_pdu_t *coap_wellknown_response(coap_context_t *context,
coap_session_t *session,
coap_pdu_t *request);
unsigned int coap_calc_timeout(coap_session_t *session, unsigned char r);
int
coap_join_mcast_group(coap_context_t *ctx, const char *groupname);
#endif /* COAP_NET_H_ */
coap_register_nack_handler
COAP_STATIC_INLINE 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: net.h:242
coap_write
unsigned int coap_write(coap_context_t *ctx, coap_socket_t *sockets[], unsigned int max_sockets, unsigned int *num_sockets, coap_tick_t now)
For applications with their own message loop, send all pending retransmits and return the list of soc...
Definition: coap_io.c:1294
coap_context_t::sendqueue
coap_queue_t * sendqueue
Definition: net.h:164
coap_session_t
Definition: coap_session.h:59
coap_pong_handler_t
void(* coap_pong_handler_t)(struct coap_context_t *context, coap_session_t *session, coap_pdu_t *received, const coap_tid_t id)
Recieved Pong handler that is used as call-back in coap_context_t.
Definition: net.h:139
coap_context_set_pki_root_cas
int coap_context_set_pki_root_cas(coap_context_t *context, const char *ca_file, const char *ca_dir)
Set the context&#39;s default Root CA information for a client or server.
Definition: net.c:399
coap_find_transaction
coap_queue_t * coap_find_transaction(coap_queue_t *queue, coap_session_t *session, coap_tid_t id)
Retrieves transaction from the queue.
Definition: net.c:1713
coap_context_t::ping_handler
coap_ping_handler_t ping_handler
Definition: net.h:182
coap_get_app_data
void * coap_get_app_data(const coap_context_t *context)
Returns any application-specific data that has been stored with context using the function coap_set_a...
Definition: net.c:546
coap_pop_next
coap_queue_t * coap_pop_next(coap_context_t *context)
Returns the next pdu to send and removes it from the sendqeue.
Definition: net.c:270
coap_send
coap_tid_t coap_send(coap_session_t *session, coap_pdu_t *pdu)
Sends a CoAP message to given peer.
Definition: net.c:966
coap_queue_t::retransmit_cnt
unsigned char retransmit_cnt
retransmission counter, will be removed when zero
Definition: net.h:41
COAP_MESSAGE_RST
#define COAP_MESSAGE_RST
Definition: pdu.h:75
coap_context_t::endpoint
coap_endpoint_t * endpoint
the endpoints used for listening
Definition: net.h:165
coap_socket_t
Definition: coap_io.h:54
coap_option_setb
COAP_STATIC_INLINE int coap_option_setb(coap_opt_filter_t filter, uint16_t type)
Sets the corresponding bit for type in filter.
Definition: option.h:183
coap_address_t
multi-purpose address abstraction
Definition: address.h:62
coap_session_t::tx_mid
uint16_t tx_mid
the last message id that was used in this session
Definition: coap_session.h:74
coap_send_error
coap_tid_t coap_send_error(coap_session_t *session, coap_pdu_t *request, unsigned char code, coap_opt_filter_t opts)
Sends an error response with code code for request request to dst.
Definition: net.c:818
coap_tid_t
int coap_tid_t
coap_tid_t is used to store CoAP transaction id, i.e.
Definition: pdu.h:238
coap_option_check_critical
int coap_option_check_critical(coap_context_t *ctx, coap_pdu_t *pdu, coap_opt_filter_t unknown)
Verifies that pdu contains no unknown critical options.
Definition: net.c:617
coap_context_t::psk_key_len
size_t psk_key_len
Definition: net.h:203
coap_context_t::psk_hint
uint8_t * psk_hint
Definition: net.h:200
coap_time.h
Clock Handling.
coap_dtls.h
coap_packet_t
Definition: coap_io.h:217
coap_context_set_pki
int coap_context_set_pki(coap_context_t *context, coap_dtls_pki_t *setup_data)
Set the context&#39;s default PKI information for a server.
Definition: net.c:384
coap_context_t
struct coap_context_t coap_context_t
The CoAP stack&#39;s global state is stored in a coap_context_t object.
coap_context_t::nack_handler
coap_nack_handler_t nack_handler
Definition: net.h:181
coap_context_t::async_state
struct coap_async_state_t * async_state
list of asynchronous transactions
Definition: net.h:157
option.h
Helpers for handling options in CoAP PDUs.
coap_nack_reason_t
coap_nack_reason_t
Definition: coap_io.h:226
coap_io_do_events
void coap_io_do_events(coap_context_t *ctx, struct epoll_event *events, size_t nevents)
Process all the epoll events.
Definition: net.c:1458
coap_new_context
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: net.c:423
coap_async_state_t
Definition: async.h:31
coap_context_get_coap_fd
int coap_context_get_coap_fd(coap_context_t *context)
Get the libcoap internal file descriptor for using in an application&#39;s select() or returned as an eve...
Definition: net.c:413
coap_endpoint_t
Abstraction of virtual endpoint that can be attached to coap_context_t.
Definition: coap_session_internal.h:29
coap_new_message_id
COAP_STATIC_INLINE uint16_t coap_new_message_id(coap_session_t *session)
Returns a new message id and updates session->tx_mid accordingly.
Definition: net.h:390
coap_retransmit
coap_tid_t coap_retransmit(coap_context_t *context, coap_queue_t *node)
Handles retransmissions of confirmable messages.
Definition: net.c:1021
coap_io_prepare_epoll
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:1248
coap_context_t::pong_handler
coap_pong_handler_t pong_handler
Definition: net.h:183
coap_queue_t::id
coap_tid_t id
CoAP transaction id.
Definition: net.h:45
coap_register_response_handler
COAP_STATIC_INLINE 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 was received that matches an ongoi...
Definition: net.h:227
coap_register_ping_handler
COAP_STATIC_INLINE 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: net.h:255
coap_context_t::sendqueue_basetime
coap_tick_t sendqueue_basetime
The time stamp in the first element of the sendqeue is relative to sendqueue_basetime.
Definition: net.h:163
coap_resource_t
Definition: resource.h:68
coap_send_rst
COAP_STATIC_INLINE coap_tid_t coap_send_rst(coap_session_t *session, coap_pdu_t *request)
Sends an RST message with code 0 for the specified request to dst.
Definition: net.h:506
coap_queue_t::pdu
coap_pdu_t * pdu
the CoAP PDU to send
Definition: net.h:46
coap_join_mcast_group
int coap_join_mcast_group(coap_context_t *ctx, const char *groupname)
Function interface for joining a multicast group for listening.
Definition: net.c:2602
coap_cancel_all_messages
void coap_cancel_all_messages(coap_context_t *context, coap_session_t *session, const uint8_t *token, size_t token_length)
Cancels all outstanding messages for session session that have the specified token.
Definition: net.c:1672
coap_queue_t::t
coap_tick_t t
when to send PDU for the next time
Definition: net.h:40
coap_context_t::ping_timeout
unsigned int ping_timeout
Minimum inactivity time before sending a ping message.
Definition: net.h:208
coap_context_t::psk_hint_len
size_t psk_hint_len
Definition: net.h:201
coap_register_pong_handler
COAP_STATIC_INLINE 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: net.h:268
coap_ticks
void coap_ticks(coap_tick_t *)
Returns the current value of an internal tick counter.
coap_pdu_t
structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...
Definition: pdu.h:287
coap_handle_dgram
int coap_handle_dgram(coap_context_t *ctx, coap_session_t *session, uint8_t *data, size_t data_len)
Parses and interprets a CoAP datagram with context ctx.
Definition: net.c:1557
coap_adjust_basetime
unsigned int coap_adjust_basetime(coap_context_t *ctx, coap_tick_t now)
Set sendqueue_basetime in the given context object ctx to now.
Definition: net.c:145
coap_context_t::response_handler
coap_response_handler_t response_handler
Definition: net.h:180
coap_tick_t
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Definition: coap_time.h:93
coap_run_once
int coap_run_once(coap_context_t *ctx, unsigned int timeout_ms)
The main message processing loop.
coap_can_exit
int coap_can_exit(coap_context_t *context)
Returns 1 if there are no messages to send or to dispatch in the context&#39;s queues.
Definition: net.c:2553
coap_remove_from_queue
int coap_remove_from_queue(coap_queue_t **queue, coap_session_t *session, coap_tid_t id, coap_queue_t **node)
This function removes the element with given id from the list given list.
Definition: net.c:1585
coap_send_ack
coap_tid_t coap_send_ack(coap_session_t *session, coap_pdu_t *request)
Sends an ACK message with code 0 for the specified request to dst.
Definition: net.c:669
coap_ping_handler_t
void(* coap_ping_handler_t)(struct coap_context_t *context, coap_session_t *session, coap_pdu_t *received, const coap_tid_t id)
Recieved Ping handler that is used as call-back in coap_context_t.
Definition: net.h:126
coap_queue_t::next
struct coap_queue_t * next
Definition: net.h:39
coap_context_t::handle_event
coap_event_handler_t handle_event
Callback function that is used to signal events to the application.
Definition: net.h:189
coap_new_error_response
coap_pdu_t * coap_new_error_response(coap_pdu_t *request, unsigned char code, coap_opt_filter_t opts)
Creates a new ACK PDU with specified error code.
Definition: net.c:1721
coap_queue_t::timeout
unsigned int timeout
the randomized timeout value
Definition: net.h:43
coap_nack_handler_t
void(* coap_nack_handler_t)(struct coap_context_t *context, coap_session_t *session, coap_pdu_t *sent, coap_nack_reason_t reason, const coap_tid_t id)
Negative Acknowedge handler that is used as call-back in coap_context_t.
Definition: net.h:112
coap_context_t::dtls_context
void * dtls_context
Definition: net.h:199
coap_wellknown_response
coap_pdu_t * coap_wellknown_response(coap_context_t *context, coap_session_t *session, coap_pdu_t *request)
Creates a new response for given request with the contents of .well-known/core.
Definition: net.c:1837
coap_delete_node
int coap_delete_node(coap_queue_t *node)
Destroys specified node.
Definition: net.c:219
coap_context_set_psk
int coap_context_set_psk(coap_context_t *context, const char *hint, const uint8_t *key, size_t key_len)
Set the context&#39;s default PSK hint and/or key for a server.
Definition: net.c:341
coap_session.h
Defines the application visible session information.
COAP_STATIC_INLINE
#define COAP_STATIC_INLINE
Definition: libcoap.h:38
pdu.h
Pre-defined constants that reflect defaults for CoAP.
coap_opt_filter_t
uint16_t coap_opt_filter_t[COAP_OPT_FILTER_SIZE]
Fixed-size vector we use for option filtering.
Definition: option.h:119
coap_event_t
unsigned int coap_event_t
Scalar type to represent different events, e.g.
Definition: coap_event.h:28
coap_io.h
coap_context_t::unknown_resource
struct coap_resource_t * unknown_resource
can be used for handling unknown resources
Definition: net.h:151
coap_dtls_pki_t
The structure used for defining the PKI setup data to be used.
Definition: coap_dtls.h:193
coap_handle_event
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: net.c:2542
coap_peek_next
coap_queue_t * coap_peek_next(coap_context_t *context)
Returns the next pdu to send without removing from sendqeue.
Definition: net.c:262
coap_context_t::csm_timeout
unsigned int csm_timeout
Timeout for waiting for a CSM from the remote side.
Definition: net.h:209
coap_context_t::psk_key
uint8_t * psk_key
Definition: net.h:202
coap_context_set_keepalive
void coap_context_set_keepalive(coap_context_t *context, unsigned int seconds)
Set the context keepalive timer for sessions.
Definition: net.c:409
coap_context_t::max_handshake_sessions
unsigned int max_handshake_sessions
Maximum number of simultaneous negotating sessions per endpoint.
Definition: net.h:207
coap_response_handler_t
void(* coap_response_handler_t)(struct coap_context_t *context, coap_session_t *session, coap_pdu_t *sent, coap_pdu_t *received, const coap_tid_t id)
Response handler that is used as call-back in coap_context_t.
Definition: net.h:97
coap_event_handler_t
int(* coap_event_handler_t)(struct coap_context_t *, coap_event_t event, struct coap_session_t *session)
Type for event handler functions that can be registered with a CoAP context using the unction coap_se...
Definition: coap_event.h:60
coap_context_t::app
void * app
application-specific data
Definition: net.h:211
coap_delete_all
void coap_delete_all(coap_queue_t *queue)
Removes all items from given queue and frees the allocated storage.
Definition: net.c:239
coap_context_t::sessions
coap_session_t * sessions
client sessions
Definition: net.h:166
coap_queue_t::session
coap_session_t * session
the CoAP session
Definition: net.h:44
uint8_t
unsigned char uint8_t
Definition: uthash.h:79
prng.h
Pseudo Random Numbers.
coap_read
void coap_read(coap_context_t *ctx, coap_tick_t now)
For applications with their own message loop, reads all data from the network.
Definition: net.c:1397
coap_new_node
coap_queue_t * coap_new_node(void)
Creates a new node suitable for adding to the CoAP sendqueue.
Definition: net.c:248
coap_queue_t
struct coap_queue_t coap_queue_t
Queue entry.
coap_cancel_session_messages
void coap_cancel_session_messages(coap_context_t *context, coap_session_t *session, coap_nack_reason_t reason)
Cancels all outstanding messages for session session.
Definition: net.c:1635
coap_dispatch
void coap_dispatch(coap_context_t *context, coap_session_t *session, coap_pdu_t *pdu)
Dispatches the PDUs from the receive queue in given context.
Definition: net.c:2373
coap_free_context
void coap_free_context(coap_context_t *context)
CoAP stack context must be released with coap_free_context().
Definition: net.c:552
coap_set_app_data
void coap_set_app_data(coap_context_t *context, void *data)
Stores data with the given CoAP context.
Definition: net.c:540
coap_register_option
COAP_STATIC_INLINE void coap_register_option(coap_context_t *ctx, uint16_t type)
Registers the option type type with the given context object ctx.
Definition: net.h:280
coap_queue_t
Queue entry.
Definition: net.h:38
coap_send_message_type
coap_tid_t coap_send_message_type(coap_session_t *session, coap_pdu_t *request, unsigned char type)
Helper funktion to create and send a message with type (usually ACK or RST).
Definition: net.c:836
coap_context_t
The CoAP stack&#39;s global state is stored in a coap_context_t object.
Definition: net.h:147
coap_context_t::max_idle_sessions
unsigned int max_idle_sessions
Maximum number of simultaneous unused sessions per endpoint.
Definition: net.h:206
coap_event.h
coap_context_t::resources
struct coap_resource_t * resources
hash table or list of known resources
Definition: net.h:149
coap_wait_ack
coap_tid_t coap_wait_ack(coap_context_t *context, coap_session_t *session, coap_queue_t *node)
Definition: net.c:888
coap_calc_timeout
unsigned int coap_calc_timeout(coap_session_t *session, unsigned char r)
Calculates the initial timeout based on the session CoAP transmission parameters &#39;ack_timeout&#39;, &#39;ack_random_factor&#39;, and COAP_TICKS_PER_SECOND.
Definition: net.c:862
coap_context_t::session_timeout
unsigned int session_timeout
Number of seconds of inactivity after which an unused session will be closed.
Definition: net.h:205
coap_insert_node
int coap_insert_node(coap_queue_t **queue, coap_queue_t *node)
Adds node to given queue, ordered by variable t in node.
Definition: net.c:182
coap_context_t::known_options
coap_opt_filter_t known_options
Definition: net.h:148