INET Framework for OMNeT++/OMNEST
inet::PIMSM::DownstreamInterface Struct Reference
Inheritance diagram for inet::PIMSM::DownstreamInterface:
inet::PIMSM::PimsmInterface inet::PIMBase::Interface

Public Types

enum  JoinPruneState { NO_INFO, JOIN, PRUNE_PENDING }
 States of each outgoing interface. More...
 
- Public Types inherited from inet::PIMSM::PimsmInterface
enum  Flags { RECEIVER_INCLUDE = 1 << 0, RECEIVER_EXCLUDE = 1 << 1, COULD_ASSERT = 1 << 2, ASSERT_TRACKING_DESIRED = 1 << 3 }
 
- Public Types inherited from inet::PIMBase::Interface
enum  AssertState { NO_ASSERT_INFO, I_LOST_ASSERT, I_WON_ASSERT }
 

Public Member Functions

 DownstreamInterface (Route *owner, InterfaceEntry *ie, JoinPruneState joinPruneState, bool show=true)
 
virtual ~DownstreamInterface ()
 
int getInterfaceId () const
 
bool isInImmediateOlist () const
 
bool isInInheritedOlist () const
 
void startPrunePendingTimer (double joinPruneOverrideInterval)
 
- Public Member Functions inherited from inet::PIMSM::PimsmInterface
 PimsmInterface (Route *owner, InterfaceEntry *ie)
 
virtual ~PimsmInterface ()
 
Routeroute () const
 
PIMSMpimsm () const
 
void startExpiryTimer (double holdTime)
 
bool localReceiverInclude () const
 
void setLocalReceiverInclude (bool value)
 
bool localReceiverExclude () const
 
void setLocalReceiverExclude (bool value)
 
bool couldAssert () const
 
void setCouldAssert (bool value)
 
bool assertTrackingDesired () const
 
void setAssertTrackingDesired (bool value)
 
bool pimInclude () const
 
bool pimExclude () const
 
- Public Member Functions inherited from inet::PIMBase::Interface
 Interface (RouteEntry *owner, InterfaceEntry *ie)
 
virtual ~Interface ()
 
bool isFlagSet (int flag) const
 
void setFlags (int flags)
 
void clearFlag (int flag)
 
void setFlag (int flag, bool value)
 
void startAssertTimer (double assertTime)
 
void deleteAssertInfo ()
 

Public Attributes

JoinPruneState joinPruneState
 
cMessage * prunePendingTimer
 
- Public Attributes inherited from inet::PIMSM::PimsmInterface
cMessage * expiryTimer
 
- Public Attributes inherited from inet::PIMBase::Interface
RouteEntryowner
 
InterfaceEntryie
 
int flags
 
AssertState assertState
 
cMessage * assertTimer
 
AssertMetric winnerMetric
 

Member Enumeration Documentation

States of each outgoing interface.

Enumerator
NO_INFO 
JOIN 
PRUNE_PENDING 

Constructor & Destructor Documentation

inet::PIMSM::DownstreamInterface::DownstreamInterface ( Route owner,
InterfaceEntry ie,
JoinPruneState  joinPruneState,
bool  show = true 
)
inline
JoinPruneState joinPruneState
Definition: PIMSM.h:113
cMessage * prunePendingTimer
Definition: PIMSM.h:114
RouteEntry * owner
Definition: PIMBase.h:82
PimsmInterface(Route *owner, InterfaceEntry *ie)
Definition: PIMSM.cc:2051
InterfaceEntry * ie
Definition: PIMBase.h:83
inet::PIMSM::DownstreamInterface::~DownstreamInterface ( )
virtual
2070 {
2071  pimsm()->cancelAndDelete(prunePendingTimer);
2072 }
PIMSM * pimsm() const
Definition: PIMSM.h:72
cMessage * prunePendingTimer
Definition: PIMSM.h:114

Member Function Documentation

int inet::PIMSM::DownstreamInterface::getInterfaceId ( ) const
inline

Referenced by inet::PIMSM::Route::findDownstreamInterfaceByInterfaceId(), inet::PIMSM::processRegisterPacket(), and inet::PIMSM::restartExpiryTimer().

120 { return ie->getInterfaceId(); }
int getInterfaceId() const
Definition: InterfaceEntry.h:185
InterfaceEntry * ie
Definition: PIMBase.h:83
bool inet::PIMSM::DownstreamInterface::isInImmediateOlist ( ) const
2075 {
2076  // immediate_olist(*,*,RP) = joins(*,*,RP)
2077  // immediate_olist(*,G) = joins(*,G) (+) pim_include(*,G) (-) lost_assert(*,G)
2078  // immediate_olist(S,G) = joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
2079  switch (route()->type) {
2080  case RP:
2081  return joinPruneState != NO_INFO;
2082 
2083  case G:
2085 
2086  case SG:
2088 
2089  case SGrpt:
2090  ASSERT(false);
2091  break;
2092  }
2093  return false;
2094 }
Definition: PIMSM.h:141
bool pimInclude() const
Definition: PIMSM.h:84
JoinPruneState joinPruneState
Definition: PIMSM.h:113
Definition: PIMSM.h:142
Route * route() const
Definition: PIMSM.h:71
Definition: PIMSM.h:140
AssertState assertState
Definition: PIMBase.h:88
Definition: PIMSM.h:139
bool inet::PIMSM::DownstreamInterface::isInInheritedOlist ( ) const

Referenced by inet::PIMSM::PIMSMOutInterface::isEnabled(), isInInheritedOlist(), and inet::PIMSM::processRegisterPacket().

2097 {
2098  // inherited_olist(S,G,rpt) = ( joins(*,*,RP(G)) (+) joins(*,G) (-) prunes(S,G,rpt) )
2099  // (+) ( pim_include(*,G) (-) pim_exclude(S,G))
2100  // (-) ( lost_assert(*,G) (+) lost_assert(S,G,rpt) )
2101  // inherited_olist(S,G) = inherited_olist(S,G,rpt) (+)
2102  // joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
2103  Route *route = this->route();
2104  int interfaceId = ie->getInterfaceId();
2105  bool include = false;
2106 
2107  switch (route->type) {
2108  case RP:
2109  // joins(*,*,RP(G))
2110  include |= joinPruneState != NO_INFO;
2111  break;
2112 
2113  case G: // inherited_olist(S,G,rpt) when there is not (S,G,rpt) state
2114  // joins(*,*,RP(G))
2115  if (route->rpRoute) {
2116  DownstreamInterface *downstream = route->rpRoute->findDownstreamInterfaceByInterfaceId(interfaceId);
2117  include |= downstream && downstream->joinPruneState != NO_INFO;
2118  }
2119  include |= joinPruneState != NO_INFO;
2120  include |= pimInclude();
2121  include &= assertState != I_LOST_ASSERT;
2122  break;
2123 
2124  case SGrpt:
2125  // joins(*,*,RP(G)
2126  if (route->rpRoute) {
2127  DownstreamInterface *downstream = route->rpRoute->findDownstreamInterfaceByInterfaceId(interfaceId);
2128  include |= downstream && downstream->joinPruneState != NO_INFO;
2129  }
2130  // (+) joins(*,G)
2131  if (route->gRoute) {
2132  DownstreamInterface *downstream = route->gRoute->findDownstreamInterfaceByInterfaceId(interfaceId);
2133  include |= downstream && downstream->joinPruneState != NO_INFO;
2134  }
2135 
2136  // TODO (-) prunes(S,G,prt)
2137 
2138  if (route->gRoute) {
2139  DownstreamInterface *downstream = route->gRoute->findDownstreamInterfaceByInterfaceId(interfaceId);
2140  // (+) ( pim_include(*,G) (-) pim_exclude(S,G))
2141  include |= (downstream && downstream->pimInclude()) && !pimExclude();
2142  // (-) lost_assert(*,G)
2143  include &= !downstream || downstream->assertState != I_LOST_ASSERT;
2144  }
2145 
2146  // (-) lost_assert(S,G)
2147  include &= assertState != I_LOST_ASSERT;
2148  break;
2149 
2150  case SG:
2151  // inherited_olist(S,G,rpt)
2152  if (route->sgrptRoute) {
2153  DownstreamInterface *downstream = route->sgrptRoute->findDownstreamInterfaceByInterfaceId(interfaceId);
2154  include |= downstream && downstream->isInInheritedOlist();
2155  }
2156  else if (route->gRoute) {
2157  DownstreamInterface *downstream = route->gRoute->findDownstreamInterfaceByInterfaceId(interfaceId);
2158  include |= downstream && downstream->isInInheritedOlist();
2159  }
2160  // (+) joins(S,G)
2161  include |= joinPruneState != NO_INFO;
2162  // (+) pim_include(S,G)
2163  include |= pimInclude();
2164  // (-) lost_assert(S,G)
2165  include &= assertState != I_LOST_ASSERT;
2166  break;
2167  }
2168  return include;
2169 }
DownstreamInterface(Route *owner, InterfaceEntry *ie, JoinPruneState joinPruneState, bool show=true)
Definition: PIMSM.h:116
int getInterfaceId() const
Definition: InterfaceEntry.h:185
Definition: PIMSM.h:141
bool pimInclude() const
Definition: PIMSM.h:84
JoinPruneState joinPruneState
Definition: PIMSM.h:113
Definition: PIMSM.h:142
bool pimExclude() const
Definition: PIMSM.h:90
Route * route() const
Definition: PIMSM.h:71
InterfaceEntry * ie
Definition: PIMBase.h:83
Definition: PIMSM.h:140
AssertState assertState
Definition: PIMBase.h:88
Definition: PIMSM.h:139
void inet::PIMSM::DownstreamInterface::startPrunePendingTimer ( double  joinPruneOverrideInterval)

Referenced by inet::PIMSM::processPruneG(), and inet::PIMSM::processPruneSG().

2172 {
2173  ASSERT(!prunePendingTimer);
2174  prunePendingTimer = new cMessage("PIMPrunePendingTimer", PrunePendingTimer);
2175  prunePendingTimer->setContextPointer(this);
2176  pimsm()->scheduleAt(simTime() + joinPruneOverrideInterval, prunePendingTimer);
2177 }
PIMSM * pimsm() const
Definition: PIMSM.h:72
double joinPruneOverrideInterval()
Definition: PIMSM.h:296
cMessage * prunePendingTimer
Definition: PIMSM.h:114
Definition: PIMBase.h:139

Member Data Documentation

cMessage* inet::PIMSM::DownstreamInterface::prunePendingTimer

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