ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
udp.c
Go to the documentation of this file.
1#include "udp.h"
2
3#include <ascii-chat/common.h>
5#include <ngtcp2/ngtcp2_crypto.h>
6#include <sodium.h>
7#include <string.h>
8
9#define QUIC_UDP_CID_LENGTH 16
10#define QUIC_UDP_PACKET_CAPACITY 1452
11#define QUIC_UDP_MAX_CONNECTIONS 64
12#define QUIC_UDP_READ_BATCH 128
13#define QUIC_UDP_WRITE_BATCH 16
14#define QUIC_RETRY_SECRET_LENGTH 32
15#define QUIC_RETRY_TOKEN_LIFETIME (10ULL * 1000000000ULL)
16
32
44
45static bool valid_sockaddr(const struct sockaddr *address, socklen_t length) {
46 if (!address || (size_t)length < sizeof(struct sockaddr) || (size_t)length > sizeof(ngtcp2_sockaddr_union))
47 return false;
48 if (address->sa_family == AF_INET && (size_t)length == sizeof(struct sockaddr_in))
49 return ((const struct sockaddr_in *)address)->sin_addr.s_addr != 0;
50 if (address->sa_family == AF_INET6 && (size_t)length == sizeof(struct sockaddr_in6)) {
51 static const uint8_t zero[16] = {0};
52 return memcmp(&((const struct sockaddr_in6 *)address)->sin6_addr, zero, sizeof(zero)) != 0;
53 }
54 return false;
55}
56
57static ngtcp2_path make_path(const quic_udp_endpoint_t *endpoint, const struct sockaddr *remote, socklen_t remote_length) {
58 ngtcp2_path path = {0};
59 path.local.addr = (struct sockaddr *)&endpoint->local;
60 path.local.addrlen = endpoint->local_length;
61 path.remote.addr = (struct sockaddr *)remote;
62 path.remote.addrlen = remote_length;
63 return path;
64}
65
66asciichat_error_t quic_udp_endpoint_create(const struct sockaddr *address, socklen_t length, quic_tls_t *server_tls, quic_udp_accept_fn accept, void *context, quic_udp_endpoint_t **out) {
67 if (!out)
68 return SET_ERRNO(ERROR_INVALID_PARAM, "Missing QUIC UDP endpoint output");
69 *out = NULL;
70 if (!valid_sockaddr(address, length) || (!!server_tls != !!accept) || (server_tls && !server_tls->server))
71 return SET_ERRNO(ERROR_INVALID_PARAM, "QUIC UDP requires a concrete bind address and valid listener");
72 quic_udp_endpoint_t *endpoint = SAFE_CALLOC(1, sizeof(*endpoint), quic_udp_endpoint_t *);
73 if (!endpoint)
74 return SET_ERRNO(ERROR_MEMORY, "Cannot allocate QUIC UDP endpoint");
75 endpoint->socket = socket_create("quic_udp", address->sa_family, SOCK_DGRAM, 0);
76 if (endpoint->socket == INVALID_SOCKET_VALUE || socket_bind(endpoint->socket, address, length) != 0 || socket_set_nonblocking(endpoint->socket, true) != 0) {
77 if (endpoint->socket != INVALID_SOCKET_VALUE)
78 socket_close(endpoint->socket);
79 SAFE_FREE(endpoint);
80 return SET_ERRNO(ERROR_NETWORK, "Cannot bind QUIC UDP endpoint");
81 }
82 endpoint->local_length = sizeof(endpoint->local);
83 if (socket_getsockname(endpoint->socket, (struct sockaddr *)&endpoint->local, &endpoint->local_length) != 0) {
84 socket_close(endpoint->socket);
85 SAFE_FREE(endpoint);
86 return SET_ERRNO(ERROR_NETWORK, "Cannot obtain QUIC UDP endpoint address");
87 }
88 endpoint->server_tls = server_tls;
89 if (server_tls) {
90 if (sodium_init() < 0) {
91 socket_close(endpoint->socket);
92 SAFE_FREE(endpoint);
93 return SET_ERRNO(ERROR_CRYPTO, "Cannot initialize QUIC Retry token secret");
94 }
95 randombytes_buf(endpoint->retry_secret, sizeof(endpoint->retry_secret));
96 }
97 endpoint->accept = accept;
98 endpoint->context = context;
99 *out = endpoint;
100 return ASCIICHAT_OK;
101}
102
103asciichat_error_t quic_udp_endpoint_address(const quic_udp_endpoint_t *endpoint, struct sockaddr_storage *address, socklen_t *length) {
104 if (!endpoint || !address || !length)
105 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP address output");
106 *address = endpoint->local;
107 *length = endpoint->local_length;
108 return ASCIICHAT_OK;
109}
110
111static udp_peer_t *new_peer(quic_udp_endpoint_t *endpoint) {
112 if (endpoint->count >= QUIC_UDP_MAX_CONNECTIONS)
113 return NULL;
114 return SAFE_CALLOC(1, sizeof(udp_peer_t), udp_peer_t *);
115}
116
117static void add_peer(quic_udp_endpoint_t *endpoint, udp_peer_t *peer) {
118 peer->next = endpoint->peers;
119 endpoint->peers = peer;
120 ++endpoint->count;
121}
122
123static void send_retry(quic_udp_endpoint_t *endpoint, const ngtcp2_pkt_hd *initial, const struct sockaddr *remote, socklen_t remote_length, uint64_t now) {
124 ngtcp2_cid retry_scid = {.datalen = QUIC_UDP_CID_LENGTH};
125 randombytes_buf(retry_scid.data, retry_scid.datalen);
126 uint8_t token[NGTCP2_CRYPTO_MAX_RETRY_TOKENLEN2];
127 ngtcp2_ssize token_length =
128 ngtcp2_crypto_generate_retry_token2(token, endpoint->retry_secret, sizeof(endpoint->retry_secret), initial->version, remote, remote_length, &retry_scid, &initial->dcid, now);
129 if (token_length < 0)
130 return;
131 uint8_t packet[1200];
132 ngtcp2_ssize length = ngtcp2_crypto_write_retry(packet, sizeof(packet), initial->version, &initial->scid, &retry_scid, &initial->dcid, token, (size_t)token_length);
133 if (length > 0)
134 (void)socket_sendto(endpoint->socket, packet, (size_t)length, 0, remote, remote_length);
135}
136
137asciichat_error_t quic_udp_connect(quic_udp_endpoint_t *endpoint, quic_tls_t *client_tls, const char *server_name, const struct sockaddr *remote, socklen_t remote_length, uint64_t now_ns,
139 if (!out)
140 return SET_ERRNO(ERROR_INVALID_PARAM, "Missing QUIC UDP connection output");
141 *out = NULL;
142 if (!endpoint || !client_tls || client_tls->server || !valid_sockaddr(remote, remote_length) || remote->sa_family != ((struct sockaddr *)&endpoint->local)->sa_family)
143 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP connection configuration");
144 udp_peer_t *peer = new_peer(endpoint);
145 if (!peer)
146 return SET_ERRNO(ERROR_BUFFER_FULL, "QUIC UDP connection limit reached or allocation failed");
147 ngtcp2_path path = make_path(endpoint, remote, remote_length);
148 asciichat_error_t result = quic_connection_client_create(client_tls, server_name, &path, now_ns, &peer->connection);
149 if (result != ASCIICHAT_OK) {
150 SAFE_FREE(peer);
151 return result;
152 }
153 add_peer(endpoint, peer);
154 *out = peer->connection;
155 return ASCIICHAT_OK;
156}
157
158static asciichat_error_t receive_one(quic_udp_endpoint_t *endpoint, const uint8_t *data, size_t length, const struct sockaddr *remote, socklen_t remote_length, uint64_t now,
159 quic_connection_t **failed) {
160 ngtcp2_version_cid header;
161 if (ngtcp2_pkt_decode_version_cid(&header, data, length, QUIC_UDP_CID_LENGTH) != 0)
162 return ASCIICHAT_OK;
163 udp_peer_t *peer = endpoint->peers;
164 while (peer) {
165 bool matches = false;
166 asciichat_error_t result = quic_connection_matches_cid(peer->connection, header.dcid, header.dcidlen, &matches);
167 if (result != ASCIICHAT_OK)
168 return result;
169 if (matches)
170 break;
171 peer = peer->next;
172 }
173 ngtcp2_path path = make_path(endpoint, remote, remote_length);
174 if (!peer) {
175 if (!endpoint->server_tls)
176 return ASCIICHAT_OK;
177 ngtcp2_pkt_hd initial;
178 if (length < NGTCP2_MAX_UDP_PAYLOAD_SIZE || ngtcp2_accept(&initial, data, length) != 0 || initial.version != NGTCP2_PROTO_VER_V1)
179 return ASCIICHAT_OK;
180 if (!initial.tokenlen) {
181 send_retry(endpoint, &initial, remote, remote_length, now);
182 return ASCIICHAT_OK;
183 }
184 ngtcp2_cid original_dcid;
185 if (ngtcp2_crypto_verify_retry_token2(&original_dcid, initial.token, initial.tokenlen, endpoint->retry_secret, sizeof(endpoint->retry_secret), initial.version, remote, remote_length,
186 &initial.dcid, QUIC_RETRY_TOKEN_LIFETIME, now) != 0)
187 return ASCIICHAT_OK;
188 peer = new_peer(endpoint);
189 if (!peer)
190 return ASCIICHAT_OK;
191 asciichat_error_t result = quic_connection_server_create_validated(endpoint->server_tls, &path, data, length, &original_dcid, now, &peer->connection);
192 if (result == ASCIICHAT_OK)
193 result = endpoint->accept(peer->connection, endpoint->context);
194 if (result != ASCIICHAT_OK) {
196 SAFE_FREE(peer);
197 if (result == ERROR_BUFFER_FULL)
198 return ASCIICHAT_OK;
199 return result;
200 }
201 add_peer(endpoint, peer);
202 }
203 asciichat_error_t result = quic_connection_receive(peer->connection, &path, data, length, now);
204 if (result != ASCIICHAT_OK)
205 *failed = peer->connection;
206 return result;
207}
208
210 if (!endpoint || !failed)
211 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP pump arguments");
212 *failed = NULL;
213 for (unsigned i = 0; i < QUIC_UDP_READ_BATCH; ++i) {
214 uint8_t data[65536];
215 struct sockaddr_storage remote = {0};
216 socklen_t remote_length = sizeof(remote);
217 ssize_t received = socket_recvfrom(endpoint->socket, data, sizeof(data), 0, (struct sockaddr *)&remote, &remote_length);
218 if (received < 0) {
219 int error = socket_get_last_error();
221 break;
222 /* An ICMP error for an earlier datagram does not identify a QUIC
223 * connection and must not terminate a shared listener. */
224 if (socket_is_connection_reset_error(error))
225 continue;
226 return SET_ERRNO(ERROR_NETWORK, "QUIC UDP receive failed");
227 }
228 if (!received || !valid_sockaddr((struct sockaddr *)&remote, remote_length))
229 continue;
230 asciichat_error_t result = receive_one(endpoint, data, (size_t)received, (struct sockaddr *)&remote, remote_length, now, failed);
231 if (result != ASCIICHAT_OK)
232 return result;
233 }
234 for (udp_peer_t *peer = endpoint->peers; peer; peer = peer->next) {
235 if (quic_connection_expiry(peer->connection) <= now) {
237 if (result != ASCIICHAT_OK) {
238 *failed = peer->connection;
239 return result;
240 }
241 }
242 for (unsigned i = 0; i < QUIC_UDP_WRITE_BATCH; ++i) {
243 if (!peer->pending_length) {
244 asciichat_error_t result = quic_connection_write(peer->connection, &peer->pending_path, peer->pending, sizeof(peer->pending), &peer->pending_length, now);
245 if (result != ASCIICHAT_OK) {
246 *failed = peer->connection;
247 return result;
248 }
249 if (!peer->pending_length)
250 break;
251 }
252 ngtcp2_addr *remote = &peer->pending_path.path.remote;
253 ssize_t sent = socket_sendto(endpoint->socket, peer->pending, peer->pending_length, 0, remote->addr, (socklen_t)remote->addrlen);
255 break;
256 if (sent < 0 || (size_t)sent != peer->pending_length)
257 return SET_ERRNO(ERROR_NETWORK, "QUIC UDP send failed");
258 peer->pending_length = 0;
260 if (result != ASCIICHAT_OK) {
261 *failed = peer->connection;
262 return result;
263 }
264 }
265 }
266 return ASCIICHAT_OK;
267}
268
269asciichat_error_t quic_udp_wait_parameters(const quic_udp_endpoint_t *endpoint, uint64_t now_ns, uint64_t maximum_wait_ns, uint64_t *wait_ns, bool *want_write) {
270 if (!endpoint || !wait_ns || !want_write || now_ns == UINT64_MAX)
271 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP wait parameters");
272 *wait_ns = maximum_wait_ns;
273 *want_write = false;
274 for (const udp_peer_t *peer = endpoint->peers; peer; peer = peer->next) {
276 if (expiry <= now_ns)
277 *wait_ns = 0;
278 else if (expiry != UINT64_MAX && expiry - now_ns < *wait_ns)
279 *wait_ns = expiry - now_ns;
280 if (peer->pending_length)
281 *want_write = true;
282 }
283 return ASCIICHAT_OK;
284}
285
286asciichat_error_t quic_udp_wait(quic_udp_endpoint_t *endpoint, uint64_t wait_ns, bool want_write, bool *ready) {
287 if (!endpoint || !ready)
288 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP wait");
289 *ready = false;
290 struct pollfd fd = {.fd = endpoint->socket, .events = (short)(POLLIN | (want_write ? POLLOUT : 0))};
291 int64_t timeout = wait_ns > INT64_MAX ? INT64_MAX : (int64_t)wait_ns;
292 int result = socket_poll(&fd, 1, timeout);
293 if (result < 0)
294 return SET_ERRNO(ERROR_NETWORK, "QUIC UDP poll failed");
295 if (result > 0 && (fd.revents & (POLLERR | POLLNVAL)))
296 return SET_ERRNO(ERROR_NETWORK, "QUIC UDP socket poll reported an error");
297 *ready = result > 0;
298 return ASCIICHAT_OK;
299}
300
302 if (!endpoint)
303 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP wake");
304 const uint8_t wake = 0;
305 ssize_t sent = socket_sendto(endpoint->socket, &wake, sizeof(wake), 0, (struct sockaddr *)&endpoint->local, endpoint->local_length);
306 if (sent != (ssize_t)sizeof(wake))
307 return SET_ERRNO(ERROR_NETWORK, "Cannot wake QUIC UDP endpoint");
308 return ASCIICHAT_OK;
309}
310
311bool quic_udp_contains(const quic_udp_endpoint_t *endpoint, const quic_connection_t *connection) {
312 if (!endpoint || !connection)
313 return false;
314 for (const udp_peer_t *peer = endpoint->peers; peer; peer = peer->next)
315 if (peer->connection == connection)
316 return true;
317 return false;
318}
319
321 if (!quic_udp_contains(endpoint, connection))
322 return SET_ERRNO(ERROR_INVALID_PARAM, "QUIC UDP connection is not owned by endpoint");
324 ngtcp2_path_storage path;
325 size_t length = 0;
326 asciichat_error_t result = quic_connection_write_close(connection, &path, packet, sizeof(packet), &length, time_get_ns());
327 if (result != ASCIICHAT_OK || !length)
328 return result;
329 ngtcp2_addr *remote = &path.path.remote;
330 ssize_t sent = socket_sendto(endpoint->socket, packet, length, 0, remote->addr, (socklen_t)remote->addrlen);
331 if (sent < 0 || (size_t)sent != length)
332 return SET_ERRNO(ERROR_NETWORK, "Cannot send QUIC close packet");
333 return ASCIICHAT_OK;
334}
335
337 if (!endpoint || !connection)
338 return SET_ERRNO(ERROR_INVALID_PARAM, "Invalid QUIC UDP removal");
339 udp_peer_t **next = &endpoint->peers;
340 while (*next && (*next)->connection != connection)
341 next = &(*next)->next;
342 if (!*next)
343 return SET_ERRNO(ERROR_INVALID_PARAM, "QUIC UDP connection is not owned by endpoint");
344 udp_peer_t *peer = *next;
345 *next = peer->next;
346 --endpoint->count;
348 SAFE_FREE(peer);
349 return ASCIICHAT_OK;
350}
351
353 if (!endpoint || !*endpoint)
354 return;
355 while ((*endpoint)->peers)
356 (void)quic_udp_remove(*endpoint, (*endpoint)->peers->connection);
357 socket_close((*endpoint)->socket);
358 sodium_memzero((*endpoint)->retry_secret, sizeof((*endpoint)->retry_secret));
359 SAFE_FREE(*endpoint);
360 *endpoint = NULL;
361}
362
363asciichat_error_t quic_udp_migrate(quic_udp_endpoint_t *endpoint, const struct sockaddr *address, socklen_t length, uint64_t now_ns) {
364 if (!endpoint || endpoint->server_tls || endpoint->count != 1 || !valid_sockaddr(address, length))
365 return SET_ERRNO(ERROR_INVALID_PARAM, "QUIC migration requires a single client connection and concrete address");
366 if (endpoint->peers->pending_length)
367 return SET_ERRNO(ERROR_BUFFER_FULL, "Flush the pending UDP packet before migrating");
368 quic_udp_endpoint_t *candidate = NULL;
369 asciichat_error_t result = quic_udp_endpoint_create(address, length, NULL, NULL, NULL, &candidate);
370 if (result != ASCIICHAT_OK)
371 return result;
372 result = quic_connection_migrate(endpoint->peers->connection, (struct sockaddr *)&candidate->local, candidate->local_length, now_ns);
373 if (result == ASCIICHAT_OK) {
374 socket_t old_socket = endpoint->socket;
375 endpoint->socket = candidate->socket;
376 candidate->socket = old_socket;
377 endpoint->local = candidate->local;
378 endpoint->local_length = candidate->local_length;
379 }
380 quic_udp_endpoint_destroy(&candidate);
381 return result;
382}
#define SET_ERRNO(code,...)
#define SAFE_FREE(ptr)
#define SAFE_CALLOC(count, size, cast)
unsigned long long uint64_t
unsigned char uint8_t
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:48
@ ERROR_NETWORK
Definition error_codes.h:77
@ ERROR_BUFFER_FULL
@ ERROR_MEMORY
Definition error_codes.h:55
@ ASCIICHAT_OK
Definition error_codes.h:50
@ ERROR_CRYPTO
@ ERROR_INVALID_PARAM
int socket_t
⚙️ Common definitions, error codes, macros, and types shared throughout the application
asciichat_error_t quic_connection_client_create(quic_tls_t *tls, const char *server_name, const ngtcp2_path *path, uint64_t now_ns, quic_connection_t **out)
void quic_connection_destroy(quic_connection_t **connection)
asciichat_error_t quic_connection_handle_expiry(quic_connection_t *connection, uint64_t now_ns)
asciichat_error_t quic_connection_write_close(quic_connection_t *connection, ngtcp2_path_storage *path, void *packet, size_t capacity, size_t *length, uint64_t now_ns)
asciichat_error_t quic_connection_matches_cid(const quic_connection_t *connection, const uint8_t *cid, size_t length, bool *matches)
asciichat_error_t quic_connection_write(quic_connection_t *connection, ngtcp2_path_storage *path, void *packet, size_t capacity, size_t *length, uint64_t now_ns)
asciichat_error_t quic_connection_receive(quic_connection_t *connection, const ngtcp2_path *path, const void *packet, size_t length, uint64_t now_ns)
asciichat_error_t quic_connection_packet_sent(quic_connection_t *connection, uint64_t now_ns)
uint64_t quic_connection_expiry(const quic_connection_t *connection)
asciichat_error_t quic_connection_migrate(quic_connection_t *connection, const struct sockaddr *local, socklen_t length, uint64_t now_ns)
asciichat_error_t quic_connection_server_create_validated(quic_tls_t *tls, const ngtcp2_path *path, const void *initial, size_t initial_length, const ngtcp2_cid *original_dcid, uint64_t now_ns, quic_connection_t **out)
struct quic_connection quic_connection_t
bool socket_is_would_block_error(int)
int socket_poll(struct pollfd *, nfds_t, int64_t)
int socket_get_last_error(void)
int socket_close(socket_t)
static bool size_t gotel_query_t * out
Definition queries.h:10
🔤 String Manipulation and Shell Escaping Utilities
bool server
Definition tls.h:15
quic_tls_t * server_tls
Definition udp.c:37
struct sockaddr_storage local
Definition udp.c:35
udp_peer_t * peers
Definition udp.c:41
uint8_t retry_secret[32]
Definition udp.c:38
socklen_t local_length
Definition udp.c:36
size_t count
Definition udp.c:42
void * context
Definition udp.c:40
socket_t socket
Definition udp.c:34
quic_udp_accept_fn accept
Definition udp.c:39
acip quic udp endpoint is intentionally a small, concrete record. Fields such as socket,...
Definition udp.c:25
quic_connection_t * connection
Definition udp.c:27
size_t pending_length
Definition udp.c:30
ngtcp2_path_storage pending_path
Definition udp.c:28
struct udp_peer * next
Definition udp.c:26
uint8_t pending[1452]
Definition udp.c:29
⏱️ High-precision timing utilities using sokol_time.h and uthash
bool quic_udp_contains(const quic_udp_endpoint_t *endpoint, const quic_connection_t *connection)
Definition udp.c:311
#define QUIC_UDP_PACKET_CAPACITY
Definition udp.c:10
asciichat_error_t quic_udp_endpoint_address(const quic_udp_endpoint_t *endpoint, struct sockaddr_storage *address, socklen_t *length)
Definition udp.c:103
asciichat_error_t quic_udp_wake(quic_udp_endpoint_t *endpoint)
Definition udp.c:301
asciichat_error_t quic_udp_wait_parameters(const quic_udp_endpoint_t *endpoint, uint64_t now_ns, uint64_t maximum_wait_ns, uint64_t *wait_ns, bool *want_write)
Definition udp.c:269
#define QUIC_UDP_READ_BATCH
Definition udp.c:12
asciichat_error_t quic_udp_pump(quic_udp_endpoint_t *endpoint, uint64_t now, quic_connection_t **failed)
Definition udp.c:209
void quic_udp_endpoint_destroy(quic_udp_endpoint_t **endpoint)
Definition udp.c:352
#define QUIC_UDP_WRITE_BATCH
Definition udp.c:13
asciichat_error_t quic_udp_endpoint_create(const struct sockaddr *address, socklen_t length, quic_tls_t *server_tls, quic_udp_accept_fn accept, void *context, quic_udp_endpoint_t **out)
Definition udp.c:66
asciichat_error_t quic_udp_migrate(quic_udp_endpoint_t *endpoint, const struct sockaddr *address, socklen_t length, uint64_t now_ns)
Definition udp.c:363
#define QUIC_UDP_CID_LENGTH
Definition udp.c:9
asciichat_error_t quic_udp_close_peer(quic_udp_endpoint_t *endpoint, quic_connection_t *connection)
Definition udp.c:320
#define QUIC_RETRY_SECRET_LENGTH
Definition udp.c:14
asciichat_error_t quic_udp_connect(quic_udp_endpoint_t *endpoint, quic_tls_t *client_tls, const char *server_name, const struct sockaddr *remote, socklen_t remote_length, uint64_t now_ns, quic_connection_t **out)
Definition udp.c:137
struct udp_peer udp_peer_t
acip quic udp endpoint is intentionally a small, concrete record. Fields such as socket,...
#define QUIC_UDP_MAX_CONNECTIONS
Definition udp.c:11
#define QUIC_RETRY_TOKEN_LIFETIME
Definition udp.c:15
asciichat_error_t quic_udp_remove(quic_udp_endpoint_t *endpoint, quic_connection_t *connection)
Definition udp.c:336
asciichat_error_t quic_udp_wait(quic_udp_endpoint_t *endpoint, uint64_t wait_ns, bool want_write, bool *ready)
Definition udp.c:286
asciichat_error_t(* quic_udp_accept_fn)(quic_connection_t *, void *)
Definition udp.h:15
struct quic_udp_endpoint quic_udp_endpoint_t
Definition udp.h:14