#include <AwdsRouting.h>

Public Types | |
|
typedef std::map< NodeId, Hop2RefCount > | Hop2List |
|
typedef std::pair < recv_callback, void * > | RegisterEntry |
|
typedef std::map< int, RegisterEntry > | ProtocolRegister |
|
typedef std::map < FlowRouting::FlowId, struct FlowReceiverData > | FlowReceiverMap |
|
typedef std::map < FlowRouting::FlowId, NodeId > | ForwardingTable |
Public Member Functions | |
| AwdsRouting (basic *base) | |
| virtual size_t | getMTU () |
| virtual std::string | getNameOfNode (const awds::NodeId &id) const |
| virtual bool | getNodeByName (awds::NodeId &id, const char *name) const |
| virtual int | foreachNode (awds::Routing::NodeFunctor, void *data) const |
| virtual int | foreachEdge (awds::Routing::EdgeFunctor, void *data) const |
| virtual void | addNodeObserver (struct awds::Routing::NodesObserver *observer) |
| virtual void | addLinkObserver (struct LinksObserver *observer) |
| void | recv_beacon (BasePacket *p) |
| void | recv_flood (BasePacket *p) |
| void | recv_unicast (BasePacket *p) |
| virtual bool | isReachable (const NodeId &id) const |
| virtual BasePacket * | newFloodPacket (int floodType) |
| virtual BasePacket * | newUnicastPacket (int type) |
| virtual void | sendBroadcast (BasePacket *p) |
| virtual void | sendUnicast (BasePacket *p) |
| virtual void | sendUnicastVia (BasePacket *p, NodeId nextHop) |
| virtual void | registerUnicastProtocol (int num, recv_callback cb, void *data) |
| virtual void | registerBroadcastProtocol (int num, recv_callback cb, void *data) |
| int | findNeigh (const NodeId &id) const |
| bool | hasNeigh (const NodeId &id) const |
| void | removeOldNeigh () |
| bool | refreshNeigh (BasePacket *p) |
| void | stat2dyn () |
| void | assert_stat () |
| void | calcMpr () |
| virtual int | addForwardingRule (FlowRouting::FlowId flowid, NodeId nextHop) |
| virtual int | delForwardingRule (FlowRouting::FlowId flowid) |
| virtual int | addFlowReceiver (FlowRouting::FlowId flowid, FlowRouting::FlowReceiver, void *data) |
| virtual int | delFlowReceiver (FlowRouting::FlowId) |
| virtual BasePacket * | newFlowPacket (FlowRouting::FlowId flowid) |
| virtual int | sendFlowPacket (BasePacket *p) |
Static Public Member Functions | |
| static void | send_beacon (gea::Handle *h, gea::AbsTime t, void *data) |
| static void | recv_packet (gea::Handle *h, gea::AbsTime t, void *data) |
| static void | trigger_topo (gea::Handle *h, gea::AbsTime t, void *data) |
| static void | repeat_flood (gea::Handle *h, gea::AbsTime t, void *data) |
| static void | send_unicast (gea::Handle *h, gea::AbsTime t, void *data) |
Public Attributes | |
| bool | verbose |
| basic * | base |
| int | topoPeriod |
| gea::Handle * | udpSend |
| gea::Handle * | udpRecv |
| gea::Blocker | blocker |
| class RTopology * | topology |
| class FloodHistory * | floodHistory |
| Hop2List | hop2list |
| ProtocolRegister | unicastRegister |
| ProtocolRegister | broadcastRegister |
| NodeDescr * | neighbors |
| int | numNeigh |
| u_int16_t | beaconSeq |
| gea::Duration | beaconPeriod |
| gea::AbsTime | nextBeacon |
| u_int16_t | floodSeq |
| u_int16_t | unicastSeq |
| FlowReceiverMap | flowReceiverMap |
| ForwardingTable | forwardingTable |
Static Public Attributes | |
| static const int | UdpPort = 4921 |
| static const int | period = BEACON_INTERVAL |
| static const int | MaxNeighbors = 40 |
Classes | |
| struct | FlowReceiverData |
| struct | Hop2RefCount |
| std::string awds::AwdsRouting::getNameOfNode | ( | const awds::NodeId & | id | ) | const [virtual] |
convert a node id to a unique name This method implements the abstact version in awds::Routing
| id | which node is looked up |
Implements awds::Routing.
| bool awds::AwdsRouting::getNodeByName | ( | awds::NodeId & | id, | |
| const char * | name | |||
| ) | const [virtual] |
convert a node name to an internal node id This method implements the abstact version in awds::Routing
| id | a reference to a node id, where the return value is stored. | |
| name | the name to look for. |
Implements awds::Routing.
| virtual int awds::AwdsRouting::foreachNode | ( | awds::Routing::NodeFunctor | , | |
| void * | data | |||
| ) | const [virtual] |
function to iterate over the list of nodes
Implements awds::Routing.
| virtual int awds::AwdsRouting::foreachEdge | ( | awds::Routing::EdgeFunctor | , | |
| void * | data | |||
| ) | const [virtual] |
function to iterate over the list of nodes
Implements awds::Routing.
| BasePacket * awds::AwdsRouting::newFloodPacket | ( | int | floodType | ) | [virtual] |
allocate a new flood packet. This function allocates a new flood packet that can be transmitted. via sendBroadcast(BasePacket *). The packets content should be accessed by created a awds::Flood wrapper around it.
The packet should never be freed directly via delete. Instead the refence counting mechanism of BasePacket should be used.
Implements awds::Routing.
enable verbose debug output
const int awds::AwdsRouting::period = BEACON_INTERVAL [static] |
beacon period in milliseconds
topology propagtion period in milliseconds
| class FloodHistory* awds::AwdsRouting::floodHistory |
history of recent flood packets
1.5.3-20071008