James Lee
Columbia University
New York, NY
USA
jl1341@columbia.edu
Amit Kaul
Columbia University
New York, NY
USA
ak946@columbia.edu
This page describes the detailed program operations of the TRIP protocol and the location server implemented. The program consist of an LS, when run, both connect to peers that exist in its location server configuration file and accepts connections from a peer. The LS can be run in three modes: send only, receive only, and send/receive with arguments provided when invoking the program. After a connection is made, the LS initiates its finite state machine.
Several test tools demonstrate the working of the LS. When running the peer session test with the LS program, the peer session tries connects to the LS. If succeeds, the test program sends a OPEN message. The success of the reception of this OPEN message by an LS will depend on the mode it is currently running as and the connection between the testing peer session and the LS.
With update message testing, a peer session opens a connection to an running LS program, and sends update message to the LS. The LS locator test program locates the LS and the TRIP id test returns the TRIP id of an LS.
The libraries are for Sun Solaris and Linux operating systems. The make utility and the build tools are available for both of these operating systems.
To clean the .o and .d type make clean.
A screen dump of an LS running:
The program is build on libraries of the TRIP stack, which contains:
An location server is build on the TRIP stack. The following code segment provides an instance of a LS peer session with LSSessionManager.
#include <stdio.h> #include <unistd.h> #include <iostream.h> #include "LSSessionManager.hxx" #include "cpLog.h" main() { try { cpLogSetPriority(7); LSSessionManager& manager = LSSessionManager::instance(1234); manager.threadRun(); while(1) { sleep(2); } } catch(VException& e) { cerr << "Caught exception:" << e.getDescription().c_str() << endl; } } |