14 #include <sys/types.h> 19 # include <lwip/udp.h> 28 #define COAP_IF_INVALID -1 40 #if defined(WITH_POSIX) || defined(WITH_CONTIKI) 59 #define COAP_ENDPOINT_NOSEC 0x00 60 #define COAP_ENDPOINT_DTLS 0x01 82 unsigned char *data,
size_t datalen);
99 #ifndef coap_mcast_interface 100 # define coap_mcast_interface(Local) 0 127 unsigned char **address,
135 struct pbuf *coap_packet_extract_pbuf(
coap_packet_t *packet);
151 unsigned char payload[];
void * conn
opaque connection (e.g.
void coap_free_endpoint(coap_endpoint_t *ep)
void coap_free_packet(coap_packet_t *packet)
Releases the storage allocated for packet.
coap_address_t addr
local interface address
multi-purpose address abstraction
void coap_packet_populate_endpoint(coap_packet_t *packet, coap_endpoint_t *target)
Populate the coap_endpoint_t *target from the incoming packet's destination data. ...
Abstraction of virtual endpoint that can be attached to coap_context_t.
ssize_t coap_network_send(struct coap_context_t *context, const coap_endpoint_t *local_interface, const coap_address_t *dst, unsigned char *data, size_t datalen)
Function interface for data transmission.
struct coap_endpoint_t coap_endpoint_t
Abstraction of virtual endpoint that can be attached to coap_context_t.
coap_endpoint_t * coap_new_endpoint(const coap_address_t *addr, int flags)
ssize_t coap_network_read(coap_endpoint_t *ep, coap_packet_t **packet)
Function interface for reading data.
void coap_packet_copy_source(coap_packet_t *packet, coap_address_t *target)
Given an incoming packet, copy its source address into an address struct.
Representation of network addresses.
union coap_endpoint_t::@1 handle
opaque handle to identify this endpoint
void coap_packet_get_memmapped(coap_packet_t *packet, unsigned char **address, size_t *length)
Given a packet, set msg and msg_len to an address and length of the packet's data in memory...
int coap_if_handle_t
Abstract handle that is used to identify a local network interface.
The CoAP stack's global state is stored in a coap_context_t object.