Changeset 6e88fea in mainline
- Timestamp:
- 2011-10-24T05:28:31Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2a3214e
- Parents:
- 6df418c4
- Location:
- uspace/srv/net/tl/tcp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/conn.c
r6df418c4 r6e88fea 120 120 } 121 121 122 /** Delist connection. 123 * 124 * Remove connection from the connection map. 125 */ 126 void tcp_conn_remove(tcp_conn_t *conn) 127 { 128 list_remove(&conn->link); 129 } 130 122 131 /** Synchronize connection. 123 132 * … … 150 159 break; 151 160 case st_close_wait: 152 log_msg(LVL_DEBUG, "FIN sent -> Close-Wait");161 log_msg(LVL_DEBUG, "FIN sent -> Last-Ack"); 153 162 conn->cstate = st_last_ack; 154 163 break; … … 596 605 return cp_done; 597 606 598 /* TODO */ 607 if (conn->fin_is_acked) { 608 log_msg(LVL_DEBUG, " FIN acked -> Closed"); 609 tcp_conn_remove(conn); 610 conn->cstate = st_closed; 611 return cp_done; 612 } 613 599 614 return cp_continue; 600 615 } … … 762 777 if (tcp_segment_text_size(seg) == 0 && (seg->ctrl & CTL_FIN) != 0) { 763 778 log_msg(LVL_DEBUG, " - FIN found in segment."); 779 780 /* Send ACK */ 781 tcp_tqueue_ctrl_seg(conn, CTL_ACK); 764 782 765 783 conn->rcv_nxt++; -
uspace/srv/net/tl/tcp/conn.h
r6df418c4 r6e88fea 40 40 41 41 extern tcp_conn_t *tcp_conn_new(tcp_sock_t *, tcp_sock_t *); 42 void tcp_conn_add(tcp_conn_t *); 42 extern void tcp_conn_add(tcp_conn_t *); 43 extern void tcp_conn_remove(tcp_conn_t *); 43 44 extern void tcp_conn_sync(tcp_conn_t *); 44 45 extern void tcp_conn_fin_sent(tcp_conn_t *); -
uspace/srv/net/tl/tcp/test.c
r6df418c4 r6e88fea 73 73 } 74 74 75 async_usleep(1000*1000); 76 77 printf("test_srv() close connection\n"); 78 tcp_uc_close(conn); 79 75 80 printf("test_srv() terminating\n"); 76 81 }
Note:
See TracChangeset
for help on using the changeset viewer.