mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
NET: Rename network interrupt event flags more appropriately: TCP_, UDP_, ICMP_, or PKT_ vs UIP_
This commit is contained in:
+3
-3
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user