forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
forest::IoProcessor Class Reference
Collaboration diagram for forest::IoProcessor:

Public Member Functions

 IoProcessor (int, ipp_t, IfaceTable *, LinkTable *, PacketStore *, StatsModule *)
 Constructor for IoProcessor, allocates space and initializes private data. More...
 
bool setup (int)
 Setup an interface. More...
 
bool ready (int)
 
bool setupBootSock (ipa_t, ipa_t)
 
void closeBootSock ()
 
int receive ()
 
void send (int, int)
 

Private Attributes

ipp_t bootIp
 IP address used to boot router.
 
ipa_t nmIp
 IP address used by netMgr.
 
int bootSock
 associated socket
 
ipp_t portNum
 port# for iface sockets
 
int maxIface
 largest interface number
 
int maxSockNum
 largest socket num opened by ioProc
 
fd_set * sockets
 file descr set for open sockets
 
int cIf
 number of "current interface"
 
int nRdy
 number of ready sockets
 
int * sock
 sock[i] is socket for iface i
 
IfaceTableift
 pointer to interface table
 
LinkTablelt
 pointer to link table
 
PacketStoreps
 pointer to packet store
 
StatsModulesm
 pointer to statistics module
 

Detailed Description

Definition at line 21 of file IoProcessor.h.

Constructor & Destructor Documentation

forest::IoProcessor::IoProcessor ( int  maxIface1,
ipp_t  portNum1,
IfaceTable ift1,
LinkTable lt1,
PacketStore ps1,
StatsModule sm1 
)

Constructor for IoProcessor, allocates space and initializes private data.

Parameters
maxIface1is the maximum interface number for this router
portNum1is the port number to be bound to interface sockets; if 0, use system-assigned socket number
ift1is a pointer to the router's InterfaceTable object
lt1is a pointer to the router's LinkTable object
sm1is a pointer to the router's StatsModule object

Definition at line 22 of file Receiver.cpp.

Member Function Documentation

bool forest::IoProcessor::setup ( int  i)

Setup an interface.

Parameters
iis the number of a new interface to be configured
Returns
true on success, false on failure.

Definition at line 45 of file Receiver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: