summaryrefslogtreecommitdiff
path: root/nuttx/net/tcp
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-06 17:22:02 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-06 17:22:02 -0600
commitde7f2c8553da00529baa9ba6d2faaf7721d0506d (patch)
tree3359191c655307f23ecdd5b46dbf3f5bbcbb486e /nuttx/net/tcp
parent13df5a4fc813c0744f78d40fed3c1e36485fe5a6 (diff)
downloadpx4-nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.tar.gz
px4-nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.tar.bz2
px4-nuttx-de7f2c8553da00529baa9ba6d2faaf7721d0506d.zip
NET: Rename network interrupt event flags more appropriately: TCP_, UDP_, ICMP_, or PKT_ vs UIP_
Diffstat (limited to 'nuttx/net/tcp')
-rw-r--r--nuttx/net/tcp/tcp.h14
-rw-r--r--nuttx/net/tcp/tcp_appsend.c6
-rw-r--r--nuttx/net/tcp/tcp_callback.c32
-rw-r--r--nuttx/net/tcp/tcp_input.c54
-rw-r--r--nuttx/net/tcp/tcp_listen.c2
-rw-r--r--nuttx/net/tcp/tcp_poll.c2
-rw-r--r--nuttx/net/tcp/tcp_send_buffered.c16
-rw-r--r--nuttx/net/tcp/tcp_send_unbuffered.c13
-rw-r--r--nuttx/net/tcp/tcp_timer.c10
9 files changed, 75 insertions, 74 deletions
diff --git a/nuttx/net/tcp/tcp.h b/nuttx/net/tcp/tcp.h
index d9bb586cc..a9aefbec4 100644
--- a/nuttx/net/tcp/tcp.h
+++ b/nuttx/net/tcp/tcp.h
@@ -183,18 +183,18 @@ struct tcp_conn_s
* When an callback is executed from 'list', the input flags are normally
* returned, however, the implementation may set one of the following:
*
- * UIP_CLOSE - Gracefully close the current connection
- * UIP_ABORT - Abort (reset) the current connection on an error that
- * prevents UIP_CLOSE from working.
+ * TCP_CLOSE - Gracefully close the current connection
+ * TCP_ABORT - Abort (reset) the current connection on an error that
+ * prevents TCP_CLOSE from working.
*
* And/Or set/clear the following:
*
- * UIP_NEWDATA - May be cleared to indicate that the data was consumed
+ * TCP_NEWDATA - May be cleared to indicate that the data was consumed
* and that no further process of the new data should be
* attempted.
- * UIP_SNDACK - If UIP_NEWDATA is cleared, then UIP_SNDACK may be set
+ * TCP_SNDACK - If TCP_NEWDATA is cleared, then TCP_SNDACK may be set
* to indicate that an ACK should be included in the response.
- * (In UIP_NEWDATA is cleared bu UIP_SNDACK is not set, then
+ * (In TCP_NEWDATA is cleared bu TCP_SNDACK is not set, then
* dev->d_len should also be cleared).
*/
@@ -757,7 +757,7 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
* zero or equal to buflen; partial packets are not buffered.
*
* Assumptions:
- * - The caller has checked that UIP_NEWDATA is set in flags and that is no
+ * - The caller has checked that TCP_NEWDATA is set in flags and that is no
* other handler available to process the incoming data.
* - This function is called at the interrupt level with interrupts disabled.
*
diff --git a/nuttx/net/tcp/tcp_appsend.c b/nuttx/net/tcp/tcp_appsend.c
index 49702ffb9..1d1670ca8 100644
--- a/nuttx/net/tcp/tcp_appsend.c
+++ b/nuttx/net/tcp/tcp_appsend.c
@@ -106,7 +106,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
/* Check for connection aborted */
- if ((result & UIP_ABORT) != 0)
+ if ((result & TCP_ABORT) != 0)
{
dev->d_sndlen = 0;
conn->tcpstateflags = TCP_CLOSED;
@@ -117,7 +117,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
/* Check for connection closed */
- else if ((result & UIP_CLOSE) != 0)
+ else if ((result & TCP_CLOSE) != 0)
{
conn->tcpstateflags = TCP_FIN_WAIT_1;
conn->unacked = 1;
@@ -209,7 +209,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
/* If there is no data to send, just send out a pure ACK if one is requested`. */
- else if ((result & UIP_SNDACK) != 0)
+ else if ((result & TCP_SNDACK) != 0)
{
tcp_send(dev, conn, TCP_ACK, IPTCP_HDRLEN);
}
diff --git a/nuttx/net/tcp/tcp_callback.c b/nuttx/net/tcp/tcp_callback.c
index 37a67cde5..ece5d87ab 100644
--- a/nuttx/net/tcp/tcp_callback.c
+++ b/nuttx/net/tcp/tcp_callback.c
@@ -68,7 +68,7 @@
* listener in place ready to receive the data.
*
* Assumptions:
- * - The caller has checked that UIP_NEWDATA is set in flags and that is no
+ * - The caller has checked that TCP_NEWDATA is set in flags and that is no
* other handler available to process the incoming data.
* - This function is called at the interrupt level with interrupts disabled.
*
@@ -84,10 +84,10 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
* placed in the read-ahead buffer -OR- if it zero length
*/
- ret = (flags & ~UIP_NEWDATA) | UIP_SNDACK;
+ ret = (flags & ~TCP_NEWDATA) | TCP_SNDACK;
/* Is there new data? With non-zero length? (Certain connection events
- * can have zero-length with UIP_NEWDATA set just to cause an ACK).
+ * can have zero-length with TCP_NEWDATA set just to cause an ACK).
*/
if (dev->d_len > 0)
@@ -119,9 +119,9 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
g_netstats.tcp.syndrop++;
g_netstats.tcp.drop++;
#endif
- /* Clear the UIP_SNDACK bit so that no ACK will be sent */
+ /* Clear the TCP_SNDACK bit so that no ACK will be sent */
- ret &= ~UIP_SNDACK;
+ ret &= ~TCP_SNDACK;
}
}
@@ -149,9 +149,9 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
uint16_t tcp_callback(FAR struct net_driver_s *dev,
FAR struct tcp_conn_s *conn, uint16_t flags)
{
- /* Preserve the UIP_ACKDATA, UIP_CLOSE, and UIP_ABORT in the response.
+ /* Preserve the TCP_ACKDATA, TCP_CLOSE, and TCP_ABORT in the response.
* These is needed by uIP to handle responses and buffer state. The
- * UIP_NEWDATA indication will trigger the ACK response, but must be
+ * TCP_NEWDATA indication will trigger the ACK response, but must be
* explicitly set in the callback.
*/
@@ -161,18 +161,18 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
* the input flags are normally returned, however, the implementation
* may set one of the following:
*
- * UIP_CLOSE - Gracefully close the current connection
- * UIP_ABORT - Abort (reset) the current connection on an error that
- * prevents UIP_CLOSE from working.
+ * TCP_CLOSE - Gracefully close the current connection
+ * TCP_ABORT - Abort (reset) the current connection on an error that
+ * prevents TCP_CLOSE from working.
*
* And/Or set/clear the following:
*
- * UIP_NEWDATA - May be cleared to indicate that the data was consumed
+ * TCP_NEWDATA - May be cleared to indicate that the data was consumed
* and that no further process of the new data should be
* attempted.
- * UIP_SNDACK - If UIP_NEWDATA is cleared, then UIP_SNDACK may be set
+ * TCP_SNDACK - If TCP_NEWDATA is cleared, then TCP_SNDACK may be set
* to indicate that an ACK should be included in the response.
- * (In UIP_NEWDATA is cleared but UIP_SNDACK is not set, then
+ * (In TCP_NEWDATA is cleared but TCP_SNDACK is not set, then
* dev->d_len should also be cleared).
*/
@@ -185,7 +185,7 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
* be re-transmitted at a better time.
*/
- if ((flags & UIP_NEWDATA) != 0)
+ if ((flags & TCP_NEWDATA) != 0)
{
/* Data was not handled.. dispose of it appropriately */
@@ -196,7 +196,7 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
* callback.
*/
- if (((flags & UIP_CONN_EVENTS) != 0) && conn->connection_event)
+ if (((flags & TCP_CONN_EVENTS) != 0) && conn->connection_event)
{
/* Perform the callback */
@@ -226,7 +226,7 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
* zero or equal to buflen; partial packets are not buffered.
*
* Assumptions:
- * - The caller has checked that UIP_NEWDATA is set in flags and that is no
+ * - The caller has checked that TCP_NEWDATA is set in flags and that is no
* other handler available to process the incoming data.
* - This function is called at the interrupt level with interrupts disabled.
*
diff --git a/nuttx/net/tcp/tcp_input.c b/nuttx/net/tcp/tcp_input.c
index 08547c61b..c84777c39 100644
--- a/nuttx/net/tcp/tcp_input.c
+++ b/nuttx/net/tcp/tcp_input.c
@@ -309,7 +309,7 @@ found:
conn->tcpstateflags = TCP_CLOSED;
nlldbg("RESET - TCP state: TCP_CLOSED\n");
- (void)tcp_callback(dev, conn, UIP_ABORT);
+ (void)tcp_callback(dev, conn, TCP_ABORT);
goto drop;
}
@@ -435,7 +435,7 @@ found:
/* Set the acknowledged flag. */
- flags |= UIP_ACKDATA;
+ flags |= TCP_ACKDATA;
/* Reset the retransmission timer. */
@@ -455,11 +455,11 @@ found:
case TCP_SYN_RCVD:
/* In SYN_RCVD we have sent out a SYNACK in response to a SYN, and
* we are waiting for an ACK that acknowledges the data we sent
- * out the last time. Therefore, we want to have the UIP_ACKDATA
+ * out the last time. Therefore, we want to have the TCP_ACKDATA
* flag set. If so, we enter the ESTABLISHED state.
*/
- if ((flags & UIP_ACKDATA) != 0)
+ if ((flags & TCP_ACKDATA) != 0)
{
conn->tcpstateflags = TCP_ESTABLISHED;
@@ -469,12 +469,12 @@ found:
conn->sent = 0;
#endif
conn->unacked = 0;
- flags = UIP_CONNECTED;
+ flags = TCP_CONNECTED;
nllvdbg("TCP state: TCP_ESTABLISHED\n");
if (dev->d_len > 0)
{
- flags |= UIP_NEWDATA;
+ flags |= TCP_NEWDATA;
net_incr32(conn->rcvseq, dev->d_len);
}
@@ -501,7 +501,7 @@ found:
* state.
*/
- if ((flags & UIP_ACKDATA) != 0 && (pbuf->flags & TCP_CTL) == (TCP_SYN | TCP_ACK))
+ if ((flags & TCP_ACKDATA) != 0 && (pbuf->flags & TCP_CTL) == (TCP_SYN | TCP_ACK))
{
/* Parse the TCP MSS option, if present. */
@@ -569,14 +569,14 @@ found:
dev->d_sndlen = 0;
nllvdbg("TCP state: TCP_ESTABLISHED\n");
- result = tcp_callback(dev, conn, UIP_CONNECTED | UIP_NEWDATA);
+ result = tcp_callback(dev, conn, TCP_CONNECTED | TCP_NEWDATA);
tcp_appsend(dev, conn, result);
return;
}
/* Inform the application that the connection failed */
- (void)tcp_callback(dev, conn, UIP_ABORT);
+ (void)tcp_callback(dev, conn, TCP_ABORT);
/* The connection is closed after we send the RST */
@@ -595,7 +595,7 @@ found:
case TCP_ESTABLISHED:
/* In the ESTABLISHED state, we call upon the application to feed
- * data into the d_buf. If the UIP_ACKDATA flag is set, the
+ * data into the d_buf. If the TCP_ACKDATA flag is set, the
* application should put new data into the buffer, otherwise we are
* retransmitting an old segment, and the application should put that
* data into the buffer.
@@ -625,11 +625,11 @@ found:
*/
net_incr32(conn->rcvseq, dev->d_len + 1);
- flags |= UIP_CLOSE;
+ flags |= TCP_CLOSE;
if (dev->d_len > 0)
{
- flags |= UIP_NEWDATA;
+ flags |= TCP_NEWDATA;
}
(void)tcp_callback(dev, conn, flags);
@@ -673,20 +673,20 @@ found:
}
/* If d_len > 0 we have TCP data in the packet, and we flag this
- * by setting the UIP_NEWDATA flag. If the application has stopped
+ * by setting the TCP_NEWDATA flag. If the application has stopped
* the data flow using TCP_STOPPED, we must not accept any data
* packets from the remote host.
*/
if (dev->d_len > 0 && (conn->tcpstateflags & TCP_STOPPED) == 0)
{
- flags |= UIP_NEWDATA;
+ flags |= TCP_NEWDATA;
}
/* If this packet constitutes an ACK for outstanding data (flagged
- * by the UIP_ACKDATA flag), we should call the application since it
+ * by the TCP_ACKDATA flag), we should call the application since it
* might want to send more data. If the incoming packet had data
- * from the peer (as flagged by the UIP_NEWDATA flag), the
+ * from the peer (as flagged by the TCP_NEWDATA flag), the
* application must also be notified.
*
* When the application is called, the d_len field
@@ -701,7 +701,7 @@ found:
* send, d_len must be set to 0.
*/
- if ((flags & (UIP_NEWDATA | UIP_ACKDATA)) != 0)
+ if ((flags & (TCP_NEWDATA | TCP_ACKDATA)) != 0)
{
/* Clear sndlen and remember the size in d_len. The application
* may modify d_len and we will need this value later when we
@@ -716,12 +716,12 @@ found:
result = tcp_callback(dev, conn, flags);
/* If the application successfully handled the incoming data,
- * then UIP_SNDACK will be set in the result. In this case,
+ * then TCP_SNDACK will be set in the result. In this case,
* we need to update the sequence number. The ACK will be
* send by tcp_appsend().
*/
- if ((result & UIP_SNDACK) != 0)
+ if ((result & TCP_SNDACK) != 0)
{
/* Update the sequence number using the saved length */
@@ -738,15 +738,15 @@ found:
case TCP_LAST_ACK:
/* We can close this connection if the peer has acknowledged our
- * FIN. This is indicated by the UIP_ACKDATA flag.
+ * FIN. This is indicated by the TCP_ACKDATA flag.
*/
- if ((flags & UIP_ACKDATA) != 0)
+ if ((flags & TCP_ACKDATA) != 0)
{
conn->tcpstateflags = TCP_CLOSED;
nllvdbg("TCP_LAST_ACK TCP state: TCP_CLOSED\n");
- (void)tcp_callback(dev, conn, UIP_CLOSE);
+ (void)tcp_callback(dev, conn, TCP_CLOSE);
}
break;
@@ -763,7 +763,7 @@ found:
if ((pbuf->flags & TCP_FIN) != 0)
{
- if ((flags & UIP_ACKDATA) != 0)
+ if ((flags & TCP_ACKDATA) != 0)
{
conn->tcpstateflags = TCP_TIME_WAIT;
conn->timer = 0;
@@ -777,11 +777,11 @@ found:
}
net_incr32(conn->rcvseq, 1);
- (void)tcp_callback(dev, conn, UIP_CLOSE);
+ (void)tcp_callback(dev, conn, TCP_CLOSE);
tcp_send(dev, conn, TCP_ACK, IPTCP_HDRLEN);
return;
}
- else if ((flags & UIP_ACKDATA) != 0)
+ else if ((flags & TCP_ACKDATA) != 0)
{
conn->tcpstateflags = TCP_FIN_WAIT_2;
conn->unacked = 0;
@@ -810,7 +810,7 @@ found:
nllvdbg("TCP state: TCP_TIME_WAIT\n");
net_incr32(conn->rcvseq, 1);
- (void)tcp_callback(dev, conn, UIP_CLOSE);
+ (void)tcp_callback(dev, conn, TCP_CLOSE);
tcp_send(dev, conn, TCP_ACK, IPTCP_HDRLEN);
return;
}
@@ -828,7 +828,7 @@ found:
return;
case TCP_CLOSING:
- if ((flags & UIP_ACKDATA) != 0)
+ if ((flags & TCP_ACKDATA) != 0)
{
conn->tcpstateflags = TCP_TIME_WAIT;
conn->timer = 0;
diff --git a/nuttx/net/tcp/tcp_listen.c b/nuttx/net/tcp/tcp_listen.c
index a62e628dc..dbe56b9f2 100644
--- a/nuttx/net/tcp/tcp_listen.c
+++ b/nuttx/net/tcp/tcp_listen.c
@@ -279,7 +279,7 @@ int tcp_accept_connection(FAR struct net_driver_s *dev,
ret = tcp_backlogadd(listener, conn);
if (ret == OK)
{
- (void)tcp_callback(dev, listener, UIP_BACKLOG);
+ (void)tcp_callback(dev, listener, TCP_BACKLOG);
}
}
#endif
diff --git a/nuttx/net/tcp/tcp_poll.c b/nuttx/net/tcp/tcp_poll.c
index 4899e47d4..ad1012970 100644
--- a/nuttx/net/tcp/tcp_poll.c
+++ b/nuttx/net/tcp/tcp_poll.c
@@ -111,7 +111,7 @@ void tcp_poll(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn)
/* Perform the callback */
- result = tcp_callback(dev, conn, UIP_POLL);
+ result = tcp_callback(dev, conn, TCP_POLL);
/* Handle the callback response */
diff --git a/nuttx/net/tcp/tcp_send_buffered.c b/nuttx/net/tcp/tcp_send_buffered.c
index cdce9ddd6..bb0eb729f 100644
--- a/nuttx/net/tcp/tcp_send_buffered.c
+++ b/nuttx/net/tcp/tcp_send_buffered.c
@@ -199,7 +199,7 @@ static inline void psock_lost_connection(FAR struct socket *psock,
*
* Description:
* This function is called from the interrupt level to perform the actual
- * send operation when polled by the uIP layer.
+ * send operation when polled by the lower, device interfacing layer.
*
* Parameters:
* dev The structure of the network driver that caused the interrupt
@@ -227,7 +227,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
* acknowledged bytes.
*/
- if ((flags & UIP_ACKDATA) != 0)
+ if ((flags & TCP_ACKDATA) != 0)
{
FAR struct tcp_wrbuffer_s *wrb;
FAR sq_entry_t *entry;
@@ -346,7 +346,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
/* Check for a loss of connection */
- else if ((flags & (UIP_CLOSE | UIP_ABORT | UIP_TIMEDOUT)) != 0)
+ else if ((flags & (TCP_CLOSE | TCP_ABORT | TCP_TIMEDOUT)) != 0)
{
nllvdbg("Lost connection: %04x\n", flags);
@@ -362,7 +362,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
/* Check if we are being asked to retransmit data */
- else if ((flags & UIP_REXMIT) != 0)
+ else if ((flags & TCP_REXMIT) != 0)
{
FAR struct tcp_wrbuffer_s *wrb;
FAR sq_entry_t *entry;
@@ -527,7 +527,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
*/
if ((conn->tcpstateflags & TCP_ESTABLISHED) &&
- (flags & (UIP_POLL | UIP_REXMIT)) &&
+ (flags & (TCP_POLL | TCP_REXMIT)) &&
!(sq_empty(&conn->write_q)))
{
/* Check if the destination IP address is in the ARP table. If not,
@@ -648,7 +648,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
* tell the caller stop polling the other connection.
*/
- flags &= ~UIP_POLL;
+ flags &= ~TCP_POLL;
}
}
@@ -774,8 +774,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf,
/* Set up the callback in the connection */
- psock->s_sndcb->flags = (UIP_ACKDATA | UIP_REXMIT |UIP_POLL | \
- UIP_CLOSE | UIP_ABORT | UIP_TIMEDOUT);
+ psock->s_sndcb->flags = (TCP_ACKDATA | TCP_REXMIT | TCP_POLL |
+ TCP_CLOSE | TCP_ABORT | TCP_TIMEDOUT);
psock->s_sndcb->priv = (void*)psock;
psock->s_sndcb->event = psock_send_interrupt;
diff --git a/nuttx/net/tcp/tcp_send_unbuffered.c b/nuttx/net/tcp/tcp_send_unbuffered.c
index aaa19c74c..aa5f87413 100644
--- a/nuttx/net/tcp/tcp_send_unbuffered.c
+++ b/nuttx/net/tcp/tcp_send_unbuffered.c
@@ -148,7 +148,7 @@ static inline int send_timeout(FAR struct send_s *pstate)
*
* Description:
* This function is called from the interrupt level to perform the actual
- * send operation when polled by the uIP layer.
+ * send operation when polled by the lower, device interfacing layer.
*
* Parameters:
* dev The structure of the network driver that caused the interrupt
@@ -177,7 +177,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
* acknowledged bytes.
*/
- if ((flags & UIP_ACKDATA) != 0)
+ if ((flags & TCP_ACKDATA) != 0)
{
/* Update the timeout */
@@ -211,7 +211,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
/* Check if we are being asked to retransmit data */
- else if ((flags & UIP_REXMIT) != 0)
+ else if ((flags & TCP_REXMIT) != 0)
{
/* Yes.. in this case, reset the number of bytes that have been sent
* to the number of bytes that have been ACKed.
@@ -232,7 +232,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
/* Check for a loss of connection */
- else if ((flags & (UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT)) != 0)
+ else if ((flags & (TCP_CLOSE | TCP_ABORT | TCP_TIMEDOUT)) != 0)
{
/* Report not connected */
@@ -264,7 +264,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
* next polling cycle.
*/
- if ((flags & UIP_NEWDATA) == 0 && pstate->snd_sent < pstate->snd_buflen)
+ if ((flags & TCP_NEWDATA) == 0 && pstate->snd_sent < pstate->snd_buflen)
{
uint32_t seqno;
@@ -571,7 +571,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock,
#endif
/* Set up the callback in the connection */
- state.snd_cb->flags = UIP_ACKDATA|UIP_REXMIT|UIP_POLL|UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT;
+ state.snd_cb->flags = (TCP_ACKDATA | TCP_REXMIT | TCP_POLL |
+ TCP_CLOSE | TCP_ABORT | TCP_TIMEDOUT);
state.snd_cb->priv = (void*)&state;
state.snd_cb->event = tcpsend_interrupt;
diff --git a/nuttx/net/tcp/tcp_timer.c b/nuttx/net/tcp/tcp_timer.c
index 2109f33c5..0a10fffbf 100644
--- a/nuttx/net/tcp/tcp_timer.c
+++ b/nuttx/net/tcp/tcp_timer.c
@@ -130,7 +130,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
/* Notify upper layers about the timeout */
- result = tcp_callback(dev, conn, UIP_TIMEDOUT);
+ result = tcp_callback(dev, conn, TCP_TIMEDOUT);
nllvdbg("TCP state: TCP_CLOSED\n");
}
@@ -174,12 +174,12 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
conn->tcpstateflags = TCP_CLOSED;
nllvdbg("TCP state: TCP_CLOSED\n");
- /* We call tcp_callback() with UIP_TIMEDOUT to
+ /* We call tcp_callback() with TCP_TIMEDOUT to
* inform the application that the connection has
* timed out.
*/
- result = tcp_callback(dev, conn, UIP_TIMEDOUT);
+ result = tcp_callback(dev, conn, TCP_TIMEDOUT);
/* We also send a reset packet to the remote host. */
@@ -225,7 +225,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
* the code for sending out the packet.
*/
- result = tcp_callback(dev, conn, UIP_REXMIT);
+ result = tcp_callback(dev, conn, TCP_REXMIT);
tcp_rexmit(dev, conn, result);
goto done;
@@ -248,7 +248,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
* application for new data.
*/
- result = tcp_callback(dev, conn, UIP_POLL);
+ result = tcp_callback(dev, conn, TCP_POLL);
tcp_appsend(dev, conn, result);
goto done;
}