|
INET Framework for OMNeT++/OMNEST
|
Class holding informatation about neighboring PIM routers. More...
#include <PimNeighborTable.h>
Public Types | |
| enum | TimerKind { NeighborLivenessTimer = 1 } |
Public Member Functions | |
| virtual | ~PimNeighborTable () |
| virtual bool | addNeighbor (PimNeighbor *neighbor, double holdTime) |
| Adds the a neighbor to the table. More... | |
| virtual bool | deleteNeighbor (PimNeighbor *neighbor) |
| Deletes a neighbor from the table. More... | |
| virtual void | restartLivenessTimer (PimNeighbor *neighbor, double holdTime) |
| Restarts the Neighbor Liveness timer of the given neighbor. More... | |
| virtual PimNeighbor * | findNeighbor (int interfaceId, Ipv4Address addr) |
| Returns the neighbor that is identified by the given (interfaceId,addr), or nullptr if no such neighbor. More... | |
| virtual int | getNumNeighbors (int interfaceId) |
| Returns the number of neighbors on the given interface. More... | |
| virtual PimNeighbor * | getNeighbor (int interfaceId, int index) |
| Returns the neighbor on the given interface at the specified position. More... | |
Protected Types | |
| typedef std::vector< PimNeighbor * > | PimNeighborVector |
| typedef std::map< int, PimNeighborVector > | InterfaceToNeighborsMap |
Protected Member Functions | |
| virtual int | numInitStages () const override |
| virtual void | initialize (int stage) override |
| virtual void | handleMessage (cMessage *) override |
| virtual void | processLivenessTimer (cMessage *timer) |
Protected Attributes | |
| InterfaceToNeighborsMap | neighbors |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const PimNeighborVector &v) |
Class holding informatation about neighboring PIM routers.
Routers are identified by the link to which they are connected and their address.
Expired entries are automatically deleted.
|
protected |
|
protected |
|
virtual |
|
virtual |
Adds the a neighbor to the table.
The operation might fail if there is a neighbor with the same (ie,address) in the table. Success is indicated by the returned value.
|
virtual |
Deletes a neighbor from the table.
If the neighbor was not found in the table then it is untouched, otherwise deleted. Returns true if the neighbor object was deleted.
Referenced by processLivenessTimer().
|
virtual |
Returns the neighbor that is identified by the given (interfaceId,addr), or nullptr if no such neighbor.
|
virtual |
|
virtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
inlineoverrideprotectedvirtual |
|
protectedvirtual |
Referenced by handleMessage().
|
virtual |
Restarts the Neighbor Liveness timer of the given neighbor.
When the timer expires, the neigbor is automatically deleted.
Referenced by addNeighbor().
|
friend |
|
protected |
Referenced by addNeighbor(), deleteNeighbor(), findNeighbor(), getNeighbor(), getNumNeighbors(), initialize(), and ~PimNeighborTable().