UDP Networking: Add support for device event notification for UDP transfers.

This commit is contained in:
Gregory Nutt
2015-05-29 10:21:06 -06:00
parent e28a8b1416
commit e672bcebfd
5 changed files with 187 additions and 86 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ static uint16_t tcp_poll_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
/* Check for a loss of connection events. */
if ((flags & (TCP_CLOSE | TCP_ABORT | TCP_TIMEDOUT)) != 0)
if ((flags & (TCP_CLOSE | TCP_ABORT | TCP_TIMEDOUT | NETDEV_DOWN)) != 0)
{
/* Marki that the connection has been lost */
@@ -209,7 +209,7 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
*/
cb->flags = (TCP_NEWDATA | TCP_BACKLOG | TCP_POLL | TCP_CLOSE |
TCP_ABORT | TCP_TIMEDOUT);
TCP_ABORT | TCP_TIMEDOUT | NETDEV_DOWN);
cb->priv = (FAR void *)info;
cb->event = tcp_poll_interrupt;