forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
forest Namespace Reference

The CtlPkt class is used to pack and unpack forest control messages. More...

Classes

class  AdminTable
 Class that implements a table of information about Forest administrators. More...
 
class  Avatar
 Class that implements a simulated avatar in a virtual world. More...
 
class  ClientTable
 Class that implements a table of information about users. More...
 
struct  QueuePair
 
struct  EventStruct
 
struct  ThreadInfo
 
class  LinkMod
 Class used to represent information used to modify a link. More...
 
class  ComtInfo
 Maintains information about the comtrees in a Forest network. More...
 
class  ComtreeRegister
 Class that implements a register of information about comtrees, for use by ClientMgr. More...
 
class  ComtreeTable
 Class that implements a table of information on comtrees. More...
 
class  CpHandler
 This class is designed for use with multi-threaded controllers (NetMgr, ComtCtl, etc) that use control packets to communicate with routers and other components. More...
 
class  CtlPkt
 This class provides a mechanism for handling forest signalling packets. More...
 
class  DBConnector
 
class  Forest
 Miscellaneous utility functions. More...
 
class  Host
 Host implements a forest host. More...
 
class  IfaceTable
 
class  IoProcessor
 
class  LinkTable
 Maintains information about a Forest router's virtual links. More...
 
class  Logger
 This is a very simple logger class to control the logging of error messages. More...
 
class  Misc
 
class  Monitor
 Monitor observes status reports sent by Avatars in a virtual world and reports them to a remote client that implements a graphical display of the moving Avatars. More...
 
class  NetBuffer
 This class implements a simple user-space buffer for use when reading from a stream socket. More...
 
class  NetInfo
 Maintains information about an entire Forest network. More...
 
struct  prefixInfo
 
struct  clientInfo
 
class  Np4d
 Network programming for dummies. More...
 
class  Packet
 Class that defines fields in Forest packets. More...
 
class  PacketFilter
 Support class used by PacketLog to control packet logging. More...
 
class  PacketLog
 
class  PacketStore
 Maintains a set of packets with selected header fields and a separate set of buffers. More...
 
class  PacketStoreTs
 Maintains a set of packets with selected header fields and a separate set of buffers. More...
 
class  Queue
 This class implements a simple thread-safe queue for communication among threads. More...
 
class  QuManager
 The QuManager class, manages a set of queues for each of the links in a router. More...
 
class  Quu
 This class implements a simple thread-safe queue for communication among threads. More...
 
class  RateSpec
 This class stores bit rates and packet rates for links in both directions. More...
 
class  Repeater
 Class to manage repeated sending of control packets. More...
 
class  RepeatHandler
 Class to aid in handling repeated control packets. More...
 
struct  RouterInfo
 Structure used to carry information about a router. More...
 
class  Router
 
class  RouterControl
 This class handles incoming and outgoing control packets on behalf of a router core. More...
 
class  RouterCore
 
class  RouterInProc
 
class  RouterOutProc
 
class  RouteTable
 Maintains a set of routes. More...
 
class  StatsModule
 
class  Substrate
 This class provides a common substrate used by various controllers. More...
 

Typedefs

typedef int pktx
 
typedef int32_t fAdr_t
 denotes a forest address
 
typedef uint32_t comt_t
 denotes a comtree
 
typedef uint8_t flgs_t
 flags field from packet header
 
typedef uint32_t buffer_t [Forest::BUF_SIZ/sizeof(uint32_t)]
 
typedef in_addr_t ipa_t
 
typedef in_port_t ipp_t
 
typedef int fltx
 

Enumerations

enum  acctRecType {
  UNDEF, NEWSESSION, CANCELSESSION, CONNECT_REC,
  DISCONNECT_REC
}
 Used to identify the type of an accounting record. More...
 

Functions

bool init (ipa_t nmIp1, ipa_t myIp1)
 Initializes sockets, and acts as a psuedo-constructor. More...
 
bool bootMe (ipa_t nmIp, ipa_t myIp, fAdr_t &nmAdr, fAdr_t &myAdr, fAdr_t &rtrAdr, ipa_t &rtrIp, ipp_t &rtrPort, uint64_t &nonce)
 Send a boot request to NetMgr and process configuraton packets. More...
 
void * handler (void *qp)
 Control packet handler. More...
 
bool handleClient (int sock, CpHandler &cph)
 Handle a connection from a client. More...
 
bool loginDialog (int sock, NetBuffer &buf, string &clientName)
 Carry out login dialog and verify that client/password is correct. More...
 
void userDialog (int sock, CpHandler &cph, NetBuffer &buf, string &clientName)
 
bool newSession (int sock, CpHandler &cph, NetBuffer &buf, string &clientName, string &reply)
 Handle a request for a new forest session. More...
 
void getProfile (NetBuffer &buf, string &clientName, string &reply)
 Handle a get profile request. More...
 
void updateProfile (NetBuffer &buf, string &clientName, string &reply)
 Handle an update profile request. More...
 
void changePassword (NetBuffer &buf, string &clientName, string &reply)
 Handle a change password request. More...
 
void uploadPhoto (int sock, NetBuffer &buf, string &clientName, string &reply)
 Handle an upload photo request. More...
 
void getSessions (NetBuffer &buf, string &clientName, string &reply)
 Respond to getSessions request from a client. More...
 
void cancelSession (NetBuffer &buf, string &clientName, string &reply)
 
void addComtree (NetBuffer &buf, string &clientName, string &reply)
 
bool handleConnDisc (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle a connect or disconnect message from the NetBgr. More...
 
void writeAcctRecord (const string &cname, fAdr_t cliAdr, ipa_t cliIp, fAdr_t rtrAdr, acctRecType recType)
 Writes a record to the accounting file. More...
 
void writeRecord (int clx)
 Write a client record to clientFile. More...
 
bool login (NetBuffer &buf, string &clientName, string &reply)
 Handle a login request. More...
 
bool newAccount (NetBuffer &buf, string &clientName, string &reply)
 Handle a new account request. More...
 
int checkPrivileges (string clientName, string targetName)
 Verify that a client may perform privileged operations on a target. More...
 
void uploadFile (string &type, int sock, NetBuffer &buf, string &clientName, string &reply)
 Handle an upload request. More...
 
void cancelSession (NetBuffer &buf, string &clientName, CpHandler &cph, string &reply)
 Respond to cancelSessions request from a client. More...
 
void cancelAllSessions (NetBuffer &buf, string &clientName, CpHandler &cph, string &reply)
 Respond to cancelAllSessions request from a client. More...
 
bool sendReqPkt (int sock, CtlPkt &reqPkt, fAdr_t target, CtlPkt &replyPkt)
 Send a request packet, then wait for and return reply. More...
 
bool setAttributes (CtlPkt &cpTemplate, CpTypeIndex type, CtlPkt &reqPkt)
 Set request packet attributes, based on template. More...
 
void parseLine (string line, list< string > &tokenList)
 Parse an input line and produce a list of tokens. More...
 
void buildWordList (string line, list< string > &wordList)
 Build a list of words from a line. More...
 
bool validTokenList (list< string > tokenList)
 Verify that a tokenList is valid Specificialy, check that if it starts with a command phrase or abbreviation, then it's a valid command phrase or abbreviation. More...
 
void processTokenList (list< string > tokenList, fAdr_t &target, CpTypeIndex &cpType, CtlPkt &cpTemplate)
 Process a list of tokens that has passed basic checks. More...
 
void posResponse (CtlPkt &)
 
int main (int argc, char *argv[])
 usage: Console NetMgrIp More...
 
bool init (const char *topoFile)
 Initialization of NetMgr. More...
 
void cleanup ()
 
bool handleConsole (int sock, CpHandler &cph)
 Handle a connection from a remote console. More...
 
void addFilter (NetBuffer &buf, string &reply, CpHandler &cph)
 Allocate log filter in router and return filter index to Console. More...
 
void modFilter (NetBuffer &buf, string &reply, CpHandler &cph)
 Modify log filter in router. More...
 
void dropFilter (NetBuffer &buf, string &reply, CpHandler &cph)
 Drop log filter from router. More...
 
void getFilter (NetBuffer &buf, string &reply, CpHandler &cph)
 Get log filter from router and return to Console. More...
 
void getFilterSet (NetBuffer &buf, string &reply, CpHandler &cph)
 Get log filter set from router and return to Console. More...
 
void getLoggedPackets (NetBuffer &buf, string &reply, CpHandler &cph)
 Get logged packets from router and return to Console. More...
 
void enableLocalLog (NetBuffer &buf, string &reply, CpHandler &cph)
 Enable local log in router Reads router name from the socket. More...
 
void getLinkTable (NetBuffer &buf, string &reply, CpHandler &cph)
 Get link table from router and return to Console. More...
 
void getComtreeTable (NetBuffer &buf, string &reply, CpHandler &cph)
 Get comtree table from router and return to Console. More...
 
void getIfaceTable (NetBuffer &buf, string &reply, CpHandler &cph)
 Get iface table from router and return to Console. More...
 
void getRouteTable (NetBuffer &buf, string &reply, CpHandler &cph)
 Get route table from router and return to Console. More...
 
bool handleConDisc (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle a connection/disconnection notification from a router. More...
 
bool handleNewSession (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle a new session request. More...
 
fAdr_t setupLeaf (int leaf, pktx px, CtlPkt &cp, int rtr, int iface, uint64_t nonce, CpHandler &cph, bool useTunnel)
 Setup a leaf by sending configuration packets to its access router. More...
 
bool handleCancelSession (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle a cancel session request. More...
 
bool handleBootLeaf (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle boot process for a pre-configured leaf node. More...
 
uint64_t generateNonce ()
 Return a random nonce suitable for use when connecting a leaf. More...
 
bool processReply (pktx px, CtlPkt &cp, pktx reply, CtlPkt &repCp, CpHandler &cph, const string &msg)
 Process the reply from an outgoing request packet This method implements a common pattern used by handlers that are configuring routers in response to a received request. More...
 
bool handleBootRouter (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle a boot request from a router. More...
 
bool setupEndpoint (int lnk, int rtr, pktx px, CtlPkt &cp, CpHandler &cph, bool useTunnel)
 Configure a link endpoint at a router. More...
 
bool setupComtree (int ctx, int rtr, pktx px, CtlPkt &cp, CpHandler &cph, bool useTunnel)
 Setup a pre-configured comtree at a booting router. More...
 
bool findCliRtr (ipa_t cliIp, fAdr_t &rtrAdr)
 Finds the router address of the router based on IP prefix. More...
 
bool readPrefixInfo (char filename[])
 Reads the prefix file. More...
 
void writeAdminRecord (int adx)
 Write a record to the file of network administrators. More...
 
void getNet (NetBuffer &buf, string &reply)
 
void getLinkSet (NetBuffer &buf, string &reply, CpHandler &cph)
 
void uploadFile (string, int, NetBuffer &, string &, string &)
 
bool init (ipa_t, ipa_t, int, int, const char *topoFile)
 
void * run (void *)
 
bool handleComtreeDisplay (int)
 
bool handleAddComtReq (int, CtlPkt &, CpHandler &)
 
bool handleDropComtReq (int, CtlPkt &, CpHandler &)
 
bool handleJoinComtReq (int, CtlPkt &, CpHandler &)
 
bool handleLeaveComtReq (int, CtlPkt &, CpHandler &)
 
bool handleComtPath (int, CtlPkt &, CpHandler &)
 
bool handleComtNewLeaf (int, CtlPkt &, CpHandler &)
 
bool handleComtPrune (int, CtlPkt &, CpHandler &)
 
void removeSubtree (int, fAdr_t)
 
int newComtreeNum ()
 
void releaseComtreeNum (int)
 
bool setupPath (int, list< LinkMod > &, CpHandler &)
 
bool teardownPath (int, list< LinkMod > &, CpHandler &)
 
bool setupComtNode (int, int, CpHandler &)
 
bool teardownComtNode (int, int, CpHandler &)
 
bool setupComtLink (int, int, int, CpHandler &)
 
int setupClientLink (int, fAdr_t, int, CpHandler &)
 
bool teardownClientLink (int, fAdr_t, int, CpHandler &)
 
bool setupComtAttrs (int, int, CpHandler &)
 
bool setComtLinkRates (int, int, int, CpHandler &)
 
bool setComtLeafRates (int, fAdr_t, CpHandler &)
 
bool modComtRates (int, list< LinkMod > &, bool, CpHandler &)
 
void connect ()
 
void disconnect ()
 
void sendToRemote (int)
 
int recvFromRemote ()
 
void sendToForest (int)
 
int rcvFromForest ()
 
static bool isSigComt (comt_t comt)
 Determine if comtree is a signalling comtree or not. More...
 
bool readPrefixInfo (char *)
 
void enablePacketLog (NetBuffer &buf, string &reply, CpHandler &cph)
 
void sendToCons (int)
 
int recvFromCons ()
 
bool processArgs (int argc, char *argv[], RouterInfo &args)
 Process command line arguments for starting a forest router. More...
 

Variables

const short NM_PORT = 30122
 server port# for NetMgr
 
fAdr_t myAdr
 Forest address of self. More...
 
ipa_t myIp
 address of interface to use More...
 
fAdr_t rtrAdr
 Forest address of router. More...
 
ipa_t rtrIp
 IP address for forest router.
 
ipp_t rtrPort
 port number for forest router
 
ipa_t nmIp
 IP address of NetMgr. More...
 
fAdr_t nmAdr
 Forest address of NetMgr. More...
 
char * dummyRecord
 dummy record for padding client file More...
 
int maxRecord
 largest record number in client file More...
 
PacketStoreTsps
 pointer to packet store
 
Substratesub
 substrate for handling packets More...
 
ClientTablecliTbl
 data about clients and active sessions
 
Loggerlogger
 error message logger
 
ofstream acctFile
 stream for writing accounting records
 
fstream clientFile
 stream for reading/updating client data
 
pthread_mutex_t clientFileLock
 so only one thread can update at a time
 
static int const RECORD_SIZE = 256
 size of a client file record
 
NetInfonet
 global view of net topology
 
ComtInfocomtrees
 definition of all comtrees More...
 
int maxComtree
 max# of comtrees
 
int firstComt
 
int lastComt
 defines range of comtrees controlled
 
UiSetPair * comtSet
 in-use and unused comtrees
 
pthread_mutex_t comtSetLock
 used to lock comtSet
 
static const int NORESPONSE = (1 << 31)
 indicates non-response to ctl pkt
 
static const int TPSIZE = 500
 number of concurrent threads at ComtCtl
 
ThreadInfopool
 pool[i]: i-th thread in pool
 
UiSetPair * threads
 in-use and unused thread indices
 
IdMap * reqMap
 maps rcvd requests to handling thread
 
IdMap * tMap
 maps sequence numbers to thread index
 
fAdr_t cliMgrAdr
 forest address of the client manager
 
fAdr_t comtCtlAdr
 forest address of the comtree controller
 
int netMgr
 node number of net manager in NetInfo
 
int nmRtr
 node number of net manager's router
 
AdminTableadmTbl
 data about administrators
 
int numPrefixes
 
prefixInfo prefixes [1000]
 
fstream adminFile
 stream for reading/updating admin data
 
pthread_mutex_t adminFileLock
 so only one thread can update at a time
 
static int const RECORD_SIZE = 256
 size of an admin file record
 

Detailed Description

The CtlPkt class is used to pack and unpack forest control messages.

The class has a public field for every field that can be used in in a control packet. To create a control packet, the user constructs a CtlPkt object. The user then specifies selected fields and calls pack, which packs the specified fields into the packet's payload and returns the length of the payload.

To unpack a buffer, the user constructs a CtlPkt object and then calls unpack, specifying the length of the payload. The control packet fields can then be retrieved from the corresponding fields of the CtlPkt object.

The class has a public field for every field that can be used in in a control packet. To create a control packet, the user constructs a CtlPkt object. The user then specifies selected fields and calls pack, which packs the specified fields into the packet's payload the length of the payload.

To unpack a buffer, the user constructs a CtlPkt object and then calls unpack, specifying the length of the payload. The control packet fields can then be retrieved from the corresponding fields of the CtlPkt object.

Enumeration Type Documentation

Used to identify the type of an accounting record.

Definition at line 41 of file ClientMgr.h.

Function Documentation

void forest::addFilter ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Allocate log filter in router and return filter index to Console.

Reads router name from the socket.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 465 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::bootMe ( ipa_t  nmIp,
ipa_t  myIp,
fAdr_t nmAdr,
fAdr_t myAdr,
fAdr_t rtrAdr,
ipa_t &  rtrIp,
ipp_t &  rtrPort,
uint64_t &  nonce 
)

Send a boot request to NetMgr and process configuraton packets.

Parameters
nmIpis the ip address of the network manager
myIpis the ip address to bind to the local socket
nmAdris a reference to a forest address in which the network manager's address is returned
myAdris a reference to a forest address in which this client manager's address is returned
rtrAdris a reference to a forest address in which this client manager's access router's address is returned
rtrIpis a reference to an ip address in which this client manager's access router's ip address is returned
rtrPortis a reference to an ip port number in which this client manager's access router's port number is returned
nonceis a reference to a 64 bit nonce in which the nonce used by this client manager to connect to the forest network is returned

Definition at line 107 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::buildWordList ( string  line,
list< string > &  wordList 
)

Build a list of words from a line.

Creates a list of words from the line, where a word is either an '=' sign, or a string of characters containing neither white space of an '=' sign.

Parameters
lineis the line to be processed,
wordListis the list in which the words are returned

Definition at line 271 of file Console.cpp.

Here is the caller graph for this function:

void forest::cancelAllSessions ( NetBuffer buf,
string &  clientName,
CpHandler cph,
string &  reply 
)

Respond to cancelAllSessions request from a client.

Parameters
bufis a NetBuffer for the socket to the client.
clientNameis the client's name
replyis a string in which a reply to the client can be returned

Definition at line 849 of file ClientMgr.cpp.

Here is the call graph for this function:

void forest::cancelSession ( NetBuffer buf,
string &  clientName,
CpHandler cph,
string &  reply 
)

Respond to cancelSessions request from a client.

Parameters
bufis a NetBuffer for the socket to the client.
clientNameis the client's name
cphis the control packet handler for this thread
replyis a string in which a reply to the client can be returned

Definition at line 786 of file ClientMgr.cpp.

Here is the call graph for this function:

void forest::changePassword ( NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle a change password request.

Reads from the socket to identify the target client. This operation requires either that the target client is the currently logged-in client, or that the logged-in client has administrative privileges.

Parameters
bufis a NetBuffer associated with the stream socket to a client
clientNameis the name of the currently logged-in client
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Reads from the socket to identify the target admin. This operation requires either that the target admin is the currently logged-in admin, or that the logged-in admin has administrative privileges.

Parameters
bufis a NetBuffer associated with the stream socket to an admin
adminNameis the name of the currently logged-in admin
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Definition at line 647 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int forest::checkPrivileges ( string  clientName,
string  targetName 
)

Verify that a client may perform privileged operations on a target.

Parameters
clientNameis the name of the client who is currently logged in
targetNameis the name of the client on which some privileged operation is to be performed
Returns
0 if targetName != clientName and clientName lacks the privileges needed to perform a privileged operation, or if either of the names does not match a client in the table; otherwise return the client table index (clx) for targetName and lock the entry (the calling program must release the entry when done)

Definition at line 550 of file ClientMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::dropFilter ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Drop log filter from router.

Reads router name and filter index from the socket.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 515 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::enableLocalLog ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Enable local log in router Reads router name from the socket.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 616 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::findCliRtr ( ipa_t  cliIp,
fAdr_t rtrAdr 
)

Finds the router address of the router based on IP prefix.

gives the rtrAdr of the prefix

Parameters
cliIpis the ip of the client
rtrAdris the address of the router associated with this IP prefix
Returns
true if there was an IP prefix found, false otherwise

Definition at line 1325 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t forest::generateNonce ( )

Return a random nonce suitable for use when connecting a leaf.

Definition at line 1034 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getComtreeTable ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get comtree table from router and return to Console.

Table is returned as a text string which each entry on a separate line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 665 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getFilter ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get log filter from router and return to Console.

Reads router name and filter index from the socket. Log filter is returned as a string line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 538 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getFilterSet ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get log filter set from router and return to Console.

Reads router name from the socket. Log filter sets are returned as a text string which each entry on a seprate line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 564 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getIfaceTable ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get iface table from router and return to Console.

Table is returned as a text string which each entry on a separate line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 692 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getLinkTable ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get link table from router and return to Console.

Table is returned as a text string which each entry on a separate line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 638 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getLoggedPackets ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get logged packets from router and return to Console.

Reads router name from the socket. Logged packets are returned as a text string which each entry on a separate line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 593 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getProfile ( NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle a get profile request.

Reads from the socket to identify the target client. This operation requires either that the target client is the currently logged-in client, or that the logged-in client has administrative privileges.

Parameters
bufis a NetBuffer associated with the stream socket to a client
clientNameis the name of the currently logged-in client
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Reads from the socket to identify the target admin.

Parameters
bufis a NetBuffer associated with the stream socket to an admin
adminNameis the name of the currently logged-in admin
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Definition at line 514 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getRouteTable ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Get route table from router and return to Console.

Table is returned as a text string which each entry on a separate line.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 719 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::getSessions ( NetBuffer buf,
string &  clientName,
string &  reply 
)

Respond to getSessions request from a client.

Parameters
bufis a NetBuffer for the socket to the client.
clientNameis the client's name
replyis a string in which a reply to the client can be returned

Definition at line 745 of file ClientMgr-sav.cpp.

bool forest::handleBootLeaf ( pktx  px,
CtlPkt cp,
CpHandler cph 
)

Handle boot process for a pre-configured leaf node.

This handler is intended primarily for controllers. It first configures the router, so it will accept new leaf. It then sends leaf configuration information to a new leaf node, including address information for it, and its router, as well as a nonce to be used when it connects.

Parameters
pxis the index of the incoming boot request packet
cpis the control packet (already unpacked)
cphis a reference to the control packet handler used to send packets out

Definition at line 968 of file NetMgr.cpp.

Here is the call graph for this function:

bool forest::handleBootRouter ( pktx  px,
CtlPkt cp,
CpHandler cph 
)

Handle a boot request from a router.

This requires sending a series of control packets to the router to configure its interface table, its link table and its comtree table. When configuration is complete, we send a boot complete message to the router. The operation can fail for a variety of reasons, at different points in the process. Any failure causes a negative reply to be sent back to the original requestor.

Parameters
pxis the packet number of the request packet
cpis the control packet structure for p (already unpacked)
cphis the control packet handler for this thread
Returns
true if the operation is completed successfully; sending an error reply is considered a success; the operation fails if it cannot allocate required packets, or if the router fails to respond to either of the control messages sent to it.

Definition at line 1096 of file NetMgr.cpp.

Here is the call graph for this function:

bool forest::handleCancelSession ( pktx  px,
CtlPkt cp,
CpHandler cph 
)

Handle a cancel session request.

Parameters
pxis the packet number of the request packet
cpis the control packet structure for p (already unpacked)
cphis the control packet handler for this thread
Returns
true if the operation is completed successfully, else false

Definition at line 927 of file NetMgr.cpp.

Here is the call graph for this function:

bool forest::handleClient ( int  sock,
CpHandler cph 
)

Handle a connection from a client.

Parameters
sockis a socket number for an open stream socket
Returns
true if the interaction proceeds normally, followed by a normal close; return false if an error occurs

Interprets variety of requests from a remote client, including requests to login, get profile information, change a password, and so forth.

Parameters
sockis a socket number for an open stream socket
Returns
true if the interaction proceeds normally, followed by a normal close; return false if an error occurs

Definition at line 288 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::handleConDisc ( pktx  px,
CtlPkt cp,
CpHandler cph 
)

Handle a connection/disconnection notification from a router.

The request is acknowledged and then forwarded to the client manager.

Parameters
pxis the packet number of the request packet
cpis the control packet structure for p (already unpacked)
cphis the control packet handler for this thread
Returns
true if the operation was completed successfully, otherwise false; an error reply is considered a successful completion; the operation can fail if it cannot allocate packets, or if the client manager never acknowledges the notification.

Definition at line 752 of file NetMgr.cpp.

Here is the call graph for this function:

bool forest::handleConnDisc ( pktx  px,
CtlPkt cp,
CpHandler cph 
)

Handle a connect or disconnect message from the NetBgr.

Parameters
pxis the index of the packet
cpis the control packet contained in px
cphis a reference to the control packet handler for this thread

Definition at line 764 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::handleConsole ( int  sock,
CpHandler cph 
)

Handle a connection from a remote console.

Handle a connection from the remote console.

Interprets variety of requests from a remote console, including requests to login, get information about routers, monitor packet flows and so forth.

Parameters
sockis a socket number for an open stream socket
Returns
true if the interaction proceeds normally, followed by a normal close; return false if an error occurs

This involves forwarding the packet to a remote router.

Parameters
pxis the packet number of the request packet
cpis the control packet structure for p (already unpacked)
returntrue on successful completion, else false

Definition at line 234 of file NetMgr.cpp.

Here is the call graph for this function:

bool forest::handleNewSession ( pktx  px,
CtlPkt cp,
CpHandler cph 
)

Handle a new session request.

This requires selecting a router and sending a sequence of control messages to configure the router to handle a new client connection. The operation can fail for a variety of reasons, at different points in the process. Any failure causes a negative reply to be sent back to the original requestor.

Parameters
pxis the packet number of the request packet
cpis the control packet structure for p (already unpacked)
cphis the control packet handler for this thread
Returns
true if the operation is completed successfully, else false

Definition at line 782 of file NetMgr.cpp.

Here is the call graph for this function:

void * forest::handler ( void *  qp)

Control packet handler.

Main handler for thread.

Control packet handler for client manager.

This method is run as a separate thread and does not terminate until the process does. It communicates with the main thread through a pair of queues, passing packet numbers back and forth across the thread boundary. When a packet number is passed to a handler, the handler "owns" the corresponding packet and can read/write it without locking. The handler is required to free any packets that it no longer needs to the packet store. When the handler has completed the requested operation, it sends a 0 value back to the main thread, signalling that it is available to handle another task. If the main thread passes a negative number through the queue, it is interpreted as a negated socket number, for an accepted stream socket to a remote display application.

Parameters
qpis a pair of queues; one is the input queue to the handler, the other is its output queue

On receiving a control packet in its input queue, it calls the appropriate individual handler. If a negative number is received through the queue, it is interpreted as a negated socket number, for an accepted stream socket.

Parameters
qpis a pair of queues; one is the input queue to the handler, the other is its output queue

This method is run as a separate thread and does not terminate until the process does. It communicates with the main thread through a pair of queues, passing packet numbers back and forth across the thread boundary. When a packet number is passed to a handler, the handler "owns" the corresponding packet and can read/write it without locking. The handler is required free any packets that it no longer needs to the packet store. When the handler has completed the requested operation, it sends a 0 value back to the main thread, signalling that it is available to handle another task.

Parameters
qpis a pair of queues; on is the input queue to the handler, the other is its output queue

Definition at line 245 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::init ( const char *  topoFile)

Initialization of NetMgr.

Returns
true on success, false on failure

Definition at line 43 of file NetMgr.cpp.

Here is the call graph for this function:

bool forest::init ( ipa_t  nmIp1,
ipa_t  myIp1 
)

Initializes sockets, and acts as a psuedo-constructor.

Parameters
nmIp1is the IP address of the network manager
myIp1is the IP address to bind sockets to
Returns
true on success, false on failure

Definition at line 50 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool forest::isSigComt ( comt_t  comt)
inlinestatic

Determine if comtree is a signalling comtree or not.

Parameters
comtis a comtree number
Returns
true if comt is one of the comtrees used for signalling

Definition at line 251 of file Forest.h.

bool forest::login ( NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle a login request.

Reads from the socket to identify client and obtain password

Parameters
bufis a NetBuffer associated with the stream socket to a client
clientNameis a reference to a string in which the name of the client is returned
replyis a reference to a string in which an error message may be returned if the operation does not succeed.
Returns
true on success, else false

Reads from the socket to identify admin and obtain password

Parameters
bufis a NetBuffer associated with the stream socket to an admin
adminNameis a reference to a string in which the name of the admin is returned
replyis a reference to a string in which an error message may be returned if the operation does not succeed.
Returns
true on success, else false

Definition at line 378 of file ClientMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::loginDialog ( int  sock,
NetBuffer buf,
string &  clientName 
)

Carry out login dialog and verify that client/password is correct.

Parameters
sockis an open socket to the client
bufis a reference to a NetBuffer bound to the socket
clientNameis a reference to a string in which user's name is retured
returntrue on success, false on failure

Definition at line 303 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int forest::main ( int  argc,
char *  argv[] 
)

usage: Console NetMgrIp

Main program for starting a forest router.

Definition at line 31 of file Console.cpp.

Here is the call graph for this function:

void forest::modFilter ( NetBuffer buf,
string &  reply,
CpHandler cph 
)

Modify log filter in router.

Reads router name and filter index from the socket.

Parameters
bufis a reference to a NetBuffer object for the socket
replyis a reference to a string to be returned to console
cphis a reference to this thread's control packet hander

Definition at line 491 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::newAccount ( NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle a new account request.

Reads from the socket to identify client and obtain password

Parameters
bufis a NetBuffer associated with the stream socket to a client
clientNameis a reference to a string in which the name of the client is returned
replyis a reference to a string in which an error message may be returned if the operation does not succeed.
Returns
true on success, else false

Reads from the socket to identify admin and obtain password

Parameters
bufis a NetBuffer associated with the stream socket to an admin
adminNameis a reference to a string in which the name of the admin is returned
replyis a reference to a string in which an error message may be returned if the operation does not succeed.
Returns
true on success, else false

Definition at line 413 of file ClientMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::newSession ( int  sock,
CpHandler cph,
NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle a request for a new forest session.

Reads from the socket to get an optional rate spec.

Parameters
sockis the socket number for the socket to the client
cphis a reference to the control packet handler, used for sending control packets to the NetMgr
bufis a NetBuffer associated with the stream socket to a client
clientNameis the name of the currently logged-in client
replyis a reference to a string in which an error message may be returned if the operation does not succeed.
Returns
true on success, else false

Definition at line 435 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

void forest::parseLine ( string  line,
list< string > &  tokenList 
)

Parse an input line and produce a list of tokens.

If the line starts with a command abbreviation or phrase, the first token will be that abbreviation/phrase with no extra white space. Subsequent tokens will take the form word=word.

Definition at line 215 of file Console.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::processArgs ( int  argc,
char *  argv[],
RouterInfo &  args 
)

Process command line arguments for starting a forest router.

All arguments are strings of the form "name=value".

Parameters
argcis the number of arguments (including the command name)
argvcontains the command line arguments as C-style strings
isa reference to a RouterInfo structure; on return, it will contain all the values that were specified on the command line; unspecified numeric values are set to 0 and unspecified string values are set to the empty string
Returns
true on success, false on failure

Definition at line 24 of file RouterCoreSave.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::processReply ( pktx  px,
CtlPkt cp,
pktx  reply,
CtlPkt repCp,
CpHandler cph,
const string &  msg 
)

Process the reply from an outgoing request packet This method implements a common pattern used by handlers that are configuring routers in response to a received request.

The handler typically sends out a series of request packets and must then handle each reply. A missing or negative reply causes a negative response to be sent back to the sender of the original request.

Parameters
pxis the packet index of the incoming request that initiated the handler
cpis the unpacked control packet for px
replyis the packet index for a reply to some outgoing control packet that was sent by this handler
repCpis a reference to the control packet for reply
cphis a reference to this handler's control packet handler
msgis an error message to be sent back to the original sender of px, if reply=0 or the associated control packet indicates a failure
Returns
true if the reply is not zero and the control packet for reply indicates that the requested operation succeeded

Definition at line 1062 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::processTokenList ( list< string >  tokenList,
fAdr_t &  target,
CpTypeIndex &  cpType,
CtlPkt &  cpTemplate 
)

Process a list of tokens that has passed basic checks.

Parameters
tokenListis the list of tokens to be processed.
targetif the token list includes an assignment of the form "target=forest address", target will be set to the specified forest address on return
cpTypeif the token list starts with a command phrase or abbreviation, cpType will be set to the CpTypeIndex for the corresponding request packet type on return
cpTemplateis a control packet in which attribute values are returned; every attribute assignment in the token list updates the corresponding attribute in cpTemplate

Definition at line 352 of file Console.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::readPrefixInfo ( char  filename[])

Reads the prefix file.

Parameters
filenameis the name of the prefix file
Returns
true on success, false otherwise

Definition at line 1355 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::sendReqPkt ( int  sock,
CtlPkt &  reqPkt,
fAdr_t  target,
CtlPkt &  replyPkt 
)

Send a request packet, then wait for and return reply.

If no reply received after a second, try again up to five times. Print progress indicator on command line while waiting.

Parameters
sockis the socket on which request is to be sent
reqPktis the control packet to be sent
targetis the forest address of the control packet destination
replyPktwill contain the reply packet on a successful return
Returns
true on success, false on failure

Definition at line 149 of file Console.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::setAttributes ( CtlPkt &  cpTemplate,
CpTypeIndex  type,
CtlPkt &  reqPkt 
)

Set request packet attributes, based on template.

Parameters
cpTemplateis a control packet from which attributes are copied
typeis the type of the control packet to be sent
reqPktis the formatted control packet on return
Returns
false if some attribute that is required for the given type has not been set in the cpTemplate; otherwise return true

Definition at line 195 of file Console.cpp.

Here is the caller graph for this function:

bool forest::setupComtree ( int  ctx,
int  rtr,
pktx  px,
CtlPkt cp,
CpHandler cph,
bool  useTunnel 
)

Setup a pre-configured comtree at a booting router.

Parameters
ctxis the index of the comtree being setup
rtris the number of the router
pxis the number of the packet that initiated the current operation
cpis the control packet for px (already unpacked)
cphis a reference to the control packet handler for this thread
Returns
true on success, false on failure

Definition at line 1263 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool forest::setupEndpoint ( int  lnk,
int  rtr,
pktx  px,
CtlPkt cp,
CpHandler cph,
bool  useTunnel 
)

Configure a link endpoint at a router.

This method is used when booting a router. It configures a link going to another router.

Parameters
lnkis the global link number for the link being configured
rtris the number of the router that is to be configured
pxis the packet that triggered this operation
cpis the control packet from px
cphis the handler for this thread
useTunnelis an optional parameter that defaults to false; when it is true, it specifies that control packets should be addressed to the tunnel (ip,port) configured in the cph;
Returns
true if the configuration is successful, else false

Definition at line 1217 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

fAdr_t forest::setupLeaf ( int  leaf,
pktx  px,
CtlPkt cp,
int  rtr,
int  iface,
uint64_t  nonce,
CpHandler cph,
bool  useTunnel 
)

Setup a leaf by sending configuration packets to its access router.

Parameters
leafis the node number for the leaf if this is a pre-configured leaf for which NetInfo object specifies various leaf parameters; it is 0 for leaf nodes that are added dynamically
pxis the packet number of the original request packet that initiated the setup process
cpis the corresponding control packet (already unpacked)
rtris the node number of the access router for the new leaf
ifaceis the interface of the access router where leaf connects
nonceis the nonce that the leaf will use to connect
cphis a reference to the control packet handler for the thread handling this operation
useTunnelis an optional parameter that defaults to false; when it is true, it specifies that control packets should be addressed to the tunnel (ip,port) configured in the cph;
Returns
the forest address of the new leaf on success, else 0

Definition at line 830 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::updateProfile ( NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle an update profile request.

Reads from the socket to identify the target client. This operation requires either that the target client is the currently logged-in client, or that the logged-in client has administrative privileges.

Parameters
bufis a NetBuffer associated with the stream socket to a client
clientNameis the name of the currently logged-in client
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Reads from the socket to identify the target admin. This operation requires either that the target admin is the currently logged-in admin, or that the logged-in admin has administrative privileges.

Parameters
bufis a NetBuffer associated with the stream socket to an admin
adminNameis the name of the currently logged-in admin
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Definition at line 559 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::uploadFile ( string &  type,
int  sock,
NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle an upload request.

Reads from the socket to identify the target client. This operation requires either that the target client is the currently logged-in client, or that the logged-in client has administrative privileges.

Parameters
sockis the socket number for the stream socket to the client
bufis a NetBuffer associated with the stream socket to a client
clientNameis the name of the currently logged-in client
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Definition at line 695 of file ClientMgr.cpp.

Here is the call graph for this function:

void forest::uploadPhoto ( int  sock,
NetBuffer buf,
string &  clientName,
string &  reply 
)

Handle an upload photo request.

Reads from the socket to identify the target client. This operation requires either that the target client is the currently logged-in client, or that the logged-in client has administrative privileges.

Parameters
sockis the socket number for the stream socket to the client
bufis a NetBuffer associated with the stream socket to a client
clientNameis the name of the currently logged-in client
replyis a reference to a string in which an error message may be returned if the operation does not succeed.

Definition at line 707 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

bool forest::validTokenList ( list< string >  tokenList)

Verify that a tokenList is valid Specificialy, check that if it starts with a command phrase or abbreviation, then it's a valid command phrase or abbreviation.

Also, check each attribute-value assignment to verify that the attribute is valid

Parameters
tokenListis a list of tokens
Returns
true if the token list passes all checks, else false

Definition at line 302 of file Console.cpp.

Here is the caller graph for this function:

void forest::writeAcctRecord ( const string &  cname,
fAdr_t  cliAdr,
ipa_t  cliIp,
fAdr_t  rtrAdr,
acctRecType  recType 
)

Writes a record to the accounting file.

Parameters
cnameis the name of the client
cliAdris the Forest address assigned to the client
cliIpis the IP address used by client to login
rtrAdris the Forest address for the router assigned to the client
recTypeis the type of accounting record

Definition at line 803 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::writeAdminRecord ( int  adx)

Write a record to the file of network administrators.

The calling thread is assumed to hold a lock on the client.

Parameters
adxis a non-negative integer

Definition at line 1379 of file NetMgr.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void forest::writeRecord ( int  clx)

Write a client record to clientFile.

Read a client record from an input file and initialize its table entry.

The calling thread is assumed to hold a lock on the client.

Parameters
clxis a non-negative integer
A record includes a client name, password, real name (in quotes),
an email address, a default rate spec and a total rate spec.
Parameters
inis an open file stream
clxis an optional argument specifying the client index for this entry; if zero, a client index is selected automatically (this is the default behavior) bool ClientTable::readEntry(istream& in, int clx) { string cname, pwd, privString, realName, email; RateSpec defRates, totalRates;

if (!in.good()) return false; if (Misc::verify(in,'+')) { if (!Misc::readName(in, cname) || !Misc::verify(in,',') || !Misc::readWord(in, pwd) || !Misc::verify(in,',') || !Misc::readWord(in, privString) || !Misc::verify(in,',') || !Misc::readString(in, realName) || !Misc::verify(in,',') || !Misc::readWord(in, email) || !Misc::verify(in,',') || !defRates.read(in) || !Misc::verify(in,',') || !totalRates.read(in)) { return false; } Misc::cflush(in,'
'); } else if (Misc::verify(in,'-')) { maxClx = max(clx, maxClx); Misc::cflush(in,'
'); return true; } else { Misc::cflush(in,'
'); return false; }

privileges priv; if (privString == "limited") priv = LIMITED; else if (privString == "standard") priv = STANDARD; else if (privString == "admin") priv = ADMIN; else if (privString == "root") priv = ROOT; else priv = NUL_PRIV;

if (addClient(cname, pwd, priv,clx) == 0) return false; setRealName(clx,realName); setEmail(clx,email); getDefRates(clx) = defRates; getTotalRates(clx) = totalRates; getAvailRates(clx) = totalRates; releaseClient(clx); return true; } Read a client entry from a NetBuffer. The entry must be on a line by itself. An entry consists of a client name, password, real name (in quotes), an email address and a default rate spec.

Parameters
bufis a NetBuffer that contains a valid client table entry
clxspecifies the client number for this entry
Returns
clx on success, 0 if the buf does not contain a valid entry and -1 on some other error int ClientTable::readRecord(NetBuffer& buf, int clx) { string cname, pwd, privString, realName, email; RateSpec defRates, totalRates;

if (!buf.skipSpaceInLine(in)) return false; if (!buf.readName(cname) || !buf.verify(',') || !buf.readWord(pwd) || !buf.verify(',') || !buf.readWord(privString) || !buf.verify(',') || !buf.readString(realName) || !buf.verify(',') || !buf.readWord(email) || !buf.verify(',') || !buf.readRspec(defRates) || !buf.verify(',') || !buf.readRspec(totalRates)) { return 0; } buf.nextLine();

privileges priv; if (privString == "limited") priv = LIMITED; else if (privString == "standard") priv = STANDARD; else if (privString == "admin") priv = ADMIN; else if (privString == "root") priv = ROOT; else priv = NUL_PRIV;

if (addClient(cname, pwd, priv, clx) == 0) return -1; setRealName(clx,realName); setEmail(clx,email); getDefRates(clx) = defRates; getTotalRates(clx) = totalRates; getAvailRates(clx) = totalRates; releaseClient(clx); return 1; } Read client table entries from an input stream. The first line of the input must contain an integer, giving the number of entries to be read. The input may include blank lines and comment lines (any text starting with '#'). The operation may fail if the input is misformatted or if an entry does not pass some basic sanity checks. In this case, an error message is printed that identifies the entry on which a problem was detected

Parameters
inis an open input stream
Returns
true on success, false on failure bool ClientTable::read(istream& in) { int i = 0; while (readEntry(in,i)) i++; cout << "read " << i << " client records, producing " << clients->getNumIn() << "table entries\n"; return true; }

Definition at line 843 of file ClientMgr-sav.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

ComtInfo * forest::comtrees

definition of all comtrees

pre-configured comtrees

Definition at line 45 of file ComtCtl.h.

char * forest::dummyRecord

dummy record for padding client file

dummy record for padding admin file

Definition at line 27 of file ClientMgr.h.

int forest::maxRecord

largest record number in client file

largest record number in admin file

Definition at line 28 of file ClientMgr.h.

fAdr_t forest::myAdr

Forest address of self.

forest address of this host

Definition at line 20 of file ClientMgr.h.

ipa_t forest::myIp

address of interface to use

NetMgr manages a Forest network.

IP address bound to sockets.

It relays control packets from a remote Console and provides some autonomous control capabilities. IP address of this host

Definition at line 21 of file ClientMgr.h.

fAdr_t forest::nmAdr

Forest address of NetMgr.

forest address for network manager

Definition at line 26 of file ClientMgr.h.

ipa_t forest::nmIp

IP address of NetMgr.

ComtCtl manages a set of comtrees in a forest network.

It receives signalling requests from clients and configures comtrees in response to those requests.IP address for network manager

Definition at line 25 of file ClientMgr.h.

fAdr_t forest::rtrAdr

Forest address of router.

forest address of router

forest address of access router

Definition at line 22 of file ClientMgr.h.

Substrate * forest::sub

substrate for handling packets

substrate for routing control packets

substrate for steering packets

Definition at line 32 of file ClientMgr.h.