forest-net
an overlay networks for large-scale virtual worlds
|
Classes | |
struct | ControlInfo |
struct | CpInfo |
struct | nuClient |
structure for tracking pending clients More... | |
Public Member Functions | |
RouterCore (bool, const RouterInfo &) | |
Constructor for RouterCore, initializes key parameters and allocates space. More... | |
bool | readTables (const RouterInfo &) |
Read router configuration tables from files. More... | |
bool | setup () |
Setup router after tables and interfaces have been configured. More... | |
bool | setBooting (bool state) |
void | run (uint64_t) |
Main router processing loop. More... | |
void | dump (ostream &os) |
Write the contents of all router tables to an output stream. More... | |
RouterCore (bool, const RouterInfo &) | |
bool | readTables (const RouterInfo &) |
bool | setup () |
bool | setBooting (bool state) |
void | run (uint64_t) |
void | dump (ostream &os) |
RouterCore (bool, const RouterInfo &) | |
bool | readTables (const RouterInfo &) |
bool | setup () |
bool | setBooting (bool state) |
void | run (uint64_t) |
void | dump (ostream &os) |
Private Member Functions | |
bool | setupIfaces () |
Setup interfaces specified in the interface table. More... | |
bool | setupLeafAddresses () |
Allocate addresses to peers specified in the initial link table. More... | |
bool | setupQueues () |
Setup queues as needed to support initial comtree configuration. More... | |
bool | checkTables () |
Check all router tables for mutual consistency. More... | |
bool | setAvailRates () |
Set available rates for interfaces and links. More... | |
void | addLocalRoutes () |
Add routes to neighboring leaf nodes and to routers in foreign zip codes. More... | |
fAdr_t | allocLeafAdr () |
Allocate a new leaf address. More... | |
bool | allocLeafAdr (fAdr_t) |
Allocate a specified leaf address. More... | |
void | freeLeafAdr (fAdr_t) |
De-allocate a leaf address. More... | |
bool | validLeafAdr (fAdr_t) const |
Determine if a given address is currently assigned. More... | |
bool | isFreeLeafAdr (fAdr_t) const |
Determine if a given address is currently unassigned. More... | |
void | forward (pktx, int) |
Lookup routing entry and forward packet accordingly. More... | |
bool | pktCheck (pktx, int) |
Perform error checks on forest packet. More... | |
void | multiSend (pktx, int, int) |
Forward multiple copies of a packet. More... | |
void | handleConnDisc (pktx) |
Handle a CONNECT or DISCONNECT packet. More... | |
void | handleRteReply (pktx, int) |
Handle a route reply packet. More... | |
void | sendRteReply (pktx, int) |
Send route reply back towards p's source. More... | |
void | subUnsub (pktx, int) |
Perform subscription processing on a packet. More... | |
void | handleCtlPkt (pktx) |
Handle all signalling packets addressed to the router. More... | |
bool | addIface (CtlPkt &, CtlPkt &) |
Handle an ADD_IFACE control packet. More... | |
bool | dropIface (CtlPkt &, CtlPkt &) |
bool | getIface (CtlPkt &, CtlPkt &) |
bool | modIface (CtlPkt &, CtlPkt &) |
bool | getIfaceSet (CtlPkt &, CtlPkt &) |
Respond to a get iface set control packet. More... | |
bool | addLink (CtlPkt &, CtlPkt &) |
bool | dropLink (CtlPkt &, CtlPkt &) |
void | dropLink (int, fAdr_t=0) |
Drop a specified link at this router. More... | |
bool | getLink (CtlPkt &, CtlPkt &) |
bool | modLink (CtlPkt &, CtlPkt &) |
bool | getLinkSet (CtlPkt &, CtlPkt &) |
Respond to a get link set control packet. More... | |
bool | addComtree (CtlPkt &, CtlPkt &) |
bool | dropComtree (CtlPkt &, CtlPkt &) |
bool | getComtree (CtlPkt &, CtlPkt &) |
bool | modComtree (CtlPkt &, CtlPkt &) |
bool | getComtreeSet (CtlPkt &, CtlPkt &) |
Respond to a get comtree set control packet. More... | |
bool | addComtreeLink (CtlPkt &, CtlPkt &) |
bool | dropComtreeLink (CtlPkt &, CtlPkt &) |
void | dropComtreeLink (int, int, int) |
bool | modComtreeLink (CtlPkt &, CtlPkt &) |
bool | getComtreeLink (CtlPkt &, CtlPkt &) |
bool | addRoute (CtlPkt &, CtlPkt &) |
bool | dropRoute (CtlPkt &, CtlPkt &) |
bool | getRoute (CtlPkt &, CtlPkt &) |
bool | modRoute (CtlPkt &, CtlPkt &) |
bool | getRouteSet (CtlPkt &, CtlPkt &) |
Respond to a get route set control packet. More... | |
bool | addFilter (CtlPkt &, CtlPkt &) |
Handle an add filter control packet. More... | |
bool | dropFilter (CtlPkt &, CtlPkt &) |
bool | getFilter (CtlPkt &, CtlPkt &) |
bool | modFilter (CtlPkt &, CtlPkt &) |
bool | getFilterSet (CtlPkt &, CtlPkt &) |
Respond to a get filter set control packet. More... | |
bool | getLoggedPackets (CtlPkt &, CtlPkt &) |
Respond to a get logged packets control packet. More... | |
bool | enablePacketLog (CtlPkt &, CtlPkt &) |
Enable local packet logging. More... | |
bool | setLeafRange (CtlPkt &, CtlPkt &) |
Set leaf address range. More... | |
void | sendConnDisc (int, Forest::ptyp_t) |
Send a connect packet to a peer router. More... | |
bool | sendCpReq (CtlPkt &, fAdr_t) |
Send control packet request. More... | |
bool | sendControl (pktx, uint64_t, int) |
Send a control packet. | |
void | resendControl () |
Retransmit any pending control packets that have timed out. More... | |
void | handleControlReply (pktx) |
Handle incoming replies to control packets. More... | |
void | returnToSender (pktx, CtlPkt &) |
Send packet back to sender. More... | |
bool | setupIfaces () |
bool | setupLeafAddresses () |
bool | setupQueues () |
bool | checkTables () |
bool | setAvailRates () |
void | addLocalRoutes () |
fAdr_t | allocLeafAdr () |
bool | allocLeafAdr (fAdr_t) |
void | freeLeafAdr (fAdr_t) |
bool | validLeafAdr (fAdr_t) const |
bool | isFreeLeafAdr (fAdr_t) const |
void | forward (pktx, int) |
bool | pktCheck (pktx, int) |
void | multiSend (pktx, int, int) |
void | handleConnDisc (pktx) |
void | handleRteReply (pktx, int) |
void | sendRteReply (pktx, int) |
void | subUnsub (pktx, int) |
void | handleCtlPkt (pktx) |
bool | addIface (CtlPkt &, CtlPkt &) |
bool | dropIface (CtlPkt &, CtlPkt &) |
bool | getIface (CtlPkt &, CtlPkt &) |
bool | modIface (CtlPkt &, CtlPkt &) |
bool | addLink (CtlPkt &, CtlPkt &) |
bool | dropLink (CtlPkt &, CtlPkt &) |
void | dropLink (int, fAdr_t=0) |
bool | getLink (CtlPkt &, CtlPkt &) |
bool | modLink (CtlPkt &, CtlPkt &) |
bool | addComtree (CtlPkt &, CtlPkt &) |
bool | dropComtree (CtlPkt &, CtlPkt &) |
bool | getComtree (CtlPkt &, CtlPkt &) |
bool | modComtree (CtlPkt &, CtlPkt &) |
bool | addComtreeLink (CtlPkt &, CtlPkt &) |
bool | dropComtreeLink (CtlPkt &, CtlPkt &) |
void | dropComtreeLink (int, int, int) |
bool | modComtreeLink (CtlPkt &, CtlPkt &) |
bool | getComtreeLink (CtlPkt &, CtlPkt &) |
bool | addRoute (CtlPkt &, CtlPkt &) |
bool | dropRoute (CtlPkt &, CtlPkt &) |
bool | getRoute (CtlPkt &, CtlPkt &) |
bool | modRoute (CtlPkt &, CtlPkt &) |
bool | getLinkSet (CtlPkt &, CtlPkt &) |
bool | setLeafRange (CtlPkt &, CtlPkt &) |
void | sendConnDisc (int, Forest::ptyp_t) |
bool | sendCpReq (CtlPkt &, fAdr_t) |
void | resendCpReq () |
Retransmit any pending control packets that have timed out. More... | |
void | handleCpReply (pktx, CtlPkt &) |
Handle incoming replies to control packets. More... | |
void | returnToSender (pktx, CtlPkt &) |
bool | setupIfaces () |
bool | setupLeafAddresses () |
bool | setupQueues () |
bool | checkTables () |
bool | setAvailRates () |
void | addLocalRoutes () |
fAdr_t | allocLeafAdr () |
bool | allocLeafAdr (fAdr_t) |
void | freeLeafAdr (fAdr_t) |
bool | validLeafAdr (fAdr_t) const |
bool | isFreeLeafAdr (fAdr_t) const |
void | forward (pktx, int) |
bool | pktCheck (pktx, int) |
void | multiSend (pktx, int, int) |
void | handleConnDisc (pktx) |
void | handleRteReply (pktx, int) |
void | sendRteReply (pktx, int) |
void | subUnsub (pktx, int) |
void | handleCtlPkt (pktx) |
bool | addIface (CtlPkt &, CtlPkt &) |
bool | dropIface (CtlPkt &, CtlPkt &) |
bool | getIface (CtlPkt &, CtlPkt &) |
bool | modIface (CtlPkt &, CtlPkt &) |
bool | addLink (CtlPkt &, CtlPkt &) |
bool | dropLink (CtlPkt &, CtlPkt &) |
void | dropLink (int, fAdr_t=0) |
bool | getLink (CtlPkt &, CtlPkt &) |
bool | getLinkSet (CtlPkt &, CtlPkt &) |
bool | getComtreeSet (CtlPkt &, CtlPkt &) |
bool | getIfaceSet (CtlPkt &, CtlPkt &) |
bool | getRouteSet (CtlPkt &, CtlPkt &) |
bool | modLink (CtlPkt &, CtlPkt &) |
bool | addComtree (CtlPkt &, CtlPkt &) |
bool | dropComtree (CtlPkt &, CtlPkt &) |
bool | dropComtree (comt_t) |
bool | getComtree (CtlPkt &, CtlPkt &) |
bool | modComtree (CtlPkt &, CtlPkt &) |
bool | modComtree (comt_t, int, CtlPkt &) |
bool | addComtreeLink (CtlPkt &, CtlPkt &) |
bool | addComtreeLink (comt_t, int, CtlPkt &) |
bool | dropComtreeLink (CtlPkt &, CtlPkt &) |
void | dropComtreeLink (int, int, int) |
bool | modComtreeLink (CtlPkt &, CtlPkt &) |
bool | modComtreeLink (comt_t, int, RateSpec, CtlPkt &) |
bool | getComtreeLink (CtlPkt &, CtlPkt &) |
void | handleClientJoinComtree (pktx, CtlPkt &, CtlPkt &) |
void | handleClientLeaveComtree (pktx, CtlPkt &, CtlPkt &) |
void | handleComtPath (pktx, CtlPkt &) |
void | handleComtAddBranch (pktx, CtlPkt &, CtlPkt &) |
void | handleComtPrune (pktx, CtlPkt &, CtlPkt &) |
void | handleAllPending (vector< pktx > &, CtlPkt &) |
void | handleComtPruneReply (pktx, CtlPkt &) |
void | handleComtNewLeafReply (pktx, CtlPkt &) |
void | handleAddBranchConfirm (pktx, CtlPkt &, CtlPkt &) |
void | handleAddBranchReply (pktx, CtlPkt &) |
void | handleConfirmReply (pktx, CtlPkt &) |
bool | addRoute (CtlPkt &, CtlPkt &) |
bool | dropRoute (CtlPkt &, CtlPkt &) |
bool | getRoute (CtlPkt &, CtlPkt &) |
bool | modRoute (CtlPkt &, CtlPkt &) |
bool | addFilter (CtlPkt &, CtlPkt &) |
bool | dropFilter (CtlPkt &, CtlPkt &) |
bool | getFilter (CtlPkt &, CtlPkt &) |
bool | modFilter (CtlPkt &, CtlPkt &) |
bool | getFilterSet (CtlPkt &, CtlPkt &) |
bool | getLoggedPackets (CtlPkt &, CtlPkt &) |
bool | enablePacketLog (CtlPkt &, CtlPkt &) |
bool | setLeafRange (CtlPkt &, CtlPkt &) |
void | sendConnDisc (int, Forest::ptyp_t) |
bool | sendCpReq (CtlPkt &, fAdr_t) |
bool | sendControl (pktx, uint64_t, int) |
void | resendControl () |
void | handleControlReply (pktx) |
void | returnToSender (pktx, CtlPkt &) |
Private Attributes | |
ipa_t | bootIp |
IP address used during booting. | |
fAdr_t | myAdr |
forest address of this router | |
ipa_t | nmIp |
IP address of the netMgr. | |
fAdr_t | nmAdr |
forest address of the netMgr | |
fAdr_t | ccAdr |
address of comtree controller | |
bool | booting |
true when booting remotely | |
uint64_t | now |
current time in 64 bit form | |
uint64_t | seqNum |
seq # for outgoing control packets | |
fAdr_t | firstLeafAdr |
first leaf address | |
UiSetPair * | leafAdr |
offsets for in-use and free leaf More... | |
map< uint64_t, ControlInfo > * | pending |
map of pending requests | |
int | nIfaces |
max number of interfaces | |
int | nLnks |
max number of links | |
int | nComts |
max number of comtrees | |
int | nRts |
max number of routes | |
int | nPkts |
number of packets | |
int | nBufs |
number of packet buffers | |
int | nQus |
number of queues | |
IfaceTable * | ift |
table defining interfaces | |
LinkTable * | lt |
table defining links | |
ComtreeTable * | ctt |
table of comtrees | |
RouteTable * | rt |
table of routes | |
PacketStore * | ps |
packet buffers and headers | |
QuManager * | qm |
collection of queues for all links | |
IoProcessor * | iop |
class for handling io | |
StatsModule * | sm |
class for recording statistics | |
PacketLog * | pktLog |
log for recording sample of packets | |
list< nuClient > * | pendingClients |
list of clients that have not More... | |
map< uint64_t, CpInfo > * | pending |
map of pending requests, indexed | |
Definition at line 53 of file RouterCore.h.
forest::RouterCore::RouterCore | ( | bool | booting1, |
const RouterInfo & | config | ||
) |
Constructor for RouterCore, initializes key parameters and allocates space.
config | is a RouterInfo structure which has been initialized to specify various router parameters |
Definition at line 117 of file RouterCore-sav.cpp.
Handle an add filter control packet.
Adds the specified interface and prepares a reply packet.
cp | is the control packet structure (already unpacked) |
reply | is a control packet structure for the reply, which the cpType has been set to match cp, the rrType is POS_REPLY and the seqNum has been set to match cp. |
return | true on success, false on failure; on a successful return, all appropriate attributes in reply are set; on a failure return, the errMsg field of reply is set. |
Definition at line 2029 of file RouterCore-sav.cpp.
Handle an ADD_IFACE control packet.
Adds the specified interface and prepares a reply packet.
px | is a packet number |
cp | is the control packet structure for p (already unpacked) |
reply | is a control packet structure for the reply, which the cpType has been set to match cp, the rrType is POS_REPLY and the seqNum has been set to match cp. |
return | true on success, false on failure; on a successful return, all appropriate attributes in reply are set; on a failure return, the errMsg field of reply is set. |
Definition at line 1203 of file RouterCore-sav.cpp.
|
private |
Add routes to neighboring leaf nodes and to routers in foreign zip codes.
Routes are added in all comtrees.
Definition at line 486 of file RouterCore-sav.cpp.
|
inlineprivate |
Allocate a new leaf address.
Definition at line 198 of file RouterCore.h.
|
inlineprivate |
Allocate a specified leaf address.
adr | is an address in the range of assignable addresses |
Definition at line 210 of file RouterCore.h.
|
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.
Definition at line 296 of file RouterCore-sav.cpp.
|
private |
Drop a specified link at this router.
First, remove all comtree links associated with this link. This also removes the comtree link from all multicast routes.
lnk | is the link number of the link to be dropped |
peerAdr | is the address of the peer of the remote end of the link, if lnk == 0; in this case, the link number is looked up using the peerAdr value |
Definition at line 1413 of file RouterCore-sav.cpp.
void forest::RouterCore::dump | ( | ostream & | out) |
Write the contents of all router tables to an output stream.
out | is an open output stream |
Definition at line 509 of file RouterCore-sav.cpp.
Enable local packet logging.
cp | is a reference to a received get logged packets control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 2052 of file RouterCore.cpp.
|
private |
Lookup routing entry and forward packet accordingly.
There are two contexts in which this method is called. The most common case is to forward a CLIENT_DATA packet. The other case is to forward a control packet that originates from this router. In this case the inLink field of the packet's header should be zero.
px | is a packet number for a CLIENT_DATA packet |
ctx | is the comtree table index for the comtree in p's header |
There are two contexts in which this method is called. The most common case is to forward a CLIENT_DATA packet. The other case is to forward a control packet that originates from this router. In this case the inLink field of the packet's header should be zero.
p | is a packet number for a CLIENT_DATA packet |
ctx | is the comtree table index for the comtree in p's header |
Definition at line 712 of file RouterCore-sav.cpp.
|
inlineprivate |
De-allocate a leaf address.
adr | is a previously allocated address. |
Definition at line 220 of file RouterCore.h.
Respond to a get comtree set control packet.
Control packet includes the first comtree in the set to be retrieved plus a count of the number of comtree to be returned; reply includes the first comtree in the set, the count of the number of comtrees returned and the next comtree in the table, following the last one in the returned set.
cp | is a reference to a received get comtree set control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 1576 of file RouterCore-sav.cpp.
Respond to a get filter set control packet.
Control packet includes the first filter in the set to be retrieved plus a count of the number of filters to be returned; reply includes the first filters in the set, the count of the number of filters returned and the next filters in the table, following the last one in the returned set.
cp | is a reference to a received get filter set control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 2079 of file RouterCore-sav.cpp.
Respond to a get iface set control packet.
Control packet includes the first iface in the set to be retrieved plus a count of the number of iface to be returned; reply includes the first iface in the set, the count of the number of ifaces returned and the next iface in the table, following the last one in the returned set.
cp | is a reference to a received get iface set control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 1280 of file RouterCore-sav.cpp.
Respond to a get link set control packet.
Get a LinkTable by Feng and Doowon.
Control packet includes the first link in the set to be retrieved plus a count of the number of links to be returned; reply includes the first link in the set, the count of the number of links returned and the next link in the table, following the last one in the returned set.
cp | is a reference to a received get link set control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 1458 of file RouterCore-sav.cpp.
Respond to a get logged packets control packet.
cp | is a reference to a received get logged packets control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 2115 of file RouterCore-sav.cpp.
Respond to a get route set control packet.
Control packet includes the first route in the set to be retrieved plus a count of the number of route to be returned; reply includes the first route in the set, the count of the number of routes returned and the next route in the table, following the last one in the returned set.
cp | is a reference to a received get route set control packet |
reply | is a reference to the reply packet with fields to be filled in |
Definition at line 1992 of file RouterCore-sav.cpp.
|
private |
Handle a CONNECT or DISCONNECT packet.
px | is the packet number of the packet to be handled. |
p | is the packet number of the packet to be handled. |
Definition at line 1057 of file RouterCore-sav.cpp.
|
private |
Handle incoming replies to control packets.
The reply is checked against the map of pending control packets, and if a match is found, the entry is removed from the map and the storage for the original control packet is freed. Currently, the only action on a reply is to print an error message to the log if we receive a negative reply.
rx | is the packet index of the reply packet |
Definition at line 2232 of file RouterCore.cpp.
|
private |
Handle incoming replies to control packets.
The reply is checked against the map of pending request packets, and if a match is found, the entry is removed from the map and the storage for the request packet is freed. Currently, the only action on a reply is to print an error message to the log if we receive a negative reply.
reply | is the packet number of the reply packet |
cpr | is a reference to an unpacked control packet for reply |
Definition at line 2287 of file RouterCore-sav.cpp.
|
private |
Handle all signalling packets addressed to the router.
Handle all control packets addressed to the router.
Assumes packet has passed all basic checks.
px | is the index of some packet |
with the exception of SUB_UNSUB and RTE_REPLY which are handled "inline". Assumes packet has passed all basic checks. Return 0 if the packet should be forwarded, else 1.
Still need to add error checking for modify messages. This requires extensions to ioProc and lnkTbl to track available bandwidth.
p | is a packet number |
Definition at line 1108 of file RouterCore-sav.cpp.
|
private |
Handle a route reply packet.
Adds a route to the destination of the original packet that triggered the route reply, if no route is currently defined. If there is no route to the destination address in the packet, the packet is flooded to neighboring routers. If there is a route to the destination, it is forwarded along that route, so long as the next hop is another router.
Definition at line 849 of file RouterCore-sav.cpp.
|
inlineprivate |
Determine if a given address is currently unassigned.
adr | is a forest unicast address |
Definition at line 240 of file RouterCore.h.
|
private |
Forward multiple copies of a packet.
There are two contexts in which this method is called. The most common case is to forward a CLIENT_DATA packet. The other case is to forward a control packet that originates from this router. In this case the inLink field of the packet's header should be zero.
px | is the number of a multi-destination packet |
ctx | is the comtree index for the comtree in p's header |
rtx | is the route index for p, or 0 if there is no route |
There are two contexts in which this method is called. The most common case is to forward a CLIENT_DATA packet. The other case is to forward a control packet that originates from this router. In this case the inLink field of the packet's header should be zero.
p | is the number of a multi-destination packet |
ctx | is the comtree index for the comtree in p's header |
rtx | is the route index for p, or 0 if there is no route |
Definition at line 756 of file RouterCore-sav.cpp.
|
private |
Perform error checks on forest packet.
px | is a packet index |
ctx | is the comtree index for p's comtree |
p | is a packet number |
ctx | is the comtree index for p's comtree |
Definition at line 647 of file RouterCore-sav.cpp.
bool forest::RouterCore::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.
config | is a RouterInfo structure which has been initialized to specify various router parameters |
Definition at line 159 of file RouterCore-sav.cpp.
|
private |
Retransmit any pending control packets that have timed out.
This method checks the map of pending requests and whenever it finds a packet that has been waiting for an acknowledgement for more than a second, it retransmits it or gives up, if it has already made three attempts.
Definition at line 2183 of file RouterCore.cpp.
|
private |
Retransmit any pending control packets that have timed out.
This method checks the map of pending requests and whenever it finds a packet that has been waiting for an acknowledgement for more than a second, it retransmits it or gives up, if it has already made three attempts.
Definition at line 2240 of file RouterCore-sav.cpp.
|
private |
Send packet back to sender.
Update the length, flip the addresses and pack the buffer.
px | is the packet number |
cp | is a control packet to be packed |
Definition at line 2341 of file RouterCore-sav.cpp.
void forest::RouterCore::run | ( | uint64_t | finishTime) |
Main router processing loop.
This method executes a loop that does three primary things:
In addition, the main loop periodically writes taffic statistics to an external statistics file. It also maintains copies of a limited number of packets received and sent. These are printed to cout after the main loop exits, to facilitate debugging.
Time is managed through a free-running clock, derived from the time value returned by gettimeofday. The clock is updated on each iteration of the loop.
Note, that since the loop processes only one input packet per iteration, and possibly multiple output packets, excessive input traffic will cause packets to be discarded from socket buffers before they ever reach this program. This is intended to keep the system productive, even during overload. However, it is still best to limit input traffic rates where that is possible.
finishTime | is the number of microseconds to run before stopping; if it is zero, the router runs without stopping (until killed) |
Definition at line 546 of file RouterCore-sav.cpp.
|
private |
Send a connect packet to a peer router.
lnk | is link number of the link on which we want to connect. |
lnk | is link number of the link on which we want to connect. |
type | is CONNECT or DISCONNECT |
Definition at line 2149 of file RouterCore-sav.cpp.
Send control packet request.
Builds a packet containing the specified control packet and stores its packet number and a timestamp in the map of pending control packet requests. Then, makes a copy, which is sent to the destination.
cp | is a reference to the control packet to be sent |
dest | is the destination address to which the packet is to be sent |
Definition at line 2187 of file RouterCore-sav.cpp.
|
private |
Send route reply back towards p's source.
The reply is sent on the link on which p was received and is addressed to p's original sender.
px | is a packet number |
ctx | is the comtree index for p's comtree |
The reply is sent on the link on which p was received and is addressed to p's original sender.
p | is a packet number |
ctx | is the comtree index for p's comtree |
Definition at line 821 of file RouterCore-sav.cpp.
|
private |
Set available rates for interfaces and links.
Sends error messages to cerr if specified rates lead to over-subscription.
Definition at line 424 of file RouterCore-sav.cpp.
Set leaf address range.
px | is the number of the boot complete request packet |
cp | is an unpacked control packet for p |
reply | is a reference to a pre-formatted positive reply packet that will be returned to the sender; it may be modified to indicate a negative reply. |
Definition at line 2128 of file RouterCore-sav.cpp.
bool forest::RouterCore::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 212 of file RouterCore-sav.cpp.
|
private |
Setup interfaces specified in the interface table.
This involves opening a separate UDP socket for each interface.
Definition at line 228 of file RouterCore-sav.cpp.
|
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.
Definition at line 247 of file RouterCore-sav.cpp.
|
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.
Definition at line 262 of file RouterCore-sav.cpp.
|
private |
Perform subscription processing on a packet.
The packet contains two lists of multicast addresses, each preceded by its length. The combined list lengths is limited to 350.
px | is a packet number |
ctx | is the comtree index for p's comtree |
The packet contains two lists of multicast addresses, each preceded by its length. The combined list lengths is limited to 350.
p | is a packet number |
ctx | is the comtree index for p's comtree |
Definition at line 949 of file RouterCore-sav.cpp.
|
inlineprivate |
Determine if a given address is currently assigned.
adr | is a forest unicast address |
Definition at line 231 of file RouterCore.h.
|
private |
|
private |