Packet Pass Around Project

by: burt rosenberg
at: university of miami


The luggage is a UDP packet;
the carrier an L2 frame for transport

Objectives

This project will familiarize you with sockets and the IP/UDP communication protocol.

Man Page

NAME
   passaround --- listens and forwards UDP packets according to message contents.
      
SYNOPSIS

   passaround [-v] [-n number] [-m message] port

DESCRIPTION

   Passaround listens on the port given in the command line for UDP packets and forwards
   the packet as instructed by the packet contents. Packet content is a character 
   sequence (not a string!) of format: 
   
        host(:host)*
        
    or the empty string. If the empty string, there is nothing to pass on. Else the 
    first host name is removed from the string, and the remainder of the string (properly
    formatted) is sent to the named host.
   
OPTIONS

    -m Take as the "message" the first received message
    -n forward number packets to forward, then exit. Default is 1; 0 for loop forever.
    -v verbose
     
ARGUMENTS

    Port, the port number to listen on, and to send to. The from port can be ephemeral.

OUTPUT
  
    Without the verbose option the output should be strictly one line for each send
    and receive, in the order of occurrence:
  
    R: host:port |message-as-received|
    S: host:port |message-as-sent|
  
    Host and port refer to the send-to, on S, and the received from, on R. For host,
    please print the IP address. Going from IP to hostname is called reverse IP lookup,
    and reverse records are not always available.
    
HISTORY

    Appeared as the Pass-it-on project, in csc524-132,and next as packet-pass-around in 
    csc424-152.

Templates and the Makefile

Copy the template files from class/proj2 into your _username_/proj2 folder. Your folder must be named proj2, and your main program must be named passaround.c.

No project is correct without a correct Makefile. The grader and I expect that we can:

svn update; make clean; make ; make test
Do not check in binaries or other build products! Points off for unnecessary stuff in the repo.

Additional Notes

See the blog posting on access to the lab for how to use certificates to make using the lab machines easy.

Always put your name and date in the header comments of your code. I will consider that your promise to have sincerely contributed your own work to the project (although you can discuss and collaborate — the final product must be your own.)

Please be assiduous in naming of your files and directories. It should be [your-repo]/proj2, not [your-repo]/projects/proj2 or [your-repo]/Project-2.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Author: Burton Rosenberg
Created: February 3, 2015
Last Update: January 27, 2016