/********************************************************* * Program: UDPEcho - client and server * * Summary: This is an implementation of a UDP version of ping. * * Usage : client * * * [] * [] * [<# of iterations>] * [] * [mode] [target send rate (bps) ] * * * Runs the client in Echo mode - 1000 byte msg every 1 second * client localhost 5000 1000000 1000 100 129 * * Runs the client in CBR mode - sends 1000 byte msgs * at a rate equivalent to 2 Mbps * client localhost 5000 1000000 1000 0 129 1 2000000 * * * Usage : server * * []\n", * * server 5000 129 * * *********************************************************/ ********************************************************* Invocation: This invokes the server, specifying port 5000 ./server Example: ./server 5000 1 ; #debug level 1 to just show warnings This invokes the client, specifying the server name as localhost (ie., the server runs on the same machiine), server port 5000, an iteration delay of 1 second, a message size of 1000 bytes, and 100 iterations. ./client server serverPort Example : ./client localhost 5000 1000000 1000 100 130 The client has two modes of operations - mode 0: UDP Echo mode. This is similar to ICMP's ping, but with UDP. mode 1: Constant bit rate mode- this sends a message at a regular interval. It models a constant bit rate traffic generator. Client parameters; * Usage : client * * * [] * [] * [<# of iterations>] * [] * [mode] [target send rate (bps) ] * *********************************************************