INET Framework for OMNeT++/OMNEST
inet::Ipv6InterfaceData Class Reference

Ipv6-specific data for NetworkInterface. More...

#include <Ipv6InterfaceData.h>

Inheritance diagram for inet::Ipv6InterfaceData:
inet::InterfaceProtocolData inet::TagBase inet::IPrintableObject

Classes

struct  AddressData
 
struct  AdvPrefix
 For routers: advertised prefix configuration. More...
 
struct  HostConstants
 
struct  HostMulticastData
 
struct  HostVariables
 
struct  NodeConstants
 
struct  NodeVariables
 
struct  RouterConstants
 
struct  RouterMulticastData
 
struct  RouterVariables
 

Public Types

enum  { F_IP_ADDRESS, F_MULTICAST_ADDRESSES, F_MULTICAST_LISTENERS }
 
typedef std::vector< Ipv6AddressIpv6AddressVector
 
- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Public Member Functions

 Ipv6InterfaceData ()
 
virtual ~Ipv6InterfaceData ()
 
std::string str () const override
 
std::string detailedInfo () const
 
Addresses
virtual void assignAddress (const Ipv6Address &addr, bool tentative, simtime_t expiryTime, simtime_t prefExpiryTime)
 Assigns the given address to the interface. More...
 
virtual void updateMatchingAddressExpiryTimes (const Ipv6Address &prefix, int length, simtime_t expiryTime=SIMTIME_ZERO, simtime_t prefExpiryTime=SIMTIME_ZERO)
 Update expiry times of addresses. More...
 
int getNumAddresses () const
 Returns the number of addresses the interface has. More...
 
const Ipv6AddressgetAddress (int i) const
 Returns ith address of the interface. More...
 
const Ipv6AddressgetGlblAddress () const
 
bool isTentativeAddress (int i) const
 Returns true if the ith address of the interface is tentative. More...
 
bool hasAddress (const Ipv6Address &addr) const
 Returns true if the given address is one of the addresses assigned, regardless whether it is tentative or not. More...
 
bool matchesSolicitedNodeMulticastAddress (const Ipv6Address &solNodeAddr) const
 Returns true if the interface has an address matching the given solicited-node multicast addresses. More...
 
bool isTentativeAddress (const Ipv6Address &addr) const
 Returns true if the interface has the given address and it is tentative. More...
 
virtual void permanentlyAssign (const Ipv6Address &addr)
 Clears the "tentative" flag of an existing interface address. More...
 
const Ipv6AddressVectorgetJoinedMulticastGroups () const
 
const Ipv6AddressVectorgetReportedMulticastGroups () const
 
bool isMemberOfMulticastGroup (const Ipv6Address &multicastAddress) const
 
virtual void joinMulticastGroup (const Ipv6Address &multicastAddress)
 
virtual void leaveMulticastGroup (const Ipv6Address &multicastAddress)
 
bool hasMulticastListener (const Ipv6Address &multicastAddress) const
 
virtual void addMulticastListener (const Ipv6Address &multicastAddress)
 
virtual void removeMulticastListener (const Ipv6Address &multicastAddress)
 
const Ipv6AddressgetPreferredAddress () const
 Chooses a preferred address for the interface and returns it. More...
 
const Ipv6AddressgetLinkLocalAddress () const
 Returns the first valid link-local address of the interface, or UNSPECIFIED_ADDRESS if there's none. More...
 
virtual void removeAddress (const Ipv6Address &address)
 Removes the address. More...
 
simtime_t _getMaxInitialRtrAdvertInterval () const
 Getters/Setters for all variables and constants defined in RFC 2461/2462 can be found here. More...
 
uint _getMaxInitialRtrAdvertisements () const
 
uint _getMaxFinalRtrAdvertisements () const
 
simtime_t _getMinDelayBetweenRAs () const
 
simtime_t _getMaxRaDelayTime () const
 
virtual void _setMaxInitialRtrAdvertInterval (simtime_t d)
 
virtual void _setMaxInitialRtrAdvertisements (uint d)
 
virtual void _setMaxFinalRtrAdvertisements (uint d)
 
virtual void _setMinDelayBetweenRAs (simtime_t d)
 
virtual void _setMaxRaDelayTime (simtime_t d)
 
simtime_t _getMaxRtrSolicitationDelay () const
 
simtime_t _getRtrSolicitationInterval () const
 
uint _getMaxRtrSolicitations () const
 
virtual void _setMaxRtrSolicitationDelay (simtime_t d)
 
virtual void _setRtrSolicitationInterval (simtime_t d)
 
virtual void _setMaxRtrSolicitations (uint d)
 
uint _getMaxMulticastSolicit () const
 
uint _getMaxUnicastSolicit () const
 
simtime_t _getMaxAnycastDelayTime () const
 
uint _getMaxNeighbourAdvertisement () const
 
simtime_t _getReachableTime () const
 
simtime_t _getRetransTimer () const
 
simtime_t _getDelayFirstProbeTime () const
 
double _getMinRandomFactor () const
 
double _getMaxRandomFactor () const
 
virtual void _setMaxMulticastSolicit (uint d)
 
virtual void _setMaxUnicastSolicit (uint d)
 
virtual void _setMaxAnycastDelayTime (simtime_t d)
 
virtual void _setMaxNeighbourAdvertisement (uint d)
 
virtual void _setReachableTime (simtime_t d)
 
virtual void _setRetransTimer (simtime_t d)
 
virtual void _setDelayFirstProbeTime (simtime_t d)
 
virtual void _setMinRandomFactor (double d)
 
virtual void _setMaxRandomFactor (double d)
 
int getDupAddrDetectTransmits () const
 
virtual void setDupAddrDetectTransmits (int d)
 
uint getLinkMtu () const
 
short getCurHopLimit () const
 
uint getBaseReachableTime () const
 
simtime_t getReachableTime () const
 
uint getRetransTimer () const
 
virtual void setLinkMtu (uint d)
 
virtual void setCurHopLimit (short d)
 
virtual void setBaseReachableTime (uint d)
 
virtual void setReachableTime (simtime_t d)
 
virtual void setRetransTimer (uint d)
 
bool getAdvSendAdvertisements () const
 
simtime_t getMaxRtrAdvInterval () const
 
simtime_t getMinRtrAdvInterval () const
 
bool getAdvManagedFlag () const
 
bool getAdvOtherConfigFlag () const
 
int getAdvLinkMtu () const
 
int getAdvReachableTime () const
 
int getAdvRetransTimer () const
 
short getAdvCurHopLimit () const
 
simtime_t getAdvDefaultLifetime () const
 
virtual void setAdvSendAdvertisements (bool d)
 
virtual void setMaxRtrAdvInterval (simtime_t d)
 
virtual void setMinRtrAdvInterval (simtime_t d)
 
virtual void setAdvManagedFlag (bool d)
 
virtual void setAdvOtherConfigFlag (bool d)
 
virtual void setAdvLinkMtu (int d)
 
virtual void setAdvReachableTime (int d)
 
virtual void setAdvRetransTimer (int d)
 
virtual void setAdvCurHopLimit (short d)
 
virtual void setAdvDefaultLifetime (simtime_t d)
 
Router advertised prefixes
virtual void addAdvPrefix (const AdvPrefix &advPrefix)
 Adds the given advertised prefix to the interface. More...
 
int getNumAdvPrefixes () const
 Returns the number of advertised prefixes on the interface. More...
 
const AdvPrefixgetAdvPrefix (int i) const
 Returns the ith advertised prefix on the interface. More...
 
virtual void setAdvPrefix (int i, const AdvPrefix &advPrefix)
 Changes the configuration of the ith advertised prefix on the interface. More...
 
virtual void removeAdvPrefix (int i)
 Remove the ith advertised prefix on the interface. More...
 
virtual simtime_t generateReachableTime (double MIN_RANDOM_FACTOR, double MAX_RANDOM_FACTOR, uint baseReachableTime)
 This method randomly generates a reachableTime given the MIN_RANDOM_FACTOR MAX_RANDOM_FACTOR and baseReachableTime. More...
 
virtual simtime_t generateReachableTime ()
 Arg-less version. More...
 
- Public Member Functions inherited from inet::InterfaceProtocolData
 InterfaceProtocolData (int id)
 
NetworkInterfacegetNetworkInterface () const
 Returns the NetworkInterface that contains this data object, or nullptr. More...
 
- Public Member Functions inherited from inet::TagBase
virtual const Ptr< TagBasedupShared () const
 
virtual const Ptr< TagBasechangeRegion (b offsetDelta, b lengthDelta) const
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) override
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags) const override
 Prints this object to the provided output stream. More...
 
virtual std::ostream & printFieldsToStream (std::ostream &stream, int level, int evFlags) const
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Public Attributes

RouterConstants routerConstants
 
HostConstants hostConstants
 
NodeConstants nodeConstants
 

Protected Types

typedef std::vector< AddressDataAddressDataVector
 
typedef std::vector< AdvPrefixAdvPrefixList
 

Protected Member Functions

int findAddress (const Ipv6Address &addr) const
 
void choosePreferredAddress ()
 
void changed1 (int fieldId)
 
HostMulticastDatagetHostData ()
 
const HostMulticastDatagetHostData () const
 
RouterMulticastDatagetRouterData ()
 
const RouterMulticastDatagetRouterData () const
 
- Protected Member Functions inherited from inet::InterfaceProtocolData
virtual void changed (simsignal_t signalID, int fieldId)
 

Static Protected Member Functions

static bool addrLess (const AddressData &a, const AddressData &b)
 

Protected Attributes

HostMulticastDatahostMcastData = nullptr
 
RouterMulticastDatarouterMcastData = nullptr
 
AddressDataVector addresses
 
Ipv6Address preferredAddr
 
simtime_t preferredAddrExpiryTime
 
NodeVariables nodeVars
 
HostVariables hostVars
 
RouterVariables rtrVars
 
- Protected Attributes inherited from inet::InterfaceProtocolData
NetworkInterfaceownerp = nullptr
 
int id
 

Detailed Description

Ipv6-specific data for NetworkInterface.

Most of this comes from section 6.2.1 of RFC 2461 (Ipv6 Neighbor Discovery, Router Configuration Variables).

Member Typedef Documentation

◆ AddressDataVector

◆ AdvPrefixList

typedef std::vector<AdvPrefix> inet::Ipv6InterfaceData::AdvPrefixList
protected

◆ Ipv6AddressVector

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
F_IP_ADDRESS 
F_MULTICAST_ADDRESSES 
F_MULTICAST_LISTENERS 
105 { F_IP_ADDRESS, F_MULTICAST_ADDRESSES, F_MULTICAST_LISTENERS }; // FIXME missed field IDs and missed notifications in setter functions

Constructor & Destructor Documentation

◆ Ipv6InterfaceData()

inet::Ipv6InterfaceData::Ipv6InterfaceData ( )
73 {
74 #ifdef INET_WITH_xMIPv6
75 // rt6 = IPv6RoutingTableAccess().get();
76 #endif /* INET_WITH_xMIPv6 */
77  /*******************Setting host/node/router Protocol Constants************/
83 
87 
88 #ifdef INET_WITH_xMIPv6
89  hostConstants.initialBindAckTimeout = MIPv6_INITIAL_BINDACK_TIMEOUT; // MIPv6: added by Zarrar Yousaf @ CNI UniDo 17.06.07
90  hostConstants.maxBindAckTimeout = MIPv6_MAX_BINDACK_TIMEOUT; // MIPv6: added by Zarrar Yousaf @ CNI UniDo 17.06.07
91  hostConstants.initialBindAckTimeoutFirst = MIPv6_INITIAL_BINDACK_TIMEOUT_FIRST; // MIPv6: 12.9.07 - CB
92  hostConstants.maxRRBindingLifeTime = MIPv6_MAX_RR_BINDING_LIFETIME; // 14.9.07 - CB
93  hostConstants.maxHABindingLifeTime = MIPv6_MAX_HA_BINDING_LIFETIME; // 14.9.07 - CB
94  hostConstants.maxTokenLifeTime = MIPv6_MAX_TOKEN_LIFETIME; // 14.9.07 - CB
95 #endif /* INET_WITH_xMIPv6 */
96 
106 
107  /*******************Setting host/node/router variables*********************/
109 
111  hostVars.curHopLimit = IPv6_DEFAULT_ADVCURHOPLIMIT; // value specified in RFC 1700-can't find it
116 
117  // rtrVars.advSendAdvertisements is set in Ipv6RoutingTable.cc:line 143
120  rtrVars.advManagedFlag = false;
121  rtrVars.advOtherConfigFlag = false;
122 
123 #ifdef INET_WITH_xMIPv6
124  rtrVars.advHomeAgentFlag = false; // Zarrar Yousaf Feb-March 2007
125 #endif /* INET_WITH_xMIPv6 */
126 
132 
133 #if USE_MOBILITY
134  if (rtrVars.advDefaultLifetime < 1)
136 #endif // if USE_MOBILITY
137 }

◆ ~Ipv6InterfaceData()

inet::Ipv6InterfaceData::~Ipv6InterfaceData ( )
virtual
140 {
141  delete hostMcastData;
142  delete routerMcastData;
143 }

Member Function Documentation

◆ _getDelayFirstProbeTime()

simtime_t inet::Ipv6InterfaceData::_getDelayFirstProbeTime ( ) const
inline

◆ _getMaxAnycastDelayTime()

simtime_t inet::Ipv6InterfaceData::_getMaxAnycastDelayTime ( ) const
inline

◆ _getMaxFinalRtrAdvertisements()

uint inet::Ipv6InterfaceData::_getMaxFinalRtrAdvertisements ( ) const
inline

◆ _getMaxInitialRtrAdvertInterval()

simtime_t inet::Ipv6InterfaceData::_getMaxInitialRtrAdvertInterval ( ) const
inline

Getters/Setters for all variables and constants defined in RFC 2461/2462 can be found here.

Operations responsible for protocol constants are marked with a "_" prefix. Constants in this class are stored as instance variables. Default values for certain variables are defined at the top of this file, while certain variables have to be generated. Protocol constants are subject to change as specified in RFC2461:section 10 depending on different link layer operation. Getters and setters have been implemented for protocol constants so that a wireless interface may be set to a different set of constant values. (ie. changed by the Ipv4FlatNetworkConfigurator) Such a design allows both wired and wireless networks to co-exist within a simulation run.

Referenced by inet::Ipv6NeighbourDiscovery::sendPeriodicRa().

◆ _getMaxInitialRtrAdvertisements()

uint inet::Ipv6InterfaceData::_getMaxInitialRtrAdvertisements ( ) const
inline

◆ _getMaxMulticastSolicit()

uint inet::Ipv6InterfaceData::_getMaxMulticastSolicit ( ) const
inline

◆ _getMaxNeighbourAdvertisement()

uint inet::Ipv6InterfaceData::_getMaxNeighbourAdvertisement ( ) const
inline

◆ _getMaxRaDelayTime()

simtime_t inet::Ipv6InterfaceData::_getMaxRaDelayTime ( ) const
inline

◆ _getMaxRandomFactor()

double inet::Ipv6InterfaceData::_getMaxRandomFactor ( ) const
inline

◆ _getMaxRtrSolicitationDelay()

simtime_t inet::Ipv6InterfaceData::_getMaxRtrSolicitationDelay ( ) const
inline

◆ _getMaxRtrSolicitations()

uint inet::Ipv6InterfaceData::_getMaxRtrSolicitations ( ) const
inline

◆ _getMaxUnicastSolicit()

uint inet::Ipv6InterfaceData::_getMaxUnicastSolicit ( ) const
inline

◆ _getMinDelayBetweenRAs()

simtime_t inet::Ipv6InterfaceData::_getMinDelayBetweenRAs ( ) const
inline

◆ _getMinRandomFactor()

double inet::Ipv6InterfaceData::_getMinRandomFactor ( ) const
inline

◆ _getReachableTime()

simtime_t inet::Ipv6InterfaceData::_getReachableTime ( ) const
inline
632 { return nodeConstants.reachableTime; }

◆ _getRetransTimer()

◆ _getRtrSolicitationInterval()

simtime_t inet::Ipv6InterfaceData::_getRtrSolicitationInterval ( ) const
inline

◆ _setDelayFirstProbeTime()

virtual void inet::Ipv6InterfaceData::_setDelayFirstProbeTime ( simtime_t  d)
inlinevirtual

◆ _setMaxAnycastDelayTime()

virtual void inet::Ipv6InterfaceData::_setMaxAnycastDelayTime ( simtime_t  d)
inlinevirtual

◆ _setMaxFinalRtrAdvertisements()

virtual void inet::Ipv6InterfaceData::_setMaxFinalRtrAdvertisements ( uint  d)
inlinevirtual

◆ _setMaxInitialRtrAdvertInterval()

virtual void inet::Ipv6InterfaceData::_setMaxInitialRtrAdvertInterval ( simtime_t  d)
inlinevirtual

◆ _setMaxInitialRtrAdvertisements()

virtual void inet::Ipv6InterfaceData::_setMaxInitialRtrAdvertisements ( uint  d)
inlinevirtual

◆ _setMaxMulticastSolicit()

virtual void inet::Ipv6InterfaceData::_setMaxMulticastSolicit ( uint  d)
inlinevirtual

◆ _setMaxNeighbourAdvertisement()

virtual void inet::Ipv6InterfaceData::_setMaxNeighbourAdvertisement ( uint  d)
inlinevirtual

◆ _setMaxRaDelayTime()

virtual void inet::Ipv6InterfaceData::_setMaxRaDelayTime ( simtime_t  d)
inlinevirtual

◆ _setMaxRandomFactor()

virtual void inet::Ipv6InterfaceData::_setMaxRandomFactor ( double  d)
inlinevirtual

◆ _setMaxRtrSolicitationDelay()

virtual void inet::Ipv6InterfaceData::_setMaxRtrSolicitationDelay ( simtime_t  d)
inlinevirtual

◆ _setMaxRtrSolicitations()

virtual void inet::Ipv6InterfaceData::_setMaxRtrSolicitations ( uint  d)
inlinevirtual

◆ _setMaxUnicastSolicit()

virtual void inet::Ipv6InterfaceData::_setMaxUnicastSolicit ( uint  d)
inlinevirtual

◆ _setMinDelayBetweenRAs()

virtual void inet::Ipv6InterfaceData::_setMinDelayBetweenRAs ( simtime_t  d)
inlinevirtual

◆ _setMinRandomFactor()

virtual void inet::Ipv6InterfaceData::_setMinRandomFactor ( double  d)
inlinevirtual

◆ _setReachableTime()

virtual void inet::Ipv6InterfaceData::_setReachableTime ( simtime_t  d)
inlinevirtual

◆ _setRetransTimer()

virtual void inet::Ipv6InterfaceData::_setRetransTimer ( simtime_t  d)
inlinevirtual

◆ _setRtrSolicitationInterval()

virtual void inet::Ipv6InterfaceData::_setRtrSolicitationInterval ( simtime_t  d)
inlinevirtual

◆ addAdvPrefix()

void inet::Ipv6InterfaceData::addAdvPrefix ( const AdvPrefix advPrefix)
virtual

Adds the given advertised prefix to the interface.

418 {
419  rtrVars.advPrefixList.push_back(advPrefix);
420 }

◆ addMulticastListener()

void inet::Ipv6InterfaceData::addMulticastListener ( const Ipv6Address multicastAddress)
virtual
518 {
519  if (!multicastAddress.isMulticast())
520  throw cRuntimeError("Ipv6InterfaceData::addMulticastListener(): multicast address expected, received %s.", multicastAddress.str().c_str());
521 
522  if (!hasMulticastListener(multicastAddress)) {
523  getRouterData()->reportedMulticastGroups.push_back(multicastAddress);
525  }
526 }

◆ addrLess()

bool inet::Ipv6InterfaceData::addrLess ( const AddressData a,
const AddressData b 
)
staticprotected
372 {
373  // This method is used in choosePreferredAddress().
374  // sort() produces increasing order, so "better" addresses should
375  // compare as "less", to make them appear first in the array
376  if (a.tentative != b.tentative)
377  return !a.tentative; // tentative=false is better
378  if (a.address.getScope() != b.address.getScope())
379  return a.address.getScope() > b.address.getScope(); // bigger scope is better
380 
381 #ifdef INET_WITH_xMIPv6
382  // FIXME check a.address.isGlobal() != b.address.isGlobal()
383 
384  if (a.address.isGlobal() && b.address.isGlobal() && a.addrType != b.addrType)
385  return a.addrType == CoA; // HoA is better than CoA, 24.9.07 - CB
386 #endif /* INET_WITH_xMIPv6 */
387 
388  return (a.expiryTime == SIMTIME_ZERO && b.expiryTime != SIMTIME_ZERO) || a.expiryTime > b.expiryTime; // longer expiry time is better
389 }

Referenced by choosePreferredAddress().

◆ assignAddress()

void inet::Ipv6InterfaceData::assignAddress ( const Ipv6Address addr,
bool  tentative,
simtime_t  expiryTime,
simtime_t  prefExpiryTime 
)
virtual

Assigns the given address to the interface.

238 {
239  addresses.push_back(AddressData());
240  AddressData& a = addresses.back();
241  a.address = addr;
242  a.tentative = tentative;
243  a.expiryTime = expiryTime;
244  a.prefExpiryTime = prefExpiryTime;
245 
246 #ifdef INET_WITH_xMIPv6
247  if (addr.isGlobal()) { // only tag a global scope address as HoA or CoA, depending on the status of the H-Flag
248  if (hFlag == true)
249  a.addrType = HoA; // if H-Flag is set then the auto-conf address is the Home address -.....
250  else
251  a.addrType = CoA; // else it is a care of address (CoA)
252  }
253  // FIXME else a.addrType = ???;
254 #endif /* INET_WITH_xMIPv6 */
255 
258 }

Referenced by inet::eigrp::EigrpIpv6Pdm::enableInterface().

◆ changed1()

void inet::Ipv6InterfaceData::changed1 ( int  fieldId)
inlineprotected

◆ choosePreferredAddress()

void inet::Ipv6InterfaceData::choosePreferredAddress ( )
protected
392 {
393  // do we have addresses?
394  if (addresses.size() == 0) {
395  preferredAddr = Ipv6Address();
396  return;
397  }
398 
399  // FIXME shouldn't we stick to the current preferredAddress if its prefLifetime
400  // hasn't expired yet?
401 
402  // FIXME TODO throw out expired addresses! 0 should be treated as infinity
403 
404  // sort addresses by scope and expiry time, then pick the first one
405  std::stable_sort(addresses.begin(), addresses.end(), addrLess);
406  // choose first unicast address
407  for (auto& elem : addresses) {
408  if (elem.address.isUnicast()) {
409  preferredAddr = elem.address;
410  preferredAddrExpiryTime = elem.expiryTime;
411  return;
412  }
413  }
415 }

Referenced by permanentlyAssign(), removeAddress(), and updateMatchingAddressExpiryTimes().

◆ detailedInfo()

std::string inet::Ipv6InterfaceData::detailedInfo ( ) const
227 {
228  return str(); // TODO this could be improved: multi-line text, etc
229 }

◆ findAddress()

int inet::Ipv6InterfaceData::findAddress ( const Ipv6Address addr) const
protected
273 {
274  for (AddressDataVector::const_iterator it = addresses.begin(); it != addresses.end(); it++)
275  if (it->address == addr)
276  return it - addresses.begin();
277 
278  return -1;
279 }

Referenced by hasAddress(), isTentativeAddress(), permanentlyAssign(), and removeAddress().

◆ generateReachableTime() [1/2]

simtime_t inet::Ipv6InterfaceData::generateReachableTime ( )
virtual

Arg-less version.

449 {
451 }

Referenced by Ipv6InterfaceData().

◆ generateReachableTime() [2/2]

simtime_t inet::Ipv6InterfaceData::generateReachableTime ( double  MIN_RANDOM_FACTOR,
double  MAX_RANDOM_FACTOR,
uint  baseReachableTime 
)
virtual

This method randomly generates a reachableTime given the MIN_RANDOM_FACTOR MAX_RANDOM_FACTOR and baseReachableTime.

Refer to RFC 2461: Section 6.3.2

444 {
445  return RNGCONTEXT uniform(MIN_RANDOM_FACTOR, MAX_RANDOM_FACTOR) * baseReachableTime;
446 }

Referenced by inet::Ipv6NeighbourDiscovery::processRaForRouterUpdates().

◆ getAddress()

const Ipv6Address & inet::Ipv6InterfaceData::getAddress ( int  i) const

Returns ith address of the interface.

282 {
283  ASSERT(i >= 0 && i < (int)addresses.size());
284  return addresses[i].address;
285 }

Referenced by inet::ospfv3::Ospfv3Process::isInInterfaceTable6(), inet::Ipv6NeighbourDiscovery::processRaPrefixInfoForAddrAutoConf(), str(), and inet::InterfaceTable::updateLinkDisplayString().

◆ getAdvCurHopLimit()

short inet::Ipv6InterfaceData::getAdvCurHopLimit ( ) const
inline

◆ getAdvDefaultLifetime()

simtime_t inet::Ipv6InterfaceData::getAdvDefaultLifetime ( ) const
inline

◆ getAdvLinkMtu()

int inet::Ipv6InterfaceData::getAdvLinkMtu ( ) const
inline

◆ getAdvManagedFlag()

bool inet::Ipv6InterfaceData::getAdvManagedFlag ( ) const
inline

◆ getAdvOtherConfigFlag()

bool inet::Ipv6InterfaceData::getAdvOtherConfigFlag ( ) const
inline

◆ getAdvPrefix()

const Ipv6InterfaceData::AdvPrefix & inet::Ipv6InterfaceData::getAdvPrefix ( int  i) const

Returns the ith advertised prefix on the interface.

423 {
424  ASSERT(i >= 0 && i < (int)rtrVars.advPrefixList.size());
425  return rtrVars.advPrefixList[i];
426 }

Referenced by inet::Ipv6RoutingTable::initialize(), and str().

◆ getAdvReachableTime()

int inet::Ipv6InterfaceData::getAdvReachableTime ( ) const
inline

◆ getAdvRetransTimer()

int inet::Ipv6InterfaceData::getAdvRetransTimer ( ) const
inline

◆ getAdvSendAdvertisements()

◆ getBaseReachableTime()

uint inet::Ipv6InterfaceData::getBaseReachableTime ( ) const
inline

◆ getCurHopLimit()

short inet::Ipv6InterfaceData::getCurHopLimit ( ) const
inline
657 { return hostVars.curHopLimit; }

◆ getDupAddrDetectTransmits()

int inet::Ipv6InterfaceData::getDupAddrDetectTransmits ( ) const
inline

◆ getGlblAddress()

const Ipv6Address & inet::Ipv6InterfaceData::getGlblAddress ( ) const
288 {
289  for (const auto& elem : addresses)
290  if (elem.address.isGlobal())
291  return elem.address;
292 
294 }

◆ getHostData() [1/2]

HostMulticastData* inet::Ipv6InterfaceData::getHostData ( )
inlineprotected
429 { if (!hostMcastData) hostMcastData = new HostMulticastData(); return hostMcastData; }

Referenced by joinMulticastGroup(), and leaveMulticastGroup().

◆ getHostData() [2/2]

const HostMulticastData* inet::Ipv6InterfaceData::getHostData ( ) const
inlineprotected
430 { return const_cast<Ipv6InterfaceData *>(this)->getHostData(); }

Referenced by getHostData().

◆ getJoinedMulticastGroups()

const Ipv6AddressVector& inet::Ipv6InterfaceData::getJoinedMulticastGroups ( ) const
inline
529 { return getHostData()->joinedMulticastGroups; }

Referenced by isMemberOfMulticastGroup().

◆ getLinkLocalAddress()

const Ipv6Address & inet::Ipv6InterfaceData::getLinkLocalAddress ( ) const

Returns the first valid link-local address of the interface, or UNSPECIFIED_ADDRESS if there's none.

354 {
355  for (const auto& elem : addresses)
356  if (elem.address.isLinkLocal()) // FIXME and valid
357  return elem.address;
358 
360 }

Referenced by inet::ospfv3::Ospfv3Interface::detailedInfo().

◆ getLinkMtu()

uint inet::Ipv6InterfaceData::getLinkMtu ( ) const
inline
656 { return hostVars.linkMTU; }

◆ getMaxRtrAdvInterval()

simtime_t inet::Ipv6InterfaceData::getMaxRtrAdvInterval ( ) const
inline

◆ getMinRtrAdvInterval()

simtime_t inet::Ipv6InterfaceData::getMinRtrAdvInterval ( ) const
inline

◆ getNumAddresses()

int inet::Ipv6InterfaceData::getNumAddresses ( ) const
inline

Returns the number of addresses the interface has.

475 { return addresses.size(); }

Referenced by inet::ospfv3::Ospfv3Area::originateIntraAreaPrefixLSA(), and str().

◆ getNumAdvPrefixes()

int inet::Ipv6InterfaceData::getNumAdvPrefixes ( ) const
inline

Returns the number of advertised prefixes on the interface.

713 { return rtrVars.advPrefixList.size(); }

Referenced by str().

◆ getPreferredAddress()

const Ipv6Address& inet::Ipv6InterfaceData::getPreferredAddress ( ) const
inline

Chooses a preferred address for the interface and returns it.

This is the address that should be used as source address for outgoing datagrams, if one is not explicitly specified.

Selection is based on scope (globally routable addresses are preferred), then on lifetime (the one that expires last is chosen). See private choosePreferredAddress() function.

FIXME turn into preferredGLOBALAddress()!

559 { return preferredAddr; } // FIXME TODO check expiry time!

Referenced by inet::Ipv6NeighbourDiscovery::processNudTimeout().

◆ getReachableTime()

simtime_t inet::Ipv6InterfaceData::getReachableTime ( ) const
inline

◆ getReportedMulticastGroups()

const Ipv6AddressVector& inet::Ipv6InterfaceData::getReportedMulticastGroups ( ) const
inline

◆ getRetransTimer()

uint inet::Ipv6InterfaceData::getRetransTimer ( ) const
inline

◆ getRouterData() [1/2]

RouterMulticastData* inet::Ipv6InterfaceData::getRouterData ( )
inlineprotected
431 { if (!routerMcastData) routerMcastData = new RouterMulticastData(); return routerMcastData; }

Referenced by addMulticastListener(), hasMulticastListener(), and removeMulticastListener().

◆ getRouterData() [2/2]

const RouterMulticastData* inet::Ipv6InterfaceData::getRouterData ( ) const
inlineprotected
432 { return const_cast<Ipv6InterfaceData *>(this)->getRouterData(); }

Referenced by getRouterData().

◆ hasAddress()

bool inet::Ipv6InterfaceData::hasAddress ( const Ipv6Address addr) const

Returns true if the given address is one of the addresses assigned, regardless whether it is tentative or not.

316 {
317  return findAddress(addr) != -1;
318 }

Referenced by inet::Ipv6NeighbourDiscovery::initiateAddressResolution(), inet::Ipv6NeighbourDiscovery::processNsPacket(), and inet::eigrp::EigrpIpv6Pdm::setPassive().

◆ hasMulticastListener()

bool inet::Ipv6InterfaceData::hasMulticastListener ( const Ipv6Address multicastAddress) const
512 {
513  const Ipv6AddressVector& multicastGroups = getRouterData()->reportedMulticastGroups;
514  return contains(multicastGroups, multicastAddress);
515 }

Referenced by addMulticastListener().

◆ isMemberOfMulticastGroup()

bool inet::Ipv6InterfaceData::isMemberOfMulticastGroup ( const Ipv6Address multicastAddress) const
454 {
455  const Ipv6AddressVector& multicastGroups = getJoinedMulticastGroups();
456  return contains(multicastGroups, multicastAddress);
457 }

◆ isTentativeAddress() [1/2]

bool inet::Ipv6InterfaceData::isTentativeAddress ( const Ipv6Address addr) const

Returns true if the interface has the given address and it is tentative.

330 {
331  int k = findAddress(addr);
332  return k != -1 && addresses[k].tentative;
333 }

◆ isTentativeAddress() [2/2]

bool inet::Ipv6InterfaceData::isTentativeAddress ( int  i) const

◆ joinMulticastGroup()

void inet::Ipv6InterfaceData::joinMulticastGroup ( const Ipv6Address multicastAddress)
virtual
460 {
461  if (!multicastAddress.isMulticast())
462  throw cRuntimeError("Ipv6InterfaceData::joinMulticastGroup(): multicast address expected, received %s.", multicastAddress.str().c_str());
463 
465 
466  std::vector<int>& refCounts = getHostData()->refCounts;
467  for (int i = 0; i < (int)multicastGroups.size(); ++i) {
468  if (multicastGroups[i] == multicastAddress) {
469  refCounts[i]++;
470  return;
471  }
472  }
473 
474  multicastGroups.push_back(multicastAddress);
475  refCounts.push_back(1);
476 
478 
479  cModule *m = ownerp ? dynamic_cast<cModule *>(ownerp->getInterfaceTable()) : nullptr;
480  if (m) {
481  Ipv6MulticastGroupInfo info(ownerp, multicastAddress);
482  m->emit(ipv6MulticastGroupJoinedSignal, &info);
483  }
484 }

Referenced by inet::ospfv3::Ospfv3InterfaceState::changeState(), inet::eigrp::EigrpIpv6Pdm::enableInterface(), and inet::ospfv3::Ospfv3Splitter::parseConfig().

◆ leaveMulticastGroup()

void inet::Ipv6InterfaceData::leaveMulticastGroup ( const Ipv6Address multicastAddress)
virtual
487 {
488  if (!multicastAddress.isMulticast())
489  throw cRuntimeError("Ipv6InterfaceData::leaveMulticastGroup(): multicast address expected, received %s.", multicastAddress.str().c_str());
490 
492  std::vector<int>& refCounts = getHostData()->refCounts;
493  for (int i = 0; i < (int)multicastGroups.size(); ++i) {
494  if (multicastGroups[i] == multicastAddress) {
495  if (--refCounts[i] == 0) {
496  multicastGroups.erase(multicastGroups.begin() + i);
497  refCounts.erase(refCounts.begin() + i);
498 
500 
501  cModule *m = ownerp ? dynamic_cast<cModule *>(ownerp->getInterfaceTable()) : nullptr;
502  if (m) {
503  Ipv6MulticastGroupInfo info(ownerp, multicastAddress);
504  m->emit(ipv6MulticastGroupLeftSignal, &info);
505  }
506  }
507  }
508  }
509 }

Referenced by inet::ospfv3::Ospfv3InterfaceState::changeState(), inet::eigrp::EigrpIpv6Pdm::disableInterface(), and inet::eigrp::EigrpIpv6Pdm::setPassive().

◆ matchesSolicitedNodeMulticastAddress()

bool inet::Ipv6InterfaceData::matchesSolicitedNodeMulticastAddress ( const Ipv6Address solNodeAddr) const

Returns true if the interface has an address matching the given solicited-node multicast addresses.

321 {
322  for (const auto& elem : addresses)
323  if (elem.address.formSolicitedNodeMulticastAddress() == solNodeAddr)
324  return true;
325 
326  return false;
327 }

Referenced by inet::Ipv6RoutingTable::isLocalAddress().

◆ permanentlyAssign()

void inet::Ipv6InterfaceData::permanentlyAssign ( const Ipv6Address addr)
virtual

Clears the "tentative" flag of an existing interface address.

336 {
337  int k = findAddress(addr);
338  ASSERT(k != -1);
339  addresses[k].tentative = false;
341 }

◆ removeAddress()

void inet::Ipv6InterfaceData::removeAddress ( const Ipv6Address address)
virtual

Removes the address.

Called when the valid lifetime expires.

363 {
364  int k = findAddress(address);
365  ASSERT(k != -1);
366  addresses.erase(addresses.begin() + k);
369 }

Referenced by inet::eigrp::EigrpIpv6Pdm::disableInterface(), inet::Ipv6NeighbourDiscovery::makeTentativeAddressPermanent(), and inet::eigrp::EigrpIpv6Pdm::setPassive().

◆ removeAdvPrefix()

void inet::Ipv6InterfaceData::removeAdvPrefix ( int  i)
virtual

Remove the ith advertised prefix on the interface.

Prefixes at larger indices will shift down.

437 {
438  ASSERT(i >= 0 && i < (int)rtrVars.advPrefixList.size());
439  rtrVars.advPrefixList.erase(rtrVars.advPrefixList.begin() + i);
440 }

◆ removeMulticastListener()

void inet::Ipv6InterfaceData::removeMulticastListener ( const Ipv6Address multicastAddress)
virtual
529 {
531 
532  int n = multicastGroups.size();
533  int i;
534  for (i = 0; i < n; i++)
535  if (multicastGroups[i] == multicastAddress)
536  break;
537 
538  if (i != n) {
539  multicastGroups.erase(multicastGroups.begin() + i);
541  }
542 }

◆ setAdvCurHopLimit()

virtual void inet::Ipv6InterfaceData::setAdvCurHopLimit ( short  d)
inlinevirtual
699 { rtrVars.advCurHopLimit = d; }

◆ setAdvDefaultLifetime()

virtual void inet::Ipv6InterfaceData::setAdvDefaultLifetime ( simtime_t  d)
inlinevirtual

◆ setAdvLinkMtu()

virtual void inet::Ipv6InterfaceData::setAdvLinkMtu ( int  d)
inlinevirtual
696 { rtrVars.advLinkMTU = d; }

◆ setAdvManagedFlag()

virtual void inet::Ipv6InterfaceData::setAdvManagedFlag ( bool  d)
inlinevirtual
689 { rtrVars.advManagedFlag = d; }

◆ setAdvOtherConfigFlag()

virtual void inet::Ipv6InterfaceData::setAdvOtherConfigFlag ( bool  d)
inlinevirtual

◆ setAdvPrefix()

void inet::Ipv6InterfaceData::setAdvPrefix ( int  i,
const AdvPrefix advPrefix 
)
virtual

Changes the configuration of the ith advertised prefix on the interface.

The prefix itself should stay the same.

429 {
430  ASSERT(i >= 0 && i < (int)rtrVars.advPrefixList.size());
431  ASSERT(rtrVars.advPrefixList[i].prefix == advPrefix.prefix);
432  ASSERT(rtrVars.advPrefixList[i].prefixLength == advPrefix.prefixLength);
433  rtrVars.advPrefixList[i] = advPrefix;
434 }

◆ setAdvReachableTime()

virtual void inet::Ipv6InterfaceData::setAdvReachableTime ( int  d)
inlinevirtual
697 { rtrVars.advReachableTime = d; }

◆ setAdvRetransTimer()

virtual void inet::Ipv6InterfaceData::setAdvRetransTimer ( int  d)
inlinevirtual
698 { rtrVars.advRetransTimer = d; }

◆ setAdvSendAdvertisements()

virtual void inet::Ipv6InterfaceData::setAdvSendAdvertisements ( bool  d)
inlinevirtual

◆ setBaseReachableTime()

virtual void inet::Ipv6InterfaceData::setBaseReachableTime ( uint  d)
inlinevirtual

◆ setCurHopLimit()

virtual void inet::Ipv6InterfaceData::setCurHopLimit ( short  d)
inlinevirtual
663 { hostVars.curHopLimit = d; }

◆ setDupAddrDetectTransmits()

virtual void inet::Ipv6InterfaceData::setDupAddrDetectTransmits ( int  d)
inlinevirtual

◆ setLinkMtu()

virtual void inet::Ipv6InterfaceData::setLinkMtu ( uint  d)
inlinevirtual
662 { hostVars.linkMTU = d; }

◆ setMaxRtrAdvInterval()

virtual void inet::Ipv6InterfaceData::setMaxRtrAdvInterval ( simtime_t  d)
inlinevirtual
687 { rtrVars.maxRtrAdvInterval = d; }

◆ setMinRtrAdvInterval()

virtual void inet::Ipv6InterfaceData::setMinRtrAdvInterval ( simtime_t  d)
inlinevirtual
688 { rtrVars.minRtrAdvInterval = d; }

◆ setReachableTime()

virtual void inet::Ipv6InterfaceData::setReachableTime ( simtime_t  d)
inlinevirtual
665 { hostVars.reachableTime = d; }

◆ setRetransTimer()

virtual void inet::Ipv6InterfaceData::setRetransTimer ( uint  d)
inlinevirtual
666 { hostVars.retransTimer = d; }

◆ str()

std::string inet::Ipv6InterfaceData::str ( ) const
overridevirtual

Reimplemented from inet::TagBase.

146 {
147  // FIXME FIXME FIXME FIXME info() should never print a newline
148  std::ostringstream os;
149  os << "Ipv6:{" << endl;
150  for (int i = 0; i < getNumAddresses(); i++) {
151  os << (i ? "\t , " : "\tAddrs:") << getAddress(i)
152  << "(" << Ipv6Address::scopeName(getAddress(i).getScope())
153  << (isTentativeAddress(i) ? " tent" : "") << ") "
154 
155 #ifdef INET_WITH_xMIPv6
156 // TODO revise, routing table is not that simple to access
157 // << ((rt6->isMobileNode() && getAddress(i).isGlobal())
158 // ? (addresses[i].addrType==HoA ? "HoA" : "CoA") : "")
159 #endif /* INET_WITH_xMIPv6 */
160 
161  << " expiryTime: " << (addresses[i].expiryTime == SIMTIME_ZERO ? "inf" : SIMTIME_STR(addresses[i].expiryTime))
162  << " prefExpiryTime: " << (addresses[i].prefExpiryTime == SIMTIME_ZERO ? "inf" : SIMTIME_STR(addresses[i].prefExpiryTime))
163  << endl;
164  }
165 
166  if (hostMcastData)
167  os << hostMcastData->str();
168 
169  for (int i = 0; i < getNumAdvPrefixes(); i++) {
170  const AdvPrefix& a = getAdvPrefix(i);
171  os << (i ? ", " : "\tAdvPrefixes: ") << a.prefix << "/" << a.prefixLength << "("
172  << (a.advOnLinkFlag ? "" : "off-link ")
173  << (a.advAutonomousFlag ? "" : "non-auto ");
174 
175 #ifdef INET_WITH_xMIPv6
176  os << "R-Flag = " << (a.advRtrAddr ? "1 " : "0 ");
177 #endif /* INET_WITH_xMIPv6 */
178 
179  if (a.advValidLifetime == SIMTIME_ZERO)
180  os << "lifetime:inf";
181  else if (a.advValidLifetime > SIMTIME_ZERO)
182  os << "expires:" << a.advValidLifetime;
183  else
184  os << "lifetime:+" << (-1 * a.advValidLifetime);
185  os << ")" << endl;
186  }
187  os << " ";
188 
189  if (routerMcastData)
190  os << routerMcastData->str();
191 
192  // uncomment the following as needed!
193  os << "\tNode:";
194  os << " dupAddrDetectTrans=" << nodeVars.dupAddrDetectTransmits;
195 // os << " curHopLimit=" << hostVars.curHopLimit;
196 // os << " retransTimer=" << hostVars.retransTimer;
197 // os << " baseReachableTime=" << hostVars.baseReachableTime;
198  os << " reachableTime=" << hostVars.reachableTime << endl;
199 
200 #ifdef INET_WITH_xMIPv6
201  // the following is for MIPv6 support
202  // 4.9.07 - Zarrar, CB
203 // TODO revise, routing table is not that simple to access
204 // if ( rt6->isMobileNode() )
205 // os << "\tHome Network Info: " << " HoA="<< homeInfo.HoA << ", HA=" << homeInfo.homeAgentAddr
206 // << ", home prefix=" << homeInfo.prefix/*.prefix()*/ << "\n";
207 #endif /* INET_WITH_xMIPv6 */
208 
210  os << "\tRouter:";
211  os << " maxRtrAdvInt=" << rtrVars.maxRtrAdvInterval;
212  os << " minRtrAdvInt=" << rtrVars.minRtrAdvInterval << endl;
213 // os << " advManagedFlag=" << rtrVars.advManagedFlag;
214 // os << " advOtherFlag=" << rtrVars.advOtherFlag;
215 // os << " advLinkMTU=" << rtrVars.advLinkMTU;
216 // os << " advReachableTime=" << rtrVars.advReachableTime;
217 // os << " advRetransTimer=" << rtrVars.advRetransTimer;
218 // os << " advCurHopLimit=" << rtrVars.advCurHopLimit;
219 // os << " advDefaultLifetime=" << rtrVars.advDefaultLifetime;
220  }
221 
222  os << " }" << endl;
223  return os.str();
224 }

Referenced by detailedInfo().

◆ updateMatchingAddressExpiryTimes()

void inet::Ipv6InterfaceData::updateMatchingAddressExpiryTimes ( const Ipv6Address prefix,
int  length,
simtime_t  expiryTime = SIMTIME_ZERO,
simtime_t  prefExpiryTime = SIMTIME_ZERO 
)
virtual

Update expiry times of addresses.

Expiry times possibly come from prefixes (with on-link flag set to either zero or one) in Router Advertisements. Zero expiry time means infinity.

262 {
263  for (auto& elem : addresses) {
264  if (elem.address.matches(prefix, length)) {
265  elem.expiryTime = expiryTime;
266  elem.prefExpiryTime = prefExpiryTime;
267  }
268  }
270 }

Member Data Documentation

◆ addresses

◆ hostConstants

HostConstants inet::Ipv6InterfaceData::hostConstants

Referenced by Ipv6InterfaceData().

◆ hostMcastData

HostMulticastData* inet::Ipv6InterfaceData::hostMcastData = nullptr
protected

Referenced by str(), and ~Ipv6InterfaceData().

◆ hostVars

HostVariables inet::Ipv6InterfaceData::hostVars
protected

Referenced by Ipv6InterfaceData(), and str().

◆ nodeConstants

NodeConstants inet::Ipv6InterfaceData::nodeConstants

Referenced by Ipv6InterfaceData().

◆ nodeVars

NodeVariables inet::Ipv6InterfaceData::nodeVars
protected

Referenced by Ipv6InterfaceData(), and str().

◆ preferredAddr

Ipv6Address inet::Ipv6InterfaceData::preferredAddr
protected

Referenced by choosePreferredAddress().

◆ preferredAddrExpiryTime

simtime_t inet::Ipv6InterfaceData::preferredAddrExpiryTime
protected

Referenced by choosePreferredAddress().

◆ routerConstants

RouterConstants inet::Ipv6InterfaceData::routerConstants

Referenced by Ipv6InterfaceData().

◆ routerMcastData

RouterMulticastData* inet::Ipv6InterfaceData::routerMcastData = nullptr
protected

Referenced by str(), and ~Ipv6InterfaceData().

◆ rtrVars

RouterVariables inet::Ipv6InterfaceData::rtrVars
protected

The documentation for this class was generated from the following files:
inet::Ipv6InterfaceData::hostMcastData
HostMulticastData * hostMcastData
Definition: Ipv6InterfaceData.h:123
inet::Ipv6InterfaceData::routerMcastData
RouterMulticastData * routerMcastData
Definition: Ipv6InterfaceData.h:124
inet::Ipv6InterfaceData::HostVariables::retransTimer
uint retransTimer
The time between retransmissions of Neighbor Solicitation messages to a neighbor when resolving the a...
Definition: Ipv6InterfaceData.h:316
inet::Ipv6InterfaceData::_getMinRandomFactor
double _getMinRandomFactor() const
Definition: Ipv6InterfaceData.h:635
IPv6_MAX_RANDOM_FACTOR
#define IPv6_MAX_RANDOM_FACTOR
Definition: Ipv6InterfaceData.h:61
inet::Ipv6InterfaceData::F_MULTICAST_ADDRESSES
@ F_MULTICAST_ADDRESSES
Definition: Ipv6InterfaceData.h:105
inet::Ipv6InterfaceData::RouterConstants::maxRADelayTime
simtime_t maxRADelayTime
Definition: Ipv6InterfaceData.h:169
IPv6_RTR_SOLICITATION_INTERVAL
#define IPv6_RTR_SOLICITATION_INTERVAL
Definition: Ipv6InterfaceData.h:49
INET_WITH_xMIPv6
#define INET_WITH_xMIPv6
Definition: features.h:221
inet::Ipv6InterfaceData::getAdvPrefix
const AdvPrefix & getAdvPrefix(int i) const
Returns the ith advertised prefix on the interface.
Definition: Ipv6InterfaceData.cc:422
inet::Ipv6InterfaceData::HostConstants::maxRtrSolicitations
int maxRtrSolicitations
Definition: Ipv6InterfaceData.h:176
inet::Ipv6InterfaceData::addrLess
static bool addrLess(const AddressData &a, const AddressData &b)
Definition: Ipv6InterfaceData.cc:371
RNGCONTEXT
#define RNGCONTEXT
Definition: INETDefs.h:82
inet::Ipv6Address::scopeName
static const char * scopeName(Scope s)
Return the string representation of the given scope.
Definition: Ipv6Address.cc:228
IPv6_DEFAULT_ADV_RETRANS_TIMER
#define IPv6_DEFAULT_ADV_RETRANS_TIMER
Definition: Ipv6InterfaceData.h:36
inet::Ipv6InterfaceData::getBaseReachableTime
uint getBaseReachableTime() const
Definition: Ipv6InterfaceData.h:658
inet::Ipv6InterfaceData::HostMulticastData::str
std::string str()
Definition: Ipv6InterfaceData.cc:22
inet::Ipv6InterfaceData::RouterConstants::maxFinalRtrAdvertisements
uint maxFinalRtrAdvertisements
Definition: Ipv6InterfaceData.h:167
inet::Ipv6InterfaceData::HostVariables::baseReachableTime
uint baseReachableTime
A base value used for computing the random ReachableTime value.
Definition: Ipv6InterfaceData.h:300
inet::Ipv6InterfaceData::HostConstants::maxRtrSolicitationDelay
simtime_t maxRtrSolicitationDelay
Definition: Ipv6InterfaceData.h:174
inet::Ipv6InterfaceData::NodeVariables::dupAddrDetectTransmits
int dupAddrDetectTransmits
The number of consecutive Neighbor Solicitation messages sent while performing Duplicate Address Dete...
Definition: Ipv6InterfaceData.h:277
inet::ipv6MulticastGroupLeftSignal
simsignal_t ipv6MulticastGroupLeftSignal
Definition: Simsignals.cc:68
IPv6_DEFAULT_DUPADDRDETECTTRANSMITS
#define IPv6_DEFAULT_DUPADDRDETECTTRANSMITS
Definition: Ipv6InterfaceData.h:29
inet::Ipv6InterfaceData::hostConstants
HostConstants hostConstants
Definition: Ipv6InterfaceData.h:187
inet::Ipv6InterfaceData::hostVars
HostVariables hostVars
Definition: Ipv6InterfaceData.h:318
inet::Ipv6InterfaceData::addresses
AddressDataVector addresses
Definition: Ipv6InterfaceData.h:252
IPv6_DELAY_FIRST_PROBE_TIME
#define IPv6_DELAY_FIRST_PROBE_TIME
Definition: Ipv6InterfaceData.h:59
inet::Ipv6InterfaceData::changed1
void changed1(int fieldId)
Definition: Ipv6InterfaceData.h:428
inet::Ipv6InterfaceData::HostVariables::curHopLimit
short curHopLimit
The default hop limit to be used when sending (unicast) IP packets.
Definition: Ipv6InterfaceData.h:295
inet::InterfaceProtocolData::ownerp
NetworkInterface * ownerp
Definition: NetworkInterface.h:54
IPv6_MAX_NEIGHBOUR_ADVERTISEMENT
#define IPv6_MAX_NEIGHBOUR_ADVERTISEMENT
Definition: Ipv6InterfaceData.h:56
IPv6_MIN_RANDOM_FACTOR
#define IPv6_MIN_RANDOM_FACTOR
Definition: Ipv6InterfaceData.h:60
IPv6_REACHABLE_TIME
#define IPv6_REACHABLE_TIME
Definition: Ipv6InterfaceData.h:57
inet::Ipv6InterfaceData::NodeConstants::delayFirstProbeTime
simtime_t delayFirstProbeTime
Definition: Ipv6InterfaceData.h:196
inet::Ipv6InterfaceData::RouterVariables::maxRtrAdvInterval
simtime_t maxRtrAdvInterval
The maximum time allowed between sending unsolicited multicast Router Advertisements from the interfa...
Definition: Ipv6InterfaceData.h:338
inet::Ipv6InterfaceData::NodeConstants::maxAnycastDelayTime
simtime_t maxAnycastDelayTime
Definition: Ipv6InterfaceData.h:192
inet::Ipv6InterfaceData::HostMulticastData::refCounts
std::vector< int > refCounts
Definition: Ipv6InterfaceData.h:110
inet::Ipv6InterfaceData::RouterVariables::advLinkMTU
int advLinkMTU
The value to be placed in MTU options sent by the router.
Definition: Ipv6InterfaceData.h:378
inet::Ipv6InterfaceData::nodeVars
NodeVariables nodeVars
Definition: Ipv6InterfaceData.h:279
IPv6_DEFAULT_MAX_RTR_ADV_INT
#define IPv6_DEFAULT_MAX_RTR_ADV_INT
Definition: Ipv6InterfaceData.h:34
inet::Ipv6InterfaceData::F_MULTICAST_LISTENERS
@ F_MULTICAST_LISTENERS
Definition: Ipv6InterfaceData.h:105
inet::Ipv6InterfaceData::generateReachableTime
virtual simtime_t generateReachableTime()
Arg-less version.
Definition: Ipv6InterfaceData.cc:448
IPv6_MAX_FINAL_RTR_ADVERTISEMENTS
#define IPv6_MAX_FINAL_RTR_ADVERTISEMENTS
Definition: Ipv6InterfaceData.h:43
IPv6_MIN_DELAY_BETWEEN_RAS
#define IPv6_MIN_DELAY_BETWEEN_RAS
Definition: Ipv6InterfaceData.h:44
IPv6_MAX_UNICAST_SOLICIT
#define IPv6_MAX_UNICAST_SOLICIT
Definition: Ipv6InterfaceData.h:54
inet::Ipv6InterfaceData::HostConstants::rtrSolicitationInterval
simtime_t rtrSolicitationInterval
Definition: Ipv6InterfaceData.h:175
inet::Ipv6InterfaceData::NodeConstants::maxNeighbourAdvertisement
uint maxNeighbourAdvertisement
Definition: Ipv6InterfaceData.h:193
inet::Ipv6InterfaceData::HostVariables::reachableTime
simtime_t reachableTime
The time a neighbor is considered reachable after receiving a reachability confirmation.
Definition: Ipv6InterfaceData.h:309
IPv6_MAX_MULTICAST_SOLICIT
#define IPv6_MAX_MULTICAST_SOLICIT
Definition: Ipv6InterfaceData.h:53
inet::Ipv6InterfaceData::RouterVariables::advRetransTimer
int advRetransTimer
The value to be placed in the Retrans Timer field in the Router Advertisement messages sent by the ro...
Definition: Ipv6InterfaceData.h:395
inet::Ipv6InterfaceData::NodeConstants::retransTimer
simtime_t retransTimer
Definition: Ipv6InterfaceData.h:195
IPv6_MAX_ANYCAST_DELAY_TIME
#define IPv6_MAX_ANYCAST_DELAY_TIME
Definition: Ipv6InterfaceData.h:55
inet::Ipv6InterfaceData::RouterVariables::advPrefixList
AdvPrefixList advPrefixList
Definition: Ipv6InterfaceData.h:420
inet::InterfaceProtocolData::InterfaceProtocolData
InterfaceProtocolData(int id)
Definition: NetworkInterface.h:62
inet::Ipv6Address::UNSPECIFIED_ADDRESS
static const Ipv6Address UNSPECIFIED_ADDRESS
The unspecified address.
Definition: Ipv6Address.h:54
inet::contains
bool contains(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:65
inet::Ipv6InterfaceData::getJoinedMulticastGroups
const Ipv6AddressVector & getJoinedMulticastGroups() const
Definition: Ipv6InterfaceData.h:529
inet::Ipv6InterfaceData::Ipv6InterfaceData
Ipv6InterfaceData()
Definition: Ipv6InterfaceData.cc:71
inet::Ipv6InterfaceData::RouterVariables::advSendAdvertisements
bool advSendAdvertisements
A flag indicating whether or not the router sends periodic Router Advertisements and responds to Rout...
Definition: Ipv6InterfaceData.h:330
inet::Ipv6InterfaceData::NodeConstants::maxUnicastSolicit
uint maxUnicastSolicit
Definition: Ipv6InterfaceData.h:191
inet::NetworkInterface::getInterfaceTable
IInterfaceTable * getInterfaceTable() const
Returns the IInterfaceTable this interface is in, or nullptr.
Definition: NetworkInterface.h:205
IPv6_RETRANS_TIMER
#define IPv6_RETRANS_TIMER
Definition: Ipv6InterfaceData.h:58
inet::Ipv6InterfaceData::getHostData
HostMulticastData * getHostData()
Definition: Ipv6InterfaceData.h:429
inet::Ipv6InterfaceData::RouterVariables::advManagedFlag
bool advManagedFlag
The TRUE/FALSE value to be placed in the "Managed address configuration" flag field in the Router Adv...
Definition: Ipv6InterfaceData.h:353
inet::NetworkInterface::F_IPV6_DATA
@ F_IPV6_DATA
Definition: NetworkInterface.h:150
inet::Ipv6InterfaceData::_getMaxRandomFactor
double _getMaxRandomFactor() const
Definition: Ipv6InterfaceData.h:636
IPv6_MAX_RTR_SOLICITATIONS
#define IPv6_MAX_RTR_SOLICITATIONS
Definition: Ipv6InterfaceData.h:50
inet::Ipv6InterfaceData::RouterVariables::advReachableTime
int advReachableTime
The value to be placed in the Reachable Time field in the Router Advertisement messages sent by the r...
Definition: Ipv6InterfaceData.h:387
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::Ipv6InterfaceData::RouterConstants::maxInitialRtrAdvertInterval
simtime_t maxInitialRtrAdvertInterval
Definition: Ipv6InterfaceData.h:165
inet::Ipv6InterfaceData::hasMulticastListener
bool hasMulticastListener(const Ipv6Address &multicastAddress) const
Definition: Ipv6InterfaceData.cc:511
IPv6_DEFAULT_ADVCURHOPLIMIT
#define IPv6_DEFAULT_ADVCURHOPLIMIT
Definition: Ipv6InterfaceData.h:32
IPv6_DEFAULT_ADV_REACHABLE_TIME
#define IPv6_DEFAULT_ADV_REACHABLE_TIME
Definition: Ipv6InterfaceData.h:35
inet::physicallayer::k
const double k
Definition: Qam1024Modulation.cc:14
inet::Ipv6InterfaceData::Ipv6AddressVector
std::vector< Ipv6Address > Ipv6AddressVector
Definition: Ipv6InterfaceData.h:102
inet::Ipv6InterfaceData::getNumAddresses
int getNumAddresses() const
Returns the number of addresses the interface has.
Definition: Ipv6InterfaceData.h:475
inet::ipv6MulticastGroupJoinedSignal
simsignal_t ipv6MulticastGroupJoinedSignal
Definition: Simsignals.cc:67
inet::Ipv6InterfaceData::findAddress
int findAddress(const Ipv6Address &addr) const
Definition: Ipv6InterfaceData.cc:272
inet::InterfaceProtocolData::changed
virtual void changed(simsignal_t signalID, int fieldId)
Definition: NetworkInterface.cc:50
inet::Ipv6InterfaceData::str
std::string str() const override
Definition: Ipv6InterfaceData.cc:145
IPv6_MAX_INITIAL_RTR_ADVERTISEMENTS
#define IPv6_MAX_INITIAL_RTR_ADVERTISEMENTS
Definition: Ipv6InterfaceData.h:42
IPv6_MIN_MTU
#define IPv6_MIN_MTU
Definition: Ipv6InterfaceData.h:31
inet::Ipv6InterfaceData::RouterVariables::advDefaultLifetime
simtime_t advDefaultLifetime
The value to be placed in the Router Lifetime field of Router Advertisements sent from the interface,...
Definition: Ipv6InterfaceData.h:414
inet::Ipv6InterfaceData::RouterVariables::advOtherConfigFlag
bool advOtherConfigFlag
The TRUE/FALSE value to be placed in the "Other stateful configuration" flag field in the Router Adve...
Definition: Ipv6InterfaceData.h:360
inet::Ipv6InterfaceData::NodeConstants::maxMulticastSolicit
uint maxMulticastSolicit
Definition: Ipv6InterfaceData.h:190
inet::Ipv6InterfaceData::HostMulticastData::joinedMulticastGroups
Ipv6AddressVector joinedMulticastGroups
Definition: Ipv6InterfaceData.h:109
inet::Ipv6InterfaceData::nodeConstants
NodeConstants nodeConstants
Definition: Ipv6InterfaceData.h:200
inet::Ipv6InterfaceData::NodeConstants::minRandomFactor
double minRandomFactor
Definition: Ipv6InterfaceData.h:197
inet::Ipv6InterfaceData::getAddress
const Ipv6Address & getAddress(int i) const
Returns ith address of the interface.
Definition: Ipv6InterfaceData.cc:281
inet::Ipv6InterfaceData::RouterMulticastData::reportedMulticastGroups
Ipv6AddressVector reportedMulticastGroups
multicast groups that have listeners on the link connected to this interface
Definition: Ipv6InterfaceData.h:117
inet::Ipv6InterfaceData::NodeConstants::maxRandomFactor
double maxRandomFactor
Definition: Ipv6InterfaceData.h:198
inet::Ipv6InterfaceData::preferredAddrExpiryTime
simtime_t preferredAddrExpiryTime
Definition: Ipv6InterfaceData.h:254
inet::Ipv6InterfaceData::choosePreferredAddress
void choosePreferredAddress()
Definition: Ipv6InterfaceData.cc:391
IPv6_MAX_RTR_SOLICITATION_DELAY
#define IPv6_MAX_RTR_SOLICITATION_DELAY
Definition: Ipv6InterfaceData.h:48
inet::Ipv6InterfaceData::RouterMulticastData::str
std::string str()
Definition: Ipv6InterfaceData.cc:50
inet::Ipv6InterfaceData::RouterConstants::minDelayBetweenRAs
simtime_t minDelayBetweenRAs
Definition: Ipv6InterfaceData.h:168
inet::units::values::m
value< double, units::m > m
Definition: Units.h:1233
inet::Ipv6InterfaceData::RouterVariables::minRtrAdvInterval
simtime_t minRtrAdvInterval
The minimum time allowed between sending unsolicited multicast Router Advertisements from the interfa...
Definition: Ipv6InterfaceData.h:346
inet::Ipv6InterfaceData::preferredAddr
Ipv6Address preferredAddr
Definition: Ipv6InterfaceData.h:253
inet::Ipv6InterfaceData::NodeConstants::reachableTime
simtime_t reachableTime
Definition: Ipv6InterfaceData.h:194
inet::Ipv6InterfaceData::isTentativeAddress
bool isTentativeAddress(int i) const
Returns true if the ith address of the interface is tentative.
Definition: Ipv6InterfaceData.cc:296
inet::Ipv6InterfaceData::HostVariables::linkMTU
uint linkMTU
The MTU of the link.
Definition: Ipv6InterfaceData.h:289
inet::Ipv6InterfaceData::getNumAdvPrefixes
int getNumAdvPrefixes() const
Returns the number of advertised prefixes on the interface.
Definition: Ipv6InterfaceData.h:713
inet::Ipv6InterfaceData::rtrVars
RouterVariables rtrVars
Definition: Ipv6InterfaceData.h:422
inet::Ipv6InterfaceData::getRouterData
RouterMulticastData * getRouterData()
Definition: Ipv6InterfaceData.h:431
IPv6_MAX_INITIAL_RTR_ADVERT_INTERVAL
#define IPv6_MAX_INITIAL_RTR_ADVERT_INTERVAL
Definition: Ipv6InterfaceData.h:41
inet::Ipv6InterfaceData::routerConstants
RouterConstants routerConstants
Definition: Ipv6InterfaceData.h:171
inet::Ipv6InterfaceData::RouterConstants::maxInitialRtrAdvertisements
uint maxInitialRtrAdvertisements
Definition: Ipv6InterfaceData.h:166
IPv6_MAX_RA_DELAY_TIME
#define IPv6_MAX_RA_DELAY_TIME
Definition: Ipv6InterfaceData.h:45
inet::Ipv6InterfaceData::RouterVariables::advCurHopLimit
short advCurHopLimit
The default value to be placed in the Cur Hop Limit field in the Router Advertisement messages sent b...
Definition: Ipv6InterfaceData.h:405
inet::interfaceIpv6ConfigChangedSignal
simsignal_t interfaceIpv6ConfigChangedSignal
Definition: Simsignals.cc:36
inet::Ipv6InterfaceData::F_IP_ADDRESS
@ F_IP_ADDRESS
Definition: Ipv6InterfaceData.h:105