# uft.2 -- UDP file transfer Part 1 ------ Stress-test your uft application in three ways: 1) Generate arbitrary control and data packets of the right size (but with fully or partly random contents) and observe how robust your application behaves. Address the observed robustness problems in your implementation. 2) Examine your protocol design and your implementation with respect to two senders sending different file contents of a file with the same name to the same receiver at the same time. What happens? 3) Temporarily change your client to direct a server to perform a file transmission at high bitrate to some third -- unsuspecting -- target. Is this possible with your design? Discuss how misusing your server in such denial-of-service attacks could be prevented or at least made more difficult. Part 2 ------ Extend your uft from assignment 1 to support adaptive congestion control using some additive increase/multiplicative decrease (AIMD) compatible scheme. You may use TFRC, ack clocking or may invent another scheme that adapts to changes in the available data rate and behaves _somewhat_ fair in sharing network resources. We will provide a tool "udppipe" that runs in user mode and allows for traffic shaping according to some predefined bit rate and will thus drop excess packets. It will also delay incoming packets by the delay (specified in milliseconds). udppipe has the following command line parameters: $ udppipe -l [lhost:]lport -c [chost:]cport -b bitrate -d delay lhost:lport chost:cport +------------+ V+---------+ V+------------+ | uft sender |-------->| udppipe |-------->|uft receiver| +------------+ +---------+ +------------+ The uft sender needs to send to the udppipe and the udppipe to the uft receiver. Packets in the reverse direction are just addressed to packet origin as obtained from recvfrom(). Introducing congestion control obviously requires that you modify the semantics of the -b option previously used to specify the transmission bitrate. Make a decision about potential new semantics and discuss your choice in the written part. *Any* revised semantics are allowed, provided that it still influences transmission rate. Also describe potential drawbacks of your choice. Your modified uft should work with a dynamic change from 10 kbit/s to 1 Mbit/s. You should document your protocol design including header syntax and interactions and discuss why you have chosen this particular design.