INET Framework for OMNeT++/OMNEST
|
Implementation of PIM-SM protocol (RFC 4601). More...
#include <PIMSM.h>
Classes | |
struct | DownstreamInterface |
struct | PimsmInterface |
class | PIMSMOutInterface |
struct | Route |
struct | UpstreamInterface |
Public Member Functions | |
PIMSM () | |
virtual | ~PIMSM () |
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 | initialize (int stage) override |
virtual bool | handleNodeStart (IDoneCallback *doneCallback) override |
virtual bool | handleNodeShutdown (IDoneCallback *doneCallback) override |
virtual void | handleNodeCrash () override |
virtual void | stopPIMRouting () |
virtual void | handleMessageWhenUp (cMessage *msg) override |
virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
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 | |
enum | RouteType { RP, G, SG, SGrpt } |
typedef std::vector< DownstreamInterface * > | DownstreamInterfaceVector |
typedef std::map< SourceAndGroup, Route * > | RoutingTable |
Private Member Functions | |
void | processJoinPrunePacket (PIMJoinPrune *pkt) |
void | processRegisterPacket (PIMRegister *pkt) |
The method is used for processing PIM Register message sent from source DR. More... | |
void | processRegisterStopPacket (PIMRegisterStop *pkt) |
The method is used for processing PIM Register-Stop message sent from RP. More... | |
void | processAssertPacket (PIMAssert *pkt) |
void | processJoinG (IPv4Address group, IPv4Address rp, IPv4Address upstreamNeighborField, int holdTime, InterfaceEntry *inInterface) |
void | processJoinSG (IPv4Address origin, IPv4Address group, IPv4Address upstreamNeighborField, int holdTime, InterfaceEntry *inInterface) |
void | processJoinSGrpt (IPv4Address origin, IPv4Address group, IPv4Address upstreamNeighborField, int holdTime, InterfaceEntry *inInterface) |
void | processPruneG (IPv4Address multGroup, IPv4Address upstreamNeighborField, InterfaceEntry *inInterface) |
void | processPruneSG (IPv4Address source, IPv4Address group, IPv4Address upstreamNeighborField, InterfaceEntry *inInterface) |
void | processPruneSGrpt (IPv4Address source, IPv4Address group, IPv4Address upstreamNeighborField, InterfaceEntry *inInterface) |
void | processAssertSG (PimsmInterface *interface, const AssertMetric &receivedMetric) |
void | processAssertG (PimsmInterface *interface, const AssertMetric &receivedMetric) |
void | processKeepAliveTimer (cMessage *timer) |
void | processRegisterStopTimer (cMessage *timer) |
void | processExpiryTimer (cMessage *timer) |
The method is used to process PIM Expiry Timer. More... | |
void | processJoinTimer (cMessage *timer) |
void | processPrunePendingTimer (cMessage *timer) |
Prune Pending Timer is used for delaying of Prune message sending (for possible overriding Join from another PIM neighbor) More... | |
void | processAssertTimer (cMessage *timer) |
void | unroutableMulticastPacketArrived (IPv4Address srcAddr, IPv4Address destAddr) |
void | multicastPacketArrivedOnRpfInterface (Route *route) |
The method process notification about data which appears on RPF interface. More... | |
void | multicastPacketArrivedOnNonRpfInterface (Route *route, int interfaceId) |
void | multicastPacketForwarded (IPv4Datagram *datagram) |
void | multicastReceiverAdded (InterfaceEntry *ie, IPv4Address group) |
void | multicastReceiverRemoved (InterfaceEntry *ie, IPv4Address group) |
void | joinDesiredChanged (Route *route) |
void | designatedRouterAddressHasChanged (InterfaceEntry *ie) |
void | iAmDRHasChanged (InterfaceEntry *ie, bool iAmDR) |
void | sendPIMRegister (IPv4Datagram *datagram, IPv4Address dest, int outInterfaceId) |
void | sendPIMRegisterStop (IPv4Address source, IPv4Address dest, IPv4Address multGroup, IPv4Address multSource) |
void | sendPIMRegisterNull (IPv4Address multSource, IPv4Address multDest) |
void | sendPIMJoin (IPv4Address group, IPv4Address source, IPv4Address upstreamNeighbor, RouteType JPtype) |
void | sendPIMPrune (IPv4Address group, IPv4Address source, IPv4Address upstreamNeighbor, RouteType JPtype) |
void | sendPIMAssert (IPv4Address source, IPv4Address group, AssertMetric metric, InterfaceEntry *ie, bool rptBit) |
void | sendToIP (PIMPacket *packet, IPv4Address source, IPv4Address dest, int outInterfaceId, short ttl) |
void | forwardMulticastData (IPv4Datagram *datagram, int outInterfaceId) |
The method is used as abstraction for encapsulation multicast data to Register packet. More... | |
double | joinPruneHoldTime () |
double | effectivePropagationDelay () |
double | effectiveOverrideInterval () |
double | joinPruneOverrideInterval () |
void | updateJoinDesired (Route *route) |
void | updateDesignatedRouterAddress (InterfaceEntry *ie) |
void | updateCouldAssert (DownstreamInterface *interface) |
void | updateAssertTrackingDesired (PimsmInterface *interface) |
bool | IamRP (IPv4Address rpAddr) |
bool | IamDR (InterfaceEntry *ie) |
PIMInterface * | getIncomingInterface (IPv4Datagram *datagram) |
bool | deleteMulticastRoute (Route *route) |
void | clearRoutes () |
void | cancelAndDeleteTimer (cMessage *&timer) |
void | restartTimer (cMessage *timer, double interval) |
void | restartExpiryTimer (Route *route, InterfaceEntry *originIntf, int holdTime) |
The method is used to restart ET. More... | |
bool | removeRoute (Route *route) |
Route * | findRouteG (IPv4Address group) |
Route * | findRouteSG (IPv4Address source, IPv4Address group) |
Route * | addNewRouteG (IPv4Address group, int flags) |
Route * | addNewRouteSG (IPv4Address source, IPv4Address group, int flags) |
IPv4MulticastRoute * | createIPv4Route (Route *route) |
IPv4MulticastRoute * | findIPv4Route (IPv4Address source, IPv4Address group) |
Private Attributes | |
IPv4Address | rpAddr |
double | joinPrunePeriod = 0 |
double | defaultOverrideInterval = 0 |
double | defaultPropagationDelay = 0 |
double | keepAlivePeriod = 0 |
double | rpKeepAlivePeriod = 0 |
double | registerSuppressionTime = 0 |
double | registerProbeTime = 0 |
double | assertTime = 0 |
double | assertOverrideInterval = 0 |
RoutingTable | gRoutes |
RoutingTable | sgRoutes |
Static Private Attributes | |
static simsignal_t | sentRegisterPkSignal = registerSignal("sentRegisterPk") |
static simsignal_t | rcvdRegisterPkSignal = registerSignal("rcvdRegisterPk") |
static simsignal_t | sentRegisterStopPkSignal = registerSignal("sentRegisterStopPk") |
static simsignal_t | rcvdRegisterStopPkSignal = registerSignal("rcvdRegisterStopPk") |
static simsignal_t | sentJoinPrunePkSignal = registerSignal("sentJoinPrunePk") |
static simsignal_t | rcvdJoinPrunePkSignal = registerSignal("rcvdJoinPrunePk") |
static simsignal_t | sentAssertPkSignal = registerSignal("sentAssertPk") |
static simsignal_t | rcvdAssertPkSignal = registerSignal("rcvdAssertPk") |
Friends | |
std::ostream & | operator<< (std::ostream &out, const SourceAndGroup &sourceGroup) |
std::ostream & | operator<< (std::ostream &out, const Route &sourceGroup) |
Implementation of PIM-SM protocol (RFC 4601).
Protocol state is stored in two tables:
The routes stored in the tables are not the same as the routes of the IPv4RoutingTable. The RFC defines the terms "Tree Information Base" (TIB) and "Multicast Forwaring Information Base" (MFIB). According to this division, TIB is the state of this module, while MFIB is stored by IPv4RoutingTable.
Incoming packets, notifications, and timer events may cause a change of the TIB, and of the MFIB (if the forwarding rules change).
|
private |
|
private |
|
private |
|
inline |
|
virtual |
|
private |
Referenced by multicastReceiverAdded(), processJoinG(), processRegisterPacket(), and unroutableMulticastPacketArrived().
|
private |
Referenced by processJoinSG(), processRegisterPacket(), and unroutableMulticastPacketArrived().
|
private |
|
private |
Referenced by stopPIMRouting().
|
private |
Referenced by addNewRouteG(), and addNewRouteSG().
|
private |
Referenced by processExpiryTimer(), and processKeepAliveTimer().
|
private |
Referenced by updateDesignatedRouterAddress().
|
inlineprivate |
|
inlineprivate |
|
private |
Referenced by deleteMulticastRoute(), and inet::PIMSM::Route::removeDownstreamInterface().
|
private |
Referenced by addNewRouteSG(), multicastPacketArrivedOnNonRpfInterface(), multicastReceiverAdded(), multicastReceiverRemoved(), processAssertPacket(), processJoinG(), processPruneG(), processRegisterPacket(), receiveSignal(), and sendPIMRegisterNull().
|
private |
|
private |
The method is used as abstraction for encapsulation multicast data to Register packet.
The method create message MultData with multicast source address and multicast group address and send the message from RP to RPT.
Referenced by processRegisterPacket().
|
private |
Referenced by receiveSignal().
|
overrideprotectedvirtual |
Implements inet::OperationalBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
private |
|
private |
Referenced by updateDesignatedRouterAddress().
|
inlineprivate |
Referenced by addNewRouteG(), and processExpiryTimer().
|
overrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
private |
Referenced by updateJoinDesired().
|
inlineprivate |
Referenced by sendPIMJoin(), and sendPIMPrune().
|
inlineprivate |
Referenced by processPruneG(), and processPruneSG().
|
private |
Referenced by receiveSignal().
|
private |
The method process notification about data which appears on RPF interface.
It means that source is still active. The result is resetting of Keep Alive Timer. Also if first data packet arrive to last hop router in RPT, switchover to SPT has to be considered.
Referenced by receiveSignal().
|
private |
Referenced by receiveSignal().
|
private |
Referenced by receiveSignal().
|
private |
Referenced by receiveSignal().
|
inlineoverrideprotectedvirtual |
Reimplemented from inet::PIMBase.
|
private |
Referenced by processAssertPacket().
|
private |
Referenced by handleMessageWhenUp().
|
private |
Referenced by processAssertPacket().
|
private |
Referenced by handleMessageWhenUp().
|
private |
The method is used to process PIM Expiry Timer.
It is timer for (S,G) and (*,G). When Expiry timer expires,route is removed from multicast routing table.
Referenced by handleMessageWhenUp().
|
private |
Referenced by processJoinPrunePacket().
|
private |
Referenced by handleMessageWhenUp().
|
private |
Referenced by processJoinPrunePacket().
|
private |
Referenced by processJoinPrunePacket().
|
private |
Referenced by handleMessageWhenUp().
|
private |
Referenced by handleMessageWhenUp().
|
private |
Referenced by processJoinPrunePacket().
|
private |
Prune Pending Timer is used for delaying of Prune message sending (for possible overriding Join from another PIM neighbor)
Referenced by handleMessageWhenUp().
|
private |
Referenced by processJoinPrunePacket().
|
private |
Referenced by processJoinPrunePacket().
|
private |
The method is used for processing PIM Register message sent from source DR.
If PIM Register isn't Null and route doesn't exist, it is created and PIM Register-Stop is sent. If PIM Register is Null, Register-Stop is sent.
Referenced by handleMessageWhenUp().
|
private |
The method is used for processing PIM Register-Stop message sent from RP.
If the message is received Register Tunnel between RP and source DR is set from Join status revert to Prune status. Also Register Stop Timer is created for periodic sending PIM Register Null messages.
Referenced by handleMessageWhenUp().
|
private |
Referenced by handleMessageWhenUp().
|
overrideprotectedvirtual |
|
private |
Referenced by deleteMulticastRoute().
|
private |
The method is used to restart ET.
ET is used for outgoing interfaces and whole route in router. After ET expires, outgoing interface is removed or if there aren't any outgoing interface, route is removed after ET expires.
|
private |
|
private |
Referenced by multicastPacketArrivedOnNonRpfInterface(), processAssertG(), processAssertSG(), and processAssertTimer().
|
private |
Referenced by joinDesiredChanged(), processJoinTimer(), and processRegisterPacket().
|
private |
Referenced by joinDesiredChanged(), processExpiryTimer(), and processPrunePendingTimer().
|
private |
Referenced by multicastPacketForwarded().
|
private |
Referenced by processRegisterStopTimer().
|
private |
Referenced by processRegisterPacket().
|
private |
Referenced by sendPIMAssert(), sendPIMJoin(), sendPIMPrune(), sendPIMRegister(), sendPIMRegisterNull(), and sendPIMRegisterStop().
|
protectedvirtual |
Referenced by handleNodeCrash(), and handleNodeShutdown().
|
private |
Referenced by receiveSignal().
|
private |
|
private |
|
private |
Referenced by receiveSignal().
|
private |
Referenced by multicastReceiverAdded(), multicastReceiverRemoved(), processJoinG(), processJoinSG(), processPruneG(), processPrunePendingTimer(), and processPruneSG().
|
friend |
|
friend |
|
private |
Referenced by initialize(), multicastPacketArrivedOnNonRpfInterface(), processAssertG(), processAssertSG(), and processAssertTimer().
|
private |
Referenced by initialize(), multicastPacketArrivedOnNonRpfInterface(), processAssertG(), processAssertSG(), and processAssertTimer().
|
private |
Referenced by initialize().
|
private |
Referenced by initialize().
|
private |
Referenced by addNewRouteG(), clearRoutes(), findRouteG(), initialize(), removeRoute(), and ~PIMSM().
|
private |
Referenced by initialize(), joinDesiredChanged(), and processJoinTimer().
|
private |
|
staticprivate |
Referenced by processAssertPacket().
|
staticprivate |
Referenced by processJoinPrunePacket().
|
staticprivate |
Referenced by processRegisterPacket().
|
staticprivate |
Referenced by processRegisterStopPacket().
|
private |
Referenced by initialize(), processRegisterStopPacket(), and processRegisterStopTimer().
|
private |
Referenced by initialize(), and processRegisterStopPacket().
|
private |
|
private |
Referenced by initialize().
|
staticprivate |
Referenced by sendPIMAssert().
|
staticprivate |
Referenced by sendPIMJoin(), and sendPIMPrune().
|
staticprivate |
Referenced by sendPIMRegister(), and sendPIMRegisterNull().
|
staticprivate |
Referenced by sendPIMRegisterStop().
|
private |
Referenced by addNewRouteG(), addNewRouteSG(), clearRoutes(), deleteMulticastRoute(), findRouteSG(), initialize(), removeRoute(), updateJoinDesired(), and ~PIMSM().