17#ifndef COAP_IO_INTERNAL_H_
18#define COAP_IO_INTERNAL_H_
37#elif defined(WITH_CONTIKI)
38 struct uip_udp_conn *udp_conn;
43#if defined(RIOT_VERSION)
48#if COAP_SERVER_SUPPORT
52#if COAP_CLIENT_SUPPORT
61#define COAP_SOCKET_EMPTY 0x0000
62#define COAP_SOCKET_NOT_EMPTY 0x0001
63#define COAP_SOCKET_BOUND 0x0002
64#define COAP_SOCKET_CONNECTED 0x0004
65#define COAP_SOCKET_WANT_READ 0x0010
66#define COAP_SOCKET_WANT_WRITE 0x0020
67#define COAP_SOCKET_WANT_ACCEPT 0x0040
68#define COAP_SOCKET_WANT_CONNECT 0x0080
69#define COAP_SOCKET_CAN_READ 0x0100
70#define COAP_SOCKET_CAN_WRITE 0x0200
71#define COAP_SOCKET_CAN_ACCEPT 0x0400
72#define COAP_SOCKET_CAN_CONNECT 0x0800
73#define COAP_SOCKET_MULTICAST 0x1000
75#if COAP_SERVER_SUPPORT
82#if COAP_CLIENT_SUPPORT
175 const uint8_t *data,
size_t datalen);
191#ifndef coap_mcast_interface
192# define coap_mcast_interface(Local) 0
200 unsigned char **address,
204void coap_io_process_timeout(
void *arg);
215void coap_start_io_process(
void);
216void coap_stop_io_process(
void);
Representation of network addresses.
Pulls together all the internal only header files.
uint16_t coap_socket_flags_t
void coap_epoll_ctl_add(coap_socket_t *sock, uint32_t events, const char *func)
Epoll specific function to add the state of events that epoll is to track for the appropriate file de...
int coap_socket_connect_udp(coap_socket_t *sock, const coap_address_t *local_if, const coap_address_t *server, int default_port, coap_address_t *local_addr, coap_address_t *remote_addr)
const char * coap_socket_format_errno(int error)
ssize_t coap_socket_read(coap_socket_t *sock, uint8_t *data, size_t data_len)
Function interface for data stream receiving off a socket.
void coap_socket_close(coap_socket_t *sock)
Function interface to close off a socket.
ssize_t coap_socket_send(coap_socket_t *sock, const coap_session_t *session, const uint8_t *data, size_t datalen)
Function interface for data transmission.
ssize_t coap_socket_recv(coap_socket_t *sock, coap_packet_t *packet)
Function interface for reading data.
void coap_update_epoll_timer(coap_context_t *context, coap_tick_t delay)
Update the epoll timer fd as to when it is to trigger.
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.
ssize_t coap_socket_write(coap_socket_t *sock, const uint8_t *data, size_t data_len)
Function interface for data stream sending off a socket.
int coap_socket_bind_udp(coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr)
coap_endpoint_t * coap_malloc_endpoint(void)
void coap_epoll_ctl_mod(coap_socket_t *sock, uint32_t events, const char *func)
Epoll specific function to modify the state of events that epoll is tracking on the appropriate file ...
void coap_mfree_endpoint(coap_endpoint_t *ep)
Internal layer I/O functions.
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Multi-purpose address abstraction.
The CoAP stack's global state is stored in a coap_context_t object.
Abstraction of virtual endpoint that can be attached to coap_context_t.
size_t length
length of payload
coap_addr_tuple_t addr_info
local and remote addresses
unsigned char * payload
payload
int ifindex
the interface index
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
coap_layer_func_t lfunc[COAP_LAYER_LAST]
Layer functions to use.
coap_session_t * session
Used to determine session owner.
coap_endpoint_t * endpoint
Used by the epoll logic for a listening endpoint.
coap_address_t mcast_addr
remote address and port (multicast track)
coap_socket_flags_t flags
1 or more of COAP_SOCKET* flag values