INET Framework for OMNeT++/OMNEST
|
IPv4 multicast route in IIPv4RoutingTable. More...
#include <IPv4Route.h>
Public Types | |
enum | { F_ORIGIN, F_ORIGINMASK, F_MULTICASTGROUP, F_IN, F_OUT, F_SOURCE, F_METRIC, F_LAST } |
Public Types inherited from inet::IMulticastRoute | |
enum | SourceType { MANUAL, DVMRP, PIM_DM, PIM_SM } |
Specifies where the route comes from. More... | |
typedef std::vector< OutInterface * > | OutInterfaceVector |
Public Member Functions | |
IPv4MulticastRoute () | |
virtual | ~IPv4MulticastRoute () |
virtual std::string | info () const override |
virtual std::string | detailedInfo () const override |
virtual void | setRoutingTable (IIPv4RoutingTable *rt) |
To be called by the routing table when this route is added or removed from it. More... | |
IIPv4RoutingTable * | getRoutingTable () const |
virtual bool | isValid () const |
test validity of route entry, e.g. More... | |
virtual bool | matches (const IPv4Address &origin, const IPv4Address &group) const |
virtual void | setOrigin (IPv4Address _origin) |
virtual void | setOriginNetmask (IPv4Address _netmask) |
virtual void | setMulticastGroup (IPv4Address _group) |
virtual void | setInInterface (InInterface *_inInterface) override |
virtual void | clearOutInterfaces () override |
virtual void | addOutInterface (OutInterface *outInterface) override |
virtual bool | removeOutInterface (const InterfaceEntry *ie) override |
virtual void | removeOutInterface (unsigned int i) override |
virtual void | setSourceType (SourceType _source) override |
virtual void | setMetric (int _metric) override |
IPv4Address | getOrigin () const |
Source address prefix to match. More... | |
IPv4Address | getOriginNetmask () const |
Represents length of prefix to match. More... | |
IPv4Address | getMulticastGroup () const |
Multicast group address. More... | |
InInterface * | getInInterface () const |
In interface. More... | |
unsigned int | getNumOutInterfaces () const |
Number of out interfaces. More... | |
OutInterface * | getOutInterface (unsigned int k) const |
The kth out interface. More... | |
SourceType | getSourceType () const override |
Source of route. More... | |
int | getMetric () const override |
"Cost" to reach the destination More... | |
void | setSource (cObject *_source) override |
cObject * | getSource () const override |
Source of route. More... | |
virtual IRoutingTable * | getRoutingTableAsGeneric () const override |
The routing table in which this route is inserted, or nullptr. More... | |
virtual void | setEnabled (bool enabled) override |
virtual void | setOrigin (const L3Address &origin) override |
virtual void | setPrefixLength (int len) override |
virtual void | setMulticastGroup (const L3Address &group) override |
virtual bool | isEnabled () const override |
Disabled entries are ignored by routing until the became enabled again. More... | |
virtual bool | isExpired () const override |
Expired entries are ignored by routing, and may be periodically purged. More... | |
virtual L3Address | getOriginAsGeneric () const override |
Source address prefix to match. More... | |
virtual int | getPrefixLength () const override |
Prefix length to match. More... | |
virtual L3Address | getMulticastGroupAsGeneric () const override |
Multicast group address. More... | |
Public Member Functions inherited from inet::IMulticastRoute | |
virtual | ~IMulticastRoute () |
virtual void | setInInterface (InInterface *_inInterface)=0 |
virtual void | setSourceType (SourceType type)=0 |
Protected Member Functions | |
void | changed (int fieldCode) |
Private Member Functions | |
IPv4MulticastRoute (const IPv4MulticastRoute &obj) | |
IPv4MulticastRoute & | operator= (const IPv4MulticastRoute &obj) |
Private Attributes | |
IIPv4RoutingTable * | rt |
the routing table in which this route is inserted, or nullptr More... | |
IPv4Address | origin |
Source network. More... | |
IPv4Address | originNetmask |
Source network mask. More... | |
IPv4Address | group |
Multicast group, if unspecified then matches any. More... | |
InInterface * | inInterface |
In interface (upstream) More... | |
OutInterfaceVector | outInterfaces |
Out interfaces (downstream) More... | |
SourceType | sourceType |
manual, routing prot, etc. More... | |
cObject * | source |
Object identifying the source. More... | |
int | metric |
Metric ("cost" to reach the source) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from inet::IMulticastRoute | |
static const char * | sourceTypeName (SourceType sourceType) |
IPv4 multicast route in IIPv4RoutingTable.
Multicast routing protocols may extend this class to store protocol specific fields.
Multicast datagrams are forwarded along the edges of a multicast tree. The tree might depend on the multicast group and the source (origin) of the multicast datagram.
The forwarding algorithm chooses the route according the to origin (source address) and multicast group (destination address) of the received datagram. The route might specify a prefix of the origin and a multicast group to be matched.
Then the forwarding algorithm copies the datagrams arrived on the parent (upstream) interface to the child interfaces (downstream). If there are no downstream routers on a child interface (i.e. it is a leaf in the multicast routing tree), then the datagram is forwarded only if there are listeners of the multicast group on that link (TRPB routing).
anonymous enum |
Enumerator | |
---|---|
F_ORIGIN | |
F_ORIGINMASK | |
F_MULTICASTGROUP | |
F_IN | |
F_OUT | |
F_SOURCE | |
F_METRIC | |
F_LAST |
|
private |
|
inline |
|
virtual |
|
overridevirtual |
Implements inet::IMulticastRoute.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), inet::PIMDM::multicastReceiverAdded(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), inet::PIMDM::rpfInterfaceHasChanged(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
protected |
|
overridevirtual |
Implements inet::IMulticastRoute.
|
overridevirtual |
|
inline |
In interface.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4RoutingTable::deleteInterfaceRoutes(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::IPv4::forwardMulticastPacket(), inet::IPv4RoutingTable::internalAddMulticastRoute(), inet::IPv4RoutingTable::printMulticastRoutingTable(), inet::PIMDM::receiveSignal(), and inet::PIMDM::rpfInterfaceHasChanged().
|
inlineoverridevirtual |
"Cost" to reach the destination
Implements inet::IMulticastRoute.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::IPv4RoutingTable::multicastRouteLessThan(), and inet::IPv4RoutingTable::printMulticastRoutingTable().
|
inline |
Multicast group address.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::PIMDM::findIPv4MulticastRoute(), inet::PIMSM::findIPv4Route(), inet::IPv4RoutingTable::internalAddMulticastRoute(), inet::PIMDM::multicastReceiverAdded(), inet::PIMDM::multicastReceiverRemoved(), inet::IPv4RoutingTable::multicastRouteLessThan(), inet::IPv4RoutingTable::printMulticastRoutingTable(), and inet::PIMDM::rpfInterfaceHasChanged().
|
inlineoverridevirtual |
Multicast group address.
Implements inet::IMulticastRoute.
|
inline |
Number of out interfaces.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::IPv4::forwardMulticastPacket(), inet::IPv4RoutingTable::internalAddMulticastRoute(), and inet::IPv4RoutingTable::printMulticastRoutingTable().
|
inline |
Source address prefix to match.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::PIMDM::findIPv4MulticastRoute(), inet::PIMSM::findIPv4Route(), inet::IPv4RoutingTable::internalAddMulticastRoute(), inet::PIMDM::multicastReceiverAdded(), inet::PIMDM::multicastReceiverRemoved(), inet::IPv4RoutingTable::multicastRouteLessThan(), inet::IPv4RoutingTable::printMulticastRoutingTable(), inet::PIMDM::receiveSignal(), and inet::PIMDM::rpfInterfaceHasChanged().
|
inlineoverridevirtual |
Source address prefix to match.
Implements inet::IMulticastRoute.
|
inline |
Represents length of prefix to match.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::IPv4RoutingTable::internalAddMulticastRoute(), inet::IPv4RoutingTable::multicastRouteLessThan(), and inet::IPv4RoutingTable::printMulticastRoutingTable().
|
inline |
The kth out interface.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::IPv4::forwardMulticastPacket(), inet::IPv4RoutingTable::internalAddMulticastRoute(), and inet::IPv4RoutingTable::printMulticastRoutingTable().
|
inlineoverridevirtual |
Prefix length to match.
Implements inet::IMulticastRoute.
|
inline |
Referenced by inet::IPv4RoutingTable::deleteInterfaceRoutes(), inet::IPv4RoutingTable::deleteMulticastRoute(), inet::IPv4RoutingTable::purge(), and inet::IPv4RoutingTable::removeMulticastRoute().
|
overridevirtual |
The routing table in which this route is inserted, or nullptr.
Implements inet::IMulticastRoute.
|
inlineoverridevirtual |
Source of route.
Implements inet::IMulticastRoute.
Referenced by inet::PIMDM::clearRoutes(), inet::PIMSM::clearRoutes(), inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMDM::findIPv4MulticastRoute(), inet::PIMSM::findIPv4Route(), inet::PIMDM::multicastReceiverAdded(), inet::PIMDM::multicastReceiverRemoved(), and inet::PIMDM::receiveSignal().
|
inlineoverridevirtual |
Source of route.
MANUAL (read from file), from routing protocol, etc
Implements inet::IMulticastRoute.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable().
|
overridevirtual |
Referenced by inet::operator<<().
|
inlineoverridevirtual |
Disabled entries are ignored by routing until the became enabled again.
Implements inet::IMulticastRoute.
|
inlineoverridevirtual |
Expired entries are ignored by routing, and may be periodically purged.
Implements inet::IMulticastRoute.
|
inlinevirtual |
|
inlinevirtual |
|
private |
|
overridevirtual |
Implements inet::IMulticastRoute.
Referenced by inet::IPv4RoutingTable::deleteInterfaceRoutes(), inet::PIMSM::Route::removeDownstreamInterface(), and inet::PIMDM::rpfInterfaceHasChanged().
|
overridevirtual |
Implements inet::IMulticastRoute.
|
inlineoverridevirtual |
Implements inet::IMulticastRoute.
|
overridevirtual |
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), inet::PIMDM::rpfInterfaceHasChanged(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
inlineoverridevirtual |
Implements inet::IMulticastRoute.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), and inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration().
|
inlinevirtual |
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
inlineoverridevirtual |
Implements inet::IMulticastRoute.
Referenced by setMulticastGroup().
|
inlinevirtual |
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
inlineoverridevirtual |
Implements inet::IMulticastRoute.
Referenced by setOrigin().
|
inlinevirtual |
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
inlineoverridevirtual |
Implements inet::IMulticastRoute.
|
inlinevirtual |
To be called by the routing table when this route is added or removed from it.
Referenced by inet::IPv4RoutingTable::internalAddMulticastRoute(), and inet::IPv4RoutingTable::removeMulticastRoute().
|
inlineoverridevirtual |
Implements inet::IMulticastRoute.
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
inlineoverridevirtual |
Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::PIMSM::createIPv4Route(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), and inet::PIMDM::unroutableMulticastPacketArrived().
|
private |
Multicast group, if unspecified then matches any.
|
private |
In interface (upstream)
|
private |
Metric ("cost" to reach the source)
|
private |
Source network.
|
private |
Source network mask.
|
private |
Out interfaces (downstream)
|
private |
the routing table in which this route is inserted, or nullptr
|
private |
Object identifying the source.
|
private |
manual, routing prot, etc.