diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-06 16:10:26 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-06 16:10:26 -0600 |
commit | 02fcad9f51a6919c21ca44ed0c417446bb4082c9 (patch) | |
tree | 4f09be381f2f799ebf1fc98712c04efba831d3c0 /nuttx/net/tcp/tcp_conn.c | |
parent | 47df79c8e4a1ce4809f5213d63f7c26d4d8d9cb7 (diff) | |
download | px4-nuttx-02fcad9f51a6919c21ca44ed0c417446bb4082c9.tar.gz px4-nuttx-02fcad9f51a6919c21ca44ed0c417446bb4082c9.tar.bz2 px4-nuttx-02fcad9f51a6919c21ca44ed0c417446bb4082c9.zip |
NET: Rename TCP state values: UIP_ -> TCP_
Diffstat (limited to 'nuttx/net/tcp/tcp_conn.c')
-rw-r--r-- | nuttx/net/tcp/tcp_conn.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/nuttx/net/tcp/tcp_conn.c b/nuttx/net/tcp/tcp_conn.c index b7a4b1cee..2cfeb7e3d 100644 --- a/nuttx/net/tcp/tcp_conn.c +++ b/nuttx/net/tcp/tcp_conn.c @@ -186,7 +186,7 @@ void tcp_initialize(void) { /* Mark the connection closed and move it to the free list */ - g_tcp_connections[i].tcpstateflags = UIP_CLOSED; + g_tcp_connections[i].tcpstateflags = TCP_CLOSED; dq_addlast(&g_tcp_connections[i].node, &g_free_tcp_connections); } @@ -244,11 +244,11 @@ FAR struct tcp_conn_s *tcp_alloc(void) * in the socket layer. */ - if (tmp->tcpstateflags == UIP_CLOSING || - tmp->tcpstateflags == UIP_FIN_WAIT_1 || - tmp->tcpstateflags == UIP_FIN_WAIT_2 || - tmp->tcpstateflags == UIP_TIME_WAIT || - tmp->tcpstateflags == UIP_LAST_ACK) + if (tmp->tcpstateflags == TCP_CLOSING || + tmp->tcpstateflags == TCP_FIN_WAIT_1 || + tmp->tcpstateflags == TCP_FIN_WAIT_2 || + tmp->tcpstateflags == TCP_TIME_WAIT || + tmp->tcpstateflags == TCP_LAST_ACK) { /* Yes.. Is it the oldest one we have seen so far? */ @@ -300,7 +300,7 @@ FAR struct tcp_conn_s *tcp_alloc(void) if (conn) { memset(conn, 0, sizeof(struct tcp_conn_s)); - conn->tcpstateflags = UIP_ALLOCATED; + conn->tcpstateflags = TCP_ALLOCATED; } return conn; @@ -342,11 +342,11 @@ void tcp_free(FAR struct tcp_conn_s *conn) tcp_callback_free(conn, cb); } - /* UIP_ALLOCATED means that that the connection is not in the active list + /* TCP_ALLOCATED means that that the connection is not in the active list * yet. */ - if (conn->tcpstateflags != UIP_ALLOCATED) + if (conn->tcpstateflags != TCP_ALLOCATED) { /* Remove the connection from the active list */ @@ -393,7 +393,7 @@ void tcp_free(FAR struct tcp_conn_s *conn) /* Mark the connection available and put it into the free list */ - conn->tcpstateflags = UIP_CLOSED; + conn->tcpstateflags = TCP_CLOSED; dq_addlast(&conn->node, &g_free_tcp_connections); net_unlock(flags); } @@ -419,7 +419,7 @@ FAR struct tcp_conn_s *tcp_active(struct tcp_iphdr_s *buf) { /* Find an open connection matching the tcp input */ - if (conn->tcpstateflags != UIP_CLOSED && + if (conn->tcpstateflags != TCP_CLOSED && buf->destport == conn->lport && buf->srcport == conn->rport && net_ipaddr_cmp(srcipaddr, conn->ripaddr)) { @@ -484,7 +484,7 @@ FAR struct tcp_conn_s *tcp_listener(uint16_t portno) for (i = 0; i < CONFIG_NET_TCP_CONNS; i++) { conn = &g_tcp_connections[i]; - if (conn->tcpstateflags != UIP_CLOSED && conn->lport == portno) + if (conn->tcpstateflags != TCP_CLOSED && conn->lport == portno) { /* The port number is in use, return the connection */ @@ -524,7 +524,7 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct tcp_iphdr_s *buf) conn->rport = buf->srcport; conn->mss = TCP_INITIAL_MSS; net_ipaddr_copy(conn->ripaddr, net_ip4addr_conv32(buf->srcipaddr)); - conn->tcpstateflags = UIP_SYN_RCVD; + conn->tcpstateflags = TCP_SYN_RCVD; tcp_initsequence(conn->sndseq); conn->unacked = 1; @@ -647,12 +647,12 @@ int tcp_connect(FAR struct tcp_conn_s *conn, net_lock_t flags; int port; - /* The connection is expected to be in the UIP_ALLOCATED state.. i.e., + /* The connection is expected to be in the TCP_ALLOCATED state.. i.e., * allocated via up_tcpalloc(), but not yet put into the active connections * list. */ - if (!conn || conn->tcpstateflags != UIP_ALLOCATED) + if (!conn || conn->tcpstateflags != TCP_ALLOCATED) { return -EISCONN; } @@ -672,7 +672,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, /* Initialize and return the connection structure, bind it to the port number */ - conn->tcpstateflags = UIP_SYN_SENT; + conn->tcpstateflags = TCP_SYN_SENT; tcp_initsequence(conn->sndseq); conn->mss = TCP_INITIAL_MSS; |