#include <IPv6InterfaceData.h>
typedef std::vector<AddressData> IPv6InterfaceData::AddressDataVector [protected] |
typedef std::vector<AdvPrefix> IPv6InterfaceData::AdvPrefixList [protected] |
IPv6InterfaceData::IPv6InterfaceData | ( | ) |
00027 { 00028 /*******************Setting host/node/router Protocol Constants************/ 00029 routerConstants.maxInitialRtrAdvertInterval = IPv6_MAX_INITIAL_RTR_ADVERT_INTERVAL; 00030 routerConstants.maxInitialRtrAdvertisements = IPv6_MAX_INITIAL_RTR_ADVERTISEMENTS; 00031 routerConstants.maxFinalRtrAdvertisements = IPv6_MAX_FINAL_RTR_ADVERTISEMENTS; 00032 routerConstants.minDelayBetweenRAs = IPv6_MIN_DELAY_BETWEEN_RAS; 00033 routerConstants.maxRADelayTime = IPv6_MAX_RA_DELAY_TIME; 00034 00035 hostConstants.maxRtrSolicitationDelay = IPv6_MAX_RTR_SOLICITATION_DELAY; 00036 hostConstants.rtrSolicitationInterval = IPv6_RTR_SOLICITATION_INTERVAL; 00037 hostConstants.maxRtrSolicitations = IPv6_MAX_RTR_SOLICITATIONS; 00038 00039 nodeConstants.maxMulticastSolicit = IPv6_MAX_MULTICAST_SOLICIT; 00040 nodeConstants.maxUnicastSolicit = IPv6_MAX_UNICAST_SOLICIT; 00041 nodeConstants.maxAnycastDelayTime = IPv6_MAX_ANYCAST_DELAY_TIME; 00042 nodeConstants.maxNeighbourAdvertisement = IPv6_MAX_NEIGHBOUR_ADVERTISEMENT; 00043 nodeConstants.reachableTime = IPv6_REACHABLE_TIME; 00044 nodeConstants.retransTimer = IPv6_RETRANS_TIMER; 00045 nodeConstants.delayFirstProbeTime = IPv6_DELAY_FIRST_PROBE_TIME; 00046 nodeConstants.minRandomFactor = IPv6_MIN_RANDOM_FACTOR; 00047 nodeConstants.maxRandomFactor = IPv6_MAX_RANDOM_FACTOR; 00048 00049 /*******************Setting host/node/router variables*********************/ 00050 nodeVars.dupAddrDetectTransmits = IPv6_DEFAULT_DUPADDRDETECTTRANSMITS; 00051 00052 hostVars.linkMTU = IPv6_MIN_MTU; 00053 hostVars.curHopLimit = IPv6_DEFAULT_ADVCURHOPLIMIT;//value specified in RFC 1700-can't find it 00054 hostVars.baseReachableTime = IPv6_REACHABLE_TIME; 00055 hostVars.reachableTime = generateReachableTime(_getMinRandomFactor(), 00056 _getMaxRandomFactor(), getBaseReachableTime()); 00057 hostVars.retransTimer = IPv6_RETRANS_TIMER; 00058 00059 //rtrVars.advSendAdvertisements is set in RoutingTable6.cc:line 143 00060 rtrVars.maxRtrAdvInterval = IPv6_DEFAULT_MAX_RTR_ADV_INT; 00061 rtrVars.minRtrAdvInterval = 0.33*rtrVars.maxRtrAdvInterval; 00062 rtrVars.advManagedFlag = false; 00063 rtrVars.advOtherConfigFlag = false; 00064 rtrVars.advLinkMTU = IPv6_MIN_MTU; 00065 rtrVars.advReachableTime = IPv6_DEFAULT_ADV_REACHABLE_TIME; 00066 rtrVars.advRetransTimer = IPv6_DEFAULT_ADV_RETRANS_TIMER; 00067 rtrVars.advCurHopLimit = IPv6_DEFAULT_ADVCURHOPLIMIT; 00068 rtrVars.advDefaultLifetime = 3*rtrVars.maxRtrAdvInterval; 00069 #if USE_MOBILITY 00070 if (rtrVars.advDefaultLifetime<1) 00071 rtrVars.advDefaultLifetime = 1; 00072 #endif 00073 }
int IPv6InterfaceData::findAddress | ( | const IPv6Address & | addr | ) | const [protected] |
Referenced by hasAddress(), isTentativeAddress(), permanentlyAssign(), and removeAddress().
00164 { 00165 for (AddressDataVector::const_iterator it=addresses.begin(); it!=addresses.end(); it++) 00166 if (it->address==addr) 00167 return it-addresses.begin(); 00168 return -1; 00169 }
void IPv6InterfaceData::choosePreferredAddress | ( | ) | [protected] |
Referenced by assignAddress(), permanentlyAssign(), removeAddress(), and updateMatchingAddressExpiryTimes().
00239 { 00240 // do we have addresses? 00241 if (addresses.size()==0) 00242 { 00243 preferredAddr = IPv6Address(); 00244 return; 00245 } 00246 00247 // FIXME shouldn't we stick to the current preferredAddress if its prefLifetime 00248 // hasn't expired yet? 00249 00250 // FIXME TBD throw out expired addresses! 0 should be treated as infinity 00251 00252 // sort addresses by scope and expiry time, then pick the first one 00253 std::sort(addresses.begin(), addresses.end(), addrLess); 00254 preferredAddr = addresses[0].address; 00255 preferredAddrExpiryTime = addresses[0].expiryTime; 00256 }
void IPv6InterfaceData::changed1 | ( | ) | [inline, protected] |
bool IPv6InterfaceData::addrLess | ( | const AddressData & | a, | |
const AddressData & | b | |||
) | [static, protected] |
Referenced by choosePreferredAddress().
00227 { 00228 // This method is used in choosePreferredAddress(). 00229 // sort() produces increasing order, so "better" addresses should 00230 // compare as "less", to make them appear first in the array 00231 if (a.tentative!=b.tentative) 00232 return !a.tentative; // tentative=false is better 00233 if (a.address.getScope()!=b.address.getScope()) 00234 return a.address.getScope()>b.address.getScope(); // bigger scope is better 00235 return (a.expiryTime==0 && b.expiryTime!=0) || a.expiryTime>b.expiryTime; // longer expiry time is better 00236 }
std::string IPv6InterfaceData::info | ( | ) | const |
Referenced by detailedInfo().
00076 { 00077 // FIXME FIXME FIXME FIXME info() should never print a newline 00078 std::ostringstream os; 00079 os << "IPv6:{" << endl; 00080 for (int i=0; i<getNumAddresses(); i++) 00081 { 00082 os << (i?"\t , ":"\tAddrs:") << getAddress(i) 00083 << "(" << IPv6Address::scopeName(getAddress(i).getScope()) 00084 << (isTentativeAddress(i)?" tent":"") << ") " 00085 << " expiryTime: " << (addresses[i].expiryTime==0 ? "inf" : SIMTIME_STR(addresses[i].expiryTime)) 00086 << " prefExpiryTime: " << (addresses[i].prefExpiryTime==0 ? "inf" : SIMTIME_STR(addresses[i].prefExpiryTime)) 00087 << endl; 00088 } 00089 00090 for (int i=0; i<getNumAdvPrefixes(); i++) 00091 { 00092 const AdvPrefix& a = getAdvPrefix(i); 00093 os << (i?", ":"\tAdvPrefixes: ") << a.prefix << "/" << a.prefixLength << "(" 00094 << (a.advOnLinkFlag?"":"off-link ") 00095 << (a.advAutonomousFlag?"":"non-auto "); 00096 if (a.advValidLifetime==0) 00097 os << "lifetime:inf"; 00098 else if (a.advValidLifetime>0) 00099 os << "expires:" << a.advValidLifetime; 00100 else 00101 os << "lifetime:+" << (-1 * a.advValidLifetime); 00102 os << ")" << endl; 00103 } 00104 os << " "; 00105 00106 // uncomment the following as needed! 00107 os << "\tNode:"; 00108 os << " dupAddrDetectTrans=" << nodeVars.dupAddrDetectTransmits; 00109 //os << " curHopLimit=" << hostVars.curHopLimit; 00110 //os << " retransTimer=" << hostVars.retransTimer; 00111 //os << " baseReachableTime=" << hostVars.baseReachableTime; 00112 os << " reachableTime=" << hostVars.reachableTime << endl; 00113 00114 if (rtrVars.advSendAdvertisements) 00115 { 00116 os << "\tRouter:"; 00117 os << " maxRtrAdvInt=" << rtrVars.maxRtrAdvInterval; 00118 os << " minRtrAdvInt=" << rtrVars.minRtrAdvInterval << endl; 00119 //os << " advManagedFlag=" << rtrVars.advManagedFlag; 00120 //os << " advOtherFlag=" << rtrVars.advOtherFlag; 00121 //os << " advLinkMTU=" << rtrVars.advLinkMTU; 00122 //os << " advReachableTime=" << rtrVars.advReachableTime; 00123 //os << " advRetransTimer=" << rtrVars.advRetransTimer; 00124 //os << " advCurHopLimit=" << rtrVars.advCurHopLimit; 00125 //os << " advDefaultLifetime=" << rtrVars.advDefaultLifetime; 00126 } 00127 00128 os << " }" << endl; 00129 return os.str(); 00130 }
std::string IPv6InterfaceData::detailedInfo | ( | ) | const |
void IPv6InterfaceData::assignAddress | ( | const IPv6Address & | addr, | |
bool | tentative, | |||
simtime_t | expiryTime, | |||
simtime_t | prefExpiryTime | |||
) | [virtual] |
Assigns the given address to the interface.
Referenced by IPv6NeighbourDiscovery::assignLinkLocalAddress(), RoutingTable6::assignRequiredNodeAddresses(), FlatNetworkConfigurator6::configureAdvPrefixes(), RoutingTable6::configureInterfaceFromXML(), and IPv6NeighbourDiscovery::processRAPrefixInfoForAddrAutoConf().
00139 { 00140 addresses.push_back(AddressData()); 00141 AddressData& a = addresses.back(); 00142 a.address = addr; 00143 a.tentative = tentative; 00144 a.expiryTime = expiryTime; 00145 a.prefExpiryTime = prefExpiryTime; 00146 choosePreferredAddress(); 00147 }
void IPv6InterfaceData::updateMatchingAddressExpiryTimes | ( | const IPv6Address & | prefix, | |
int | length, | |||
simtime_t | expiryTime = 0 , |
|||
simtime_t | prefExpiryTime = 0 | |||
) | [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.
00151 { 00152 for (AddressDataVector::iterator it=addresses.begin(); it!=addresses.end(); it++) 00153 { 00154 if (it->address.matches(prefix,length)) 00155 { 00156 it->expiryTime = expiryTime; 00157 it->prefExpiryTime = prefExpiryTime; 00158 } 00159 } 00160 choosePreferredAddress(); 00161 }
int IPv6InterfaceData::getNumAddresses | ( | ) | const [inline] |
Returns the number of addresses the interface has.
Referenced by info(), IPv6NeighbourDiscovery::processRAPrefixInfoForAddrAutoConf(), and SCTPAssociation::sendInit().
00335 {return addresses.size();}
const IPv6Address & IPv6InterfaceData::getAddress | ( | int | i | ) | const |
Returns ith address of the interface.
Referenced by info(), SCTPAssociation::processInitArrived(), IPv6NeighbourDiscovery::processRAPrefixInfoForAddrAutoConf(), and SCTPAssociation::sendInit().
bool IPv6InterfaceData::isTentativeAddress | ( | int | i | ) | const |
Returns true if the ith address of the interface is tentative.
Referenced by IPv6NeighbourDiscovery::createAndSendRSPacket(), info(), IPv6NeighbourDiscovery::processNAPacket(), and IPv6NeighbourDiscovery::processNSPacket().
bool 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.
Referenced by RoutingTable6::getInterfaceByAddress(), IPv6NeighbourDiscovery::initiateAddressResolution(), RoutingTable6::isLocalAddress(), and IPv6NeighbourDiscovery::processNSPacket().
00184 { 00185 return findAddress(addr)!=-1; 00186 }
bool IPv6InterfaceData::matchesSolicitedNodeMulticastAddress | ( | const IPv6Address & | solNodeAddr | ) | const |
Returns true if the interface has an address matching the given solicited-node multicast addresses.
Referenced by RoutingTable6::isLocalAddress().
00189 { 00190 for (AddressDataVector::const_iterator it=addresses.begin(); it!=addresses.end(); it++) 00191 if (it->address.formSolicitedNodeMulticastAddress()==solNodeAddr) 00192 return true; 00193 return false; 00194 }
bool IPv6InterfaceData::isTentativeAddress | ( | const IPv6Address & | addr | ) | const |
Returns true if the interface has the given address and it is tentative.
00197 { 00198 int k = findAddress(addr); 00199 return k!=-1 && addresses[k].tentative; 00200 }
void IPv6InterfaceData::permanentlyAssign | ( | const IPv6Address & | addr | ) | [virtual] |
Clears the "tentative" flag of an existing interface address.
Referenced by IPv6NeighbourDiscovery::processDADTimeout().
00203 { 00204 int k = findAddress(addr); 00205 ASSERT(k!=-1); 00206 addresses[k].tentative = false; 00207 choosePreferredAddress(); 00208 }
const IPv6Address& 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()!
Referenced by IPv6NeighbourDiscovery::createAndSendRSPacket(), IPAddressResolver::getInterfaceIPv6Address(), IPAddressResolver::getIPv6AddressFrom(), IPv6NeighbourDiscovery::initiateAddressResolution(), IPv6NeighbourDiscovery::processNUDTimeout(), IPv6::routePacket(), and IPv6NeighbourDiscovery::sendSolicitedNA().
00382 {return preferredAddr;} // FIXME TBD check expiry time!
const IPv6Address & IPv6InterfaceData::getLinkLocalAddress | ( | ) | const |
Returns the first valid link-local address of the interface, or UNSPECIFIED_ADDRESS if there's none.
Referenced by FlatNetworkConfigurator6::addStaticRoutes(), IPv6NeighbourDiscovery::assignLinkLocalAddress(), FlatNetworkConfigurator6::configureAdvPrefixes(), IPv6NeighbourDiscovery::createAndSendRAPacket(), IPv6NeighbourDiscovery::createAndSendRSPacket(), and IPv6NeighbourDiscovery::processRAPrefixInfoForAddrAutoConf().
00211 { 00212 for (AddressDataVector::const_iterator it=addresses.begin(); it!=addresses.end(); it++) 00213 if (it->address.isLinkLocal()) // FIXME and valid 00214 return it->address; 00215 return IPv6Address::UNSPECIFIED_ADDRESS; 00216 }
void IPv6InterfaceData::removeAddress | ( | const IPv6Address & | address | ) | [virtual] |
Removes the address. Called when the valid lifetime expires.
00219 { 00220 int k = findAddress(address); 00221 ASSERT(k!=-1); 00222 addresses.erase(addresses.begin()+k); 00223 choosePreferredAddress(); 00224 }
simtime_t IPv6InterfaceData::_getMaxInitialRtrAdvertInterval | ( | ) | [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 FlatNetworkConfigurator) Such a design allows both wired and wireless networks to co-exist within a simulation run.
Referenced by IPv6NeighbourDiscovery::sendPeriodicRA().
00408 {return routerConstants.maxInitialRtrAdvertInterval;}
uint IPv6InterfaceData::_getMaxInitialRtrAdvertisements | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::sendPeriodicRA().
00409 {return routerConstants.maxInitialRtrAdvertisements;}
uint IPv6InterfaceData::_getMaxFinalRtrAdvertisements | ( | ) | [inline] |
simtime_t IPv6InterfaceData::_getMinDelayBetweenRAs | ( | ) | [inline] |
simtime_t IPv6InterfaceData::_getMaxRADelayTime | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processRSPacket().
00412 {return routerConstants.maxRADelayTime;}
virtual void IPv6InterfaceData::_setMaxInitialRtrAdvertInterval | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxInitialRtrAdvertisements | ( | uint | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxFinalRtrAdvertisements | ( | uint | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMinDelayBetweenRAs | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxRADelayTime | ( | simtime_t | d | ) | [inline, virtual] |
simtime_t IPv6InterfaceData::_getMaxRtrSolicitationDelay | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processDADTimeout(), and IPv6NeighbourDiscovery::processRDTimeout().
00422 {return hostConstants.maxRtrSolicitationDelay;}
simtime_t IPv6InterfaceData::_getRtrSolicitationInterval | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::initiateRouterDiscovery(), and IPv6NeighbourDiscovery::processRDTimeout().
00423 {return hostConstants.rtrSolicitationInterval;}
uint IPv6InterfaceData::_getMaxRtrSolicitations | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processRDTimeout().
00424 {return hostConstants.maxRtrSolicitations;}
virtual void IPv6InterfaceData::_setMaxRtrSolicitationDelay | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setRtrSolicitationInterval | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxRtrSolicitations | ( | uint | d | ) | [inline, virtual] |
uint IPv6InterfaceData::_getMaxMulticastSolicit | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processARTimeout().
00432 {return nodeConstants.maxMulticastSolicit;}
uint IPv6InterfaceData::_getMaxUnicastSolicit | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processNUDTimeout().
00433 {return nodeConstants.maxUnicastSolicit;}
simtime_t IPv6InterfaceData::_getMaxAnycastDelayTime | ( | ) | [inline] |
uint IPv6InterfaceData::_getMaxNeighbourAdvertisement | ( | ) | [inline] |
simtime_t IPv6InterfaceData::_getReachableTime | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processNAForIncompleteNCEState(), and IPv6NeighbourDiscovery::processNAForOtherNCEStates().
00436 {return nodeConstants.reachableTime;}
simtime_t IPv6InterfaceData::_getRetransTimer | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::initiateAddressResolution(), IPv6NeighbourDiscovery::processARTimeout(), and IPv6NeighbourDiscovery::processNUDTimeout().
00437 {return nodeConstants.retransTimer;}
simtime_t IPv6InterfaceData::_getDelayFirstProbeTime | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::initiateNeighbourUnreachabilityDetection().
00438 {return nodeConstants.delayFirstProbeTime;}
double IPv6InterfaceData::_getMinRandomFactor | ( | ) | [inline] |
Referenced by generateReachableTime(), and IPv6InterfaceData().
00439 {return nodeConstants.minRandomFactor;}
double IPv6InterfaceData::_getMaxRandomFactor | ( | ) | [inline] |
Referenced by generateReachableTime(), and IPv6InterfaceData().
00440 {return nodeConstants.maxRandomFactor;}
virtual void IPv6InterfaceData::_setMaxMulticastSolicit | ( | uint | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxUnicastSolicit | ( | uint | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxAnycastDelayTime | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxNeighbourAdvertisement | ( | uint | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setReachableTime | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setRetransTimer | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setDelayFirstProbeTime | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMinRandomFactor | ( | double | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::_setMaxRandomFactor | ( | double | d | ) | [inline, virtual] |
int IPv6InterfaceData::dupAddrDetectTransmits | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processDADTimeout().
00454 {return nodeVars.dupAddrDetectTransmits;}
virtual void IPv6InterfaceData::setDupAddrDetectTransmits | ( | int | d | ) | [inline, virtual] |
short IPv6InterfaceData::getCurHopLimit | ( | ) | [inline] |
uint IPv6InterfaceData::getBaseReachableTime | ( | ) | [inline] |
Referenced by generateReachableTime(), and IPv6InterfaceData().
00462 {return hostVars.baseReachableTime;}
simtime_t IPv6InterfaceData::getReachableTime | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::processRAForRouterUpdates().
00463 {return hostVars.reachableTime;}
uint IPv6InterfaceData::getRetransTimer | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::initiateDAD(), and IPv6NeighbourDiscovery::processDADTimeout().
00464 {return hostVars.retransTimer;}
virtual void IPv6InterfaceData::setLinkMTU | ( | uint | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setCurHopLimit | ( | short | d | ) | [inline, virtual] |
Referenced by IPv6NeighbourDiscovery::processRAForRouterUpdates().
00467 {hostVars.curHopLimit = d;}
virtual void IPv6InterfaceData::setBaseReachableTime | ( | uint | d | ) | [inline, virtual] |
Referenced by IPv6NeighbourDiscovery::processRAForRouterUpdates().
00468 {hostVars.baseReachableTime = d;}
virtual void IPv6InterfaceData::setReachableTime | ( | simtime_t | d | ) | [inline, virtual] |
Referenced by IPv6NeighbourDiscovery::processRAForRouterUpdates().
00469 {hostVars.reachableTime = d;}
virtual void IPv6InterfaceData::setRetransTimer | ( | uint | d | ) | [inline, virtual] |
Referenced by IPv6NeighbourDiscovery::processRAForRouterUpdates().
00470 {hostVars.retransTimer = d;}
bool IPv6InterfaceData::getAdvSendAdvertisements | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket(), IPv6NeighbourDiscovery::createAndSendRSPacket(), IPv6NeighbourDiscovery::initialize(), IPv6NeighbourDiscovery::processDADTimeout(), IPv6NeighbourDiscovery::processRAPacket(), and IPv6NeighbourDiscovery::processRSPacket().
00474 {return rtrVars.advSendAdvertisements;}
simtime_t IPv6InterfaceData::getMaxRtrAdvInterval | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createRATimer(), and IPv6NeighbourDiscovery::sendPeriodicRA().
00475 {return rtrVars.maxRtrAdvInterval;}
simtime_t IPv6InterfaceData::getMinRtrAdvInterval | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createRATimer(), and IPv6NeighbourDiscovery::sendPeriodicRA().
00476 {return rtrVars.minRtrAdvInterval;}
bool IPv6InterfaceData::getAdvManagedFlag | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket().
00477 {return rtrVars.advManagedFlag;}
bool IPv6InterfaceData::getAdvOtherConfigFlag | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket().
00478 {return rtrVars.advOtherConfigFlag;}
int IPv6InterfaceData::getAdvLinkMTU | ( | ) | [inline] |
int IPv6InterfaceData::getAdvReachableTime | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket().
00480 {return rtrVars.advReachableTime;}
int IPv6InterfaceData::getAdvRetransTimer | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket().
00481 {return rtrVars.advRetransTimer;}
short IPv6InterfaceData::getAdvCurHopLimit | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket().
00482 {return rtrVars.advCurHopLimit;}
simtime_t IPv6InterfaceData::getAdvDefaultLifetime | ( | ) | [inline] |
Referenced by IPv6NeighbourDiscovery::createAndSendRAPacket().
00483 {return rtrVars.advDefaultLifetime;}
virtual void IPv6InterfaceData::setAdvSendAdvertisements | ( | bool | d | ) | [inline, virtual] |
Referenced by RoutingTable6::configureInterfaceForIPv6(), and RoutingTable6::configureInterfaceFromXML().
00485 {rtrVars.advSendAdvertisements = d;}
virtual void IPv6InterfaceData::setMaxRtrAdvInterval | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setMinRtrAdvInterval | ( | simtime_t | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvManagedFlag | ( | bool | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvOtherConfigFlag | ( | bool | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvLinkMTU | ( | int | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvReachableTime | ( | int | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvRetransTimer | ( | int | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvCurHopLimit | ( | short | d | ) | [inline, virtual] |
virtual void IPv6InterfaceData::setAdvDefaultLifetime | ( | simtime_t | d | ) | [inline, virtual] |
void IPv6InterfaceData::addAdvPrefix | ( | const AdvPrefix & | advPrefix | ) | [virtual] |
Adds the given advertised prefix to the interface.
Referenced by FlatNetworkConfigurator6::configureAdvPrefixes(), and RoutingTable6::configureInterfaceFromXML().
00259 { 00260 rtrVars.advPrefixList.push_back(advPrefix); 00261 }
int IPv6InterfaceData::getNumAdvPrefixes | ( | ) | const [inline] |
Returns the number of advertised prefixes on the interface.
Referenced by FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), FlatNetworkConfigurator6::addStaticRoutes(), FlatNetworkConfigurator6::configureAdvPrefixes(), IPv6NeighbourDiscovery::createAndSendRAPacket(), info(), and RoutingTable6::initialize().
00507 {return rtrVars.advPrefixList.size();}
const IPv6InterfaceData::AdvPrefix & IPv6InterfaceData::getAdvPrefix | ( | int | i | ) | const |
Returns the ith advertised prefix on the interface.
Referenced by FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), FlatNetworkConfigurator6::addStaticRoutes(), IPv6NeighbourDiscovery::createAndSendRAPacket(), info(), and RoutingTable6::initialize().
00264 { 00265 ASSERT(i>=0 && i<(int)rtrVars.advPrefixList.size()); 00266 return rtrVars.advPrefixList[i]; 00267 }
void 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.
00270 { 00271 ASSERT(i>=0 && i<(int)rtrVars.advPrefixList.size()); 00272 ASSERT(rtrVars.advPrefixList[i].prefix == advPrefix.prefix); 00273 ASSERT(rtrVars.advPrefixList[i].prefixLength == advPrefix.prefixLength); 00274 rtrVars.advPrefixList[i] = advPrefix; 00275 }
void IPv6InterfaceData::removeAdvPrefix | ( | int | i | ) | [virtual] |
Remove the ith advertised prefix on the interface. Prefixes at larger indices will shift down.
00278 { 00279 ASSERT(i>=0 && i<(int)rtrVars.advPrefixList.size()); 00280 rtrVars.advPrefixList.erase(rtrVars.advPrefixList.begin()+i); 00281 }
simtime_t 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
Referenced by IPv6NeighbourDiscovery::processRAForRouterUpdates().
simtime_t IPv6InterfaceData::generateReachableTime | ( | ) | [virtual] |
Arg-less version.
Referenced by IPv6InterfaceData().
00290 { 00291 return uniform(_getMinRandomFactor(), _getMaxRandomFactor()) * getBaseReachableTime(); 00292 }
Referenced by IPv6InterfaceData().
Referenced by IPv6InterfaceData().
Referenced by IPv6InterfaceData().
AddressDataVector IPv6InterfaceData::addresses [protected] |
IPv6Address IPv6InterfaceData::preferredAddr [protected] |
Referenced by choosePreferredAddress().
simtime_t IPv6InterfaceData::preferredAddrExpiryTime [protected] |
Referenced by choosePreferredAddress().
NodeVariables IPv6InterfaceData::nodeVars [protected] |
Referenced by info(), and IPv6InterfaceData().
HostVariables IPv6InterfaceData::hostVars [protected] |
Referenced by info(), and IPv6InterfaceData().
RouterVariables IPv6InterfaceData::rtrVars [protected] |
Referenced by addAdvPrefix(), getAdvPrefix(), info(), IPv6InterfaceData(), removeAdvPrefix(), and setAdvPrefix().