libcoap 4.3.2rc2

coap_netif_internal.h
Go to the documentation of this file.
1/*
2 * coap_netif_internal.h -- Netif Transport Layer Support for libcoap
3 *
4 * Copyright (C) 2023 Jon Shallow <supjps-libcoap@jpshallow.com>
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_NETIF_INTERNAL_H_
18#define COAP_NETIF_INTERNAL_H_
19
20#include "coap_internal.h"
21
37 int coap_netif_available(coap_session_t *session);
38
46 int coap_netif_available_ep(coap_endpoint_t *endpoint);
47
56 int coap_netif_dgrm_listen(coap_endpoint_t *endpoint,
57 const coap_address_t *listen_addr);
58
69 int coap_netif_dgrm_connect(coap_session_t *session,
70 const coap_address_t *local_if,
71 const coap_address_t *server, int default_port);
72
84ssize_t coap_netif_dgrm_read(coap_session_t *session, coap_packet_t *packet);
85
97ssize_t coap_netif_dgrm_read_ep(coap_endpoint_t *endpoint,
98 coap_packet_t *packet);
99
112ssize_t coap_netif_dgrm_write(coap_session_t *session, const uint8_t *data,
113 size_t datalen);
114
123 int coap_netif_strm_listen(coap_endpoint_t *endpoint,
124 const coap_address_t *listen_addr);
125
134 int coap_netif_strm_accept(coap_endpoint_t *endpoint, coap_session_t *session);
135
147 int coap_netif_strm_connect1(coap_session_t *session,
148 const coap_address_t *local_if,
149 const coap_address_t *server, int default_port);
150
159 int coap_netif_strm_connect2(coap_session_t *session);
160
172ssize_t coap_netif_strm_read(coap_session_t *session, uint8_t *data,
173 size_t datalen);
174
188ssize_t coap_netif_strm_write(coap_session_t *session,
189 const uint8_t *data, size_t datalen);
190
196 void coap_netif_close(coap_session_t *session);
197
203 void coap_netif_close_ep(coap_endpoint_t *endpoint);
204
207#endif /* COAP_NETIF_INTERNAL_H */
coap_internal.h
Pulls together all the internal only header files.
coap_netif_strm_connect2
int coap_netif_strm_connect2(coap_session_t *session)
Layer function interface for Netif stream connect (tcp).
coap_netif_dgrm_write
ssize_t coap_netif_dgrm_write(coap_session_t *session, const uint8_t *data, size_t datalen)
Function interface for netif datagram data transmission.
Definition: coap_netif.c:123
coap_netif_close
void coap_netif_close(coap_session_t *session)
Layer function interface for Netif close for a session.
Definition: coap_netif.c:258
coap_netif_dgrm_listen
int coap_netif_dgrm_listen(coap_endpoint_t *endpoint, const coap_address_t *listen_addr)
Layer function interface for Netif datagram listem (udp).
coap_netif_dgrm_read
ssize_t coap_netif_dgrm_read(coap_session_t *session, coap_packet_t *packet)
Function interface for layer data datagram receiving for sessions.
Definition: coap_netif.c:72
coap_netif_close_ep
void coap_netif_close_ep(coap_endpoint_t *endpoint)
Layer function interface for Netif close for a endpoint.
coap_netif_strm_connect1
int coap_netif_strm_connect1(coap_session_t *session, const coap_address_t *local_if, const coap_address_t *server, int default_port)
Layer function interface for Netif stream connect (tcp).
coap_netif_dgrm_read_ep
ssize_t coap_netif_dgrm_read_ep(coap_endpoint_t *endpoint, coap_packet_t *packet)
Function interface for layer data datagram receiving for endpoints.
coap_netif_strm_listen
int coap_netif_strm_listen(coap_endpoint_t *endpoint, const coap_address_t *listen_addr)
Layer function interface for Netif stream listem (tcp).
coap_netif_strm_write
ssize_t coap_netif_strm_write(coap_session_t *session, const uint8_t *data, size_t datalen)
Function interface for netif stream data transmission.
Definition: coap_netif.c:234
coap_netif_strm_accept
int coap_netif_strm_accept(coap_endpoint_t *endpoint, coap_session_t *session)
Layer function interface for Netif stream accept.
coap_netif_dgrm_connect
int coap_netif_dgrm_connect(coap_session_t *session, const coap_address_t *local_if, const coap_address_t *server, int default_port)
Layer function interface for Netif datagram connect (udp).
coap_netif_available
int coap_netif_available(coap_session_t *session)
Function interface to check whether netif for session is still available.
Definition: coap_netif.c:25
coap_netif_strm_read
ssize_t coap_netif_strm_read(coap_session_t *session, uint8_t *data, size_t datalen)
Function interface for layer data stream receiving.
Definition: coap_netif.c:213
coap_netif_available_ep
int coap_netif_available_ep(coap_endpoint_t *endpoint)
Function interface to check whether netif for endpoint is still available.
coap_address_t
Multi-purpose address abstraction.
Definition: coap_address.h:109
coap_endpoint_t
Abstraction of virtual endpoint that can be attached to coap_context_t.
Definition: coap_session_internal.h:219
coap_packet_t
Definition: coap_io_internal.h:207
coap_session_t
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
Definition: coap_session_internal.h:68