1 / 23

Implementation of TCP over UDP

Implementation of TCP over UDP. Team : Fortworth Piyush Patel Hiren Bhorania Dhiwakar Mani Ketan Nawal. Agenda. Introduction Server design Concurrency Flow Reliability Test cases. Goal. Provide a TCP like 207 layer over the UDP protocol

iola-wilcox
Download Presentation

Implementation of TCP over 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. Implementation of TCP over UDP Team : Fortworth Piyush Patel Hiren Bhorania Dhiwakar Mani Ketan Nawal

  2. Agenda • Introduction • Server design • Concurrency • Flow • Reliability • Test cases

  3. Goal • Provide a TCP like 207 layer over the UDP protocol • Implement TCP like 207 protocol to develop 207 Server which provides TCP like functionalities • Provide application on top of 207 layer

  4. Features • Packet Generator • Packet Parser • Connection Management • Data transfer • Reliability • Flow control • Error control • Concurrency • Application

  5. Server Design • Multi threaded Server • Descriptor table • Master handles incoming packets • Message queues for each child thread • Packets get buffered in child’s queue • Child thread waits for packet in its queue

  6. Concurrency

  7. Q Q Q 207 Server Descriptor table Master Slave 1 Slave 1 Slave 1 Concurrency (Cont…)

  8. Connection establishment

  9. Data transfer and connection termination • Master thread handles and check initial packet • Slave thread completes handshaking and handles data transfer and connection termination • Master remove the thread after completion and free the resources • Four way teardown

  10. Packet Generator • Single function to prepare outgoing data • Set the flags of the header • Append data to it, if any • Append pseudo header to it • Calculate checksum • Remove pseudo header • Print the segment

  11. Packet Parser • Single function to check on incoming data • Check on the flags of the header • Calculate checksum • Compare checksum • Print the segment • Separate data from header

  12. Error Control • Checksum • Scenario

  13. Error control (Cont…) • Psuedo header format • typedef struct {    uint32_t src_adr;    uint32_t dst_adr;        uint16_t offset : 8,               protocol : 8;        uint16_t hlen;    }PSEUDO207;

  14. Flow Control • Basic windowing • Check incoming window size • Set proper outgoing window size • Server advertise the window size first • Server set outgoing buffer according to client’s window • Same procedure is followed at client side • Sequencing • Check sequence number and update entries in TCB • If out of sequence packet arrives in data transfer then send the ACK again

  15. Logging • Log file for each session • Logging capability for each incoming and outgoing packet • Logging in a text file • Log error messages and connection state

  16. Test cases

  17. Test Case - 1 SERVER CLIENT SYN SYN-ACK SYN RST

  18. Test Case - 2 CLIENT SERVER Data Transfer SYN RST

  19. Test Case - 3 SERVER CLIENT All Flags ON RST

  20. Test Case - 4 SERVER CLIENT Not SYN packet RST

  21. Test Case - 5 CLIENT SERVER SYN 1 SYN 2 SYN 3 SYN 4 SYN 10 SYN 11 Drop

  22. Reference • RFC 793 • http://www.unpbook.com/unpv13e.tar.gz • https://computing.llnl.gov/tutorials/pthreads/

  23. Thank You

More Related