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:
Gregory Nutt
2015-01-30 07:25:01 -06:00
parent de91d34a19
commit 5736cf10af
4 changed files with 52 additions and 322 deletions

View File

@@ -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
}