mirror of
https://github.com/apache/nuttx.git
synced 2025-12-20 04:09:12 +08:00
Networking: Separate TCP poll logic out of net/sockets/net_poll.c and move it into the new net/tcp/tcp_netpoll.c.
This commit is contained in:
@@ -275,6 +275,7 @@ extern "C"
|
||||
|
||||
struct sockaddr; /* Forward reference */
|
||||
struct socket; /* Forward reference */
|
||||
struct pollfd; /* Forward reference */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tcp_initialize
|
||||
@@ -1063,6 +1064,46 @@ void tcp_wrbuffer_dump(FAR const char *msg, FAR struct tcp_wrbuffer_s *wrb,
|
||||
#endif
|
||||
#endif /* CONFIG_NET_TCP_WRITE_BUFFERS */
|
||||
|
||||
/****************************************************************************
|
||||
* Function: tcp_pollsetup
|
||||
*
|
||||
* Description:
|
||||
* Setup to monitor events on one TCP/IP socket
|
||||
*
|
||||
* Input Parameters:
|
||||
* psock - The TCP/IP socket of interest
|
||||
* fds - The structure describing the events to be monitored, OR NULL if
|
||||
* this is a request to stop monitoring events.
|
||||
*
|
||||
* Returned Value:
|
||||
* 0: Success; Negated errno on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_TCP_POLL
|
||||
int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Function: tcp_pollteardown
|
||||
*
|
||||
* Description:
|
||||
* Teardown monitoring of events on an TCP/IP socket
|
||||
*
|
||||
* Input Parameters:
|
||||
* psock - The TCP/IP socket of interest
|
||||
* fds - The structure describing the events to be monitored, OR NULL if
|
||||
* this is a request to stop monitoring events.
|
||||
*
|
||||
* Returned Value:
|
||||
* 0: Success; Negated errno on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_TCP_POLL
|
||||
int tcp_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user