1 /*
2  * Copyright (c) 2024 Nordic Semiconductor
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_INCLUDE_NET_SOCKET_POLL_H_
8 #define ZEPHYR_INCLUDE_NET_SOCKET_POLL_H_
9 
10 #include <zephyr/sys/fdtable.h>
11 
12 /* Setting for pollfd to avoid circular inclusion */
13 
14 /**
15  * @brief BSD Sockets compatible API
16  * @defgroup bsd_sockets BSD Sockets compatible API
17  * @ingroup networking
18  * @{
19  */
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #ifdef __DOXYGEN__
26 /**
27  * @brief Definition of the monitored socket/file descriptor.
28  *
29  * An array of these descriptors is passed as an argument to poll().
30  */
31 struct zsock_pollfd {
32 	int fd;        /**< Socket descriptor */
33 	short events;  /**< Requested events */
34 	short revents; /**< Returned events */
35 };
36 #else
37 #define zsock_pollfd zvfs_pollfd
38 #endif
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 /**
45  * @}
46  */
47 
48 #endif /* ZEPHYR_INCLUDE_NET_SOCKET_POLL_H_ */
49