NAME pass-it-on SYNOPSIS pass-it-on DESCRIPTION pass-it-on listens on the for UDP packets from a peer pass-it-on server and "passes the packet on" to a next peer pass-it-on server. There are three types of UDP packets. All are strictly printable ASCII characters (no NULL's, new-lines, or other special characters are allowed): S:_signature_:_list_,_of_,_users_ A:_signature_: E:_explanation_ The "S" (source) packet gives a comma separated list of users. The users are known to the system (you can write the user names into your program, for simplicity). The names can only be alphanumeric. The list can be empty. If not empty, pass-it-on removes the first user from the list, and sends an "S" packet with a new recalculated signature to the hostname associated with the first user. The new list of users is the old list, with the first user removed. If the list of users is empty, no "S" packet is sent in response. The signature is exactly 13 characters, and is calculated based on the pass-it-on server's password. The colons are literal, and appear as the second and 16-th characters in the "S" packet. Every "S" packet also causes pass-it-on to send an "A" packet (acknowledgement) back to the sender of the "S" packet, to acknowledge it. The receiver of the "A" packet notes the packet, but takes no further action. Resend if an acknowledgement is not received is not required. The signature of the "A" packet is copied from the signature of the "S" packet. If pass-it-on does not like the "S" packet, it sends an "E" packet (error) rather than an "A" packet back to the sender of the server. The explanation is arbitrary text explaining the error. SIGNATURE The signature is exactly 13 characters. In order to prove that a packet has passed through the pass-it-on server, the server will sign the packet: new-signature = H(old-signature,server-secret) where H is a cryptographic hash function. Because the signature accumulates all server-secrets, it attests that the packet has passed through each of the pass-it-on servers listed in the original "S" packet, in the order they were listed. Use your username concatenated with itself for your 8 letter password: e.g. user "burt" signs with password "burtburt". OPTIONS There are no required options. You might want to implement a -v option for testing. THE PASS-IT-ON GAME OLD: Once your server is working, tweet with hashtag #csc524 your username and public DNS for the AWS server where your server is running. NEW: The PEER REGISTRY section of this page will be updated with the username and public DNS of claimed working pass-it-on servers. To run a program perennially in the background, even when logged out, start the program as: nohup ./pass-it-on & To kill all such program, the most convenient way is "killall pass-it-on". If you don't kill running services before starting another, they will conflict over binding to the UDP port. My pass-it-on server will create a master "S" packet with a fixed starting signature. The list of users will end with "burt" so that the packet will ultimately return to me, after passing through other peers. Since I know your passwords I can verify that the packet is traveled correctly. OLD: The "T" packet can be used to test pass-it-on servers, as you can send "T" packets to users named in #csc524 tweets, with your user as the last on the list, and expect them to be returned empty, with a known signature only depending on the length of the original user list. NOTES You will have to make another program (a client) to create and send the first "S" packet, in order to test your pass-it-on server. To test it further, you might need to form small groups to send packets around in a circle. These are also called "bake-offs", because you test whether your protocols can inter-operate. Receiving port is 3333. Sending port can be the receiving port, or an ephemeral port. The assignment does not specify this. PEER REGISTRY: ahae, ec2-54-242-244-20.compute-1.amazonaws.com (confirmed) burt, ec2-50-19-171-60.compute-1.amazonaws.com (confirmed) pika, ec2-54-242-231-151.compute-1.amazonaws.com (confirmed) nada, ec2-50-19-170-169.compute-1.amazonaws.com (confirmed) efie, ec2-67-202-57-111.compute-1.amazonaws.com (confirmed) mwei, ec2-54-242-189-57.compute-1.amazonaws.com (confirmed) kcbr, ec2-23-22-17-187.compute-1.amazonaws.com (confirmed) atve, ec2-54-243-17-171.compute-1.amazonaws.com neca, ec2-23-23-20-2.compute-1.amazonaws.com bcsa, ec2-23-22-228-54.compute-1.amazonaws.com (confirmed) dacl, ec2-23-20-36-19.compute-1.amazonaws.com (confirmed) LAST UPDATED March 31, 2013