#include <VirtualCircuitTable.h>
Inheritance diagram for VirtualCircuitTable::
Public Methods | |
VirtualCircuitTable (Node *myself) | |
virtual | ~VirtualCircuitTable () |
VirtualCircuitTableEntry * | add (Node *srcNode, int srcVcn, Node *destNode, int destVcn) |
Add an entry to the front of the table. More... | |
VirtualCircuitTableEntry * | findBySrc (Node *srcNode, int srcVcn) |
Lookup an entry in the virtual circuit table using the source node and source vcn as the key. More... | |
VirtualCircuitTableEntry * | findByDest (Node *destNode, int destVcn) |
Lookup an entry in the virtual circuit table using the destination node and destination vcn as the key. More... | |
VirtualCircuitTableEntry * | findNode (Node *node) |
Find an entry that has the specified node in either src or dest field. More... | |
bool | remove (Node *srcNode, int srcVcn) |
Remove an entry from the table. More... | |
bool | isThisPacketForMe (Node *fromNode, NpPacket *packet) |
This is only for NON-CONNECTION packets. More... | |
virtual void | toStream (std::ostream &out) |
Private Methods | |
VirtualCircuitTableEntry * | lookUp (int srvVcn, Node *srcNode) |
Private Attributes | |
vector< VirtualCircuitTableEntry *> | m_table |
Node * | m_myself |
Mutex | m_tableLock |
Definition at line 13 of file VirtualCircuitTable.h.
|
Definition at line 10 of file VirtualCircuitTable.cpp. |
|
Definition at line 18 of file VirtualCircuitTable.cpp. |
|
Add an entry to the front of the table. We can get all of the information we need from the packet itself.
Definition at line 35 of file VirtualCircuitTable.cpp. Referenced by NetworkLayer::connectForward(), NetworkLayer::connectTerminate(), NetworkLayer::handleEstablishedPacket(), and NetworkLayer::makeVc().
|
|
Lookup an entry in the virtual circuit table using the destination node and destination vcn as the key. If found, it returns the virtual circuit table entry cooresponding to those keys. If nothing is found, return NULL.
Definition at line 98 of file VirtualCircuitTable.cpp. Referenced by NetworkLayer::handleEstablishedPacket().
|
|
Lookup an entry in the virtual circuit table using the source node and source vcn as the key. If found, it returns the virtual circuit table entry cooresponding to those keys. If nothing is found, return NULL.
Definition at line 68 of file VirtualCircuitTable.cpp. Referenced by NetworkLayer::destroyVc(), NetworkLayer::forwardPacket(), NetworkLayer::handleConnectPacket(), NetworkLayer::handleDataPacket(), NetworkLayer::handleFinPacket(), NetworkLayer::hasVc(), isThisPacketForMe(), NetworkLayer::isThisPacketForMe(), and NetworkLayer::send().
|
|
Find an entry that has the specified node in either src or dest field.
Definition at line 122 of file VirtualCircuitTable.cpp. Referenced by NetworkLayer::destroyVcsTo().
|
|
This is only for NON-CONNECTION packets.
Definition at line 188 of file VirtualCircuitTable.cpp. |
|
|
|
Remove an entry from the table.
Definition at line 146 of file VirtualCircuitTable.cpp. Referenced by NetworkLayer::destroyVc(), NetworkLayer::destroyVcsTo(), and NetworkLayer::handleFinPacket().
|
|
Reimplemented from BasicObject. Definition at line 254 of file VirtualCircuitTable.cpp. Referenced by operator<<().
|
|
Definition at line 52 of file VirtualCircuitTable.h. |
|
Definition at line 50 of file VirtualCircuitTable.h. |
|
Definition at line 54 of file VirtualCircuitTable.h. |