forest-net
an overlay networks for large-scale virtual worlds
|
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...
#include <CpHandler.h>
Public Member Functions | |
CpHandler (Queue *q1, Queue *q2, fAdr_t myAdr1, Logger *log, PacketStoreTs *ps1) | |
pktx | clientAddComtree (fAdr_t, int, CtlPkt &) |
Send a client add comtree request. More... | |
pktx | clientDropComtree (fAdr_t, comt_t, CtlPkt &) |
Send a client drop comtree request. More... | |
pktx | clientJoinComtree (fAdr_t, comt_t, ipa_t, ipp_t, CtlPkt &) |
Send a client join comtree request. More... | |
pktx | clientLeaveComtree (fAdr_t, comt_t, ipa_t, ipp_t, CtlPkt &) |
Send a client leave comtree request. More... | |
pktx | addIface (fAdr_t, int, ipa_t, RateSpec &, CtlPkt &) |
Send an add interface request packet. More... | |
pktx | dropIface (fAdr_t, int, CtlPkt &) |
Send a drop interface request packet. More... | |
pktx | modIface (fAdr_t, int, ipa_t, RateSpec &, CtlPkt &) |
Send a modify interface request packet. More... | |
pktx | getIface (fAdr_t, int, CtlPkt &) |
Send a get interface request packet. More... | |
pktx | getIfaceSet (fAdr_t, int, int, CtlPkt &) |
Send a get iface set request packet. More... | |
pktx | addLink (fAdr_t, Forest::ntyp_t, int, int, ipa_t, ipp_t, fAdr_t, uint64_t, CtlPkt &) |
Send an add link request packet. More... | |
pktx | addLink (fAdr_t, Forest::ntyp_t, int, uint64_t, CtlPkt &) |
Send an add link request packet (short form for dynamic leaf nodes). More... | |
pktx | dropLink (fAdr_t, int, fAdr_t, CtlPkt &) |
Send a drop link request packet. More... | |
pktx | modLink (fAdr_t, int, RateSpec &, CtlPkt &) |
Send a modify link request packet. More... | |
pktx | getLink (fAdr_t, int, CtlPkt &) |
Send a get link request packet. More... | |
pktx | getLinkSet (fAdr_t, int, int, CtlPkt &) |
Send a get link set request packet. More... | |
pktx | addComtree (fAdr_t, comt_t, CtlPkt &) |
Send an add comtree request packet. More... | |
pktx | dropComtree (fAdr_t, comt_t, CtlPkt &) |
Send a drop comtree request packet. More... | |
pktx | modComtree (fAdr_t, comt_t, int, int, CtlPkt &) |
Send a modify comtree request packet. More... | |
pktx | getComtree (fAdr_t, comt_t, CtlPkt &) |
Send a get comtree request packet. More... | |
pktx | getComtreeSet (fAdr_t, int, int, CtlPkt &) |
Send a get comtree set request packet. More... | |
pktx | addComtreeLink (fAdr_t, comt_t, int, int, CtlPkt &) |
Send an add comtree link request packet. More... | |
pktx | addComtreeLink (fAdr_t, comt_t, fAdr_t, CtlPkt &) |
Send an add comtree link request packet. More... | |
pktx | dropComtreeLink (fAdr_t, comt_t, int, fAdr_t, CtlPkt &) |
Send an add comtree link request packet. More... | |
pktx | modComtreeLink (fAdr_t, comt_t, int, RateSpec &, CtlPkt &) |
Send a drop comtree link request packet. More... | |
pktx | getComtreeLink (fAdr_t, comt_t, int, CtlPkt &) |
Send a get comtree link request packet. More... | |
pktx | getRouteSet (fAdr_t, int, int, CtlPkt &) |
Send a get route set request packet. More... | |
pktx | addFilter (fAdr_t, CtlPkt &) |
Send an add filter request packet. More... | |
pktx | dropFilter (fAdr_t, int, CtlPkt &) |
Send a drop filter request packet. More... | |
pktx | modFilter (fAdr_t, int, string &, CtlPkt &) |
Send a modify filter request packet. More... | |
pktx | getFilter (fAdr_t, int, CtlPkt &) |
Send a get filter request packet. More... | |
pktx | getFilterSet (fAdr_t, int, int, CtlPkt &) |
Send a get filter set request packet. More... | |
pktx | getLoggedPackets (fAdr_t, CtlPkt &) |
Send a get logged packets request packet. More... | |
pktx | enablePacketLog (fAdr_t, bool, bool, CtlPkt &) |
Send an enable packet log request packet. More... | |
pktx | newSession (fAdr_t, ipa_t, RateSpec &, CtlPkt &) |
Send a new session request packet. More... | |
pktx | cancelSession (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
Send a cancel session request packet. More... | |
pktx | clientConnect (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
Send a client connect request packet. More... | |
pktx | clientDisconnect (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
Send a client disconnect request packet. More... | |
pktx | setLeafRange (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
Send a set leaf range packet to a router. More... | |
pktx | configLeaf (fAdr_t, fAdr_t, fAdr_t, ipa_t, ipp_t, uint64_t, CtlPkt &) |
Send a leaf config packet. More... | |
pktx | bootRouter (fAdr_t, CtlPkt &) |
Send a boot router packet. More... | |
pktx | bootLeaf (fAdr_t, CtlPkt &) |
Send a boot leaf packet. More... | |
pktx | bootComplete (fAdr_t, CtlPkt &) |
Send a boot complete packet. More... | |
pktx | bootAbort (fAdr_t, CtlPkt &) |
Send a boot abort packet. More... | |
int | sendRequest (CtlPkt &, fAdr_t, CtlPkt &) |
Send a control packet request back through the main thread. More... | |
bool | handleReply (pktx, CtlPkt &, string &, string &) |
void | sendReply (CtlPkt &, fAdr_t) |
Send a control packet reply back through the main thread. More... | |
void | errReply (pktx, CtlPkt &, const string &) |
Build and send error reply packet for ps. More... | |
void | setTunnel (ipa_t, ipp_t) |
CpHandler (Queue *q1, Queue *q2, fAdr_t myAdr1, Logger *log, PacketStoreTs *ps1) | |
pktx | clientAddComtree (fAdr_t, int, CtlPkt &) |
pktx | clientDropComtree (fAdr_t, comt_t, CtlPkt &) |
pktx | clientJoinComtree (fAdr_t, comt_t, ipa_t, ipp_t, CtlPkt &) |
pktx | clientLeaveComtree (fAdr_t, comt_t, ipa_t, ipp_t, CtlPkt &) |
pktx | addIface (fAdr_t, int, ipa_t, RateSpec &, CtlPkt &) |
pktx | dropIface (fAdr_t, int, CtlPkt &) |
pktx | modIface (fAdr_t, int, ipa_t, RateSpec &, CtlPkt &) |
pktx | getIface (fAdr_t, int, CtlPkt &) |
pktx | addLink (fAdr_t, Forest::ntyp_t, int, int, ipa_t, ipp_t, fAdr_t, uint64_t, CtlPkt &) |
pktx | addLink (fAdr_t, Forest::ntyp_t, int, uint64_t, CtlPkt &) |
pktx | dropLink (fAdr_t, int, fAdr_t, CtlPkt &) |
pktx | modLink (fAdr_t, int, RateSpec &, CtlPkt &) |
pktx | getLink (fAdr_t, int, CtlPkt &) |
pktx | addComtree (fAdr_t, comt_t, CtlPkt &) |
pktx | dropComtree (fAdr_t, comt_t, CtlPkt &) |
pktx | modComtree (fAdr_t, comt_t, int, int, CtlPkt &) |
pktx | getComtree (fAdr_t, comt_t, CtlPkt &) |
pktx | addComtreeLink (fAdr_t, comt_t, int, int, CtlPkt &) |
pktx | addComtreeLink (fAdr_t, comt_t, fAdr_t, CtlPkt &) |
pktx | dropComtreeLink (fAdr_t, comt_t, int, fAdr_t, CtlPkt &) |
pktx | modComtreeLink (fAdr_t, comt_t, int, RateSpec &, CtlPkt &) |
pktx | getComtreeLink (fAdr_t, comt_t, int, CtlPkt &) |
pktx | newSession (fAdr_t, ipa_t, RateSpec &, CtlPkt &) |
pktx | clientConnect (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
pktx | clientDisconnect (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
pktx | setLeafRange (fAdr_t, fAdr_t, fAdr_t, CtlPkt &) |
pktx | configLeaf (fAdr_t, fAdr_t, fAdr_t, ipa_t, ipp_t, uint64_t, CtlPkt &) |
pktx | bootRouter (fAdr_t, CtlPkt &) |
pktx | bootLeaf (fAdr_t, CtlPkt &) |
pktx | bootComplete (fAdr_t, CtlPkt &) |
pktx | bootAbort (fAdr_t, CtlPkt &) |
pktx | getLinkSet (fAdr_t, CtlPkt &, int, int) |
Send a get link table request packet. More... | |
int | sendRequest (CtlPkt &, fAdr_t, CtlPkt &) |
bool | handleReply (pktx, CtlPkt &, string &, string &) |
void | sendReply (CtlPkt &, fAdr_t) |
void | errReply (pktx, CtlPkt &, const string &) |
void | setTunnel (ipa_t, ipp_t) |
Static Public Attributes | |
static const int | NORESPONSE = (1 << 31) |
Private Member Functions | |
int | sendAndWait (pktx, CtlPkt &) |
Send a control request packet multiple times before giving up. More... | |
int | sendAndWait (pktx, CtlPkt &) |
Private Attributes | |
Queue * | inq |
from main thread | |
Queue * | outq |
going back to main thread | |
fAdr_t | myAdr |
address of this host | |
ipa_t | tunIp |
ip address for tunnel | |
ipp_t | tunPort |
port number for tunnel | |
PacketStoreTs * | ps |
thread-safe packet store | |
Logger * | logger |
for reporting error messages | |
This class is designed for use with multi-threaded controllers (NetMgr, ComtCtl, etc) that use control packets to communicate with routers and other components.
It handles retransmission of control packet requests, on behalf of the thread using it. Each thread instantiates and initializes its own CpHandler. The threads use a pair of queues to communicate with a "main thread" that handles IO and routing of packets to the appropriate thread.
Definition at line 31 of file CpHandler.h.
Send an add comtree request packet.
dest | is the destination address for the packet |
comtree | is the comtree number of the comtree to be added (may be 0) |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 284 of file ControlSender.cpp.
pktx forest::CpHandler::addComtreeLink | ( | fAdr_t | dest, |
comt_t | comtree, | ||
int | link, | ||
int | peerCoreFlag, | ||
CtlPkt & | repCp | ||
) |
Send an add comtree link request packet.
dest | is the destination address for the packet |
comtree | is the comtree number of the comtree to be added |
link | is the link number of the link to be added |
peerCoreFlag | is the core flag of the peer for this link (may be -1) |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 342 of file ControlSender.cpp.
pktx forest::CpHandler::addComtreeLink | ( | fAdr_t | dest, |
comt_t | comtree, | ||
fAdr_t | peerAdr, | ||
CtlPkt & | repCp | ||
) |
Send an add comtree link request packet.
This version is used only when the peer is a leaf node.
dest | is the destination address for the packet |
comtree | is the comtree number of the comtree to be added |
peerAdr | is the forest address of the peer |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 359 of file ControlSender.cpp.
Send an add filter request packet.
dest | is the destination address for the packet |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 462 of file ControlSender.cpp.
pktx forest::CpHandler::addIface | ( | fAdr_t | dest, |
int | iface, | ||
ipa_t | ifip, | ||
RateSpec & | rates, | ||
CtlPkt & | repCp | ||
) |
Send an add interface request packet.
dest | is the destination address for the packet |
iface | is the number of the interface to be added |
ifip | is the IP address to be associated with the interface |
rates | is the rate spec for the interface |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 82 of file ControlSender.cpp.
pktx forest::CpHandler::addLink | ( | fAdr_t | dest, |
Forest::ntyp_t | peerType, | ||
int | iface, | ||
int | lnk, | ||
ipa_t | peerIp, | ||
ipp_t | peerPort, | ||
fAdr_t | peerAdr, | ||
uint64_t | nonce, | ||
CtlPkt & | repCp | ||
) |
Send an add link request packet.
dest | is the destination address for the packet |
peerType | is the node type of the peer of the new link |
iface | is the number of the interface for the link |
link | is the link number of the link to be added |
peerIp | is the ip address of the peer |
peerPort | is the ip port of the peer |
peerAdr | is the address for the peer |
nonce | is the nonce that must be included in client connect |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 147 of file ControlSender.cpp.
pktx forest::CpHandler::addLink | ( | fAdr_t | dest, |
Forest::ntyp_t | peerType, | ||
int | iface, | ||
uint64_t | nonce, | ||
CtlPkt & | repCp | ||
) |
Send an add link request packet (short form for dynamic leaf nodes).
dest | is the destination address for the packet |
peerType | is the node type of the peer of the new link |
iface | is the number of the interface for the link |
nonce | is the nonce that must be included in client connect |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 168 of file ControlSender.cpp.
Send a boot abort packet.
dest | is the destination address for the packet |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 679 of file ControlSender.cpp.
Send a boot complete packet.
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 668 of file ControlSender.cpp.
Send a boot leaf packet.
dest | is the destination address for the packet |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 658 of file ControlSender.cpp.
Send a boot router packet.
dest | is the destination address for the packet |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 611 of file ControlSender.cpp.
pktx forest::CpHandler::cancelSession | ( | fAdr_t | dest, |
fAdr_t | clientAdr, | ||
fAdr_t | rtrAdr, | ||
CtlPkt & | repCp | ||
) |
Send a cancel session request packet.
dest | is the destination address for the packet |
clientAdr | is the forest address of the client |
rtAdr | is the forest address of the client's router |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 570 of file ControlSender.cpp.
Send a client add comtree request.
dest | is the destination address for the packet |
zipCode | is the number of the interface to be added |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 20 of file ControlSender.cpp.
pktx forest::CpHandler::clientConnect | ( | fAdr_t | dest, |
fAdr_t | clientAdr, | ||
fAdr_t | rtrAdr, | ||
CtlPkt & | repCp | ||
) |
Send a client connect request packet.
dest | is the destination address for the packet |
clientAdr | is the address of the client |
rtrAdr | is the address of the client's access router |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 585 of file ControlSender.cpp.
pktx forest::CpHandler::clientDisconnect | ( | fAdr_t | dest, |
fAdr_t | clientAdr, | ||
fAdr_t | rtrAdr, | ||
CtlPkt & | repCp | ||
) |
Send a client disconnect request packet.
dest | is the destination address for the packet |
clientAdr | is the address of the client |
rtrAdr | is the address of the client's access router |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 599 of file ControlSender.cpp.
Send a client drop comtree request.
dest | is the destination address for the packet |
comt | is the number of the comtree to be dropped |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 33 of file ControlSender.cpp.
pktx forest::CpHandler::clientJoinComtree | ( | fAdr_t | dest, |
comt_t | comt, | ||
ipa_t | clientIp, | ||
ipp_t | clientPort, | ||
CtlPkt & | repCp | ||
) |
Send a client join comtree request.
dest | is the destination address for the packet |
comt | is the number of the comtree to be dropped |
clientIp | is the client IP address |
clientPort | is the client IP port number |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 48 of file ControlSender.cpp.
pktx forest::CpHandler::clientLeaveComtree | ( | fAdr_t | dest, |
comt_t | comt, | ||
ipa_t | clientIp, | ||
ipp_t | clientPort, | ||
CtlPkt & | repCp | ||
) |
Send a client leave comtree request.
dest | is the destination address for the packet |
comt | is the number of the comtree to be dropped |
clientIp | is the client IP address |
clientPort | is the client IP port number |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 65 of file ControlSender.cpp.
pktx forest::CpHandler::configLeaf | ( | fAdr_t | dest, |
fAdr_t | leafAdr, | ||
fAdr_t | rtrAdr, | ||
ipa_t | rtrIp, | ||
ipp_t | rtrPort, | ||
uint64_t | nonce, | ||
CtlPkt & | repCp | ||
) |
Send a leaf config packet.
dest | is the destination address for the packet |
leafAdr | is the forest address assigned to the leaf |
rtrAdr | is the forest address of the leaf's access router |
rtrIp | is the IP of the leaf's access router |
rtrPort | is the port number of the leaf's access router |
nonce | is a nonce that the leaf can use to connect to router |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 627 of file ControlSender.cpp.
Send a drop comtree request packet.
dest | is the destination address for the packet |
comtree | is the number of the comtree to be dropped |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 297 of file ControlSender.cpp.
pktx forest::CpHandler::dropComtreeLink | ( | fAdr_t | dest, |
comt_t | comtree, | ||
int | link, | ||
fAdr_t | peerAdr, | ||
CtlPkt & | repCp | ||
) |
Send an add comtree link request packet.
dest | is the destination address for the packet |
comtree | is the comtree number of the comtree to be added |
peerCoreFlag | is the core flag of the peer for this link (may be -1) |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
dest | is the destination address for the packet |
comtree | is the comtree number of the comtree |
link | is the link number of the link to be added (may be 0) |
peerAdr | is the address of the peer node (must be non-zero if link=0) |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 393 of file ControlSender.cpp.
Send a drop filter request packet.
dest | is the destination address for the packet |
filter | is the number of the filter to be dropped |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 474 of file ControlSender.cpp.
Send a drop interface request packet.
dest | is the destination address for the packet |
iface | is the number of the interface to be dropped |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 97 of file ControlSender.cpp.
Send a drop link request packet.
dest | is the destination address for the packet |
link | is the number of the link to be dropped (may be 0) |
peerAdr | is the address of the peer at the end of the link (may be 0) |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 183 of file ControlSender.cpp.
Send an enable packet log request packet.
dest | is the destination address for the packet |
on | controls whether logging is to be turned on (true) or off (false) |
local | controls local logging in the same way |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 542 of file ControlSender.cpp.
void forest::CpHandler::errReply | ( | pktx | px, |
CtlPkt & | cp, | ||
const string & | msg | ||
) |
Build and send error reply packet for ps.
px | is the packet index of the request packet we are replying to |
cp | is the control packet structure for p (already unpacked) |
msg | is the error message to be sent. |
Definition at line 828 of file ControlSender.cpp.
Send a get comtree request packet.
dest | is the destination address for the packet |
comtree | is the number of the comtree |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 327 of file ControlSender.cpp.
Send a get comtree link request packet.
dest | is the destination address for the packet |
comtree | is the number of the comtree |
link | is the number of the link |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 448 of file ControlSender.cpp.
Send a get comtree set request packet.
dest | is the destination address for the packet |
firstLink | is the table index for the first comtree to be returned; if zero, start with the first comtree in the table |
count | is the number of comtrees whose table entries are requested |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 241 of file ControlSender.cpp.
Send a get filter request packet.
dest | is the destination address for the packet |
filter | is the number of the filter |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 502 of file ControlSender.cpp.
Send a get filter set request packet.
dest | is the destination address for the packet |
firstFilter | is the table index for the first filter to be returned; if zero, start with the first filter in the table |
count | is the number of filters whose table entries are requested |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 517 of file ControlSender.cpp.
Send a get interface request packet.
dest | is the destination address for the packet |
iface | is the number of the interface |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 127 of file ControlSender.cpp.
Send a get iface set request packet.
dest | is the destination address for the packet |
firstIface | is the table index for the first iface to be returned; if zero, start with the first iface in the table |
count | is the number of ifaces whose table entries are requested |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 256 of file ControlSender.cpp.
Send a get link request packet.
dest | is the destination address for the packet |
link | is the number of the link |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 211 of file ControlSender.cpp.
Send a get link set request packet.
dest | is the destination address for the packet |
firstLink | is the table index for the first link to be returned; if zero, start with the first link in the table |
count | is the number of links whose table entries are requested |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 226 of file ControlSender.cpp.
pktx forest::CpHandler::getLinkSet | ( | fAdr_t | dest, |
CtlPkt & | repCp, | ||
int | firstLinkNum, | ||
int | numOfLinks | ||
) |
Send a get link table request packet.
dest | is the destination address for the packet |
repCp | is a reference to a control packet in which the control packet in the response is returned (if reponse is != 0) |
firstLinkNum | is the first link number |
numOfLinks | is the number of links sent |
Definition at line 571 of file CpHandlerDoowon.cpp.
Send a get logged packets request packet.
dest | is the destination address for the packet |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 529 of file ControlSender.cpp.
Send a get route set request packet.
dest | is the destination address for the packet |
firstRoute | is the table index for the first route to be returned; if zero, start with the first route in the table |
count | is the number of routes whose table entries are requested |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 271 of file ControlSender.cpp.
pktx forest::CpHandler::modComtree | ( | fAdr_t | dest, |
comt_t | comtree, | ||
int | pLink, | ||
int | coreFlag, | ||
CtlPkt & | repCp | ||
) |
Send a modify comtree request packet.
dest | is the destination address for the packet |
comtree | is the number of the comtree to be modified |
pLink | is the parent link for the comtree |
coreFlag | is the core flag for the comtree |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 312 of file ControlSender.cpp.
pktx forest::CpHandler::modComtreeLink | ( | fAdr_t | dest, |
comt_t | comtree, | ||
int | link, | ||
RateSpec & | rates, | ||
CtlPkt & | repCp | ||
) |
Send a drop comtree link request packet.
dest | is the destination address for the packet |
comtree | is the comtree number of the comtree |
peerIp | is the ip address of the peer |
peerPort | is the ip port of the peer |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
dest | is the destination address for the packet |
comtree | is the number of the comtree to be modified |
link | is the link number for the comtree |
rates | is the rate spec for the comtree link |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 432 of file ControlSender.cpp.
pktx forest::CpHandler::modFilter | ( | fAdr_t | dest, |
int | filter, | ||
string & | filterString, | ||
CtlPkt & | repCp | ||
) |
Send a modify filter request packet.
dest | is the destination address for the packet |
filter | is the number of the filter to be modified |
filterString | is a string representation fo the filter |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 488 of file ControlSender.cpp.
pktx forest::CpHandler::modIface | ( | fAdr_t | dest, |
int | iface, | ||
ipa_t | ifip, | ||
RateSpec & | rates, | ||
CtlPkt & | repCp | ||
) |
Send a modify interface request packet.
dest | is the destination address for the packet |
iface | is the number of the interface to be modified |
ifip | is the IP address to be associated with the interface |
rates | is the rate spec for the interface |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 112 of file ControlSender.cpp.
Send a modify link request packet.
dest | is the destination address for the packet |
link | is the number of the link to be modified |
rates | is the rate spec for the link |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 198 of file ControlSender.cpp.
pktx forest::CpHandler::newSession | ( | fAdr_t | dest, |
ipa_t | clientIp, | ||
RateSpec & | rates, | ||
CtlPkt & | repCp | ||
) |
Send a new session request packet.
dest | is the destination address for the packet |
clientIp | is the ip address of the client |
rates | is the rate spec for this session |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 556 of file ControlSender.cpp.
|
private |
Send a control request packet multiple times before giving up.
This method makes a copy of the original and sends the copy back to the main thread. If no reply is received after 1 second, it tries again; it makes a total of three attempts before giving up.
px | is the packet index of the packet to be sent; the header for px is assumed to be unpacked |
cp | is the control packet structure for p (already unpacked) |
Definition at line 741 of file ControlSender.cpp.
Send a control packet reply back through the main thread.
The control packet object is assumed to be already initialized.
cp | is the pre-formatted control packet |
dest | is the destination address to which it is to be sent |
Definition at line 797 of file ControlSender.cpp.
Send a control packet request back through the main thread.
The control packet object is assumed to be already initialized. It is packed into a packet object whose index is then placed in the outq. It then waits for a reply. If the reply is not received after one second, it tries again. After three failed attempts, it gives up.
cp | is the pre-formatted control packet |
dest | is the destination address to which it is to be sent |
repCp | is a reference to a control packet in which the response control packet is returned. |
Definition at line 696 of file ControlSender.cpp.
Send a set leaf range packet to a router.
dest | is the destination address for the packet |
first | is the first forest address in the target router's leaf range |
last | is the last forest address in the target router's leaf range |
repCp | is a reference to a control packet in which the control packet in the response is returned (if response is != 0) |
Definition at line 645 of file ControlSender.cpp.