libcoap
4.3.5-develop-eafc023
Loading...
Searching...
No Matches
coap_dgrm_internal.h
Go to the documentation of this file.
1
/*
2
* coap_dgrm_internal.h -- Datagram (UDP) functions for libcoap
3
*
4
* Copyright (C) 2019--2026 Olaf Bergmann <bergmann@tzi.org> and others
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
16
17
#ifndef COAP_DGRM_INTERNAL_H_
18
#define COAP_DGRM_INTERNAL_H_
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
24
typedef
struct
coap_icmp_info_t
{
25
uint32_t
length
;
26
uint8_t
cmsg_level
;
27
uint8_t
ee_origin
;
28
uint8_t
ee_type
;
29
uint8_t
ee_code
;
30
}
coap_icmp_info_t
;
31
38
39
#if COAP_CLIENT_SUPPORT
56
int
coap_socket_connect_udp(
coap_socket_t
*sock,
57
const
coap_address_t
*local_if,
58
const
coap_address_t
*server,
59
int
default_port,
60
coap_address_t
*local_addr,
61
coap_address_t
*remote_addr);
62
#endif
/* COAP_CLIENT_SUPPORT */
63
64
#if COAP_SERVER_SUPPORT
78
int
coap_socket_bind_udp(
coap_socket_t
*sock,
79
const
coap_address_t
*listen_addr,
80
coap_address_t
*bound_addr);
81
#endif
/* COAP_SERVER_SUPPORT */
82
97
ssize_t
coap_socket_send
(
coap_socket_t
*sock,
coap_session_t
*session,
98
const
uint8_t *data,
size_t
datalen);
99
114
ssize_t
coap_socket_recv
(
coap_socket_t
*sock,
coap_packet_t
*packet);
115
124
void
coap_socket_dgrm_close
(
coap_socket_t
*sock);
125
127
128
#ifdef __cplusplus
129
}
130
#endif
131
132
#endif
/* COAP_DGRM_INTERNAL_H_ */
coap_socket_recv
ssize_t coap_socket_recv(coap_socket_t *sock, coap_packet_t *packet)
Function interface for reading data.
Definition
coap_dgrm_posix.c:821
coap_socket_send
ssize_t coap_socket_send(coap_socket_t *sock, coap_session_t *session, const uint8_t *data, size_t datalen)
Function interface for data transmission.
Definition
coap_dgrm_posix.c:620
coap_socket_dgrm_close
void coap_socket_dgrm_close(coap_socket_t *sock)
Function interface to close off a datagram socket.
Definition
coap_dgrm_posix.c:1052
coap_address_t
Multi-purpose address abstraction.
Definition
coap_address.h:185
coap_icmp_info_t
Definition
coap_dgrm_internal.h:24
coap_icmp_info_t::length
uint32_t length
Definition
coap_dgrm_internal.h:25
coap_icmp_info_t::cmsg_level
uint8_t cmsg_level
Definition
coap_dgrm_internal.h:26
coap_icmp_info_t::ee_type
uint8_t ee_type
Definition
coap_dgrm_internal.h:28
coap_icmp_info_t::ee_code
uint8_t ee_code
Definition
coap_dgrm_internal.h:29
coap_icmp_info_t::ee_origin
uint8_t ee_origin
Definition
coap_dgrm_internal.h:27
coap_packet_t
Definition
coap_io_internal.h:150
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:77
coap_socket_t
Definition
coap_io_internal.h:38
libcoap
include
coap3
coap_dgrm_internal.h
Generated on
for libcoap by
1.15.0