Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019-20 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
19#ifndef NET_SOCK_ASYNC_TYPES_H
20#define NET_SOCK_ASYNC_TYPES_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/* This header needs to re-typedef the sock types to prevent cyclic includes */
27#if defined (__clang__)
28# pragma clang diagnostic push
29# pragma clang diagnostic ignored "-Wtypedef-redefinition"
30#endif
31
32#if defined(SOCK_HAS_ASYNC) || defined(DOXYGEN)
45
46#if defined(MODULE_SOCK_DTLS) || defined(DOXYGEN)
47typedef struct sock_dtls sock_dtls_t;
68typedef void (*sock_dtls_cb_t)(sock_dtls_t *sock, sock_async_flags_t flags,
69 void *arg);
70#endif /* defined(MODULE_SOCK_DTLS) || defined(DOXYGEN) */
71
72#if defined(MODULE_SOCK_IP) || defined(DOXYGEN)
73typedef struct sock_ip sock_ip_t;
92 void *arg);
93#endif /* defined(MODULE_SOCK_IP) || defined(DOXYGEN) */
94
95#if defined(MODULE_SOCK_TCP) || defined(DOXYGEN)
96typedef struct sock_tcp sock_tcp_t;
117typedef void (*sock_tcp_cb_t)(sock_tcp_t *sock, sock_async_flags_t flags,
118 void *arg);
119
134 sock_async_flags_t flags,
135 void *arg);
136#endif /* defined(MODULE_SOCK_TCP) || defined(DOXYGEN) */
137
138#if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
139typedef struct sock_udp sock_udp_t;
158 void *arg);
159#endif /* defined(MODULE_SOCK_UDP) || defined(DOXYGEN) */
160
161#ifdef SOCK_HAS_ASYNC_CTX
162#include "sock_async_ctx.h"
163#endif
164
165#include "sock_types.h"
166#ifdef MODULE_SOCK_DTLS
167#include "sock_dtls_types.h"
168#endif /* MODULE_SOCK_DTLS */
169#endif /* defined(SOCK_HAS_ASYNC) || defined(DOXYGEN) */
170
171#if defined (__clang__)
172# pragma clang diagnostic pop
173#endif
174
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* NET_SOCK_ASYNC_TYPES_H */
void(* sock_tcp_queue_cb_t)(sock_tcp_queue_t *queue, sock_async_flags_t flags, void *arg)
Event callback for sock_tcp_queue_t.
Definition types.h:133
void(* sock_udp_cb_t)(sock_udp_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_udp_t.
Definition types.h:157
sock_async_flags_t
Flag types to signify asynchronous sock events.
Definition types.h:37
void(* sock_tcp_cb_t)(sock_tcp_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_tcp_t.
Definition types.h:117
void(* sock_ip_cb_t)(sock_ip_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_ip_t.
Definition types.h:91
void(* sock_dtls_cb_t)(sock_dtls_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_dtls_t.
Definition types.h:68
@ SOCK_ASYNC_MSG_RECV
Message received event.
Definition types.h:41
@ SOCK_ASYNC_MSG_SENT
Message sent event.
Definition types.h:42
@ SOCK_ASYNC_PATH_PROP
Path property changed event.
Definition types.h:43
@ SOCK_ASYNC_CONN_RDY
Connection ready event.
Definition types.h:38
@ SOCK_ASYNC_CONN_FIN
Connection finished event.
Definition types.h:39
@ SOCK_ASYNC_CONN_RECV
Listener received connection event.
Definition types.h:40
Type definitions for asynchronous socks with Event Queue.
tinydtls-specific types and functions definitions
Information about DTLS sock.
Raw IP sock type.
Definition sock_types.h:91
uint16_t flags
option flags
Definition sock_types.h:129
TCP queue type.
Definition sock_types.h:114
TCP sock type.
Definition sock_types.h:101
UDP sock type.
Definition sock_types.h:128
uint16_t flags
option flags
Definition sock_types.h:140