forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
ClientMgr.cpp File Reference
#include "ClientMgr.h"
#include <map>
#include <iostream>
#include <fstream>
#include <sstream>
Include dependency graph for ClientMgr.cpp:

Go to the source code of this file.

Namespaces

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

Constant Groups

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

Functions

int main (int argc, char *argv[])
 usage: ClientMgr nmIp myIp finTime More...
 
bool forest::init (ipa_t nmIp1, ipa_t myIp1)
 Initializes sockets, and acts as a psuedo-constructor. More...
 
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. More...
 
void * forest::handler (void *qp)
 Control packet handler. More...
 
bool forest::handleClient (int sock, CpHandler &cph)
 Handle a connection from a client. More...
 
bool forest::login (NetBuffer &buf, string &clientName, string &reply)
 Handle a login request. More...
 
bool forest::newAccount (NetBuffer &buf, string &clientName, string &reply)
 Handle a new account request. More...
 
bool forest::newSession (int sock, CpHandler &cph, NetBuffer &buf, string &clientName, string &reply)
 Handle a request for a new forest session. More...
 
int forest::checkPrivileges (string clientName, string targetName)
 Verify that a client may perform privileged operations on a target. More...
 
void forest::getProfile (NetBuffer &buf, string &clientName, string &reply)
 Handle a get profile request. More...
 
void forest::updateProfile (NetBuffer &buf, string &clientName, string &reply)
 Handle an update profile request. More...
 
void forest::changePassword (NetBuffer &buf, string &clientName, string &reply)
 Handle a change password request. More...
 
void forest::uploadFile (string &type, int sock, NetBuffer &buf, string &clientName, string &reply)
 Handle an upload request. More...
 
void forest::getSessions (NetBuffer &buf, string &clientName, string &reply)
 Respond to getSessions request from a client. More...
 
void forest::cancelSession (NetBuffer &buf, string &clientName, CpHandler &cph, string &reply)
 Respond to cancelSessions request from a client. More...
 
void forest::cancelAllSessions (NetBuffer &buf, string &clientName, CpHandler &cph, string &reply)
 Respond to cancelAllSessions request from a client. More...
 
void forest::addComtree (NetBuffer &buf, string &clientName, string &reply)
 
bool forest::handleConnDisc (pktx px, CtlPkt &cp, CpHandler &cph)
 Handle a connect or disconnect message from the NetBgr. More...
 
void forest::writeAcctRecord (const string &cname, fAdr_t cliAdr, ipa_t cliIp, fAdr_t rtrAdr, acctRecType recType)
 Writes a record to the accounting file. More...
 
void forest::writeRecord (int clx)
 Write a client record to clientFile. More...
 

Detailed Description

Author
Jonathan Turner (based on earlier version by Logan Stafman)
Date
2013 This is open source software licensed under the Apache 2.0 license. See http://www.apache.org/licenses/LICENSE-2.0 for details.
Author
Jonathan Turner (based on earlier version by Logan Stafman)
Andrew Kelley and Sam Jonesi added extensions to display and cancel sessions
Date
2013 This is open source software licensed under the Apache 2.0 license. See http://www.apache.org/licenses/LICENSE-2.0 for details.

Definition in file ClientMgr.cpp.

Function Documentation

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

usage: ClientMgr nmIp myIp finTime

Command line arguments include the following: nmIp - IP address of network manager myIp - IP address of the preferred interface for client manager finTime - how many seconds this program should run before terminating

Definition at line 27 of file ClientMgr.cpp.

Here is the call graph for this function: