|
class | RouterInProc |
|
class | RouterOutProc |
|
class | RouterControl |
|
Definition at line 70 of file Router.h.
forest::Router::Router |
( |
const RouterInfo & |
config) | |
|
Constructor for Router, initializes key parameters and allocates space.
- Parameters
-
config | is a RouterInfo structure which has been initialized to specify various router parameters |
Definition at line 114 of file Router.cpp.
void forest::Router::addLocalRoutes |
( |
) | |
|
|
private |
Add routes to neighboring leaf nodes and to routers in foreign zip codes.
Routes are added in all comtrees.
Definition at line 536 of file Router.cpp.
fAdr_t forest::Router::allocLeafAdr |
( |
) | |
|
|
inlineprivate |
Allocate a new leaf address.
Caller is assumed to hold the LinkTable lock.
- Returns
- a previously unused address in the range of assignable leaf addresses for this router, or 0 if all addresses are in use
Definition at line 152 of file Router.h.
bool forest::Router::allocLeafAdr |
( |
fAdr_t |
adr) | |
|
|
inlineprivate |
Allocate a specified leaf address.
Caller is assumed to hold the LinkTable lock.
- Parameters
-
adr | is an address in the range of assignable addresses |
- Returns
- true of the adr is available for use and was successfully allocated, else false
Definition at line 165 of file Router.h.
bool forest::Router::checkTables |
( |
) | |
|
|
private |
Check all router tables for mutual consistency.
Sends error messages to cerr if inconsistencies are found. This does not verify the consistency of interface, link and comtree rates. That is left to the setAvailRates() method.
- Returns
- true on success, false on failure
Definition at line 347 of file Router.cpp.
void forest::Router::dump |
( |
ostream & |
out) | |
|
Write the contents of all router tables to an output stream.
- Parameters
-
out | is an open output stream |
Definition at line 557 of file Router.cpp.
void forest::Router::freeLeafAdr |
( |
fAdr_t |
adr) | |
|
|
inlineprivate |
De-allocate a leaf address.
Caller is assumed to hold the LinkTable lock.
- Parameters
-
adr | is a previously allocated address. |
Definition at line 176 of file Router.h.
bool forest::Router::isFreeLeafAdr |
( |
fAdr_t |
adr) | |
const |
|
inlineprivate |
Determine if a given address is currently unassigned.
Caller is assumed to hold the LinkTable lock.
- Parameters
-
adr | is a forest unicast address |
- Returns
- true if adr is not currently assigned.
Definition at line 198 of file Router.h.
uint64_t forest::Router::nextSeqNum |
( |
) | |
|
|
private |
Get the next sequence number.
Definition at line 170 of file Router.cpp.
bool forest::Router::readTables |
( |
const RouterInfo & |
config) | |
|
Read router configuration tables from files.
This method reads initial router configuration files (if present) and configures router tables as specified.
- Parameters
-
config | is a RouterInfo structure which has been initialized to specify various router parameters |
Definition at line 182 of file Router.cpp.
bool forest::Router::setAvailRates |
( |
) | |
|
|
private |
Set available rates for interfaces and links.
Sends error messages to cerr if specified rates lead to over-subscription.
- Returns
- true on success, false if specified rates oversubscribe an interface or link
Definition at line 474 of file Router.cpp.
bool forest::Router::setup |
( |
) | |
|
Setup router after tables and interfaces have been configured.
Invokes several setup and verification methods to ensure that the initial configuration is fully consistent.
Definition at line 235 of file Router.cpp.
bool forest::Router::setupAllIfaces |
( |
) | |
|
Setup interfaces specified in the interface table.
This involves opening a separate UDP socket for each interface.
- Returns
- true on success, false on failure
Definition at line 251 of file Router.cpp.
bool forest::Router::setupIface |
( |
int |
i) | |
|
Setup an interface.
Caller is assumed to hold the lock on the IfaceTable object.
- Parameters
-
i | is the number of a new interface to be configured |
- Returns
- true on success, false on failure.
Definition at line 269 of file Router.cpp.
bool forest::Router::setupLeafAddresses |
( |
) | |
|
|
private |
Allocate addresses to peers specified in the initial link table.
Verifies that the initial peer addresses are in the range of assignable leaf addresses, and allocates them if they are.
- Returns
- true on success, false on failure
Definition at line 298 of file Router.cpp.
bool forest::Router::setupQueues |
( |
) | |
|
|
private |
Setup queues as needed to support initial comtree configuration.
For each defined comtree, a queue is allocated to each of its links. For each comtree link, initial rates are the minimum bit rate and packet rate allowed.
- Returns
- true on success, false on failure
Definition at line 314 of file Router.cpp.
bool forest::Router::validLeafAdr |
( |
fAdr_t |
adr) | |
const |
|
inlineprivate |
Determine if a given address is currently assigned.
Caller is assumed to hold the LinkTable lock.
- Parameters
-
adr | is a forest unicast address |
- Returns
- true if adr is one that had been previously assigned
Definition at line 188 of file Router.h.
The documentation for this class was generated from the following files: