Assignment 3 CS494-unp revised: 9/7/99 Assigned: 9/2/99 Due: 6:00pm 9/15/99 Objective: TCP client and DNS Points: 30 Description: Construct a TCP echo client that takes as arguments a host name or IP address and optionally a port number (default 7), and optionally a message length (default 1024, max 2048), and optionally the number of repetitions (default 100). (Consider getopt() for argument processing, or positional arguments will do.) Your inline documentation should describe how arguments are to be supplied. Your client should connect to the given host on the given port, record the start time (use seconds() described in class). Then for the specified number of repetitions, send (writen()) and receive (readn()) an arbitrary message of the specified length. Record the ending time. Your program should then print the hostname, repetitions, message length, elapsed time, and kilobits/second. Provide the output from your program when testing with the following hosts using 100 repetitions and message sizes (bytes) of 8, 256, 1024, 2000. host: cetus2b (or any of the cetus* critters) port:7 host: 128.169.93.200 port:8989 host: www.hawaii.edu port: 7 Check error status on ALL network function calls. Do NOT use any of the Stevens' libraries nor his wrapper include file. Optional: please indicate amount of time required to complete assignment. Use ~dunigan/cs494-unp/494submit to submit your source files and output. See http://www.cs.utk.edu/~dunigan/cs494-unp/policy.txt