CS 210 PROJECT #5 Due Date: Noon Tuesday 05/05/09 This project gives students an introduction to network programming in GNU/Linux assembly language using the 'sockets' API, and to the task of implementing a standard internet protocol, as described in an RFC. PROBLEM STATEMENT Design a 'standalone' assembly language program (i.e., one that is not linked with any code in the standard C runtime libraries, but which instead makes direct system-calls to the Linux kernel using 'syscall'), which will contact an official government-approved server that can send back the precise time, expressed in Coordinated Universal Time (UTC) as described in the RFC-868 (Time Protocol) document available online. The time-server application your program should contact is running on a network host named 'time-nw.nist.gov' which is located in Seattle. You can discover its IP-address for use by your client program by using the standard 'ping' command: $ ping -c1 time-nw.nist.gov The port-number to which this time-server listens is specified (as part of the official 'Time Protocol') in the RFC-868 document. Be sure that you keep in mind the fact that network byte-order is 'big-endian' while our Intel x86 host's byte-order is 'little-endian'. Thus the value you receive from any network time-server will need to have the order of its bytes 'swapped' before you attempt to do any computations with it using our Intel-based Linux machines. Keep in mind also that Coordinated Universal Time is measured as a number of seconds that have elapsed since Midnight, January 1, 1900, in Greenwich, England. So in order to show the correct time-of-day now in Caliornia, you will have to adjust for the difference in time-zones. WHAT TO DISPLAY Your program should print a message showing the current time using the following 24-hour clock format: TIME NOW IS hh:mm:ss (PDT) As an option (for extra credit), your program may also show the current date, using the following format as an example: TIME NOW IS 11:45:22 (PDT) on WED 22 APR 2009 Please use the filenames 'utc.s', 'utc.o', and 'utc' for your project's source-file, object-file, and executable-file. (Copy these three files into your '/submit' folder, at: '/home/submit/cs210/' ) _______________________________________________________________________ Allan B. Cruse University of San Francisco Spring 2009