NET: Rename network interrupt event flags more appropriately: TCP_, UDP_, ICMP_, or PKT_ vs UIP_

This commit is contained in:
Gregory Nutt
2014-07-06 17:22:02 -06:00
parent a251259f90
commit 73f3ecf7e2
25 changed files with 234 additions and 208 deletions
+3 -3
View File
@@ -114,13 +114,13 @@ int pkt_input(struct net_driver_s *dev)
/* Perform the application callback */
flags = pkt_callback(dev, conn, UIP_NEWDATA);
flags = pkt_callback(dev, conn, PKT_NEWDATA);
/* If the operation was successful, the UIP_NEWDATA flag is removed
/* If the operation was successful, the PKT_NEWDATA flag is removed
* and thus the packet can be deleted (OK will be returned).
*/
if ((flags & UIP_NEWDATA) != 0)
if ((flags & PKT_NEWDATA) != 0)
{
/* No.. the packet was not processed now. Return ERROR so
* that the driver may retry again later.
+1 -1
View File
@@ -110,7 +110,7 @@ void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn)
/* Perform the application callback */
(void)pkt_callback(dev, conn, UIP_POLL);
(void)pkt_callback(dev, conn, PKT_POLL);
/* If the application has data to send, setup the UDP/IP header */
+2 -2
View File
@@ -107,7 +107,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
* we will just have to wait for the next polling cycle.
*/
if (dev->d_sndlen > 0 || (flags & UIP_NEWDATA) != 0)
if (dev->d_sndlen > 0 || (flags & PKT_NEWDATA) != 0)
{
/* Another thread has beat us sending data or the buffer is busy,
* Check for a timeout. If not timed out, wait for the next
@@ -251,7 +251,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf,
/* Set up the callback in the connection */
state.snd_cb->flags = UIP_POLL;
state.snd_cb->flags = PKT_POLL;
state.snd_cb->priv = (void*)&state;
state.snd_cb->event = psock_send_interrupt;