INET Framework for OMNeT++/OMNEST
|
Implementation of PIM-DM protocol (RFC 3973). More...
#include <PIMDM.h>
Classes | |
struct | DownstreamInterface |
class | PIMDMOutInterface |
struct | Route |
struct | UpstreamInterface |
Public Member Functions | |
PIMDM () | |
virtual | ~PIMDM () |
Public Member Functions inherited from inet::PIMBase | |
PIMBase (PIMInterface::PIMMode mode) | |
virtual | ~PIMBase () |
Public Member Functions inherited from inet::OperationalBase | |
OperationalBase () | |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Protected Member Functions | |
virtual int | numInitStages () const override |
virtual void | handleMessageWhenUp (cMessage *msg) override |
virtual void | initialize (int stage) override |
virtual bool | handleNodeStart (IDoneCallback *doneCallback) override |
virtual bool | handleNodeShutdown (IDoneCallback *doneCallback) override |
virtual void | handleNodeCrash () override |
virtual void | stopPIMRouting () |
Protected Member Functions inherited from inet::PIMBase | |
void | sendHelloPackets () |
void | sendHelloPacket (PIMInterface *pimInterface) |
void | processHelloTimer (cMessage *timer) |
void | processHelloPacket (PIMHello *pkt) |
virtual bool | isInitializeStage (int stage) override |
virtual bool | isNodeStartStage (int stage) override |
virtual bool | isNodeShutdownStage (int stage) override |
Protected Member Functions inherited from inet::OperationalBase | |
virtual void | handleMessage (cMessage *msg) override |
virtual void | handleMessageWhenDown (cMessage *msg) |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
virtual void | setOperational (bool isOperational) |
Private Types | |
typedef std::map< SourceAndGroup, Route * > | RoutingTable |
Private Member Functions | |
void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
void | unroutableMulticastPacketArrived (IPv4Address srcAddress, IPv4Address destAddress, unsigned short ttl) |
The method process notification about new multicast data stream. More... | |
void | multicastPacketArrivedOnNonRpfInterface (IPv4Address group, IPv4Address source, int interfaceId) |
The method has to solve the problem when multicast data appears on non-RPF interface. More... | |
void | multicastPacketArrivedOnRpfInterface (int interfaceId, IPv4Address group, IPv4Address source, unsigned short ttl) |
void | multicastReceiverAdded (InterfaceEntry *ie, IPv4Address newAddr) |
void | multicastReceiverRemoved (InterfaceEntry *ie, IPv4Address oldAddr) |
The method process notification about multicast groups removed from interface. More... | |
void | rpfInterfaceHasChanged (IPv4MulticastRoute *route, IPv4Route *routeToSource) |
The method process notification about interface change. More... | |
void | processPruneTimer (cMessage *timer) |
void | processPrunePendingTimer (cMessage *timer) |
void | processGraftRetryTimer (cMessage *timer) |
void | processOverrideTimer (cMessage *timer) |
void | processSourceActiveTimer (cMessage *timer) |
void | processStateRefreshTimer (cMessage *timer) |
void | processAssertTimer (cMessage *timer) |
void | processJoinPrunePacket (PIMJoinPrune *pkt) |
void | processGraftPacket (PIMGraft *pkt) |
void | processGraftAckPacket (PIMGraftAck *pkt) |
void | processStateRefreshPacket (PIMStateRefresh *pkt) |
The method is used to process PIMStateRefresh packet. More... | |
void | processAssertPacket (PIMAssert *pkt) |
void | processPrune (Route *route, int intId, int holdTime, int numRpfNeighbors, IPv4Address upstreamNeighborField) |
The method process PIM Prune packet. More... | |
void | processJoin (Route *route, int intId, int numRpfNeighbors, IPv4Address upstreamNeighborField) |
void | processGraft (IPv4Address source, IPv4Address group, IPv4Address sender, int intId) |
The method is used to process PIMGraft packet. More... | |
void | processAssert (Interface *downstream, AssertMetric receivedMetric, int stateRefreshInterval) |
void | processOlistEmptyEvent (Route *route) |
void | processOlistNonEmptyEvent (Route *route) |
void | sendPrunePacket (IPv4Address nextHop, IPv4Address src, IPv4Address grp, int holdTime, int intId) |
void | sendJoinPacket (IPv4Address nextHop, IPv4Address source, IPv4Address group, int interfaceId) |
void | sendGraftPacket (IPv4Address nextHop, IPv4Address src, IPv4Address grp, int intId) |
void | sendGraftAckPacket (PIMGraft *msg) |
void | sendStateRefreshPacket (IPv4Address originator, Route *route, DownstreamInterface *downstream, unsigned short ttl) |
void | sendAssertPacket (IPv4Address source, IPv4Address group, AssertMetric metric, InterfaceEntry *ie) |
void | sendToIP (PIMPacket *packet, IPv4Address source, IPv4Address dest, int outInterfaceId) |
void | restartTimer (cMessage *timer, double interval) |
void | cancelAndDeleteTimer (cMessage *&timer) |
PIMInterface * | getIncomingInterface (IPv4Datagram *datagram) |
IPv4MulticastRoute * | findIPv4MulticastRoute (IPv4Address group, IPv4Address source) |
Route * | findRoute (IPv4Address source, IPv4Address group) |
void | deleteRoute (IPv4Address source, IPv4Address group) |
void | clearRoutes () |
Private Attributes | |
double | pruneInterval = 0 |
double | pruneLimitInterval = 0 |
double | overrideInterval = 0 |
double | propagationDelay = 0 |
double | graftRetryInterval = 0 |
double | sourceActiveInterval = 0 |
double | stateRefreshInterval = 0 |
double | assertTime = 0 |
RoutingTable | routes |
Static Private Attributes | |
static simsignal_t | sentGraftPkSignal = registerSignal("sentGraftPk") |
static simsignal_t | rcvdGraftPkSignal = registerSignal("rcvdGraftPk") |
static simsignal_t | sentGraftAckPkSignal = registerSignal("sentGraftAckPk") |
static simsignal_t | rcvdGraftAckPkSignal = registerSignal("rcvdGraftAckPk") |
static simsignal_t | sentJoinPrunePkSignal = registerSignal("sentJoinPrunePk") |
static simsignal_t | rcvdJoinPrunePkSignal = registerSignal("rcvdJoinPrunePk") |
static simsignal_t | sentAssertPkSignal = registerSignal("sentAssertPk") |
static simsignal_t | rcvdAssertPkSignal = registerSignal("rcvdAssertPk") |
static simsignal_t | sentStateRefreshPkSignal = registerSignal("sentStateRefreshPk") |
static simsignal_t | rcvdStateRefreshPkSignal = registerSignal("rcvdStateRefreshPk") |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Route *route) |
Implementation of PIM-DM protocol (RFC 3973).
|
private |
|
inline |
|
virtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
overrideprotectedvirtual |
Implements inet::OperationalBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
private |
The method has to solve the problem when multicast data appears on non-RPF interface.
It can happen when there is loop in the network. In this case, router has to prune from the neighbor, so it sends Prune message.
|
private |
|
private |
|
private |
The method process notification about multicast groups removed from interface.
For each old address it tries to find route. If there is route, it finds interface in list of outgoing interfaces. If the interface is in the list it will be removed. If the router was not pruned and there is no outgoing interface, the router will prune from the multicast tree.
|
inlineoverrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
private |
|
private |
|
private |
|
private |
The method is used to process PIMGraft packet.
Packet means that downstream router wants to join to multicast tree, so the packet cannot come to RPF interface. Router finds correct outgoig interface towards downstream router. Change its state to forward if it was not before and cancel Prune Timer. If route was in pruned state, router will send also Graft message to join multicast tree.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The method process PIM Prune packet.
First the method has to find correct outgoing interface where PIM Prune packet came to. The method also checks if there is still any forwarding outgoing interface. Forwarding interfaces, where Prune packet come to, goes to prune state. If all outgoing interfaces are pruned, the router will prune from multicast tree.
|
private |
|
private |
|
private |
|
private |
The method is used to process PIMStateRefresh packet.
The method checks if there is route in mroute and that packet has came to RPF interface. Then it goes through all outgoing interfaces. If the interface is pruned, it resets Prune Timer. For each interface State Refresh message is copied and correct prune indicator is set according to state of outgoing interface (pruned/forwarding).
State Refresh message is used to stop flooding of network each 3 minutes.
|
private |
|
overrideprivate |
|
private |
|
private |
The method process notification about interface change.
Multicast routing table will be changed if RPF interface has changed. New RPF interface is set to route and is removed from outgoing interfaces. On the other hand, old RPF interface is added to outgoing interfaces. If route was not pruned, the router has to join to the multicast tree again (by different path).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedvirtual |
|
private |
The method process notification about new multicast data stream.
It goes through all PIM interfaces and tests them if they can be added to the list of outgoing interfaces. If there is no interface on the list at the end, the router will prune from the multicast tree.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |