|
INET Framework for OMNeT++/OMNEST
|
Ipv4 multicast route in IIpv4RoutingTable.
More...
#include <Ipv4Route.h>
|
| enum | {
F_ORIGIN,
F_ORIGINMASK,
F_MULTICASTGROUP,
F_IN,
F_OUT,
F_SOURCE,
F_METRIC,
F_LAST
} |
| |
| enum | SourceType { MANUAL,
DVMRP,
PIM_DM,
PIM_SM
} |
| | Specifies where the route comes from. More...
|
| |
| typedef std::vector< OutInterface * > | OutInterfaceVector |
| |
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).
- See also
- IIpv4RoutingTable, Ipv4RoutingTable
◆ anonymous enum
| Enumerator |
|---|
| F_ORIGIN | |
| F_ORIGINMASK | |
| F_MULTICASTGROUP | |
| F_IN | |
| F_OUT | |
| F_SOURCE | |
| F_METRIC | |
| F_LAST | |
◆ Ipv4MulticastRoute() [1/2]
◆ Ipv4MulticastRoute() [2/2]
| inet::Ipv4MulticastRoute::Ipv4MulticastRoute |
( |
| ) |
|
|
inline |
◆ ~Ipv4MulticastRoute()
| inet::Ipv4MulticastRoute::~Ipv4MulticastRoute |
( |
| ) |
|
|
virtual |
◆ addOutInterface()
| void inet::Ipv4MulticastRoute::addOutInterface |
( |
OutInterface * |
outInterface | ) |
|
|
overridevirtual |
◆ changed()
| void inet::Ipv4MulticastRoute::changed |
( |
int |
fieldCode | ) |
|
|
protected |
◆ clearOutInterfaces()
| void inet::Ipv4MulticastRoute::clearOutInterfaces |
( |
| ) |
|
|
overridevirtual |
◆ detailedInfo()
| std::string inet::Ipv4MulticastRoute::detailedInfo |
( |
| ) |
const |
|
virtual |
◆ getInInterface()
| InInterface* inet::Ipv4MulticastRoute::getInInterface |
( |
| ) |
const |
|
inline |
◆ getMetric()
| int inet::Ipv4MulticastRoute::getMetric |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getMulticastGroup()
| Ipv4Address inet::Ipv4MulticastRoute::getMulticastGroup |
( |
| ) |
const |
|
inline |
◆ getMulticastGroupAsGeneric()
| virtual L3Address inet::Ipv4MulticastRoute::getMulticastGroupAsGeneric |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getNumOutInterfaces()
| unsigned int inet::Ipv4MulticastRoute::getNumOutInterfaces |
( |
| ) |
const |
|
inline |
◆ getOrigin()
| Ipv4Address inet::Ipv4MulticastRoute::getOrigin |
( |
| ) |
const |
|
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().
◆ getOriginAsGeneric()
| virtual L3Address inet::Ipv4MulticastRoute::getOriginAsGeneric |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getOriginNetmask()
| Ipv4Address inet::Ipv4MulticastRoute::getOriginNetmask |
( |
| ) |
const |
|
inline |
◆ getOutInterface()
| OutInterface* inet::Ipv4MulticastRoute::getOutInterface |
( |
unsigned int |
k | ) |
const |
|
inline |
◆ getPrefixLength()
| virtual int inet::Ipv4MulticastRoute::getPrefixLength |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getRoutingTable()
◆ getRoutingTableAsGeneric()
| IRoutingTable * inet::Ipv4MulticastRoute::getRoutingTableAsGeneric |
( |
| ) |
const |
|
overridevirtual |
◆ getSource()
| cObject* inet::Ipv4MulticastRoute::getSource |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getSourceType()
| SourceType inet::Ipv4MulticastRoute::getSourceType |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isEnabled()
| virtual bool inet::Ipv4MulticastRoute::isEnabled |
( |
| ) |
const |
|
inlineoverridevirtual |
Disabled entries are ignored by routing until the became enabled again.
Implements inet::IMulticastRoute.
◆ isExpired()
| virtual bool inet::Ipv4MulticastRoute::isExpired |
( |
| ) |
const |
|
inlineoverridevirtual |
Expired entries are ignored by routing, and may be periodically purged.
Implements inet::IMulticastRoute.
◆ isValid()
| virtual bool inet::Ipv4MulticastRoute::isValid |
( |
| ) |
const |
|
inlinevirtual |
◆ matches()
| virtual bool inet::Ipv4MulticastRoute::matches |
( |
const Ipv4Address & |
origin, |
|
|
const Ipv4Address & |
group |
|
) |
| const |
|
inlinevirtual |
◆ operator=()
◆ removeOutInterface() [1/2]
| bool inet::Ipv4MulticastRoute::removeOutInterface |
( |
const NetworkInterface * |
ie | ) |
|
|
overridevirtual |
◆ removeOutInterface() [2/2]
| void inet::Ipv4MulticastRoute::removeOutInterface |
( |
unsigned int |
i | ) |
|
|
overridevirtual |
◆ setEnabled()
| virtual void inet::Ipv4MulticastRoute::setEnabled |
( |
bool |
enabled | ) |
|
|
inlineoverridevirtual |
◆ setInInterface()
| void inet::Ipv4MulticastRoute::setInInterface |
( |
InInterface * |
_inInterface | ) |
|
|
overridevirtual |
◆ setMetric()
| virtual void inet::Ipv4MulticastRoute::setMetric |
( |
int |
_metric | ) |
|
|
inlineoverridevirtual |
◆ setMulticastGroup() [1/2]
| virtual void inet::Ipv4MulticastRoute::setMulticastGroup |
( |
const L3Address & |
group | ) |
|
|
inlineoverridevirtual |
◆ setMulticastGroup() [2/2]
| virtual void inet::Ipv4MulticastRoute::setMulticastGroup |
( |
Ipv4Address |
_group | ) |
|
|
inlinevirtual |
◆ setOrigin() [1/2]
| virtual void inet::Ipv4MulticastRoute::setOrigin |
( |
const L3Address & |
origin | ) |
|
|
inlineoverridevirtual |
◆ setOrigin() [2/2]
| virtual void inet::Ipv4MulticastRoute::setOrigin |
( |
Ipv4Address |
_origin | ) |
|
|
inlinevirtual |
◆ setOriginNetmask()
| virtual void inet::Ipv4MulticastRoute::setOriginNetmask |
( |
Ipv4Address |
_netmask | ) |
|
|
inlinevirtual |
◆ setPrefixLength()
| virtual void inet::Ipv4MulticastRoute::setPrefixLength |
( |
int |
len | ) |
|
|
inlineoverridevirtual |
◆ setRoutingTable()
◆ setSource()
| void inet::Ipv4MulticastRoute::setSource |
( |
cObject * |
_source | ) |
|
|
inlineoverridevirtual |
◆ setSourceType()
| virtual void inet::Ipv4MulticastRoute::setSourceType |
( |
SourceType |
_source | ) |
|
|
inlineoverridevirtual |
◆ str()
| std::string inet::Ipv4MulticastRoute::str |
( |
| ) |
const |
|
overridevirtual |
126 std::stringstream out;
143 out <<
"metric:" <<
metric <<
" ";
154 if (elem->isEnabled()) {
155 out << elem->getInterface()->getInterfaceName();
Referenced by detailedInfo().
◆ group
Multicast group, if unspecified then matches any.
Referenced by str().
◆ inInterface
| InInterface* inet::Ipv4MulticastRoute::inInterface |
|
private |
◆ metric
| int inet::Ipv4MulticastRoute::metric |
|
private |
Metric ("cost" to reach the source)
Referenced by str().
◆ origin
Source network.
Referenced by str().
◆ originNetmask
Source network mask.
Referenced by str().
◆ outInterfaces
◆ rt
the routing table in which this route is inserted, or nullptr
Referenced by changed().
◆ source
| cObject* inet::Ipv4MulticastRoute::source |
|
private |
Object identifying the source.
◆ sourceType
manual, routing prot, etc.
Referenced by str().
The documentation for this class was generated from the following files:
cObject * source
Object identifying the source.
Definition: Ipv4Route.h:145
int metric
Metric ("cost" to reach the source)
Definition: Ipv4Route.h:146
@ F_MULTICASTGROUP
Definition: Ipv4Route.h:150
Ipv4Address getMulticastGroup() const
Multicast group address.
Definition: Ipv4Route.h:197
virtual void multicastRouteChanged(Ipv4MulticastRoute *entry, int fieldCode)=0
To be called from multicast route objects whenever a field changes.
virtual void setOrigin(Ipv4Address _origin)
Definition: Ipv4Route.h:179
int getNetmaskLength() const
Counts 1 bits in a netmask.
Definition: Ipv4Address.cc:234
IIpv4RoutingTable * getRoutingTable() const
Definition: Ipv4Route.h:168
const char * getInterfaceName() const
Definition: NetworkInterface.h:233
NetworkInterface * getInterface() const
Definition: IRoute.h:180
@ F_OUT
Definition: Ipv4Route.h:150
virtual void setOriginNetmask(Ipv4Address _netmask)
Definition: Ipv4Route.h:180
virtual std::string str() const override
Definition: Ipv4Route.cc:124
SourceType sourceType
manual, routing prot, etc.
Definition: Ipv4Route.h:144
Ipv4Address origin
Source network.
Definition: Ipv4Route.h:139
Ipv4Address getOrigin() const
Source address prefix to match.
Definition: Ipv4Route.h:191
@ F_SOURCE
Definition: Ipv4Route.h:150
@ F_ORIGINMASK
Definition: Ipv4Route.h:150
Ipv4Address group
Multicast group, if unspecified then matches any.
Definition: Ipv4Route.h:141
IIpv4RoutingTable * rt
the routing table in which this route is inserted, or nullptr
Definition: Ipv4Route.h:138
InInterface * inInterface
In interface (upstream)
Definition: Ipv4Route.h:142
static bool maskedAddrAreEqual(const Ipv4Address &addr1, const Ipv4Address &addr2, const Ipv4Address &netmask)
Test if the masked addresses (ie the mask is applied to addr1 and addr2) are equal.
Definition: Ipv4Address.cc:249
static Ipv4Address makeNetmask(int length)
Creates and returns a netmask with the given length.
Definition: Ipv4Address.h:329
@ F_ORIGIN
Definition: Ipv4Route.h:150
virtual void setMulticastGroup(Ipv4Address _group)
Definition: Ipv4Route.h:181
static const char * sourceTypeName(SourceType sourceType)
Definition: IRoute.cc:64
Ipv4Address originNetmask
Source network mask.
Definition: Ipv4Route.h:140
@ MANUAL
manually added static route
Definition: IRoute.h:166
Ipv4Address getOriginNetmask() const
Represents length of prefix to match.
Definition: Ipv4Route.h:194
const double k
Definition: Qam1024Modulation.cc:14
OutInterfaceVector outInterfaces
Out interfaces (downstream)
Definition: Ipv4Route.h:143
virtual bool isValid() const
test validity of route entry, e.g.
Definition: Ipv4Route.h:171
@ F_IN
Definition: Ipv4Route.h:150
bool isUnspecified() const
True if all four address bytes are zero.
Definition: Ipv4Address.h:165
@ F_METRIC
Definition: Ipv4Route.h:150
@ F_LAST
Definition: Ipv4Route.h:150
void changed(int fieldCode)
Definition: Ipv4Route.cc:233