COMP3331/9331 Computer Networks and ApplicationsAssignment for Term 1, 2024Version 1.0Due: 11:59am (noon) Thursday, 18 April 2024 (Week 10)1. Change LogVersion 1.0 released on 7th March 2024.2. Goal and learning objectivesFor this assignment, you are to implement a reliable transport protocol over the UDP protocol. Wewill refer to the reliable transport protocol that you will be implementing in this assignment asSimple Transport Protocol (STP). STP will include most (but not all) of the features that aredescribed in Sections 3.5.4 - 3.5.6 of the text Computer Networking by Kurose and Ross (7th or 8thed.) or equivalent parts from the Week 4/5 lecture notes. Examples of these features includetimeout, ACK, sequence numbers, sliding window, etc. Note that these features are commonlyfound in many transport protocols. Therefore, this assignment will give you an opportunity toimplement some of these basic features of a transport protocol. In addition, you may have wonderedwhy the designer of the TCP/IP protocol stack includes such a feature-less transport protocol asUDP. You will find in this assignment that you can design your own transport protocol and run itover UDP. This is the case for some multimedia delivery services on the Internet, where they haveimplemented their own proprietary transport protocol over UDP. QUIC, a newly proposed transportprotocol also runs over UDP and implements additional functionalities such as reliability.Recall that UDP provides point-to-point, unreliable datagram service between a pair of hosts. In thisprogramming assignment, you will develop a more structured protocol, STP, which ensuresreliable, end-to-end delivery of data in the face of packet loss. STP provides a byte-streamabstraction like TCP and sends pipelined data segments using a sliding window. However, STPdoes not implement congestion control or flow control. Finally, whereas TCP allows fullybidirectional communication, your implementation of STP will be asymmetric. There will be twodistinct STP endpoints, "sender" and "receiver", respectively. Data packets will only flow in the"forward" direction from the sender to the receiver, while acknowledgments will only flow in the"reverse" direction from the receiver back to the sender. To support reliability in a protocol likeSTP, state must be maintained at both endpoints. Thus, as in TCP, connection set-up and connectionteardown phases will be an integral part of the protocol. STP should implement a sliding windowprotocol wherein multiple segments can be sent by the sender in a pipelined manner. Like TCP,STP will include some elements of both Go-Back-N (GBN) and Selective Repeat (SR). You willuse your STP protocol to transfer a text file (examples provided on the assignment webpage) fromthe sender to the receiver.The sender program must also emulate the behaviour of an unreliable communication channelbetween the sender and receiver. Even though UDP segments can get lost, the likelihood of suchlosses is virtually zero in our test environment, where the sender and receiver will be executed onthe same machine. Further, to properly test the implementation of your sender program, we wouldlike to control the unreliable behaviour of the underlying channel. The sender program shouldUpdates to the assignment, including any corrections and clarifications, will be posted on thecourse website. Please make sure that you check the course website regularly for updates.2emulate loss of STP segments in both directions – (i) DATA, SYN, and FIN segments in theforward direction and (ii) ACK segments in the reverse direction. You may assume that theunderlying channel will never reorder or corrupt STP segments (in both directions).Note that it is mandatory that you impl代 写COMP3331、C++, Java/Python ement STP over UDP. Do not use TCP sockets. Youwill not receive any marks for this assignment if you use TCP sockets.2.1 Learning ObjectivesOn completing this assignment, you will gain sufficient expertise in the following skills:1. Detailed understanding of how reliable transport protocols such as TCP function.2. Socket programming for UDP transport protocol.3. Protocol and message design.Non-CSE Student Version: The rationale for this option is that students enrolled in a program thatdoes not include a computer science component have had very limited exposure to programmingand in particular working on complex programming assignments. A Non-CSE student is a studentwho is not enrolled in a CSE program (single or double degree). Examples would include studentsenrolled exclusively in a single degree program such as Mechatronics or Aerospace or ActuarialStudies or Law. Students enrolled in dual degree programs that include a CSE program as oneof the degrees do not qualify. Any student who meets this criterion and wishes to avail of thisoption MUST email cs3331@cse.unsw.edu.au to seek approval before 5pm, 29th March (Friday,Week 7). If approved, we will send you the specification for the non-CSE version of theassignment. We will assume by default that all students are attempting the CSE version of theassignment unless they have sought explicit permission. No exceptions.3. Assignment SpecificationSTP should be implemented as two separate programs: sender and receiver. You should implementunidirectional transfer of data from the sender to the receiver. As illustrated in Figure 1, datasegments will flow from sender to receiver while ACK segments will flow from receiver to sender.The sender and receiver programs will be run from different terminals on the same machine, so youcan use localhost, i.e., 127.0.0.1 as the IP address for the sender and receiver in your program. Letus reiterate this, STP must be implemented on top of UDP. Do not use TCP sockets. If you useTCP, you will not receive any marks for your assignment.You will find it useful to review Sections 3.5.4 - 3.5.6 of the text (or the relevant parts from theWeek 5 lecture notes). It may also be useful to review the basic concepts of reliable data transferfrom Section 3.4 (or relevant parts from the Week 4 lecture notes). Section 3.5 of the textbookwhich covers the bulk of the discussion on TCP is available to download on the assignment page.Figure 1: This depicts the assignment setup. A file is to be transferred from the Sender to the Receiver, both running on the samemachine. Data segments will flow from the sender to receiver, while ACK segments will flow from the receiver to sender.DataAck Sender ReceiverUDP Socket1sender_port specifiedasargumentUDP Socket 2receiver_port specifiedasargument33.1 File NamesThe main code for the sender should be contained in the following files: sender.c, orSender.java, or sender.py. You may create additional files such as header files or otherclass files and name them as you wish.The sender should accept the following seven arguments:1. sender_port: the UDP port number to be used by the sender to send STP segments to thereceiver. The sender will receive ACK segments from the receiver through this same port. Werecommend using a random port number between 49152 to 65535 (dynamic port numberrange) for the sender and receiver ports.2. receiver_port: the UDP port number on which receiver is expecting to receive STPsegments from the sender. The receiver should send ACK segments to the sender through thissame port. We recommend using a random port number in the same range noted above.3. txt_file_to_send: the name of the text file that must be transferred from sender toreceiver using your reliable t WX:codehelp