INET Framework for OMNeT++/OMNEST
inet::PIMDM::Route Struct Reference
Inheritance diagram for inet::PIMDM::Route:
inet::PIMBase::RouteEntry

Public Member Functions

 Route (PIMDM *owner, IPv4Address source, IPv4Address group)
 
virtual ~Route ()
 
DownstreamInterfacefindDownstreamInterfaceByInterfaceId (int interfaceId) const
 
DownstreamInterfacecreateDownstreamInterface (InterfaceEntry *ie)
 
DownstreamInterfaceremoveDownstreamInterface (int interfaceId)
 
bool isOilistNull ()
 
- Public Member Functions inherited from inet::PIMBase::RouteEntry
 RouteEntry (PIMBase *owner, IPv4Address source, IPv4Address group)
 
virtual ~RouteEntry ()
 
bool isFlagSet (int flag) const
 
void setFlags (int flags)
 
void clearFlag (int flag)
 
void setFlag (int flag, bool value)
 

Public Attributes

UpstreamInterfaceupstreamInterface
 
std::vector< DownstreamInterface * > downstreamInterfaces
 
- Public Attributes inherited from inet::PIMBase::RouteEntry
PIMBaseowner
 
IPv4Address source
 
IPv4Address group
 
int flags
 
AssertMetric metric
 

Constructor & Destructor Documentation

inet::PIMDM::Route::Route ( PIMDM owner,
IPv4Address  source,
IPv4Address  group 
)
inline
135  : RouteEntry(owner, source, group), upstreamInterface(nullptr) {}
RouteEntry(PIMBase *owner, IPv4Address source, IPv4Address group)
Definition: PIMBase.h:70
IPv4Address source
Definition: PIMBase.h:65
IPv4Address group
Definition: PIMBase.h:66
PIMBase * owner
Definition: PIMBase.h:64
UpstreamInterface * upstreamInterface
Definition: PIMDM.h:131
inet::PIMDM::Route::~Route ( )
virtual
1733 {
1734  delete upstreamInterface;
1735  for (auto & elem : downstreamInterfaces)
1736  delete elem;
1737  downstreamInterfaces.clear();
1738 }
std::vector< DownstreamInterface * > downstreamInterfaces
Definition: PIMDM.h:132
UpstreamInterface * upstreamInterface
Definition: PIMDM.h:131

Member Function Documentation

PIMDM::DownstreamInterface * inet::PIMDM::Route::createDownstreamInterface ( InterfaceEntry ie)

Referenced by inet::PIMDM::multicastReceiverAdded(), inet::PIMDM::rpfInterfaceHasChanged(), and inet::PIMDM::unroutableMulticastPacketArrived().

1750 {
1751  DownstreamInterface *downstream = new DownstreamInterface(this, ie);
1752  downstreamInterfaces.push_back(downstream);
1753  return downstream;
1754 }
std::vector< DownstreamInterface * > downstreamInterfaces
Definition: PIMDM.h:132
PIMDM::DownstreamInterface * inet::PIMDM::Route::findDownstreamInterfaceByInterfaceId ( int  interfaceId) const

Referenced by inet::PIMDM::multicastPacketArrivedOnNonRpfInterface(), inet::PIMDM::multicastReceiverAdded(), inet::PIMDM::multicastReceiverRemoved(), inet::PIMDM::processGraft(), and inet::PIMDM::processJoin().

1741 {
1742  for (auto & elem : downstreamInterfaces)
1743  if (elem->ie->getInterfaceId() == interfaceId)
1744  return elem;
1745 
1746  return nullptr;
1747 }
std::vector< DownstreamInterface * > downstreamInterfaces
Definition: PIMDM.h:132
bool inet::PIMDM::Route::isOilistNull ( )

Referenced by inet::PIMDM::multicastPacketArrivedOnNonRpfInterface(), inet::PIMDM::multicastPacketArrivedOnRpfInterface(), inet::PIMDM::multicastReceiverRemoved(), inet::PIMDM::processAssert(), inet::PIMDM::processAssertTimer(), inet::PIMDM::processJoin(), and inet::PIMDM::rpfInterfaceHasChanged().

1769 {
1770  for (auto & elem : downstreamInterfaces) {
1771  if (elem->isInOlist())
1772  return false;
1773  }
1774  return true;
1775 }
std::vector< DownstreamInterface * > downstreamInterfaces
Definition: PIMDM.h:132
PIMDM::DownstreamInterface * inet::PIMDM::Route::removeDownstreamInterface ( int  interfaceId)

Referenced by inet::PIMDM::rpfInterfaceHasChanged().

1757 {
1758  for (auto it = downstreamInterfaces.begin(); it != downstreamInterfaces.end(); ++it) {
1759  DownstreamInterface *downstream = *it;
1760  if (downstream->ie->getInterfaceId() == interfaceId) {
1761  downstreamInterfaces.erase(it);
1762  return downstream;
1763  }
1764  }
1765  return nullptr;
1766 }
std::vector< DownstreamInterface * > downstreamInterfaces
Definition: PIMDM.h:132

Member Data Documentation

std::vector<DownstreamInterface *> inet::PIMDM::Route::downstreamInterfaces

The documentation for this struct was generated from the following files: