Loading...
Searching...
No Matches
coap_netif_internal.h
Go to the documentation of this file.
/*
* coap_netif_internal.h -- Netif Transport Layer Support for libcoap
*
* Copyright (C) 2023 Jon Shallow <supjps-libcoap@jpshallow.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_NETIF_INTERNAL_H_
#define COAP_NETIF_INTERNAL_H_
#include "coap_internal.h"
int coap_netif_available(coap_session_t *session);
int coap_netif_available_ep(coap_endpoint_t *endpoint);
int coap_netif_dgrm_listen(coap_endpoint_t *endpoint,
const coap_address_t *listen_addr);
int coap_netif_dgrm_connect(coap_session_t *session,
const coap_address_t *local_if,
const coap_address_t *server, int default_port);
ssize_t coap_netif_dgrm_read(coap_session_t *session, coap_packet_t *packet);
ssize_t coap_netif_dgrm_read_ep(coap_endpoint_t *endpoint,
coap_packet_t *packet);
ssize_t coap_netif_dgrm_write(coap_session_t *session, const uint8_t *data,
size_t datalen);
int coap_netif_strm_listen(coap_endpoint_t *endpoint,
const coap_address_t *listen_addr);
int coap_netif_strm_accept(coap_endpoint_t *endpoint, coap_session_t *session);
int coap_netif_strm_connect1(coap_session_t *session,
const coap_address_t *local_if,
const coap_address_t *server, int default_port);
int coap_netif_strm_connect2(coap_session_t *session);
ssize_t coap_netif_strm_read(coap_session_t *session, uint8_t *data,
size_t datalen);
ssize_t coap_netif_strm_write(coap_session_t *session,
const uint8_t *data, size_t datalen);
void coap_netif_close(coap_session_t *session);
void coap_netif_close_ep(coap_endpoint_t *endpoint);
#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