1 / 11

STCP Implementation [TCP on UDP]

STCP Implementation [TCP on UDP]. 김 영 준 , 백 일 우. sbuf. rbuf. timer. Event Queue. Event Queue. timer. Design. Client. Server. data transport. Application. Application. file. file. STCP API. STCP API. APPLICATION Layer. data & control transport. Event Handler.

yael
Download Presentation

STCP Implementation [TCP on UDP]

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. STCP Implementation[TCP on UDP] 김 영 준 , 백 일 우

  2. sbuf rbuf timer Event Queue Event Queue timer Design Client Server data transport Application Application file file STCP API STCP API APPLICATION Layer data & control transport Event Handler Event Handler STCP Input STCP Output STCP Output STCP Input STCP Layer sendto() recvfrom() UDP Transport Layer recvfrom() sendto()

  3. Buffer Manager Header Header Data Data Data Size : MSS size Management File Read Buffer COPY COPY SendBuffer SEND

  4. Client stcp_send( ) Application file stcp_send( ) APPLICATION Layer Sbuf에 header 추가 server client sbuf Timer Start Event queue에 send request message input timer Event Queue Event Handler Timer start STCP Output을 통해 sendto( ) 호출 STCP Input STCP Output STCP Layer sendto() UDP Transport Layer recvfrom() Stcp_send( ) #1

  5. Client stcp_send( ) Application file stcp_send( ) APPLICATION Layer server client sbuf Timer Start Event queue에 recv request message input Timer Stop timer Event Queue Timer stop Event Handler STCP Output을 통해 sendto( ) 호출 Ack recv STCP Input STCP Output STCP Layer sendto() UDP Transport Layer recvfrom() Stcp_send( ) #2

  6. Server stcp_recv( ) Application file saved data stcp_recv( ) APPLICATION Layer server client rbuf delayed ACK Start recv request message input Event Queue timer Event Handler delayed ACK Timer start STCP Output STCP Input STCP Layer recvfrom() UDP Transport Layer sendto() Stcp_recv( ) #1

  7. Server stcp_recv( ) Application file stcp_recv( ) APPLICATION Layer server client rbuf delayed ACK Start send ACK message input delayed ACK Stop Event Queue timer Event Handler delayed ACK Timer stop STCP Output STCP Input STCP Layer recvfrom() UDP Transport Layer sendto() Stcp_recv( ) #2

  8. Client RTO timeout Application file stcp_send( ) APPLICATION Layer Sbuf에서 ACKed seq 다음 seq부터 전송 server client sbuf Event queue에 RTO timeout message input X TIMEOUT TIMER START timer Event Queue Time out 발생 현재 rto의 2배로 Timer start Event Handler STCP Output을 통해 sendto( ) 호출 STCP Input STCP Output STCP Layer sendto() UDP Transport Layer recvfrom() RTO timeout

  9. Expected Rcvd 2 Rcvd 1 Read Sliding Window Problem 1. Split A S W W A S & Split Situation S W A 2. Circular Acked Sent Written 3. What about Hole Should be spilt

  10. TCP STATE define // TCP STATE DEFINE #define STCPS_CLOSED 0 /* closed */ #define STCPS_LISTEN 1 /* listening for connection */ #define STCPS_SYN_SENT 2 /* active, have sent syn */ #define STCPS_SYN_RECEIVED 3 /* have sent and received syn */ #define STCPS_ESTABLISHED 4 /* established */ #define STCPS_CLOSE_WAIT 5 /* rcvd fin, waiting for close */ #define STCPS_FIN_WAIT_1 6 /* have closed, sent fin */ #define STCPS_CLOSING 7 /* closed xchd FIN, awaik ACK*/ #define STCPS_LAST_ACK 8 /* had fin and close; FIN ACK*/ #define STCPS_FIN_WAIT_2 9 /* have closed, fin is acked */ #define STCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */

  11. 느낀점 • Receiver는 데이터를 받을 때마다 버퍼에 저장 시, 데이터가 버퍼에 저장되었다고, EventQue에 그때마다 넣어주어야 할까? • 해결 => 한 묶음의 데이터가 올 것을 예상하여, Advertise Window가 mss 1개의 크기가 되었을 때, EventQue에 넣어주었음

More Related