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

Implements RFC 3775 Mobility Support in IPv6. More...

#include <xMIPv6.h>

Inheritance diagram for inet::xMIPv6:

Classes

class  BCExpiryIfEntry
 
class  BRTransmitIfEntry
 
class  BULExpiryIfEntry
 
class  BUTransmitIfEntry
 Subclasses for the different timers. More...
 
struct  Key
 
class  TestInitTransmitIfEntry
 
class  TimerIfEntry
 The base class for all other timers that are used for retransmissions. More...
 
class  TokenExpiryIfEntry
 

Public Member Functions

virtual ~xMIPv6 ()
 Destructur. More...
 
void initiateMIPv6Protocol (InterfaceEntry *ie, const IPv6Address &CoA)
 Initiates the Mobile IP protocol. More...
 
void returningHome (const IPv6Address &CoA, InterfaceEntry *ie)
 This method destroys all tunnels associated to the previous CoA and sends appropriate BU(s) to HA and CN(s). More...
 
virtual void triggerRouteOptimization (const IPv6Address &destAddress, const IPv6Address &HoA, InterfaceEntry *ie)
 Alain Tigyo, 21.03.2008 The following method is used for triggering RO to a CN. More...
 

Protected Types

typedef std::map< Key, TimerIfEntry * > TransmitIfList
 
typedef std::map< int, IPv6AddressInterfaceCoAList
 holds the tuples of currently available {InterfaceID, CoA} pairs More...
 
typedef std::vector< IPv6AddressCNList
 

Protected Member Functions

virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessage (cMessage *msg) override
 
void processMobilityMessage (MobilityHeader *mipv6Msg, IPv6ControlInfo *ctrlInfo)
 This is where all the mobility messages are sifted through and sent to appropriate functions for processing. More...
 
void createBUTimer (const IPv6Address &buDest, InterfaceEntry *ie, const uint lifeTime, bool homeRegistration)
 This method finally creates the timer structure and schedules the message for sending. More...
 
void createDeregisterBUTimer (const IPv6Address &buDest, InterfaceEntry *ie)
 Similiar to the previous one, this method creates an BU timer with registration lifetime equal to 0. More...
 
void createBUTimer (const IPv6Address &buDest, InterfaceEntry *ie)
 
void sendPeriodicBU (cMessage *msg)
 This method is called when the timer created in createBUTimer() has fired. More...
 
void createAndSendBUMessage (const IPv6Address &dest, InterfaceEntry *ie, const uint buSeq, const uint lifeTime, const int bindAuthData=0)
 Method for creating and sending a BU by a MN. More...
 
void updateBUL (BindingUpdate *bu, const IPv6Address &dest, const IPv6Address &CoA, InterfaceEntry *ie, const simtime_t sendTime)
 Update the an entry of the BUL with the provided parameters. More...
 
xMIPv6::BUTransmitIfEntryfetchBUTransmitIfEntry (InterfaceEntry *ie, const IPv6Address &dest)
 This method takes an interface and a destination address and returns the appropriate IfEntry for an BU. More...
 
void sendMobilityMessageToIPv6Module (cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
 Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Module. More...
 
void processBUMessage (BindingUpdate *bu, IPv6ControlInfo *ctrlInfo)
 Process a BU - only applicable to HAs and CNs. More...
 
bool validateBUMessage (BindingUpdate *bu, IPv6ControlInfo *ctrlInfo)
 Validate a BU - only applicable to HAs and CNs. More...
 
bool validateBUderegisterMessage (BindingUpdate *bu, IPv6ControlInfo *ctrlInfo)
 Similiar to validateBUMessage(). More...
 
void createAndSendBAMessage (const IPv6Address &src, const IPv6Address &dest, IPv6ControlInfo *ctrlInfo, const BAStatus &baStatus, const uint baSeq, const int bindingAuthorizationData, const uint lifeTime, simtime_t sendTime=0)
 Constructs and send a BA to the IPv6 module. More...
 
void processBAMessage (BindingAcknowledgement *ba, IPv6ControlInfo *ctrlInfo)
 Processes the received BA and creates tunnels or mobility header paths if appropriate. More...
 
bool validateBAck (const BindingAcknowledgement &ba, const IPv6ControlInfo *ctrlInfo)
 Validates a Binding Acknowledgement for a mobile node. More...
 
void createAndSendBEMessage (const IPv6Address &dest, const BEStatus &beStatus)
 Creates and sends Binding Error message. More...
 
virtual void initReturnRoutability (const IPv6Address &cnDest, InterfaceEntry *ie)
 Creates HoTI and CoTI messages and sends them to the CN if timers are not already existing. More...
 
void createTestInitTimer (MobilityHeader *testInit, const IPv6Address &dest, InterfaceEntry *ie, simtime_t sendTime=0)
 Creates and schedules a timer for either a HoTI or a CoTI transmission. More...
 
void sendTestInit (cMessage *msg)
 If a TestInit timer was fired, this method gets called. More...
 
void resetBUIfEntry (const IPv6Address &dest, int interfaceID, simtime_t retransmissionTime)
 Cancels the current existing timer and reschedules it with initial values. More...
 
void createAndSendHoTIMessage (const IPv6Address &cnDest, InterfaceEntry *ie)
 Creates and sends a HoTI message to the specified destination. More...
 
void createAndSendCoTIMessage (const IPv6Address &cnDest, InterfaceEntry *ie)
 Creates and sends a CoTI message to the specified destination. More...
 
void processHoTIMessage (HomeTestInit *HoTI, IPv6ControlInfo *ctrlInfo)
 Create and send a HoT message. More...
 
void processCoTIMessage (CareOfTestInit *CoTI, IPv6ControlInfo *ctrlInfo)
 Create and send a CoT message. More...
 
void processHoTMessage (HomeTest *HoT, IPv6ControlInfo *ctrlInfo)
 First verifies a received HoT message and sends a BU to the CN if the care-of keygen token is available as well. More...
 
bool validateHoTMessage (const HomeTest &HoT, const IPv6ControlInfo *ctrlInfo)
 Verifies a HoT according to the RFC, Section 11.6.2. More...
 
void processCoTMessage (CareOfTest *CoT, IPv6ControlInfo *ctrlInfo)
 Like processHoTMessage(), but related to CoT. More...
 
bool validateCoTMessage (const CareOfTest &CoT, const IPv6ControlInfo *ctrlInfo)
 Like validateHoTMessage(), but related to CoT. More...
 
bool checkForBUtoCN (BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
 Send a BU depending on current status of: More...
 
void sendBUtoCN (BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
 Creates a timer for sending a BU. More...
 
void processType2RH (IPv6Datagram *datagram, IPv6RoutingHeader *rh)
 Process the Type 2 Routing Header which belongs to the provided datagram. More...
 
bool validateType2RH (const IPv6Datagram &datagram, const IPv6RoutingHeader &rh)
 Perform validity checks according to RFC 3775 - Section 6.4. More...
 
void processHoAOpt (IPv6Datagram *datagram, HomeAddressOption *hoaOpt)
 Process the Home Address Option which belongs to the provided datagram. More...
 
void createBRRTimer (const IPv6Address &brDest, InterfaceEntry *ie, const uint scheduledTime)
 Creates a timer for a Binding Refresh Request message that is going to be fired in scheduledTime seconds. More...
 
void sendPeriodicBRR (cMessage *msg)
 Handles a fired BRR message transmission structure. More...
 
void createAndSendBRRMessage (const IPv6Address &dest, InterfaceEntry *ie)
 Creates a Binding Refresh Request and sends it to the IPv6 module. More...
 
void processBRRMessage (BindingRefreshRequest *brr, IPv6ControlInfo *ctrlInfo)
 Processes the Binding Refresh Message. More...
 
bool cancelTimerIfEntry (const IPv6Address &dest, int interfaceID, int msgType)
 Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission timer. More...
 
bool pendingTimerIfEntry (IPv6Address &dest, int interfaceID, int msgType)
 Checks whether there exists an TransmitIfEntry for the specified values. More...
 
TimerIfEntrygetTimerIfEntry (Key &key, int timerType)
 Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the possible polymorphic types. More...
 
TimerIfEntrysearchTimerIfEntry (IPv6Address &dest, int timerType)
 Searches for a transmitEntry with the given destination address which is of type timerType. More...
 
void removeTimerEntries (const IPv6Address &dest, int interfaceId)
 Removes timers of all types for the specified destination address and interfaceId. More...
 
void cancelEntries (int interfaceId, IPv6Address &CoA)
 Cancel all timers (TransmitIf entities for HA and CNs) related to the provided interfaceId and CoA. More...
 
void removeCoAEntries ()
 Remove all entries from the interfaceCoAList. More...
 
void createBULEntryExpiryTimer (BindingUpdateList::BindingUpdateListEntry *entry, InterfaceEntry *ie, simtime_t scheduledTime)
 Creates or overwrites a timer for BUL expiry that fires at provided scheduledTime. More...
 
void handleBULExpiry (cMessage *msg)
 Handles the situation of a BUL expiry. More...
 
void createBCEntryExpiryTimer (IPv6Address &HoA, InterfaceEntry *ie, simtime_t scheduledTime)
 Creates or overwrites a timer for BC expiry that fires at provided scheduledTime. More...
 
void handleBCExpiry (cMessage *msg)
 Handles the expiry of a BC entry. More...
 
void createHomeTokenEntryExpiryTimer (IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime)
 Creates or overwrites a timer for home keygen token expiry that fires at provided scheduledTime. More...
 
void createCareOfTokenEntryExpiryTimer (IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime)
 Creates or overwrites a timer for care-of keygen token expiry that fires at provided scheduledTime. More...
 

Protected Attributes

IInterfaceTableift
 
IPv6RoutingTablert6
 
BindingUpdateListbul
 
BindingCachebc
 
IPv6Tunnelingtunneling
 
IPv6NeighbourDiscoveryipv6nd
 
cOutVector statVectorBUtoHA
 
cOutVector statVectorBUtoCN
 
cOutVector statVectorBUtoMN
 
cOutVector statVectorBAtoMN
 
cOutVector statVectorBAfromHA
 
cOutVector statVectorBAfromCN
 
cOutVector statVectorHoTItoCN
 
cOutVector statVectorCoTItoCN
 
cOutVector statVectorHoTtoMN
 
cOutVector statVectorCoTtoMN
 
cOutVector statVectorHoTfromCN
 
cOutVector statVectorCoTfromCN
 
TransmitIfList transmitIfList
 
InterfaceCoAList interfaceCoAList
 
CNList cnList
 
CNList::iterator itCNList
 

Private Member Functions

void createTokenEntryExpiryTimer (IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime, int tokenType)
 Creates or overwrites a timer for {home, care-of} keygen token expiry that fires at provided scheduledTime. More...
 
void handleTokenExpiry (cMessage *msg)
 Handles the event that indicates that a {care-of,home} keygen token has expired. More...
 

Detailed Description

Implements RFC 3775 Mobility Support in IPv6.

Member Typedef Documentation

typedef std::vector<IPv6Address> inet::xMIPv6::CNList
protected
typedef std::map<int, IPv6Address> inet::xMIPv6::InterfaceCoAList
protected

holds the tuples of currently available {InterfaceID, CoA} pairs

typedef std::map<Key, TimerIfEntry *> inet::xMIPv6::TransmitIfList
protected

Constructor & Destructor Documentation

inet::xMIPv6::~xMIPv6 ( )
virtual

Destructur.

Ensures that the memory from the list with all TimerIfEntry's gets properly released.

76 {
77  auto it = transmitIfList.begin();
78 
79  while (it != transmitIfList.end()) {
80  Key key = it->first;
81 
82  // advance pointer to make sure it does not become invalid
83  // after the cancel() call
84  ++it;
85 
86  cancelTimerIfEntry(key.dest, key.interfaceID, key.type);
87  }
88 }
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
void * Key
Definition: Macho.h:325

Member Function Documentation

void inet::xMIPv6::cancelEntries ( int  interfaceId,
IPv6Address CoA 
)
protected

Cancel all timers (TransmitIf entities for HA and CNs) related to the provided interfaceId and CoA.

In addition the tunnels to the Home Agent and the CNs are destroyed as well. 0

Referenced by removeCoAEntries().

2357 {
2358  InterfaceEntry *ie = ift->getInterfaceById(interfaceId);
2359 
2360  // we have to cancel all existing timers
2361 
2362  // ...first for the HA
2363  IPv6Address HA = ie->ipv6Data()->getHomeAgentAddress();
2364  //IPv6Address HoA = ie->ipv6()->getMNHomeAddress();
2365 
2366  cancelTimerIfEntry(HA, interfaceId, KEY_BU);
2367  tunneling->destroyTunnel(CoA, HA);
2368 
2369  // ...and then for the CNs
2370  for (auto it = transmitIfList.begin(); it != transmitIfList.end(); ) {
2371  if ((*it).first.interfaceID == interfaceId) {
2372  auto oldIt = it++;
2373 
2374  // destroy tunnel (if we have a BU entry here)
2375  if ((*oldIt).first.type == KEY_BU)
2376  tunneling->destroyTunnelForEntryAndTrigger(CoA, (*oldIt).first.dest);
2377 
2378  // then cancel the pending event
2379  cancelTimerIfEntry((*oldIt).first.dest, (*oldIt).first.interfaceID, (*oldIt).first.type);
2380  }
2381  else
2382  ++it;
2383  }
2384 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
#define KEY_BU
Definition: xMIPv6.h:50
IInterfaceTable * ift
Definition: xMIPv6.h:77
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
const IPv6Address & getHomeAgentAddress() const
Definition: IPv6InterfaceData.h:774
IPv6InterfaceData * ipv6Data() const
Definition: InterfaceEntry.h:223
bool destroyTunnel(const IPv6Address &src, const IPv6Address &dest, const IPv6Address &destTrigger)
Creates a pseudo-tunnel for use with either Type 2 Routing Header or Home Address Option with given e...
Definition: IPv6Tunneling.cc:203
void destroyTunnelForEntryAndTrigger(const IPv6Address &entry, const IPv6Address &trigger)
Remove the tunnel with the provided entry point and trigger.
Definition: IPv6Tunneling.cc:264
bool inet::xMIPv6::cancelTimerIfEntry ( const IPv6Address dest,
int  interfaceID,
int  msgType 
)
protected

Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission timer.

Referenced by cancelEntries(), createBUTimer(), handleBCExpiry(), handleBULExpiry(), handleTokenExpiry(), processBAMessage(), processBUMessage(), processCoTMessage(), processHoTMessage(), removeTimerEntries(), sendPeriodicBRR(), and ~xMIPv6().

2200 {
2201  Key key(dest, interfaceID, msgType);
2202  auto pos = transmitIfList.find(key);
2203 
2204  if (pos == transmitIfList.end()) {
2205  //EV << "### No corresponding TimerIfEntry found! ###\n";
2206  return false;
2207  }
2208 
2209  TimerIfEntry *entry = (pos->second);
2210 
2211  if (dynamic_cast<TestInitTransmitIfEntry *>(entry))
2212  delete ((TestInitTransmitIfEntry *)entry)->testInitMsg;
2213 
2214  cancelAndDelete(entry->timer); // cancels the retransmission timer
2215  entry->timer = nullptr;
2216 
2217  transmitIfList.erase(key); // remove entry from list
2218 
2219  delete entry; // free memory
2220 
2221  EV_DEBUG << "Deleted TimerIfEntry and corresponding timer.\n";
2222 
2223  return true;
2224 }
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
void * Key
Definition: Macho.h:325
bool inet::xMIPv6::checkForBUtoCN ( BindingUpdateList::BindingUpdateListEntry bulEntry,
InterfaceEntry ie 
)
protected

Send a BU depending on current status of:

  • Registration or Deregistration phase
  • Availability of tokens

Return true or false depending on whether a BU has been sent or not.

Referenced by handleBULExpiry(), processCoTMessage(), processHoTMessage(), and returningHome().

1969 {
1970  EV_INFO << "Checking whether a new BU has to be sent to CN." << endl;
1971 
1972  if (bulEntry.state == BindingUpdateList::DEREGISTER) {
1973  // we are supposed to send a deregistration BU
1974 
1975  if (!bul->isValidBinding(bulEntry.destAddress)) {
1976  // no valid binding existing; nothing to do
1977  // TODO cleanup operations?
1978  return false;
1979  }
1980 
1981  // we need a valid home keygen token for deregistration
1982  if (bul->isHomeTokenAvailable(bulEntry.destAddress, ie)) {
1983  sendBUtoCN(bulEntry, ie);
1984  return true;
1985  }
1986  else {
1987  // no token available
1988  // send HoTI
1989  createAndSendHoTIMessage(bulEntry.destAddress, ie);
1990  return false;
1991  }
1992  }
1993  else { // case REGISTER, REGISTERED and anything else
1994  // for a registration BU we need both valid care-of and home keygen tokens
1995  if (!bul->isCareOfTokenAvailable(bulEntry.destAddress, ie)) {
1996  if (bul->recentlySentCOTI(bulEntry.destAddress, ie))
1997  return false;
1998 
1999  createAndSendCoTIMessage(bulEntry.destAddress, ie);
2000  return false;
2001  }
2002 
2003  if (!bul->isHomeTokenAvailable(bulEntry.destAddress, ie)) {
2004  if (bul->recentlySentHOTI(bulEntry.destAddress, ie))
2005  return false;
2006 
2007  createAndSendHoTIMessage(bulEntry.destAddress, ie);
2008  return false;
2009  }
2010 
2011  bulEntry.state = BindingUpdateList::RR_COMPLETE;
2012 
2013  // tokens are available: now we also need the case that the binding is about to expire or we have no valid binding at all
2014  if ((bul->isBindingAboutToExpire(bulEntry.destAddress)
2015  || !bul->isValidBinding(bulEntry.destAddress))
2016  && bulEntry.state != BindingUpdateList::REGISTER
2017  && bulEntry.state != BindingUpdateList::NONE) // update CB - 26.11.2008
2018  {
2019  sendBUtoCN(bulEntry, ie);
2020  return true;
2021  }
2022  else
2023  return false;
2024  }
2025 }
Definition: BindingUpdateList.h:56
Definition: BindingUpdateList.h:55
virtual bool recentlySentCOTI(const IPv6Address &dest, InterfaceEntry *ie)
These two methods indicate whether a CoTI or HoTI message has been recently sent to the CN identified...
Definition: BindingUpdateList.cc:388
void createAndSendCoTIMessage(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates and sends a CoTI message to the specified destination.
Definition: xMIPv6.cc:1731
virtual bool isHomeTokenAvailable(const IPv6Address &dest, InterfaceEntry *ie)
Returns true if a home keygen token is available.
Definition: BindingUpdateList.cc:280
BindingUpdateList * bul
Definition: xMIPv6.h:79
virtual bool isCareOfTokenAvailable(const IPv6Address &dest, InterfaceEntry *ie)
Returns true if a care-of keygen token is available.
Definition: BindingUpdateList.cc:289
void createAndSendHoTIMessage(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates and sends a HoTI message to the specified destination.
Definition: xMIPv6.cc:1720
Definition: BindingUpdateList.h:58
Definition: BindingUpdateList.h:53
virtual bool isValidBinding(const IPv6Address &dest)
Returns true if a binding has been acknowledged and it&#39;s lifetime has not yet expired.
Definition: BindingUpdateList.cc:334
virtual bool isBindingAboutToExpire(const IPv6Address &dest)
Returns true if a binding is about to expire.
Definition: BindingUpdateList.cc:344
virtual bool recentlySentHOTI(const IPv6Address &dest, InterfaceEntry *ie)
Definition: BindingUpdateList.cc:397
void sendBUtoCN(BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
Creates a timer for sending a BU.
Definition: xMIPv6.cc:2027
void inet::xMIPv6::createAndSendBAMessage ( const IPv6Address src,
const IPv6Address dest,
IPv6ControlInfo ctrlInfo,
const BAStatus baStatus,
const uint  baSeq,
const int  bindingAuthorizationData,
const uint  lifeTime,
simtime_t  sendTime = 0 
)
protected

Constructs and send a BA to the IPv6 module.

Only applicable to HAs and CNs.

Referenced by processBUMessage(), and validateBUMessage().

1093 {
1094  EV_TRACE << "Entered createAndSendBAMessage() method" << endl;
1095 
1096  InterfaceEntry *ie = ift->getInterfaceById(ctrlInfo->getInterfaceId()); // To find the interface on which the BU was received
1097 
1098  // swapping src and destination for the ack packet
1099  //IPv6Address source = ie->ipv6()->linkLocalAddress();
1100  //IPv6Address destination = src;
1101  //IPv6Address src = ie ->ipv6()->linkLocalAddress();
1102 
1103  // uncommented the code above - we can use the swapped original src and
1104  // dest from the ctrlInfo as it is provided in the first two arguments
1105  // 4.9.07 - CB
1106 
1107  BindingAcknowledgement *ba = new BindingAcknowledgement("Binding Acknowledgement");
1108  ba->setMobilityHeaderType(BINDING_ACKNOWLEDGEMENT);
1109  ba->setStatus(baStatus);
1110  ba->setSequenceNumber(baSeq); //this sequence number will correspond to the ACKed BU
1111 
1112  // we are providing lifetime as a parameter, 14.9.07 - CB
1113  ba->setLifetime(lifeTime / 4); /* 6.1.8 ...in time units of 4 seconds... */
1114 
1115  /*9.5.4
1116  If the Status field in the Binding Acknowledgement contains the value
1117  136 (expired home nonce index), 137 (expired care-of nonce index), or
1118  138 (expired nonces) then the message MUST NOT include the Binding
1119  Authorization Data mobility option. Otherwise, the Binding
1120  Authorization Data mobility option MUST be included, and MUST meet
1121  the specific authentication requirements for Binding Acknowledgements
1122  as defined in Section 5.2.*/
1123  if (ba->getStatus() != EXPIRED_HOME_NONCE_INDEX &&
1124  ba->getStatus() != EXPIRED_CARE_OF_NONCE_INDEX &&
1125  ba->getStatus() != EXPIRED_NONCES)
1126  {
1127  ba->setBindingAuthorizationData(bindingAuthorizationData);
1128  }
1129 
1130  // setting message size, 10.09.07 - CB
1131  int bindAuthSize = 0;
1132 
1133  if (bindingAuthorizationData != UNDEFINED_BIND_AUTH_DATA)
1134  bindAuthSize = SIZE_BIND_AUTH_DATA + 2; // Binding Auth. Data + 6.2.3 PadN = 16 bit
1135 
1136  ba->setByteLength(SIZE_MOBILITY_HEADER + SIZE_BACK + bindAuthSize);
1137 
1138  /*The rules for selecting the Destination IP address (and, if required,
1139  routing header construction) for the Binding Acknowledgement to the
1140  mobile node are the same as in the previous section. When the Status
1141  field in the Binding Acknowledgement is greater than or equal to 128
1142  and the Source Address of the Binding Update is on the home link, the
1143  home agent MUST send it to the mobile node's link layer address
1144  (retrieved either from the Binding Update or through Neighbor
1145  Solicitation).*/
1146  // TODO
1147 
1148  sendMobilityMessageToIPv6Module(ba, dest, src, ie->getInterfaceId(), sendTime);
1149 
1150  // statistic collection
1151  /*if (rt6->isHomeAgent())
1152  statVectorBAtoMN.record(1);
1153  else
1154  statVectorBAtoMN.record(2);*/
1155 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
#define UNDEFINED_BIND_AUTH_DATA
Definition: BindingUpdateList.h:38
Definition: MobilityHeader_m.h:217
Definition: MobilityHeader_m.h:216
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
IInterfaceTable * ift
Definition: xMIPv6.h:77
Definition: MobilityHeader_m.h:64
Definition: MobilityHeader_m.h:215
#define SIZE_BIND_AUTH_DATA
Definition: xMIPv6.cc:57
#define SIZE_BACK
Definition: xMIPv6.cc:58
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::createAndSendBEMessage ( const IPv6Address dest,
const BEStatus beStatus 
)
protected

Creates and sends Binding Error message.

Referenced by processHoAOpt().

2186 {
2187  EV_TRACE << "\n<<<<<<<<< Entered createAndSendBEMessage() Function>>>>>>>\n";
2188 
2189  BindingError *be = new BindingError("BError");
2190  be->setMobilityHeaderType(BINDING_ERROR);
2191  be->setStatus(beStatus);
2192 
2193  // setting message size
2194  be->setByteLength(SIZE_MOBILITY_HEADER + SIZE_BE);
2195 
2196  sendMobilityMessageToIPv6Module(be, dest); // update 12.09.07 - CB
2197 }
Definition: MobilityHeader_m.h:65
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
#define SIZE_BE
Definition: xMIPv6.cc:64
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::createAndSendBRRMessage ( const IPv6Address dest,
InterfaceEntry ie 
)
protected

Creates a Binding Refresh Request and sends it to the IPv6 module.

Referenced by sendPeriodicBRR().

2472 {
2473  EV_TRACE << "\n<<======THIS IS THE ROUTINE FOR CREATING AND SENDING BRR MESSAGE =====>>\n";
2474  BindingRefreshRequest *brr = new BindingRefreshRequest("Binding Refresh Request");
2475 
2476  /*6.1.2
2477  The Binding Refresh Request message uses the MH Type value 0. When
2478  this value is indicated in the MH Type field, the format of the
2479  Message Data field in the Mobility Header is as follows:*/
2480  brr->setMobilityHeaderType(BINDING_REFRESH_REQUEST);
2481 
2482  brr->setByteLength(SIZE_MOBILITY_HEADER + SIZE_BRR);
2483 
2484  EV_INFO << "\n<<======BRR MESSAGE FORMED; APPENDING CONTROL INFO=====>>\n";
2485  IPv6Address CoA = ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::CoA);
2486  ASSERT(!CoA.isUnspecified());
2487  sendMobilityMessageToIPv6Module(brr, dest, CoA, ie->getInterfaceId());
2488 }
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
Definition: MobilityHeader_m.h:58
#define SIZE_BRR
Definition: xMIPv6.cc:65
Definition: IPv6InterfaceData.h:211
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::createAndSendBUMessage ( const IPv6Address dest,
InterfaceEntry ie,
const uint  buSeq,
const uint  lifeTime,
const int  bindAuthData = 0 
)
protected

Method for creating and sending a BU by a MN.

Referenced by sendPeriodicBU().

482 {
483  EV_INFO << "Creating and sending Binding Update" << endl;
484  // TODO use the globalAddress(IPv6InterfaceData::CoA) in the address selection somewhere above (caller)
485  IPv6Address CoA = ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::CoA); // source address of MN
486 
487  if (CoA.isUnspecified())
488  CoA = ie->ipv6Data()->getPreferredAddress(); // in case a CoA is not availabile (e.g. returning home)
489 
490  BindingUpdate *bu = new BindingUpdate("Binding Update");
491 
492  /*11.7.1
493  To register a care-of address or to extend the lifetime of an
494  existing registration, the mobile node sends a packet to its home
495  agent containing a Binding Update, with the packet constructed as
496  follows:*/
497  /*11.7.2
498  A Binding Update is created as follows:*/
499  bu->setMobilityHeaderType(BINDING_UPDATE);
500 
501  /*11.7.1
502  o The value specified in the Lifetime field MUST be non-zero and
503  SHOULD be less than or equal to the remaining valid lifetime of
504  the home address and the care-of address specified for the
505  binding.*/
506  /*6.1.7
507  Lifetime
508  16-bit unsigned integer. The number of time units remaining
509  before the binding MUST be considered expired. A value of zero
510  indicates that the Binding Cache entry for the mobile node MUST be
511  deleted. (In this case the specified care-of address MUST also be
512  set equal to the home address.) One time unit is 4 seconds.
513  */
514  bu->setLifetime(lifeTime / 4);
515 
516  bu->setSequence(buSeq);
517 
518  /*11.7.1
519  o The Acknowledge (A) bit MUST be set in the Binding Update.*/
520  bu->setAckFlag(true);
521 
522  /*o The Home Registration (H) bit MUST be set in the Binding Update.*/
523  // set flag depending on whether the BU goes to HA or not - CB
524  bu->setHomeRegistrationFlag(dest == ie->ipv6Data()->getHomeAgentAddress()); // update CB 07.08.08
525 
526  /*11.7.1
527  o If the mobile node's link-local address has the same interface
528  identifier as the home address for which it is supplying a new
529  care-of address, then the mobile node SHOULD set the Link-Local
530  Address Compatibility (L) bit.
531  o If the home address was generated using RFC 3041 [18], then the
532  link local address is unlikely to have a compatible interface
533  identifier. In this case, the mobile node MUST clear the Link-
534  Local Address Compatibility (L) bit.*/
535  // The link identifiers are always the same in our simulations. As
536  // long as this is not changing, we can stick to the value "true"
537  bu->setLinkLocalAddressCompatibilityFlag(true); // fine for now
538 
539  bu->setKeyManagementFlag(false); // no IKE/IPsec available anyway
540 
541  /*11.7.1
542  o The packet MUST contain a Home Address destination option, giving
543  the mobile node's home address for the binding.*/
544  /*11.7.2
545  o The home address of the mobile node MUST be added to the packet in
546  a Home Address destination option, unless the Source Address is
547  the home address.*/
548  IPv6Address HoA = ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::HoA);
549  ASSERT(!HoA.isUnspecified());
550 
551  // As every IPv6 Datagram sending the BU has to have the Home Address Option, I have
552  // made this field a part of BU message to ease my task of simulation...
553  // this can be accessed from the InterfaceTable of the MN.
554  bu->setHomeAddressMN(HoA); //HoA of MN
555 
556  /*11.7.2
557  o The Mobility Header is constructed according to rules in Section
558  6.1.7 and Section 5.2.6, including the Binding Authorization Data
559  (calculated as defined in Section 6.2.7) and possibly the Nonce
560  Indices mobility options.*/
561  bu->setBindingAuthorizationData(bindAuthData); // added for BU to CN, 28.08.07 - CB
562 
563  // update 13.09.07 - CB
564  int nonceIndicesSize = 0;
565 
566  if (!bu->getHomeRegistrationFlag())
567  nonceIndicesSize = SIZE_NONCE_INDICES;
568 
569  // setting message size, 10.09.07 - CB
570  int bindAuthSize = 0;
571 
572  if (bindAuthData != UNDEFINED_BIND_AUTH_DATA)
573  bindAuthSize = SIZE_BIND_AUTH_DATA; // (6.2.3 PadN = 16 bit) -> no padding required if nonces provided // TODO check whether nonces valid
574 
575  bu->setByteLength(SIZE_MOBILITY_HEADER + SIZE_BU + SIZE_HOA_OPTION + bindAuthSize + nonceIndicesSize);
576 
577  /*11.7.1
578  When sending a Binding Update to its home agent, the mobile node MUST
579  also create or update the corresponding Binding Update List entry, as
580  specified in Section 11.7.2.*/
581  updateBUL(bu, dest, CoA, ie, simTime());
582 
583  /*11.7.1
584  o The care-of address for the binding MUST be used as the Source
585  Address in the packet's IPv6 header, unless an Alternate Care-of
586  Address mobility option is included in the Binding Update. This
587  option MUST be included in all home registrations, as the ESP
588  protocol will not be able to protect care-of addresses in the IPv6
589  header. (Mobile IPv6 implementations that know they are using
590  IPsec AH to protect a particular message might avoid this option.
591  For brevity the usage of AH is not discussed in this document.)*/
592  /*11.7.2
593  o The current care-of address of the mobile node MUST be sent either
594  in the Source Address of the IPv6 header, or in the Alternate
595  Care-of Address mobility option.
596  o The Destination Address of the IPv6 header MUST contain the
597  address of the correspondent node.*/
598  sendMobilityMessageToIPv6Module(bu, dest, CoA, ie->getInterfaceId());
599  //sendMobilityMessageToIPv6Module(bu, dest);
600 }
#define UNDEFINED_BIND_AUTH_DATA
Definition: BindingUpdateList.h:38
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
Definition: IPv6InterfaceData.h:211
void updateBUL(BindingUpdate *bu, const IPv6Address &dest, const IPv6Address &CoA, InterfaceEntry *ie, const simtime_t sendTime)
Update the an entry of the BUL with the provided parameters.
Definition: xMIPv6.cc:602
#define SIZE_HOA_OPTION
Definition: xMIPv6.cc:56
Definition: MobilityHeader_m.h:63
#define SIZE_BU
Definition: xMIPv6.cc:55
Definition: IPv6InterfaceData.h:211
#define SIZE_NONCE_INDICES
Definition: xMIPv6.cc:59
#define SIZE_BIND_AUTH_DATA
Definition: xMIPv6.cc:57
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::createAndSendCoTIMessage ( const IPv6Address cnDest,
InterfaceEntry ie 
)
protected

Creates and sends a CoTI message to the specified destination.

Referenced by checkForBUtoCN(), handleTokenExpiry(), and initReturnRoutability().

1732 {
1733  CareOfTestInit *CoTI = new CareOfTestInit("CoTI");
1734  CoTI->setMobilityHeaderType(CARE_OF_TEST_INIT);
1735  CoTI->setCareOfInitCookie(CO_COOKIE);
1736  // setting message size, 10.09.07 - CB
1737  CoTI->setByteLength(SIZE_MOBILITY_HEADER + SIZE_COTI);
1738 
1739  createTestInitTimer(CoTI, cnDest, ie);
1740 }
Definition: MobilityHeader_m.h:60
#define SIZE_COTI
Definition: xMIPv6.cc:61
void createTestInitTimer(MobilityHeader *testInit, const IPv6Address &dest, InterfaceEntry *ie, simtime_t sendTime=0)
Creates and schedules a timer for either a HoTI or a CoTI transmission.
Definition: xMIPv6.cc:1495
#define CO_COOKIE
Definition: BindingUpdateList.h:41
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::createAndSendHoTIMessage ( const IPv6Address cnDest,
InterfaceEntry ie 
)
protected

Creates and sends a HoTI message to the specified destination.

Referenced by checkForBUtoCN(), handleTokenExpiry(), and initReturnRoutability().

1721 {
1722  HomeTestInit *HoTI = new HomeTestInit("HoTI");
1723  HoTI->setMobilityHeaderType(HOME_TEST_INIT);
1724  HoTI->setHomeInitCookie(HO_COOKIE);
1725  // setting message size, 10.09.07 - CB
1726  HoTI->setByteLength(SIZE_MOBILITY_HEADER + SIZE_HOTI);
1727 
1728  createTestInitTimer(HoTI, cnDest, ie);
1729 }
#define SIZE_HOTI
Definition: xMIPv6.cc:60
Definition: MobilityHeader_m.h:59
void createTestInitTimer(MobilityHeader *testInit, const IPv6Address &dest, InterfaceEntry *ie, simtime_t sendTime=0)
Creates and schedules a timer for either a HoTI or a CoTI transmission.
Definition: xMIPv6.cc:1495
#define HO_COOKIE
Definition: BindingUpdateList.h:39
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::createBCEntryExpiryTimer ( IPv6Address HoA,
InterfaceEntry ie,
simtime_t  scheduledTime 
)
protected

Creates or overwrites a timer for BC expiry that fires at provided scheduledTime.

Referenced by processBUMessage().

2624 {
2625  cMessage *bcExpiryMsg = new cMessage("BCEntryExpiry", MK_BC_EXPIRY);
2626 
2627  Key key(HoA, ie->getInterfaceId(), KEY_BC_EXP);
2628  // fetch a valid TimerIfEntry obect
2629  BCExpiryIfEntry *bcExpIfEntry = (BCExpiryIfEntry *)getTimerIfEntry(key, EXPIRY_TYPE_BC);
2630 
2631  bcExpIfEntry->dest = HoA;
2632  bcExpIfEntry->HoA = HoA;
2633  bcExpIfEntry->ifEntry = ie;
2634  bcExpIfEntry->timer = bcExpiryMsg;
2635 
2636  bcExpiryMsg->setContextPointer(bcExpIfEntry); // information in the bulExpIfEntry is required for handler when message fires
2637 
2638  scheduleAt(scheduledTime, bcExpiryMsg);
2639  EV_INFO << "Scheduled BC expiry for time " << scheduledTime << "s" << endl;
2640 }
#define KEY_BC_EXP
Definition: xMIPv6.h:55
IPv6Address dest
Definition: xMIPv6.h:103
TimerIfEntry * getTimerIfEntry(Key &key, int timerType)
Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the p...
Definition: xMIPv6.cc:2236
#define EXPIRY_TYPE_BC
Definition: xMIPv6.h:64
void * Key
Definition: Macho.h:325
#define MK_BC_EXPIRY
Definition: xMIPv6.cc:45
void inet::xMIPv6::createBRRTimer ( const IPv6Address brDest,
InterfaceEntry ie,
const uint  scheduledTime 
)
protected

Creates a timer for a Binding Refresh Request message that is going to be fired in scheduledTime seconds.

2399 {
2400  /*9.5.5
2401  If the sender knows that the Binding Cache entry is still in active
2402  use, it MAY send a Binding Refresh Request message to the mobile node
2403  in an attempt to avoid this overhead and latency due to deleting and
2404  recreating the Binding Cache entry. This message is always sent to
2405  the home address of the mobile node.*/
2406 
2407  Enter_Method("createBRRTimer()");
2408  cMessage *brTriggerMsg = new cMessage("sendPeriodicBRR", MK_SEND_PERIODIC_BR);
2409 
2410  // check if there already exists a BRTimer entry for this key
2411  Key key(brDest, ie->getInterfaceId(), KEY_BR);
2412  BRTransmitIfEntry *brIfEntry;
2413 
2414  auto pos = transmitIfList.find(key);
2415  if (pos != transmitIfList.end()) {
2416  // there already exists an unACKed retransmission timer for that entry
2417  // -> overwrite the old with the new one
2418  if (dynamic_cast<BRTransmitIfEntry *>(pos->second)) {
2419  brIfEntry = (BRTransmitIfEntry *)pos->second;
2420  cancelAndDelete(brIfEntry->timer); // delete the corresponding timer
2421  }
2422  else
2423  throw cRuntimeError("Expected BRTransmitIfEntry* !");
2424  }
2425  else {
2426  // we do not yet have an entry -> create a new one
2427  brIfEntry = new BRTransmitIfEntry();
2428  transmitIfList.insert(std::make_pair(key, brIfEntry));
2429  }
2430 
2431  brIfEntry->dest = brDest;
2432  brIfEntry->ifEntry = ie;
2433  brIfEntry->timer = brTriggerMsg;
2434 
2435  brIfEntry->retries = 0;
2436 
2437  brTriggerMsg->setContextPointer(brIfEntry); // attaching the brIfEntry info corresponding to a particular address ith message
2438 
2439  // Scheduling a message which will trigger a BRR towards brIfEntry->dest
2440  scheduleAt(simTime() + scheduledTime, brTriggerMsg);
2441  EV_DETAIL << "\n++++++++++BRR TIMER CREATED FOR SIM TIME: " << simTime() + scheduledTime
2442  << " seconds+++++++++++++++++ \n";
2443 }
#define MK_SEND_PERIODIC_BR
Definition: xMIPv6.cc:42
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
void * Key
Definition: Macho.h:325
#define KEY_BR
Definition: xMIPv6.h:53
void inet::xMIPv6::createBULEntryExpiryTimer ( BindingUpdateList::BindingUpdateListEntry entry,
InterfaceEntry ie,
simtime_t  scheduledTime 
)
protected

Creates or overwrites a timer for BUL expiry that fires at provided scheduledTime.

Referenced by handleBULExpiry(), and processBAMessage().

2514 {
2515  //Enter_Method("createBULEntryExpiryTimer()");
2516  //EV << "Creating BUL entry expiry timer for sim time: " << entry->bindingExpiry << " seconds." << endl;
2517  cMessage *bulExpiryMsg = new cMessage("BULEntryExpiry", MK_BUL_EXPIRY);
2518 
2519  // we are able to associate the BUL entry later on based on HoA, CoA and destination (=HA address)
2520  IPv6Address& HoA = entry->homeAddress;
2521  IPv6Address& CoA = entry->careOfAddress;
2522  IPv6Address& HA = entry->destAddress;
2523 
2524  Key key(HA, ie->getInterfaceId(), KEY_BUL_EXP);
2525  // fetch a valid TimerIfEntry obect
2526  BULExpiryIfEntry *bulExpIfEntry = (BULExpiryIfEntry *)getTimerIfEntry(key, EXPIRY_TYPE_BUL);
2527 
2528  bulExpIfEntry->dest = HA;
2529  bulExpIfEntry->HoA = HoA;
2530  bulExpIfEntry->CoA = CoA;
2531  bulExpIfEntry->ifEntry = ie;
2532  bulExpIfEntry->timer = bulExpiryMsg;
2533 
2534  bulExpiryMsg->setContextPointer(bulExpIfEntry); // information in the bulExpIfEntry is required for handler when message fires
2535 
2536  /*BULExpiryIfEntry* bulExpIfEntry = createBULEntryExpiryTimer(key, HA, HoA, CoA, ie);*/
2537 
2538  scheduleAt(scheduledTime, bulExpiryMsg);
2539  EV_INFO << "Scheduled BUL expiry (" << entry->bindingExpiry << "s) for time " << scheduledTime << "s" << endl;
2540  // WAS SCHEDULED FOR EXPIRY, NOT 2 SECONDS BEFORE!?!?!?
2541 }
#define MK_BUL_EXPIRY
Definition: xMIPv6.cc:44
IPv6Address dest
Definition: xMIPv6.h:103
TimerIfEntry * getTimerIfEntry(Key &key, int timerType)
Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the p...
Definition: xMIPv6.cc:2236
#define EXPIRY_TYPE_BUL
Definition: xMIPv6.h:63
#define KEY_BUL_EXP
Definition: xMIPv6.h:54
void * Key
Definition: Macho.h:325
void inet::xMIPv6::createBUTimer ( const IPv6Address buDest,
InterfaceEntry ie,
const uint  lifeTime,
bool  homeRegistration 
)
protected

This method finally creates the timer structure and schedules the message for sending.

Referenced by createBUTimer(), createDeregisterBUTimer(), handleBULExpiry(), initiateMIPv6Protocol(), and sendBUtoCN().

370 {
371  Enter_Method("createBUTimer()");
372  EV_INFO << "Creating BU timer at sim time: " << simTime() << " seconds." << endl;
373  cMessage *buTriggerMsg = new cMessage("sendPeriodicBU", MK_SEND_PERIODIC_BU);
374 
375  // update 13.9.07 - CB
376  // check if there already exists a BUTimer entry for this key
377  Key key(buDest, ie->getInterfaceId(), KEY_BU);
378  // fetch a valid TimerIfEntry obect
379  BUTransmitIfEntry *buIfEntry = (BUTransmitIfEntry *)getTimerIfEntry(key, TRANSMIT_TYPE_BU);
380  // TODO: Investigate problem witht he following line. : runtime error because of attempted message rescheduling
381  //cancelAndDelete(buIfEntry->timer);
382 
383  buIfEntry->dest = buDest;
384  buIfEntry->ifEntry = ie;
385  buIfEntry->timer = buTriggerMsg;
386 
387  // update 10.09.07 - CB
388  // retrieve sequence number from BUL
389  // if no entry exists, the method will return 0
390  buIfEntry->buSequenceNumber = bul->getSequenceNumber(buDest); //the sequence number gets initialized and stored here
391 
392  buIfEntry->lifeTime = lifeTime;
393 
394  /*11.8
395  If the mobile node is sending a Binding Update and does not have
396  an existing binding at the home agent, it SHOULD use
397  InitialBindackTimeoutFirstReg (see Section 13) as a value for the
398  initial retransmission timer.*/
399  if (!bul->isInBindingUpdateList(buDest))
400  buIfEntry->ackTimeout = ie->ipv6Data()->_getInitialBindAckTimeoutFirst(); //the backoff constant gets initialised here
401  /*Otherwise, the mobile node should use the specified value of
402  INITIAL_BINDACK_TIMEOUT for the initial retransmission timer.*/
403  else
404  buIfEntry->ackTimeout = ie->ipv6Data()->_getInitialBindAckTimeout(); // if there's an entry in the BUL, use different value
405 
406  buIfEntry->homeRegistration = homeRegistration; // added by CB, 28.08.07
407 
408  buTriggerMsg->setContextPointer(buIfEntry); // attaching the buIfEntry info corresponding to a particular address ith message
409 
410  // send BU now, 14.9.07 - CB
411  //scheduleAt(buIfEntry->initScheduledBUTime, buTriggerMsg); //Scheduling a message which will trigger a BU towards buIfEntry->dest
412  scheduleAt(simTime(), buTriggerMsg); //Scheduling a message which will trigger a BU towards buIfEntry->dest
413 }
#define KEY_BU
Definition: xMIPv6.h:50
#define TRANSMIT_TYPE_BU
Definition: xMIPv6.h:60
IPv6Address dest
Definition: xMIPv6.h:103
TimerIfEntry * getTimerIfEntry(Key &key, int timerType)
Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the p...
Definition: xMIPv6.cc:2236
virtual uint getSequenceNumber(const IPv6Address &dest)
Returns the last used sequence number for the given dest.
Definition: BindingUpdateList.cc:303
BindingUpdateList * bul
Definition: xMIPv6.h:79
#define MK_SEND_PERIODIC_BU
Definition: xMIPv6.cc:40
void * Key
Definition: Macho.h:325
virtual bool isInBindingUpdateList(const IPv6Address &dest) const
Checks whether there exists an entry in the BUL for the given destination address.
Definition: BindingUpdateList.cc:298
void inet::xMIPv6::createBUTimer ( const IPv6Address buDest,
InterfaceEntry ie 
)
protected
323 {
324  // update 12.06.08 - CB
325  // if we send a new BU we can delete any potential existing BUL expiry timer for this destination
326  cancelTimerIfEntry(buDest, ie->getInterfaceId(), KEY_BUL_EXP);
327 
328  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->fetch(buDest); // CB, 10.10.08
329  ASSERT(bulEntry != nullptr); // CB, 10.10.08
330 
331  if (bulEntry->state != BindingUpdateList::DEREGISTER)
332  bulEntry->state = BindingUpdateList::REGISTER;
333 
334  // update lifetime, 14.9.07
335  //if (homeRegistration)
336  if (buDest == ie->ipv6Data()->getHomeAgentAddress()) // update 12.06.08 - CB
337  createBUTimer(buDest, ie, ie->ipv6Data()->_getMaxHABindingLifeTime(), true);
338  else {
339  if (bulEntry->state == BindingUpdateList::DEREGISTER) // CB, 10.10.08
340  createDeregisterBUTimer(buDest, ie); // CB, 10.10.08
341  else
342  createBUTimer(buDest, ie, ie->ipv6Data()->_getMaxRRBindingLifeTime(), false);
343  }
344 }
Definition: BindingUpdateList.h:56
void createBUTimer(const IPv6Address &buDest, InterfaceEntry *ie, const uint lifeTime, bool homeRegistration)
This method finally creates the timer structure and schedules the message for sending.
Definition: xMIPv6.cc:368
virtual BindingUpdateList::BindingUpdateListEntry * fetch(const IPv6Address &dest)
Similiar to lookup(), but with the difference that this method always returns a valid BUL entry...
Definition: BindingUpdateList.cc:205
void createDeregisterBUTimer(const IPv6Address &buDest, InterfaceEntry *ie)
Similiar to the previous one, this method creates an BU timer with registration lifetime equal to 0...
Definition: xMIPv6.cc:346
BindingUpdateList * bul
Definition: xMIPv6.h:79
#define KEY_BUL_EXP
Definition: xMIPv6.h:54
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
Definition: BindingUpdateList.h:58
void inet::xMIPv6::createCareOfTokenEntryExpiryTimer ( IPv6Address cnAddr,
InterfaceEntry ie,
simtime_t  scheduledTime 
)
inlineprotected

Creates or overwrites a timer for care-of keygen token expiry that fires at provided scheduledTime.

Referenced by processCoTMessage().

543  {
544  createTokenEntryExpiryTimer(cnAddr, ie, scheduledTime, KEY_CTOKEN_EXP);
545  }
void createTokenEntryExpiryTimer(IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime, int tokenType)
Creates or overwrites a timer for {home, care-of} keygen token expiry that fires at provided schedule...
Definition: xMIPv6.cc:2671
#define KEY_CTOKEN_EXP
Definition: xMIPv6.h:57
void inet::xMIPv6::createDeregisterBUTimer ( const IPv6Address buDest,
InterfaceEntry ie 
)
protected

Similiar to the previous one, this method creates an BU timer with registration lifetime equal to 0.

Referenced by createBUTimer(), and returningHome().

347 {
348  /*11.5.4
349  The mobile node SHOULD then send a Binding Update to its home agent,
350  to instruct its home agent to no longer intercept or tunnel packets
351  for it. In this home registration, the mobile node MUST set the
352  Acknowledge (A) and Home Registration (H) bits, set the Lifetime
353  field to zero, and set the care-of address for the binding to the
354  mobile node's own home address. The mobile node MUST use its home
355  address as the source address in the Binding Update.*/
356 
357  /*11.7.2
358  If the Binding Update is sent to the correspondent node, requesting
359  the deletion of any existing Binding Cache entry it has for the
360  mobile node, the care-of address is set to the mobile node's home
361  address and the Lifetime field set to zero.*/
362 
363  //createBUTimer(buDest, ie, 0, homeRegistration);
364  // update 12.06.08 - CB
365  createBUTimer(buDest, ie, 0, buDest == ie->ipv6Data()->getHomeAgentAddress());
366 }
void createBUTimer(const IPv6Address &buDest, InterfaceEntry *ie, const uint lifeTime, bool homeRegistration)
This method finally creates the timer structure and schedules the message for sending.
Definition: xMIPv6.cc:368
void inet::xMIPv6::createHomeTokenEntryExpiryTimer ( IPv6Address cnAddr,
InterfaceEntry ie,
simtime_t  scheduledTime 
)
inlineprotected

Creates or overwrites a timer for home keygen token expiry that fires at provided scheduledTime.

Referenced by processHoTMessage().

535  {
536  createTokenEntryExpiryTimer(cnAddr, ie, scheduledTime, KEY_HTOKEN_EXP);
537  }
void createTokenEntryExpiryTimer(IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime, int tokenType)
Creates or overwrites a timer for {home, care-of} keygen token expiry that fires at provided schedule...
Definition: xMIPv6.cc:2671
#define KEY_HTOKEN_EXP
Definition: xMIPv6.h:56
void inet::xMIPv6::createTestInitTimer ( MobilityHeader testInit,
const IPv6Address dest,
InterfaceEntry ie,
simtime_t  sendTime = 0 
)
protected

Creates and schedules a timer for either a HoTI or a CoTI transmission.

Referenced by createAndSendCoTIMessage(), and createAndSendHoTIMessage().

1497 {
1498  EV_DETAIL << "\n++++++++++TEST INIT TIMER CREATED AT SIM TIME: " << simTime()
1499  << " seconds+++++++++++++++++ \n";
1500 
1501  cMessage *testInitTriggerMsg = new cMessage("sendTestInit", MK_SEND_TEST_INIT);
1502 
1503  /*11.8
1504  When the mobile node sends a Mobile Prefix Solicitation, Home Test
1505  Init, Care-of Test Init or Binding Update for which it expects a
1506  response, the mobile node has to determine a value for the initial
1507  retransmission timer:*/
1508  // update 13.9.07 - CB
1509  // check if there already exists a testInitTimer entry for this key
1510  int msgType;
1511 
1512  if (dynamic_cast<HomeTestInit *>(testInit))
1513  msgType = KEY_HI;
1514  else
1515  msgType = KEY_CI;
1516 
1517  // TODO refactor the code below, as it is also used in createBUTimer
1518  Key key(dest, ie->getInterfaceId(), msgType);
1519  // fetch a valid TimerIfEntry obect
1520  TestInitTransmitIfEntry *tiIfEntry = (TestInitTransmitIfEntry *)getTimerIfEntry(key, TRANSMIT_TYPE_TI);
1521  //delete tiIfEntry->testInitMsg;
1522  cancelAndDelete(tiIfEntry->timer);
1523 
1524  tiIfEntry->timer = testInitTriggerMsg;
1525 
1526  tiIfEntry->dest = dest;
1527  tiIfEntry->ifEntry = ie;
1528  tiIfEntry->testInitMsg = testInit;
1529  /*o Otherwise, the mobile node should use the specified value of
1530  INITIAL_BINDACK_TIMEOUT for the initial retransmission timer.*/
1531  tiIfEntry->ackTimeout = ie->ipv6Data()->_getInitialBindAckTimeout();
1532  tiIfEntry->nextScheduledTime = simTime(); // we send the HoTI/CoTI now
1533 
1534  testInitTriggerMsg->setContextPointer(tiIfEntry); // attach the Test Init If Entry to this message
1535 
1536  // scheduling a message which will trigger the Test Init for sendTime seconds
1537  // if not called with a parameter for sendTime, the message will be scheduled for NOW
1538  scheduleAt(simTime() + sendTime, testInitTriggerMsg);
1539 }
#define KEY_CI
Definition: xMIPv6.h:52
TimerIfEntry * getTimerIfEntry(Key &key, int timerType)
Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the p...
Definition: xMIPv6.cc:2236
#define KEY_HI
Definition: xMIPv6.h:51
void * Key
Definition: Macho.h:325
#define TRANSMIT_TYPE_TI
Definition: xMIPv6.h:61
#define MK_SEND_TEST_INIT
Definition: xMIPv6.cc:43
void inet::xMIPv6::createTokenEntryExpiryTimer ( IPv6Address cnAddr,
InterfaceEntry ie,
simtime_t  scheduledTime,
int  tokenType 
)
private

Creates or overwrites a timer for {home, care-of} keygen token expiry that fires at provided scheduledTime.

Parameter tokenType is provided as KEY_XTOKEN_EXP

2673 {
2674  cMessage *tokenExpiryMsg = new cMessage("TokenEntryExpiry", MK_TOKEN_EXPIRY);
2675 
2676  Key key(cnAddr, ie->getInterfaceId(), tokenType);
2677  // fetch a valid TimerIfEntry obect
2678  TokenExpiryIfEntry *tokenExpIfEntry = (TokenExpiryIfEntry *)getTimerIfEntry(key, EXPIRY_TYPE_TOKEN);
2679 
2680  tokenExpIfEntry->cnAddr = cnAddr;
2681  tokenExpIfEntry->ifEntry = ie;
2682  tokenExpIfEntry->timer = tokenExpiryMsg;
2683 
2684  tokenExpIfEntry->tokenType = tokenType;
2685 
2686  tokenExpiryMsg->setContextPointer(tokenExpIfEntry);
2687 
2688  scheduleAt(scheduledTime, tokenExpiryMsg);
2689  EV_INFO << "Scheduled token expiry for time " << scheduledTime << "s" << endl;
2690 }
TimerIfEntry * getTimerIfEntry(Key &key, int timerType)
Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the p...
Definition: xMIPv6.cc:2236
InterfaceEntry * ifEntry
Definition: xMIPv6.h:108
#define EXPIRY_TYPE_TOKEN
Definition: xMIPv6.h:66
#define MK_TOKEN_EXPIRY
Definition: xMIPv6.cc:46
void * Key
Definition: Macho.h:325
xMIPv6::BUTransmitIfEntry * inet::xMIPv6::fetchBUTransmitIfEntry ( InterfaceEntry ie,
const IPv6Address dest 
)
protected

This method takes an interface and a destination address and returns the appropriate IfEntry for an BU.

Is supposed to be used until the valid BA is received for the respective BU.

Referenced by updateBUL().

627 {
628  // TODO use STL search algorithm
629 
630  // update 13.9.07 - CB
631  for (auto & elem : transmitIfList) {
632  if (dynamic_cast<BUTransmitIfEntry *>(elem.second)) {
633  BUTransmitIfEntry *buIfEntry = (BUTransmitIfEntry *)(elem.second);
634  if (buIfEntry->ifEntry->getInterfaceId() == ie->getInterfaceId() && buIfEntry->dest == dest) // update 5.9.07 - CB
635  return buIfEntry;
636  }
637  }
638  return nullptr;
639 }
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
xMIPv6::TimerIfEntry * inet::xMIPv6::getTimerIfEntry ( Key key,
int  timerType 
)
protected

Returns a pointer to an TimerIfEntry object identified by the provided key, which can be one of the possible polymorphic types.

In case there does not yet exist such an entry, a new one is created. The type of the TimerIfEntry is specified with the provided timerType.

Referenced by createBCEntryExpiryTimer(), createBULEntryExpiryTimer(), createBUTimer(), createTestInitTimer(), and createTokenEntryExpiryTimer().

2237 {
2238  TimerIfEntry *ifEntry;
2239  auto pos = transmitIfList.find(key);
2240 
2241  if (pos != transmitIfList.end()) {
2242  // there already exists an unACKed retransmission timer for that entry
2243  // -> overwrite the old with the new one
2244  if (dynamic_cast<TestInitTransmitIfEntry *>(pos->second)) {
2245  TestInitTransmitIfEntry *testInitIfEntry = (TestInitTransmitIfEntry *)pos->second;
2246  cancelAndDelete(testInitIfEntry->timer); // delete the corresponding timer
2247  delete testInitIfEntry->testInitMsg; // delete old HoTI/CoTI, 21.9.07 - CB
2248  testInitIfEntry->testInitMsg = nullptr;
2249 
2250  ifEntry = testInitIfEntry;
2251  }
2252  else if (dynamic_cast<BUTransmitIfEntry *>(pos->second)) {
2253  BUTransmitIfEntry *buIfEntry = (BUTransmitIfEntry *)pos->second;
2254  cancelAndDelete(buIfEntry->timer); // delete the corresponding timer
2255 
2256  ifEntry = buIfEntry;
2257  }
2258  else if (dynamic_cast<BULExpiryIfEntry *>(pos->second)) {
2259  BULExpiryIfEntry *bulExpIfEntry = (BULExpiryIfEntry *)pos->second;
2260  cancelAndDelete(bulExpIfEntry->timer); // delete the corresponding timer
2261 
2262  ifEntry = bulExpIfEntry;
2263  }
2264  else if (dynamic_cast<BCExpiryIfEntry *>(pos->second)) {
2265  BCExpiryIfEntry *bcExpIfEntry = (BCExpiryIfEntry *)pos->second;
2266  cancelAndDelete(bcExpIfEntry->timer); // delete the corresponding timer
2267 
2268  ifEntry = bcExpIfEntry;
2269  }
2270  else if (dynamic_cast<TokenExpiryIfEntry *>(pos->second)) {
2271  TokenExpiryIfEntry *tokenExpIfEntry = (TokenExpiryIfEntry *)pos->second;
2272  cancelAndDelete(tokenExpIfEntry->timer); // delete the corresponding timer
2273  tokenExpIfEntry->timer = nullptr;
2274 
2275  ifEntry = tokenExpIfEntry;
2276  }
2277  else
2278  throw cRuntimeError("Expected a subclass of TimerIfEntry!");
2279 
2280  ifEntry->timer = nullptr;
2281  }
2282  else {
2283  // we do not yet have an entry -> create a new one
2284  switch (timerType) {
2285  case TRANSMIT_TYPE_BU:
2286  ifEntry = new BUTransmitIfEntry();
2287  break;
2288 
2289  case TRANSMIT_TYPE_TI:
2290  ifEntry = new TestInitTransmitIfEntry();
2291  break;
2292 
2293  case EXPIRY_TYPE_BUL:
2294  ifEntry = new BULExpiryIfEntry();
2295  break;
2296 
2297  case EXPIRY_TYPE_BC:
2298  ifEntry = new BCExpiryIfEntry();
2299  break;
2300 
2301  case EXPIRY_TYPE_TOKEN:
2302  ifEntry = new TokenExpiryIfEntry();
2303  break;
2304 
2305  default:
2306  throw cRuntimeError("Expected a valid TimerIfEntry type!");
2307  break;
2308  }
2309 
2310  ifEntry->timer = nullptr;
2311  ifEntry->ifEntry = nullptr;
2312 
2313  transmitIfList.insert(std::make_pair(key, ifEntry));
2314  }
2315 
2316  return ifEntry;
2317 }
#define TRANSMIT_TYPE_BU
Definition: xMIPv6.h:60
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
#define EXPIRY_TYPE_BUL
Definition: xMIPv6.h:63
#define EXPIRY_TYPE_TOKEN
Definition: xMIPv6.h:66
#define EXPIRY_TYPE_BC
Definition: xMIPv6.h:64
#define TRANSMIT_TYPE_TI
Definition: xMIPv6.h:61
void inet::xMIPv6::handleBCExpiry ( cMessage *  msg)
protected

Handles the expiry of a BC entry.

Entry is removed from BC and tunnels/routing paths are destroyed.

Referenced by handleMessage().

2643 {
2644  /*10.3.1
2645  The home agent MAY further decrease the specified lifetime for the
2646  binding, for example based on a local policy. The resulting
2647  lifetime is stored by the home agent in the Binding Cache entry,
2648  and this Binding Cache entry MUST be deleted by the home agent
2649  after the expiration of this lifetime.*/
2650  /*9.5.2
2651  Any Binding Cache entry MUST be deleted after the expiration of its lifetime.*/
2652  EV_INFO << "BC entry has expired - removing entry and associated structures..." << endl;
2653 
2654  BCExpiryIfEntry *bcExpIfEntry = (BCExpiryIfEntry *)msg->getContextPointer(); //detaching the corresponding bulExpIfEntry pointer
2655  ASSERT(bcExpIfEntry != nullptr);
2656 
2657  // remove binding from BC
2658  bc->deleteEntry(bcExpIfEntry->HoA);
2659 
2660  // and remove the tunnel
2661  tunneling->destroyTunnelFromTrigger(bcExpIfEntry->HoA);
2662 
2663  // and remove entry from list
2664  cancelTimerIfEntry(bcExpIfEntry->dest, bcExpIfEntry->ifEntry->getInterfaceId(), KEY_BC_EXP);
2665  // deletion of the message already takes place in the cancelTimerIfEntry(.., KEY_BC_EXP);
2666 
2667  // TODO
2668  // in the future we might send a Binding Refresh Request shortly before the expiration of the BCE
2669 }
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
void deleteEntry(IPv6Address &HoA)
Added by CB, 4.9.07 Delete the entry from the cache with the provided HoA.
Definition: BindingCache.cc:101
#define KEY_BC_EXP
Definition: xMIPv6.h:55
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
void destroyTunnelFromTrigger(const IPv6Address &trigger)
Remove the tunnel with the provided destination trigger.
Definition: IPv6Tunneling.cc:296
BindingCache * bc
Definition: xMIPv6.h:80
void inet::xMIPv6::handleBULExpiry ( cMessage *  msg)
protected

Handles the situation of a BUL expiry.

Either a BU is sent in advance for renewal or the BUL entry is removed.

Referenced by handleMessage().

2559 {
2560  /*11.7.1
2561  Also, if the mobile node wants the services of the home agent beyond
2562  the current registration period, the mobile node should send a new
2563  Binding Update to it well before the expiration of this period, even
2564  if it is not changing its primary care-of address.*/
2565  BULExpiryIfEntry *bulExpIfEntry = (BULExpiryIfEntry *)msg->getContextPointer(); //detaching the corresponding bulExpIfEntry pointer
2566  ASSERT(bulExpIfEntry != nullptr);
2567 
2568  // we fetch the BUL entry that belongs to this expiration timer
2569  BindingUpdateList::BindingUpdateListEntry *entry = bul->lookup(bulExpIfEntry->dest);
2570  ASSERT(entry != nullptr);
2571 
2572  // A timer usually can appear for two times:
2573  // 1. Entry is shortly before expiration -> send new BU
2574  // 2. Entry expired -> remove
2575  if (simTime() < entry->bindingExpiry) {
2576  EV_INFO << "BUL entry about to expire - creating new BU timer..." << endl;
2577  // we have to store the pointer to the InterfaceIdentifier as the BUL expiry timer
2578  // will be canceled/deleted by createBUTimer(...)
2579  InterfaceEntry *ie = bulExpIfEntry->ifEntry;
2580 
2581  // send new BU
2582  // we immediately create a new BU transmission timer for BU to HA
2583  // but we only trigger BU creation for transmission to CN
2584  if (bulExpIfEntry->dest == ie->ipv6Data()->getHomeAgentAddress())
2585  createBUTimer(bulExpIfEntry->dest, bulExpIfEntry->ifEntry);
2586  else {
2587  BindingUpdateList::BindingUpdateListEntry *entry = bul->lookup(bulExpIfEntry->dest);
2588  checkForBUtoCN(*entry, ie);
2589  }
2590 
2591  // we reschedule the expiration timer for expiry time
2592  EV_DETAIL << "Resetting expiry timer... " << endl;
2593  createBULEntryExpiryTimer(entry, ie, entry->bindingExpiry);
2594 
2595  // ...and that's it.
2596  // createBUTimer will take care of cancelling/overwriting the current BU timer.
2597  // As soon as we receive a valid BA to this BU the BUL expiry timer will be reset.
2598  }
2599  else {
2600  EV_INFO << "BUL entry has expired - removing entry and associated structures..." << endl;
2601 
2602  // TODO group everything from below in a purgeMobilityState() method
2603 
2604  entry->state = BindingUpdateList::NONE; // UPDATE CB, 26.11.2008
2605  // remove binding
2606  bul->removeBinding(bulExpIfEntry->dest);
2607 
2608  // remove all timers
2609  int interfaceID = bulExpIfEntry->ifEntry->getInterfaceId();
2610  removeTimerEntries(bulExpIfEntry->dest, interfaceID);
2611 
2612  // destroy tunnel
2613  tunneling->destroyTunnel(bulExpIfEntry->CoA, bulExpIfEntry->dest);
2614 
2615  // and remove entry from list
2616  cancelTimerIfEntry(bulExpIfEntry->dest, interfaceID, KEY_BUL_EXP);
2617 
2618  // deletion of the message already takes place in the cancelTimerIfEntry(.., KEY_BUL_EXP);
2619  //delete msg;
2620  }
2621 }
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
void createBUTimer(const IPv6Address &buDest, InterfaceEntry *ie, const uint lifeTime, bool homeRegistration)
This method finally creates the timer structure and schedules the message for sending.
Definition: xMIPv6.cc:368
void removeTimerEntries(const IPv6Address &dest, int interfaceId)
Removes timers of all types for the specified destination address and interfaceId.
Definition: xMIPv6.cc:2329
void createBULEntryExpiryTimer(BindingUpdateList::BindingUpdateListEntry *entry, InterfaceEntry *ie, simtime_t scheduledTime)
Creates or overwrites a timer for BUL expiry that fires at provided scheduledTime.
Definition: xMIPv6.cc:2513
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
BindingUpdateList * bul
Definition: xMIPv6.h:79
#define KEY_BUL_EXP
Definition: xMIPv6.h:54
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
virtual void removeBinding(const IPv6Address &dest)
Deletes an entry from the binding update list for the provided destination address.
Definition: BindingUpdateList.cc:365
bool checkForBUtoCN(BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
Send a BU depending on current status of:
Definition: xMIPv6.cc:1968
Definition: BindingUpdateList.h:53
bool destroyTunnel(const IPv6Address &src, const IPv6Address &dest, const IPv6Address &destTrigger)
Creates a pseudo-tunnel for use with either Type 2 Routing Header or Home Address Option with given e...
Definition: IPv6Tunneling.cc:203
void inet::xMIPv6::handleMessage ( cMessage *  msg)
overrideprotectedvirtual
145 {
146  if (msg->isSelfMessage()) {
147  EV_DETAIL << "Self message received!\n";
148 
149  if (msg->getKind() == MK_SEND_PERIODIC_BU) {
150  EV_DETAIL << "Periodic BU Timeout Message Received\n";
151  sendPeriodicBU(msg);
152  }
153  else if (msg->getKind() == MK_SEND_PERIODIC_BR) {
154  EV_DETAIL << "Periodic BRR Timeout Message Received\n";
155  sendPeriodicBRR(msg);
156  }
157  else if (msg->getKind() == MK_SEND_TEST_INIT) { // 28.08.07 - CB
158  EV_DETAIL << "HoTI/CoTI Timeout Message Received\n";
159  sendTestInit(msg);
160  }
161  else if (msg->getKind() == MK_BUL_EXPIRY) { // 12.06.08 - CB
162  EV_DETAIL << "BUL Expiry Timeout Message Received\n";
163  handleBULExpiry(msg);
164  }
165  else if (msg->getKind() == MK_BC_EXPIRY) { // 12.06.08 - CB
166  EV_DETAIL << "BUL Expiry Timeout Message Received\n";
167  handleBCExpiry(msg);
168  }
169  else if (msg->getKind() == MK_TOKEN_EXPIRY) { // 11.07.08 - CB
170  EV_DETAIL << "RR token expired" << endl;
171  handleTokenExpiry(msg);
172  }
173  else
174  throw cRuntimeError("Unrecognized Timer"); //stops sim w/ error msg.
175  }
176  // Zarrar Yousaf @ CNI Dortmund Uni on 29.05.07
177  // if its a MIPv6 related mobility message
178  else if (dynamic_cast<MobilityHeader *>(msg)) {
179  EV_INFO << " Received MIPv6 related message" << endl;
180  IPv6ControlInfo *ctrlInfo = check_and_cast<IPv6ControlInfo *>(msg->removeControlInfo());
181  MobilityHeader *mipv6Msg = (MobilityHeader *)(msg);
182  processMobilityMessage(mipv6Msg, ctrlInfo);
183  }
184  // CB on 29.08.07
185  // normal datagram with an extension header
186  else if (dynamic_cast<IPv6Datagram *>(msg)) {
187  IPv6ExtensionHeader *eh = (IPv6ExtensionHeader *)msg->getContextPointer();
188 
189  if (dynamic_cast<IPv6RoutingHeader *>(eh))
190  processType2RH((IPv6Datagram *)msg, (IPv6RoutingHeader *)eh);
191  else if (dynamic_cast<HomeAddressOption *>(eh))
192  processHoAOpt((IPv6Datagram *)msg, (HomeAddressOption *)eh);
193  else
194  throw cRuntimeError("Unknown Extension Header.");
195  }
196  else
197  throw cRuntimeError("Unknown message type received.");
198 }
void sendTestInit(cMessage *msg)
If a TestInit timer was fired, this method gets called.
Definition: xMIPv6.cc:1541
void sendPeriodicBU(cMessage *msg)
This method is called when the timer created in createBUTimer() has fired.
Definition: xMIPv6.cc:415
void processMobilityMessage(MobilityHeader *mipv6Msg, IPv6ControlInfo *ctrlInfo)
This is where all the mobility messages are sifted through and sent to appropriate functions for proc...
Definition: xMIPv6.cc:200
void handleTokenExpiry(cMessage *msg)
Handles the event that indicates that a {care-of,home} keygen token has expired.
Definition: xMIPv6.cc:2692
void handleBULExpiry(cMessage *msg)
Handles the situation of a BUL expiry.
Definition: xMIPv6.cc:2558
#define MK_SEND_PERIODIC_BR
Definition: xMIPv6.cc:42
void handleBCExpiry(cMessage *msg)
Handles the expiry of a BC entry.
Definition: xMIPv6.cc:2642
#define MK_BUL_EXPIRY
Definition: xMIPv6.cc:44
#define MK_SEND_PERIODIC_BU
Definition: xMIPv6.cc:40
void sendPeriodicBRR(cMessage *msg)
Handles a fired BRR message transmission structure.
Definition: xMIPv6.cc:2445
#define MK_TOKEN_EXPIRY
Definition: xMIPv6.cc:46
void processHoAOpt(IPv6Datagram *datagram, HomeAddressOption *hoaOpt)
Process the Home Address Option which belongs to the provided datagram.
Definition: xMIPv6.cc:2141
#define MK_BC_EXPIRY
Definition: xMIPv6.cc:45
void processType2RH(IPv6Datagram *datagram, IPv6RoutingHeader *rh)
Process the Type 2 Routing Header which belongs to the provided datagram.
Definition: xMIPv6.cc:2050
#define MK_SEND_TEST_INIT
Definition: xMIPv6.cc:43
void inet::xMIPv6::handleTokenExpiry ( cMessage *  msg)
private

Handles the event that indicates that a {care-of,home} keygen token has expired.

Referenced by handleMessage().

2693 {
2694  TokenExpiryIfEntry *tokenExpIfEntry = (TokenExpiryIfEntry *)msg->getContextPointer(); //detaching the corresponding tokenExpIfEntry pointer
2695  ASSERT(tokenExpIfEntry != nullptr);
2696 
2697  if (tokenExpIfEntry->tokenType == KEY_CTOKEN_EXP) {
2698  EV_INFO << "Care-of keygen token for CN=" << tokenExpIfEntry->cnAddr << " expired";
2699  bul->resetCareOfToken(tokenExpIfEntry->cnAddr, tokenExpIfEntry->ifEntry->ipv6Data()->getMNHomeAddress());
2700  }
2701  else if (tokenExpIfEntry->tokenType == KEY_HTOKEN_EXP) {
2702  EV_INFO << "Home keygen token for CN=" << tokenExpIfEntry->cnAddr << " expired";
2703  bul->resetHomeToken(tokenExpIfEntry->cnAddr, tokenExpIfEntry->ifEntry->ipv6Data()->getMNHomeAddress());
2704  }
2705  else
2706  throw cRuntimeError("Unkown value for tokenType!");
2707 
2708  EV_INFO << "...removed token from BUL." << endl;
2709 
2710  if (bul->getMobilityState(tokenExpIfEntry->cnAddr) == BindingUpdateList::RR_COMPLETE)
2711  bul->setMobilityState(tokenExpIfEntry->cnAddr, BindingUpdateList::RR);
2712 
2713  cancelTimerIfEntry(tokenExpIfEntry->cnAddr, tokenExpIfEntry->ifEntry->getInterfaceId(), tokenExpIfEntry->tokenType);
2714 
2715  // and now send a Test Init message to retrieve a new token
2716  if (tokenExpIfEntry->tokenType == KEY_CTOKEN_EXP)
2717  createAndSendCoTIMessage(tokenExpIfEntry->cnAddr, tokenExpIfEntry->ifEntry);
2718  else
2719  createAndSendHoTIMessage(tokenExpIfEntry->cnAddr, tokenExpIfEntry->ifEntry);
2720 
2721  //delete msg;
2722 }
Definition: BindingUpdateList.h:55
void createAndSendCoTIMessage(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates and sends a CoTI message to the specified destination.
Definition: xMIPv6.cc:1731
virtual MobilityState getMobilityState(const IPv6Address &dest) const
Returns the current mobility state for the CN identified by the provided IP address.
Definition: BindingUpdateList.cc:215
BindingUpdateList * bul
Definition: xMIPv6.h:79
#define KEY_HTOKEN_EXP
Definition: xMIPv6.h:56
virtual void resetHomeToken(const IPv6Address &dest, const IPv6Address &hoa)
Resets the token to UNDEFINED.
Definition: BindingUpdateList.cc:262
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
#define KEY_CTOKEN_EXP
Definition: xMIPv6.h:57
void createAndSendHoTIMessage(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates and sends a HoTI message to the specified destination.
Definition: xMIPv6.cc:1720
virtual void setMobilityState(const IPv6Address &dest, BindingUpdateList::MobilityState state)
Sets the mobility state to provided state for the CN identified by the provided IP address...
Definition: BindingUpdateList.cc:225
Definition: BindingUpdateList.h:54
virtual void resetCareOfToken(const IPv6Address &dest, const IPv6Address &hoa)
Resets the token to UNDEFINED.
Definition: BindingUpdateList.cc:271
void inet::xMIPv6::initialize ( int  stage)
overrideprotectedvirtual
91 {
92  cSimpleModule::initialize(stage);
93 
94  if (stage == INITSTAGE_LOCAL) {
95  EV_TRACE << "Initializing xMIPv6 module" << endl;
96 
97  // statistic collection
98  /*statVectorBUtoHA.setName("BU to HA");
99  statVectorBUtoCN.setName("BU to CN");
100  statVectorBUtoMN.setName("BU to MN");
101  statVectorBAtoMN.setName("BA to MN");
102  statVectorBAfromHA.setName("BA from HA");
103  statVectorBAfromCN.setName("BA from CN");
104  statVectorHoTItoCN.setName("HoTI to CN");
105  statVectorCoTItoCN.setName("CoTI to CN");
106  statVectorHoTtoMN.setName("HoT to MN");
107  statVectorCoTtoMN.setName("CoT to MN");
108  statVectorHoTfromCN.setName("HoT from CN");
109  statVectorCoTfromCN.setName("CoT from CN");*/
110 
111  tunneling = getModuleFromPar<IPv6Tunneling>(par("ipv6TunnelingModule"), this); // access to tunneling module, 21.08.07 - CB
112  }
113  else if (stage == INITSTAGE_NETWORK_LAYER) {
114  // moved rt6 initialization to here, as we should
115  // set the MIPv6 flag as soon as possible for use
116  // with other modules.
117  cModule *host = getContainingNode(this);
118  rt6 = L3AddressResolver().routingTable6Of(host);
119  rt6->setMIPv6Support(true); // 4.9.07 - CB
120 
121  // moved init stuff from rt6 to here as this is actually
122  // the right place for these parameters
123  // 26.10.07 - CB
124  rt6->setIsHomeAgent(par("isHomeAgent").boolValue());
125  rt6->setIsMobileNode(par("isMobileNode").boolValue());
126 
127  ift = getModuleFromPar<IInterfaceTable>(par("interfaceTableModule"), this);
128  ipv6nd = getModuleFromPar<IPv6NeighbourDiscovery>(par("ipv6NeighbourDiscoveryModule"), this); //Zarrar Yousaf 17.07.07
129 
130  if (rt6->isMobileNode()) {
131  bul = getModuleFromPar<BindingUpdateList>(par("bindingUpdateListModule"), this); // Zarrar Yousaf 31.07.07
132  bc = nullptr;
133  }
134  else {
135  bc = getModuleFromPar<BindingCache>(par("bindingCacheModule"), this); // Zarrar Yousaf 31.07.07
136  bul = nullptr;
137  }
138 
139  WATCH_VECTOR(cnList);
140  WATCH_MAP(interfaceCoAList);
141  }
142 }
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
CNList cnList
Definition: xMIPv6.h:143
InterfaceCoAList interfaceCoAList
Definition: xMIPv6.h:139
IInterfaceTable * ift
Definition: xMIPv6.h:77
void setIsHomeAgent(bool value)
Define whether normal Router or Home Agent.
Definition: IPv6RoutingTable.h:175
bool isMobileNode() const
Determine whether a node is a Mobile Node or Correspondent Node: MN if TRUE or else a CN...
Definition: IPv6RoutingTable.h:181
void setIsMobileNode(bool value)
Define whether a node is a Mobile Node or Correspondent Node: MN if TRUE or else a CN...
Definition: IPv6RoutingTable.h:187
BindingUpdateList * bul
Definition: xMIPv6.h:79
IPv6NeighbourDiscovery * ipv6nd
Definition: xMIPv6.h:82
Initialization of network-layer protocols, stage 1.
Definition: InitStages.h:72
Local initializations.
Definition: InitStages.h:35
void setMIPv6Support(bool value)
This method is used to define whether the node support MIPv6 or not (MN, MR, HA or CN)...
Definition: IPv6RoutingTable.h:371
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:65
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
BindingCache * bc
Definition: xMIPv6.h:80
void inet::xMIPv6::initiateMIPv6Protocol ( InterfaceEntry ie,
const IPv6Address CoA 
)

Initiates the Mobile IP protocol.

Method to be used when we have moved to a new access network and the new CoA is available for that interface.

Referenced by inet::IPv6NeighbourDiscovery::makeTentativeAddressPermanent().

245 {
246  Enter_Method_Silent(); // can be called by NeighborDiscovery module
247 
248  if (!(ie->isLoopback()) && rt6->isMobileNode()) {
249  EV_INFO << "Initiating Mobile IPv6 protocol..." << endl;
250 
251  // The MN is supposed to send a BU to the HA after forming a CoA
252  IPv6Address haDest = ie->ipv6Data()->getHomeAgentAddress(); // HA address for use in the BU for Home Registration
253 
254  createBUTimer(haDest, ie);
255 
256  // RO with CNs is triggered after receiving a valid BA from the HA
257  }
258 
259  // a movement occured -> BUL entries for CNs not valid anymore
260  IPv6Address HoA = ie->ipv6Data()->getMNHomeAddress();
261 
262  for (itCNList = cnList.begin(); itCNList != cnList.end(); itCNList++) { // run an iterator through the CN map
263  IPv6Address cn = *(itCNList);
264  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->fetch(cn); // CB, 10.10.08
265  ASSERT(bulEntry != nullptr); // CB, 10.10.08
266  //bul->resetBindingCacheEntry(*bulEntry, HoA);
267  bul->removeBinding(cn);
268  // care-of token becomes invalid with new CoA
269  bul->resetCareOfToken(cn, HoA);
271  }
272 }
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
void createBUTimer(const IPv6Address &buDest, InterfaceEntry *ie, const uint lifeTime, bool homeRegistration)
This method finally creates the timer structure and schedules the message for sending.
Definition: xMIPv6.cc:368
CNList cnList
Definition: xMIPv6.h:143
virtual BindingUpdateList::BindingUpdateListEntry * fetch(const IPv6Address &dest)
Similiar to lookup(), but with the difference that this method always returns a valid BUL entry...
Definition: BindingUpdateList.cc:205
CNList::iterator itCNList
Definition: xMIPv6.h:144
bool isMobileNode() const
Determine whether a node is a Mobile Node or Correspondent Node: MN if TRUE or else a CN...
Definition: IPv6RoutingTable.h:181
BindingUpdateList * bul
Definition: xMIPv6.h:79
void destroyTunnelForExitAndTrigger(const IPv6Address &exit, const IPv6Address &trigger)
Remove the tunnel with the provided exit point and trigger.
Definition: IPv6Tunneling.cc:249
virtual void removeBinding(const IPv6Address &dest)
Deletes an entry from the binding update list for the provided destination address.
Definition: BindingUpdateList.cc:365
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
virtual void resetCareOfToken(const IPv6Address &dest, const IPv6Address &hoa)
Resets the token to UNDEFINED.
Definition: BindingUpdateList.cc:271
void inet::xMIPv6::initReturnRoutability ( const IPv6Address cnDest,
InterfaceEntry ie 
)
protectedvirtual

Creates HoTI and CoTI messages and sends them to the CN if timers are not already existing.

If home and care-of tokens are already available a BU is directly sent to the CN.

Referenced by processBRRMessage(), and triggerRouteOptimization().

1424 {
1425  EV_TRACE << "Initiating Return Routability...\n";
1426  Enter_Method("initReturnRoutability()");
1427 
1428  // update 12.9.07 - CB
1429  bool sendHoTI = true, sendCoTI = true;
1430 
1431  /*11.6.1
1432  A mobile node that initiates a return routability procedure MUST send
1433  (in parallel) a Home Test Init message and a Care-of Test Init
1434  messages. However, if the mobile node has recently received (see
1435  Section 5.2.7) one or both home or care-of keygen tokens, and
1436  associated nonce indices for the desired addresses, it MAY reuse
1437  them. Therefore, the return routability procedure may in some cases
1438  be completed with only one message pair. It may even be completed
1439  without any messages at all, if the mobile node has a recent home
1440  keygen token and has previously visited the same care-of address so
1441  that it also has a recent care-of keygen token.*/
1442  BindingUpdateList::BindingUpdateListEntry *cnEntry = bul->fetch(cnDest);
1443  ASSERT(cnEntry);
1444  cnEntry->state = BindingUpdateList::RR;
1445 
1446  /*A Home Test Init message MUST be created as described in Section
1447  6.1.3.*/
1448  //if (cnEntry != nullptr)
1449  //{
1450  // if there exists an entry in the BUL, check whether we already
1451  // have valid home and care-of tokens
1452 
1453  // check whether the last received home token is still valid
1454  //if ((cnEntry->tokenH != UNDEFINED_TOKEN) && (cnEntry->sentHoTI + ie->ipv6()->_maxTokenLifeTime() > simTime()))
1455  if (bul->isHomeTokenAvailable(cnDest, ie)) {
1456  EV_INFO << "Valid home token available - sending HoTI later.\n";
1457  sendHoTI = false;
1458  }
1459  //else
1460  // delete HoTI;
1461 
1462  /*if ((cnEntry->tokenC != UNDEFINED_TOKEN) && (cnEntry->sentCoTI + ie->ipv6()->_maxTokenLifeTime() > simTime()))*/
1463  if (bul->isCareOfTokenAvailable(cnDest, ie)) {
1464  EV_INFO << "Valid care-of token available - sending CoTI later.\n" << endl;
1465 
1466  // we already have a care-of token
1467  sendCoTI = false;
1468  }
1469  //else
1470  // delete CoTI;
1471 
1472  if (!sendHoTI && !sendCoTI) { // cnEntry can not be nullptr as a consequence of the other two flag's values
1473  // we already had a valid home and care-of token
1474  // -> no need for sending HoTI/CoTI; we can
1475  // immediately continue with sending a BU
1476  cnEntry->state = BindingUpdateList::RR_COMPLETE;
1477 
1478  sendBUtoCN(*cnEntry, ie);
1479  }
1480  //}
1481 
1482  if (sendHoTI && !bul->recentlySentHOTI(cnDest, ie)) {
1483  // no entry for this CN available: create Home Test Init message to be sent via HA
1484  createAndSendHoTIMessage(cnDest, ie);
1485  }
1486 
1487  if (sendCoTI && !bul->recentlySentCOTI(cnDest, ie)) {
1488  /*A Care-of Test Init message MUST be created as described in Section
1489  6.1.4.*/
1490  // Care-of Test Init Message to CN
1491  createAndSendCoTIMessage(cnDest, ie);
1492  }
1493 }
Definition: BindingUpdateList.h:55
virtual bool recentlySentCOTI(const IPv6Address &dest, InterfaceEntry *ie)
These two methods indicate whether a CoTI or HoTI message has been recently sent to the CN identified...
Definition: BindingUpdateList.cc:388
void createAndSendCoTIMessage(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates and sends a CoTI message to the specified destination.
Definition: xMIPv6.cc:1731
virtual bool isHomeTokenAvailable(const IPv6Address &dest, InterfaceEntry *ie)
Returns true if a home keygen token is available.
Definition: BindingUpdateList.cc:280
virtual BindingUpdateList::BindingUpdateListEntry * fetch(const IPv6Address &dest)
Similiar to lookup(), but with the difference that this method always returns a valid BUL entry...
Definition: BindingUpdateList.cc:205
BindingUpdateList * bul
Definition: xMIPv6.h:79
virtual bool isCareOfTokenAvailable(const IPv6Address &dest, InterfaceEntry *ie)
Returns true if a care-of keygen token is available.
Definition: BindingUpdateList.cc:289
void createAndSendHoTIMessage(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates and sends a HoTI message to the specified destination.
Definition: xMIPv6.cc:1720
Definition: BindingUpdateList.h:54
virtual bool recentlySentHOTI(const IPv6Address &dest, InterfaceEntry *ie)
Definition: BindingUpdateList.cc:397
void sendBUtoCN(BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
Creates a timer for sending a BU.
Definition: xMIPv6.cc:2027
virtual int inet::xMIPv6::numInitStages ( ) const
inlineoverrideprotectedvirtual
194 { return NUM_INIT_STAGES; }
The number of initialization stages.
Definition: InitStages.h:116
bool inet::xMIPv6::pendingTimerIfEntry ( IPv6Address dest,
int  interfaceID,
int  msgType 
)
protected

Checks whether there exists an TransmitIfEntry for the specified values.

In case a new XXXTimerIfEntry is added, this method has to be appropriately extended in order to cover the new data structure. Returns true on success and false otherwise.

2227 {
2228  Key key(dest, interfaceID, msgType);
2229  auto pos = transmitIfList.find(key);
2230 
2231  // return true if there is an entry
2232  // and false otherwise
2233  return pos != transmitIfList.end();
2234 }
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
void * Key
Definition: Macho.h:325
void inet::xMIPv6::processBAMessage ( BindingAcknowledgement ba,
IPv6ControlInfo ctrlInfo 
)
protected

Processes the received BA and creates tunnels or mobility header paths if appropriate.

11.5.1 After updating its home registration, the mobile node then updates associated mobility bindings in correspondent nodes that it is performing route optimization with as specified in Section 11.7.2.

Referenced by processMobilityMessage().

1158 {
1159  EV_TRACE << "\n<<<<<<<<<This is where BA gets processed>>>>>>>>>\n";
1160  //bool retransmitBU = false; // update 11.6.08 - CB
1161  IPv6Address& baSource = ctrlInfo->getSrcAddr();
1162  InterfaceEntry *ie = ift->getInterfaceById(ctrlInfo->getInterfaceId()); //the interface on which the BAck was received
1163 
1164  if (rt6->isMobileNode()) {
1165  if (!validateBAck(*ba, ctrlInfo)) {
1166  EV_INFO << "Discarding invalid BAck...\n";
1167  delete ctrlInfo;
1168  delete ba;
1169 
1170  // statistic collection
1171  /*if (baSource == ie->ipv6()->getHomeAgentAddress())
1172  statVectorBAfromHA.record(3);
1173  else
1174  statVectorBAfromCN.record(3);*/
1175 
1176  return;
1177  }
1178 
1179  /*11.7.3
1180  When a mobile node receives a packet carrying a valid Binding
1181  Acknowledgement, the mobile node MUST examine the Status field as
1182  follows:
1183  o If the Status field indicates that the Binding Update was accepted
1184  (the Status field is less than 128), then the mobile node MUST
1185  update the corresponding entry in its Binding Update List to
1186  indicate that the Binding Update has been acknowledged; the mobile
1187  node MUST then stop retransmitting the Binding Update.*/
1188  if (ba->getStatus() < 128) {
1189  // update 21.9.07 - CB
1190  EV_INFO << "Binding was accepted." << endl;
1191 
1192  // As the BU is obviously valid, we can remove the transmission timer for BU
1193  cancelTimerIfEntry(baSource, ie->getInterfaceId(), KEY_BU); // 11.06.08 - CB
1194 
1195  if (ba->getLifetime() == 0) { // BAck to deregistration BU
1196  if (baSource == ie->ipv6Data()->getHomeAgentAddress()) {
1197  /*11.5.4
1198  After receiving the Binding Acknowledgement for its Binding Update to
1199  its home agent, the mobile node MUST multicast onto the home link (to
1200  the all-nodes multicast address) a Neighbor Advertisement [12], to
1201  advertise the mobile node's own link-layer address for its own home
1202  address.*/
1204 
1205  // statistic collection
1206  /*statVectorBAfromHA.record(2);*/
1207  }
1208  /*else
1209  statVectorBAfromCN.record(2);*/
1210 
1211  // delete the entry from the BUL
1212  bul->removeBinding(baSource);
1213  // remove all timers related to this BA address
1214  removeTimerEntries(baSource, ctrlInfo->getInterfaceId()); // update 10.10.08 - CB
1215  }
1216  else {
1217  // binding with lifeTime >0 was accepted
1218 
1219  // moved the code below from sendBU(), 21.9.07 - CB
1220  // retrieve the appropriate BUL entry
1221  BindingUpdateList::BindingUpdateListEntry *entry = bul->lookup(ctrlInfo->getSrcAddr());
1222  ASSERT(entry != nullptr);
1223 
1224  // establish tunnel, but only if we have not already acked the BU before
1225  if (entry->BAck == false && entry->destAddress == ie->ipv6Data()->getHomeAgentAddress()) { // BA from HA
1226  removeCoAEntries(); // TODO would be better if this is done somewhere else or in a comletely different way
1227  interfaceCoAList[ie->getInterfaceId()] = entry->careOfAddress;
1228 
1229  tunneling->createTunnel(IPv6Tunneling::NORMAL, entry->careOfAddress, entry->destAddress); // update 10.06.08 - CB
1230  //bubble("Established tunnel to home agent.");
1231 
1237  // initiate RR for the CNs
1238  for (itCNList = cnList.begin(); itCNList != cnList.end(); itCNList++) { // run an iterator through the CN map
1239  IPv6Address& cnDest = *(itCNList);
1240 
1241  //entry->state = BindingUpdateList::RR;
1242  //if (!bul->isValidBinding(cnDest)) // to initiate HoTI/CoTI resending
1243  triggerRouteOptimization(cnDest, ie->ipv6Data()->getMNHomeAddress(), ie); // update 10.06.08 - CB
1244  }
1245 
1246  // statistic collection
1247  /*statVectorBAfromHA.record(1);*/
1248  }
1249  else if (entry->BAck == false) { // BA from CN
1250  tunneling->destroyTunnelForExitAndTrigger(entry->homeAddress, baSource);
1251  tunneling->createTunnel(IPv6Tunneling::HA_OPT, entry->careOfAddress, entry->homeAddress, baSource); // update 10.06.08 - CB
1252  //tunneling->createPseudoTunnel(CoA, bu->getHomeAddressMN(), dest, TUNNEL_HA_OPT);
1253  //bubble("Established Type 2 Routing Header path to CN.");
1254 
1255  // statistic collection
1256  /*statVectorBAfromCN.record(1);*/
1257 
1258  // fire event to MIH subscribers
1259  emit(NF_MIPv6_RO_COMPLETED, (cObject *)nullptr);
1260  }
1261 
1262  // set BAck flag in BUL
1263  entry->BAck = true;
1264 
1265  // set mobility state in BUL
1266  entry->state = BindingUpdateList::REGISTERED;
1267 
1268  /*11.7.3
1269  In addition, if the value specified in the Lifetime field in the
1270  Binding Acknowledgement is less than the Lifetime value sent in
1271  the Binding Update being acknowledged, the mobile node MUST
1272  subtract the difference between these two Lifetime values from the
1273  remaining lifetime for the binding as maintained in the
1274  corresponding Binding Update List entry (with a minimum value for
1275  the Binding Update List entry lifetime of 0). That is, if the
1276  Lifetime value sent in the Binding Update was L_update, the
1277  Lifetime value received in the Binding Acknowledgement was L_ack,
1278  and the current remaining lifetime of the Binding Update List
1279  entry is L_remain, then the new value for the remaining lifetime
1280  of the Binding Update List entry should be
1281  max((L_remain - (L_update - L_ack)), 0)
1282  where max(X, Y) is the maximum of X and Y.*/
1283  int l_ack = ba->getLifetime() * 4; /* 6.1.7 One time unit is 4 seconds. */
1284  int l_update = entry->bindingLifetime;
1285  int l_remain = entry->bindingLifetime - (SIMTIME_DBL(simTime() - entry->sentTime));
1286  int x = l_remain - (l_update - l_ack);
1287  entry->bindingLifetime = x > 0 ? x : 0;
1288  entry->bindingExpiry = simTime() + entry->bindingLifetime;
1289  // we schedule the timer that manages the BUL entry expiration
1290  // TODO currently we schedule the expiry message some seconds (PRE_BINDING_EXPIRY)
1291  // before the actual expiration. Can be improved.
1292  simtime_t scheduledTime = entry->bindingExpiry - PRE_BINDING_EXPIRY;
1293  scheduledTime = scheduledTime > 0 ? scheduledTime : 0;
1294 
1295  /*EV << "l_ack=" << l_ack << ", l_update=" << l_update << ", l_remain=" << l_remain << ", x=" << x << endl;
1296  EV << "entry->bindingLifetime=" << entry->bindingLifetime << " and entry->bindingExpiry=" << entry->bindingExpiry << endl;*/
1297  EV_DETAIL << "Scheduling BULEntryExpiryTimer for " << scheduledTime << endl;
1298  createBULEntryExpiryTimer(entry, ie, scheduledTime);
1299 
1300  // 11.06.08 - CB: rescheduling changed. Handled by BUL entry expiry.
1301  /*// reschedule the message if the BA is from a CN and not from the HA
1302  retransmitBU = (entry->destAddress != ie->ipv6()->getHomeAgentAddress());*/
1303 
1304  /*if (baSource == ie->ipv6()->getHomeAgentAddress())
1305  {
1306  // initiate RR for CNs moved to above
1307  }*/
1308  }
1309  }
1310  /*o If the Status field indicates that the Binding Update was rejected
1311  (the Status field is greater than or equal to 128), then the
1312  mobile node can take steps to correct the cause of the error and
1313  retransmit the Binding Update (with a new Sequence Number value),
1314  subject to the rate limiting restriction specified in Section
1315  11.8. If this is not done or it fails, then the mobile node
1316  SHOULD record in its Binding Update List that future Binding
1317  Updates SHOULD NOT be sent to this destination.*/
1318  else {
1319  EV_INFO << "Binding was rejected.\n";
1320 
1321  /*11.7.1
1322  If the home agent rejects the value, it sends back a
1323  Binding Acknowledgement with a status code 135, and the last accepted
1324  sequence number in the Sequence Number field of the Binding
1325  Acknowledgement. The mobile node MUST store this information and use
1326  the next Sequence Number value for the next Binding Update it sends.*/
1327 
1328  // retransmission is performed anyway as timers are not deleted
1329  // TODO store DO_NOT_SEND_BU in BUL
1330  }
1331  }
1332 
1333  // update 11.6.08 - CB: rescheduling of BU is now handled by BUL entry expiry
1334  // update 13.9.07 - CB
1335  // for now, we delete the BU transmission timer irrelevant of the status of the BA
1336  // TODO catch BA failure case
1337  /*
1338  int interfaceID = ctrlInfo->interfaceId();
1339  if (retransmitBU)
1340  resetBUIfEntry(baSource, interfaceID, retransmissionTime); // add bindingLifetime
1341  else
1342  cancelTransmitIfEntry(baSource, interfaceID, KEY_BU);
1343  */
1344 
1345  delete ctrlInfo;
1346  delete ba;
1347 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
Definition: IPv6Tunneling.h:54
#define KEY_BU
Definition: xMIPv6.h:50
#define PRE_BINDING_EXPIRY
Definition: BindingUpdateList.h:44
CNList cnList
Definition: xMIPv6.h:143
InterfaceCoAList interfaceCoAList
Definition: xMIPv6.h:139
void removeTimerEntries(const IPv6Address &dest, int interfaceId)
Removes timers of all types for the specified destination address and interfaceId.
Definition: xMIPv6.cc:2329
IInterfaceTable * ift
Definition: xMIPv6.h:77
virtual void triggerRouteOptimization(const IPv6Address &destAddress, const IPv6Address &HoA, InterfaceEntry *ie)
Alain Tigyo, 21.03.2008 The following method is used for triggering RO to a CN.
Definition: xMIPv6.cc:1387
void createBULEntryExpiryTimer(BindingUpdateList::BindingUpdateListEntry *entry, InterfaceEntry *ie, simtime_t scheduledTime)
Creates or overwrites a timer for BUL expiry that fires at provided scheduledTime.
Definition: xMIPv6.cc:2513
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
CNList::iterator itCNList
Definition: xMIPv6.h:144
int createTunnel(TunnelType tunnelType, const IPv6Address &src, const IPv6Address &dest, const IPv6Address &destTrigger=IPv6Address::UNSPECIFIED_ADDRESS)
Creates a tunnel with given entry and exit point, which will be used for datagrams destined for destT...
Definition: IPv6Tunneling.cc:110
simsignal_t NF_MIPv6_RO_COMPLETED
Definition: NotifierConsts.cc:86
bool isMobileNode() const
Determine whether a node is a Mobile Node or Correspondent Node: MN if TRUE or else a CN...
Definition: IPv6RoutingTable.h:181
Definition: IPv6Tunneling.h:52
bool validateBAck(const BindingAcknowledgement &ba, const IPv6ControlInfo *ctrlInfo)
Validates a Binding Acknowledgement for a mobile node.
Definition: xMIPv6.cc:1349
BindingUpdateList * bul
Definition: xMIPv6.h:79
IPv6NeighbourDiscovery * ipv6nd
Definition: xMIPv6.h:82
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
void destroyTunnelForExitAndTrigger(const IPv6Address &exit, const IPv6Address &trigger)
Remove the tunnel with the provided exit point and trigger.
Definition: IPv6Tunneling.cc:249
Definition: BindingUpdateList.h:57
virtual void removeBinding(const IPv6Address &dest)
Deletes an entry from the binding update list for the provided destination address.
Definition: BindingUpdateList.cc:365
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
void removeCoAEntries()
Remove all entries from the interfaceCoAList.
Definition: xMIPv6.cc:2386
virtual void sendUnsolicitedNA(InterfaceEntry *ie)
Definition: IPv6NeighbourDiscovery.cc:2090
void inet::xMIPv6::processBRRMessage ( BindingRefreshRequest brr,
IPv6ControlInfo ctrlInfo 
)
protected

Processes the Binding Refresh Message.

Referenced by processMobilityMessage().

2491 {
2492  /*11.7.4
2493  When a mobile node receives a packet containing a Binding Refresh
2494  Request message, the mobile node has a Binding Update List entry for
2495  the source of the Binding Refresh Request, and the mobile node wants
2496  to retain its binding cache entry at the correspondent node, then the
2497  mobile node should start a return routability procedure.*/
2498  IPv6Address& cnAddress = ctrlInfo->getSrcAddr();
2499  IPv6Address& HoA = ctrlInfo->getDestAddr();
2500 
2501  if (!bul->isInBindingUpdateList(cnAddress, HoA)) {
2502  EV_WARN << "BRR not accepted - no binding for this CN. Dropping message." << endl;
2503  }
2504  else {
2505  InterfaceEntry *ie = ift->getInterfaceById(ctrlInfo->getInterfaceId());
2506  initReturnRoutability(cnAddress, ie);
2507  }
2508 
2509  delete brr;
2510  delete ctrlInfo;
2511 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
IInterfaceTable * ift
Definition: xMIPv6.h:77
BindingUpdateList * bul
Definition: xMIPv6.h:79
virtual void initReturnRoutability(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates HoTI and CoTI messages and sends them to the CN if timers are not already existing...
Definition: xMIPv6.cc:1423
virtual bool isInBindingUpdateList(const IPv6Address &dest) const
Checks whether there exists an entry in the BUL for the given destination address.
Definition: BindingUpdateList.cc:298
void inet::xMIPv6::processBUMessage ( BindingUpdate bu,
IPv6ControlInfo ctrlInfo 
)
protected

Process a BU - only applicable to HAs and CNs.

Referenced by processMobilityMessage().

703 {
704  EV_INFO << "Entered BU processing method" << endl;
705 
706  /*if ((!rt6->isMobileNode() && !rt6->isRouter() && !rt6->isHomeAgent()) ||
707  (rt6->isRouter() && rt6->isHomeAgent() && !rt6->isMobileNode())
708  ) // if node is either HA or CN, only then a BA is sent otherwise not.
709  */
710  // BA is not sent when node is a mobile node and not a HA at the same time
711  if (rt6->isMobileNode() && !rt6->isHomeAgent()) { // rewrote condition to make it more clear - CB
712  EV_WARN << "Wrong Node: not HA or CN" << endl;
713 
714  if (hasGUI())
715  bubble("Wrong Node: not HA or CN");
716 
717  delete bu;
718  delete ctrlInfo;
719  return;
720  }
721 
722  BAStatus status;
723  bool validBUMessage;
724  validBUMessage = validateBUMessage(bu, ctrlInfo);
725 
726  if (validBUMessage) {
727  IPv6Address& HoA = bu->getHomeAddressMN();
728  IPv6Address& CoA = ctrlInfo->getSrcAddr();
729  IPv6Address& destAddress = ctrlInfo->getDestAddr();
730  uint buLifetime = bu->getLifetime() * 4; /* 6.1.7 One time unit is 4 seconds. */
731  uint buSequence = bu->getSequence();
732  bool homeRegistration = bu->getHomeRegistrationFlag();
733 
734  // UPDATE, 4.9.07
735  // handling for binding de-registration
736 
737  /*9.5.1
738  If the Lifetime specified in the Binding Update is zero or the
739  specified care-of address matches the home address for the
740  binding, then this is a request to delete the cached binding for
741  the home address. [...] If the Home Registration (H) bit is set
742  in the Binding Update, the Binding Update is processed according
743  to the procedure specified in Section 10.3.2; otherwise, it is
744  processed according to the procedure specified in Section 9.5.3.*/
745  if ((buLifetime == 0) || (CoA == HoA)) {
746  // Check home registration flag -> not much difference in Section 10.3.2 and 9.5.3 for our purpose
747 
748  // de-register binding
749  if (rt6->isHomeAgent() && !validateBUderegisterMessage(bu, ctrlInfo)) { // HAs have to validate the BU
750  /* If the receiving node has no entry marked as a home registration
751  in its Binding Cache for this mobile node, then this node MUST
752  reject the Binding Update and SHOULD return a Binding
753  Acknowledgement to the mobile node, in which the Status field is
754  set to 133 (not home agent for this mobile node).*/
755  status = NOT_HA_FOR_THIS_MN; //enum defined in MobilityHeader.msg file
756  uint baSeqNumber = bu->getSequence(); //the sequence number from Rxed BU is copied into BA.
757  createAndSendBAMessage(destAddress, CoA, ctrlInfo, status,
758  bu->getBindingAuthorizationData(), baSeqNumber, buLifetime); // swapped src and dest, 4.9.07 - CB, update lifeTime 14.9.07 - CB
759  EV_ERROR << "Not HA for this MN. Responding with appropirate BA...\n";
760  delete bu;
761  delete ctrlInfo;
762  return;
763  }
764  /*9.5.3
765  Any existing binding for the given home address MUST be deleted. A
766  Binding Cache entry for the home address MUST NOT be created in
767  response to receiving the Binding Update.*/
768  /*10.3.2
769  If the home agent does not reject the Binding Update as described
770  above, then it MUST delete any existing entry in its Binding Cache
771  for this mobile node.*/
772  bc->deleteEntry(HoA);
773 
774  /*In addition, the home agent MUST stop intercepting packets on the
775  mobile node's home link that are addressed to the mobile node*/
776  // of course this is also true for CNs
778 
779  // kill BC expiry timer
780  cancelTimerIfEntry(HoA, ctrlInfo->getInterfaceId(), KEY_BC_EXP);
781 
782  /*10.3.2
783  Then, the home agent MUST return a Binding Acknowledgement to the mobile node */
784  /*9.5.4
785  o If the Acknowledge (A) bit set is set in the Binding Update, a
786  Binding Acknowledgement MUST be sent.*/
787  if (rt6->isHomeAgent() || bu->getAckFlag()) {
788  /*constructed as follows:
789  o The Status field MUST be set to a value 0, indicating success.*/
790  status = BINDING_UPDATE_ACCEPTED; //enum defined in MobilityHeader.msg file
791  /*o The Sequence Number field MUST be copied from the Sequence Number
792  given in the Binding Update.*/
793  uint baSeqNumber = bu->getSequence();
794  /*o The Lifetime field MUST be set to zero.*/
795  uint lifeTime = 0;
796 
797  /*//The following was omitted://
798  o The Key Management Mobility Capability (K) bit is set or cleared
799  and actions based on its value are performed as described in the
800  previous section. The mobile node's home address is used as its
801  new care-of address for the purposes of moving the key management
802  connection to a new endpoint.
803  o The Binding Refresh Advice mobility option MUST be omitted.*/
804  createAndSendBAMessage(destAddress, CoA, ctrlInfo, status, baSeqNumber,
805  bu->getBindingAuthorizationData(), lifeTime); // swapped src and dest, 4.9.07 - CB
806  }
807 
808  if (!rt6->isHomeAgent()) { // this is a CN, 18.9.07 - CB
809  // cancel existing Binding Refresh Request timer
810  // (if there exists one)
811  int interfaceID = ctrlInfo->getInterfaceId();
812  cancelTimerIfEntry(HoA, interfaceID, KEY_BR);
813  }
814 
815  EV_INFO << "Deregistered binding\n";
816  bubble("Deregistered binding!");
817  }
818  else {
819  // update 10.9.07 - CB
820 
821  // binding lifetime is nonzero
822  /*9.5.1
823  If the Lifetime specified in the Binding Update is nonzero and the
824  specified care-of address is not equal to the home address for the
825  binding, then this is a request to cache a binding for the home
826  address. If the Home Registration (H) bit is set in the Binding
827  Update, the Binding Update is processed according to the procedure
828  specified in Section 10.3.1; otherwise, it is processed according
829  to the procedure specified in Section 9.5.2.*/
830  if (homeRegistration) {
831  /* 10.3.1
832  o If the node implements only correspondent node functionality, or
833  has not been configured to act as a home agent, then the node MUST
834  reject the Binding Update. The node MUST also return a Binding
835  Acknowledgement to the mobile node, in which the Status field is
836  set to 131 (home registration not supported).*/
837  if (!rt6->isHomeAgent()) {
838  status = HOME_REGISTRATION_NOT_SUPPORTED; //enum defined in MobilityHeader.msg file
839  uint baSeqNumber = bu->getSequence();
840  uint lifeTime = 0;
841  createAndSendBAMessage(destAddress, CoA, ctrlInfo, status, baSeqNumber,
842  bu->getBindingAuthorizationData(), lifeTime);
843 
844  delete bu;
845  delete ctrlInfo;
846  return;
847  }
848  else if (!rt6->isOnLinkAddress(HoA)) { // update 11.9.07 - CB
849  /*Else, if the home address for the binding (the Home Address field
850  in the packet's Home Address option) is not an on-link IPv6
851  address with respect to the home agent's current Prefix List, then
852  the home agent MUST reject the Binding Update and SHOULD return a
853  Binding Acknowledgement to the mobile node, in which the Status
854  field is set to 132 (not home subnet).*/
855  status = NOT_HOME_SUBNET; //enum defined in MobilityHeader.msg file
856  uint baSeqNumber = bu->getSequence();
857  uint lifeTime = 0;
858  createAndSendBAMessage(destAddress, CoA, ctrlInfo, status, baSeqNumber,
859  bu->getBindingAuthorizationData(), lifeTime);
860 
861  delete bu;
862  delete ctrlInfo;
863  return;
864  }
865  }
866 
867  bool existingBinding = bc->isInBindingCache(HoA);
868  bc->addOrUpdateBC(HoA, CoA, buLifetime, buSequence, homeRegistration); // moved to there, 11.9.07 - CB
869  // for both HA and CN we create a BCE expiry timer
870  createBCEntryExpiryTimer(HoA, ift->getInterfaceById(ctrlInfo->getInterfaceId()), simTime() + buLifetime);
871 
872  /*10.3.1
873  Regardless of the setting of the Acknowledge (A) bit in the Binding
874  Update, the home agent MUST return a Binding Acknowledgement to the
875  mobile node*/
876  /*9.5.4
877  If the Acknowledge (A) bit set is set in the Binding Update, a
878  Binding Acknowledgement MUST be sent. Otherwise, the treatment
879  depends on the below rule.*/
880  if (bu->getAckFlag() || rt6->isHomeAgent()) {
881  /*10.3.1
882  The Status field MUST be set to a value indicating success. The
883  value 1 (accepted but prefix discovery necessary) MUST be used if
884  the subnet prefix of the specified home address is deprecated, or
885  becomes deprecated during the lifetime of the binding, or becomes
886  invalid at the end of the lifetime. The value 0 MUST be used
887  otherwise. For the purposes of comparing the binding and prefix
888  lifetimes, the prefix lifetimes are first converted into units of
889  four seconds by ignoring the two least significant bits.*/
890  status = BINDING_UPDATE_ACCEPTED; //enum defined in MobilityHeader.msg file
891  /*The Sequence Number field MUST be copied from the Sequence Number
892  given in the Binding Update.*/
893  uint baSeqNumber = bu->getSequence();
894  /*The Lifetime field MUST be set to the remaining lifetime for the
895  binding as set by the home agent in its home registration Binding
896  Cache entry for the mobile node, as described above.*/
897  uint lifeTime = bc->getLifetime(HoA);
898 
899  /* 10.3.1
900  Unless this home agent already has a binding for the given home
901  address, the home agent MUST perform Duplicate Address Detection [13]
902  on the mobile node's home link before returning the Binding
903  Acknowledgement.*/
904  simtime_t sendTime;
905  if (rt6->isHomeAgent())
906  // HA has to do DAD in case this is a new binding for this HoA
907  sendTime = existingBinding ? 0 : 1;
908  else
909  sendTime = 0;
910 
911  createAndSendBAMessage(destAddress, CoA, ctrlInfo, status, baSeqNumber,
912  //bu->getBindingAuthorizationData(), 15, sendTime); // swapped src and dest, 4.9.07 - CB
913  bu->getBindingAuthorizationData(), lifeTime, sendTime); // swapped src and dest, 4.9.07 - CB // corrected lifetime value 18.06.08 - CB
914 
915  /*If this Duplicate Address Detection fails for the given
916  home address or an associated link local address, then the home agent
917  MUST reject the complete Binding Update and MUST return a Binding
918  Acknowledgement to the mobile node, in which the Status field is set
919  to 134 (Duplicate Address Detection failed).*/
920  // TODO
921  }
922  else { // condition: ! bu->getAckFlag()
923  EV_INFO << "BU Validated as OK: ACK FLAG NOT SET" << endl;
924  bubble("!!!BU VALID --- ACK FLAG = False !!!");
925  }
926 
927  if (rt6->isHomeAgent()) { // establish tunnel to MN - CB
928  IPv6Address& HA = destAddress;
929 
930  // we first destroy the already existing tunnel if
931  // there exists one
933 
935  //bubble("Established tunnel to mobile node.");
936  }
937  else { // CN, update 18.9.07 - CB
938  // we first destroy the already existing RH2 path if
939  // there exists one
940  IPv6Address& CNAddress = destAddress;
942 
943  // establish RH2 pseudo-tunnel at correspondent node - CB
944  tunneling->createTunnel(IPv6Tunneling::T2RH, CNAddress, CoA, HoA); // update 10.06.08 - CB
945 
946  // cancel existing Binding Refresh Request timer
947  // (if there exists one)
948  int interfaceID = ctrlInfo->getInterfaceId();
949  cancelTimerIfEntry(HoA, interfaceID, KEY_BR);
950 
951  // and then we initialize a (new) BRR timer that gets
952  // fired as soon as the BU lifetime is closing to 0.
953  // Then we send Binding Refresh Requests once again
954  // until we receive a valid BU.
955  // FOX uncommented BRR below
956  //InterfaceEntry *ie = ift->interfaceAt(interfaceID);
957  //createBRRTimer(HoA, ie, buLifetime - BRR_TIMEOUT_THRESHOLD); // 18.9.07 - CB
958  //createBRRTimer(HoA, ie, BRR_TIMEOUT_THRESHOLD); // 18.9.07 - CB
959  }
960  }
961  }
962  else {
963  EV_WARN << "BU Validation Failed: Dropping message" << endl;
964  bubble("BU Validation Failed: Dropping Packet");
965  }
966 
967  delete bu;
968  delete ctrlInfo;
969 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
void createAndSendBAMessage(const IPv6Address &src, const IPv6Address &dest, IPv6ControlInfo *ctrlInfo, const BAStatus &baStatus, const uint baSeq, const int bindingAuthorizationData, const uint lifeTime, simtime_t sendTime=0)
Constructs and send a BA to the IPv6 module.
Definition: xMIPv6.cc:1090
void deleteEntry(IPv6Address &HoA)
Added by CB, 4.9.07 Delete the entry from the cache with the provided HoA.
Definition: BindingCache.cc:101
Definition: MobilityHeader_m.h:211
IInterfaceTable * ift
Definition: xMIPv6.h:77
uint getLifetime(const IPv6Address &HoA) const
Returns the lifetime of the binding for the given HoA.
Definition: BindingCache.cc:119
unsigned int uint
Definition: INETDefs.h:63
#define KEY_BC_EXP
Definition: xMIPv6.h:55
BAStatus
Enum generated from inet/networklayer/xmipv6/MobilityHeader.msg:77 by nedtool.
Definition: MobilityHeader_m.h:204
bool isOnLinkAddress(const IPv6Address &address)
Checks whether the provided address is in an on-link address with respect to the prefix advertisement...
Definition: IPv6RoutingTable.cc:835
int createTunnel(TunnelType tunnelType, const IPv6Address &src, const IPv6Address &dest, const IPv6Address &destTrigger=IPv6Address::UNSPECIFIED_ADDRESS)
Creates a tunnel with given entry and exit point, which will be used for datagrams destined for destT...
Definition: IPv6Tunneling.cc:110
bool isMobileNode() const
Determine whether a node is a Mobile Node or Correspondent Node: MN if TRUE or else a CN...
Definition: IPv6RoutingTable.h:181
Definition: IPv6Tunneling.h:53
Definition: IPv6Tunneling.h:52
void addOrUpdateBC(const IPv6Address &hoa, const IPv6Address &coa, const uint lifetime, const uint seq, bool homeReg)
Sets Binding Cache Entry (BCE) with provided values.
Definition: BindingCache.cc:58
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
Definition: MobilityHeader_m.h:212
bool validateBUMessage(BindingUpdate *bu, IPv6ControlInfo *ctrlInfo)
Validate a BU - only applicable to HAs and CNs.
Definition: xMIPv6.cc:971
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
void createBCEntryExpiryTimer(IPv6Address &HoA, InterfaceEntry *ie, simtime_t scheduledTime)
Creates or overwrites a timer for BC expiry that fires at provided scheduledTime. ...
Definition: xMIPv6.cc:2623
bool validateBUderegisterMessage(BindingUpdate *bu, IPv6ControlInfo *ctrlInfo)
Similiar to validateBUMessage().
Definition: xMIPv6.cc:1076
void destroyTunnelFromTrigger(const IPv6Address &trigger)
Remove the tunnel with the provided destination trigger.
Definition: IPv6Tunneling.cc:296
bool isInBindingCache(const IPv6Address &HoA, IPv6Address &CoA) const
Added by CB, 29.08.07 Checks whether there is an entry in the BC for the given HoA and CoA...
Definition: BindingCache.cc:86
Definition: MobilityHeader_m.h:205
bool isHomeAgent() const
Determine whether normal Router or Home Agent.
Definition: IPv6RoutingTable.h:170
BindingCache * bc
Definition: xMIPv6.h:80
Definition: MobilityHeader_m.h:210
#define KEY_BR
Definition: xMIPv6.h:53
void destroyTunnelForEntryAndTrigger(const IPv6Address &entry, const IPv6Address &trigger)
Remove the tunnel with the provided entry point and trigger.
Definition: IPv6Tunneling.cc:264
void inet::xMIPv6::processCoTIMessage ( CareOfTestInit CoTI,
IPv6ControlInfo ctrlInfo 
)
protected

Create and send a CoT message.

Referenced by processMobilityMessage().

1765 {
1766  // 9.4.2 & 9.4.4
1767  IPv6Address& CoA = ctrlInfo->getDestAddr();
1768 
1769  CareOfTest *CoT = new CareOfTest("CoT");
1770  CoT->setMobilityHeaderType(CARE_OF_TEST);
1771  CoT->setCareOfInitCookie(CoTI->getCareOfInitCookie());
1772  CoT->setCareOfKeyGenToken(bc->generateCareOfToken(CoA, 0)); // TODO nonce
1773  // setting message size, 10.09.07 - CB
1774  CoT->setByteLength(SIZE_MOBILITY_HEADER + SIZE_COT);
1775 
1776  EV_INFO << "\n<<======CoT MESSAGE FORMED; APPENDING CONTROL INFO=====>>\n";
1777  sendMobilityMessageToIPv6Module(CoT, ctrlInfo->getSrcAddr(), ctrlInfo->getDestAddr());
1778 
1779  // statistic collection
1780  /*statVectorCoTtoMN.record(1);*/
1781 
1782  delete CoTI;
1783  delete ctrlInfo;
1784 }
Definition: MobilityHeader_m.h:62
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
virtual int generateCareOfToken(const IPv6Address &CoA, int nonce)
Generates a care-of token from the provided parameters.
Definition: BindingCache.cc:134
BindingCache * bc
Definition: xMIPv6.h:80
#define SIZE_COT
Definition: xMIPv6.cc:63
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::processCoTMessage ( CareOfTest CoT,
IPv6ControlInfo ctrlInfo 
)
protected

Like processHoTMessage(), but related to CoT.

Referenced by processMobilityMessage().

1873 {
1874  if (!validateCoTMessage(*CoT, ctrlInfo))
1875  EV_WARN << "CoT validation not passed: dropping message" << endl;
1876  else {
1877  EV_INFO << "CoT validation passed: updating BUL" << endl;
1878 
1879  IPv6Address& srcAddr = ctrlInfo->getSrcAddr();
1880  //IPv6Address& destAddr = ctrlInfo->destAddr();
1881  int interfaceID = ctrlInfo->getInterfaceId();
1882  InterfaceEntry *ie = ift->getInterfaceById(interfaceID);
1883 
1884  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->lookup(srcAddr);
1885  ASSERT(bulEntry != nullptr);
1886 
1887  // cancel the existing CoTI retransmission timer
1888  cancelTimerIfEntry(srcAddr, interfaceID, KEY_CI);
1889 
1890  // set the care-of keygen token
1891  bulEntry->tokenC = CoT->getCareOfKeyGenToken();
1892 
1893  // 10.07.08 - CB
1894  // set token expiry appropriately
1896  simTime() + ie->ipv6Data()->_getMaxTokenLifeTime());
1897 
1898  // if we have the home token as well, we can send the BU to the CN now
1899  // but only if we have already sent or are about to send a BU, 26.10.07
1900 
1901  // call method that potentially sends BU now
1902  checkForBUtoCN(*bulEntry, ie);
1903 
1904  // reset the CoTI timer for the time the token expires
1905  //resetTestInitIfEntry(srcAddr, interfaceID, KEY_CI);
1906 
1907  /*// delete the CoT retransmission timer
1908  cancelTimerIfEntry(srcAddr, interfaceID, KEY_CI);*/
1909 
1910  // gather statistics
1911  /*statVectorCoTfromCN.record(1);*/
1912  }
1913 
1914  delete CoT;
1915  delete ctrlInfo;
1916 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
void createCareOfTokenEntryExpiryTimer(IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime)
Creates or overwrites a timer for care-of keygen token expiry that fires at provided scheduledTime...
Definition: xMIPv6.h:542
IInterfaceTable * ift
Definition: xMIPv6.h:77
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
#define KEY_CI
Definition: xMIPv6.h:52
BindingUpdateList * bul
Definition: xMIPv6.h:79
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
bool checkForBUtoCN(BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
Send a BU depending on current status of:
Definition: xMIPv6.cc:1968
uint _getMaxTokenLifeTime() const
Definition: IPv6InterfaceData.h:612
IPv6InterfaceData * ipv6Data() const
Definition: InterfaceEntry.h:223
bool validateCoTMessage(const CareOfTest &CoT, const IPv6ControlInfo *ctrlInfo)
Like validateHoTMessage(), but related to CoT.
Definition: xMIPv6.cc:1918
void inet::xMIPv6::processHoAOpt ( IPv6Datagram datagram,
HomeAddressOption hoaOpt 
)
protected

Process the Home Address Option which belongs to the provided datagram.

Swaps the addresses between the original source address of the datagram and the field in the option.

Referenced by handleMessage().

2142 {
2143  // datagram from MN to CN
2144  bool validHoAOpt = false;
2145  IPv6Address& HoA = hoaOpt->getHomeAddress();
2146  IPv6Address& CoA = datagram->getSrcAddress();
2147 
2148  /*9.3.1
2149  Packets containing a
2150  Home Address option MUST be dropped if there is no corresponding
2151  Binding Cache entry. A corresponding Binding Cache entry MUST have
2152  the same home address as appears in the Home Address destination
2153  option, and the currently registered care-of address MUST be equal to
2154  the source address of the packet.*/
2155  ASSERT(bc != nullptr);
2156 
2157  if (bc->isInBindingCache(HoA, CoA)) {
2158  datagram->setSrcAddress(HoA);
2159  validHoAOpt = true;
2160  }
2161  else {
2162  EV_WARN << "Invalid RH2 destination - no entry in binding cache. Dropping packet." << endl;
2163 
2164  /*If the packet is dropped due the above tests, the correspondent node
2165  MUST send the Binding Error message as described in Section 9.3.3.
2166  The Status field in this message should be set to 1 (unknown binding
2167  for Home Address destination option).*/
2168  // update 12.9.07 - CB
2169  // previous code was erroneous, as destination from packet is probably
2170  // not a valid address of the interfaces of this node
2172  createAndSendBEMessage(CoA, status);
2173  }
2174 
2175  delete hoaOpt;
2176 
2177  if (validHoAOpt) {
2178  EV_INFO << "Valid HoA Option - copied address from HoA Option to datagram" << endl;
2179  send(datagram, "toIPv6");
2180  }
2181  else
2182  delete datagram;
2183 }
void createAndSendBEMessage(const IPv6Address &dest, const BEStatus &beStatus)
Creates and sends Binding Error message.
Definition: xMIPv6.cc:2185
BEStatus
Enum generated from inet/networklayer/xmipv6/MobilityHeader.msg:112 by nedtool.
Definition: MobilityHeader_m.h:293
Definition: MobilityHeader_m.h:294
bool isInBindingCache(const IPv6Address &HoA, IPv6Address &CoA) const
Added by CB, 29.08.07 Checks whether there is an entry in the BC for the given HoA and CoA...
Definition: BindingCache.cc:86
BindingCache * bc
Definition: xMIPv6.h:80
void inet::xMIPv6::processHoTIMessage ( HomeTestInit HoTI,
IPv6ControlInfo ctrlInfo 
)
protected

Create and send a HoT message.

Referenced by processMobilityMessage().

1743 {
1744  // 9.4.1 & 9.4.3
1745  IPv6Address& HoA = ctrlInfo->getDestAddr();
1746 
1747  HomeTest *HoT = new HomeTest("HoT");
1748  HoT->setMobilityHeaderType(HOME_TEST);
1749  HoT->setHomeInitCookie(HoTI->getHomeInitCookie());
1750  HoT->setHomeKeyGenToken(bc->generateHomeToken(HoA, 0)); // TODO nonce
1751  // setting message size, 10.09.07 - CB
1752  HoT->setByteLength(SIZE_MOBILITY_HEADER + SIZE_HOT);
1753 
1754  EV_INFO << "\n<<======HoT MESSAGE FORMED; APPENDING CONTROL INFO=====>>\n";
1755  sendMobilityMessageToIPv6Module(HoT, ctrlInfo->getSrcAddr(), ctrlInfo->getDestAddr());
1756 
1757  // statistic collection
1758  /*statVectorHoTtoMN.record(1);*/
1759 
1760  delete HoTI;
1761  delete ctrlInfo;
1762 }
#define SIZE_HOT
Definition: xMIPv6.cc:62
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
virtual int generateHomeToken(const IPv6Address &HoA, int nonce)
Generates a home token from the provided parameters.
Definition: BindingCache.cc:129
Definition: MobilityHeader_m.h:61
BindingCache * bc
Definition: xMIPv6.h:80
#define SIZE_MOBILITY_HEADER
Definition: xMIPv6.cc:54
void inet::xMIPv6::processHoTMessage ( HomeTest HoT,
IPv6ControlInfo ctrlInfo 
)
protected

First verifies a received HoT message and sends a BU to the CN if the care-of keygen token is available as well.

Retransmission of HoTI message is rescheduled.

Referenced by processMobilityMessage().

1787 {
1788  if (!validateHoTMessage(*HoT, ctrlInfo))
1789  EV_WARN << "HoT validation not passed: dropping message" << endl;
1790  else {
1791  EV_WARN << "HoT validation passed: updating BUL" << endl;
1792  IPv6Address& srcAddr = ctrlInfo->getSrcAddr();
1793  //IPv6Address& destAddr = ctrlInfo->destAddr();
1794  int interfaceID = ctrlInfo->getInterfaceId();
1795  InterfaceEntry *ie = ift->getInterfaceById(interfaceID);
1796 
1797  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->lookup(srcAddr);
1798  ASSERT(bulEntry != nullptr);
1799 
1800  // cancel the existing HoTI retransmission timer
1801  cancelTimerIfEntry(srcAddr, interfaceID, KEY_HI);
1802 
1803  // set the home keygen token
1804  bulEntry->tokenH = HoT->getHomeKeyGenToken();
1805 
1806  // 10.07.08 - CB
1807  // set token expiry appropriately
1808  createHomeTokenEntryExpiryTimer(srcAddr, ift->getInterfaceById(interfaceID),
1809  simTime() + ie->ipv6Data()->_getMaxTokenLifeTime());
1810 
1811  // if we have the care-of token as well, we can send the BU to the CN now
1812  // but only if we have not already sent or are about to send a BU, 26.10.07
1813  // 21.07.08 - CB
1814  // call method that potentially sends a BU now
1815  checkForBUtoCN(*bulEntry, ie);
1816 
1817  // gather statistics
1818  /*statVectorHoTfromCN.record(1);*/
1819  }
1820 
1821  delete HoT;
1822  delete ctrlInfo;
1823 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
IInterfaceTable * ift
Definition: xMIPv6.h:77
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
bool validateHoTMessage(const HomeTest &HoT, const IPv6ControlInfo *ctrlInfo)
Verifies a HoT according to the RFC, Section 11.6.2.
Definition: xMIPv6.cc:1825
BindingUpdateList * bul
Definition: xMIPv6.h:79
void createHomeTokenEntryExpiryTimer(IPv6Address &cnAddr, InterfaceEntry *ie, simtime_t scheduledTime)
Creates or overwrites a timer for home keygen token expiry that fires at provided scheduledTime...
Definition: xMIPv6.h:534
#define KEY_HI
Definition: xMIPv6.h:51
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
bool checkForBUtoCN(BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
Send a BU depending on current status of:
Definition: xMIPv6.cc:1968
uint _getMaxTokenLifeTime() const
Definition: IPv6InterfaceData.h:612
IPv6InterfaceData * ipv6Data() const
Definition: InterfaceEntry.h:223
void inet::xMIPv6::processMobilityMessage ( MobilityHeader mipv6Msg,
IPv6ControlInfo ctrlInfo 
)
protected

This is where all the mobility messages are sifted through and sent to appropriate functions for processing.

Referenced by handleMessage().

201 {
202  EV_INFO << "Processing of MIPv6 related mobility message" << endl;
203 
204  if (dynamic_cast<BindingUpdate *>(mipv6Msg)) {
205  EV_INFO << "Message recognised as BINDING UPDATE (BU)" << endl;
206  //EV << "\n<<<<<<<<Giving Control to processBUMessage()>>>>>>>\n";
207  BindingUpdate *bu = (BindingUpdate *)mipv6Msg;
208  processBUMessage(bu, ctrlInfo);
209  }
210  else if (dynamic_cast<BindingAcknowledgement *>(mipv6Msg)) {
211  EV_INFO << "Message recognised as BINDING ACKNOWLEDGEMENT (BA)" << endl;
212  //EV << "\n<<<<<<<<Giving Control to processBAMessage()>>>>>>>\n";
213  BindingAcknowledgement *ba = (BindingAcknowledgement *)mipv6Msg;
214  processBAMessage(ba, ctrlInfo);
215  }
216  // 28.08.07 - CB
217  else if (dynamic_cast<HomeTestInit *>(mipv6Msg)) {
218  EV_INFO << "Message recognised as HOME TEST INIT (HoTI)" << endl;
219  processHoTIMessage((HomeTestInit *)mipv6Msg, ctrlInfo);
220  }
221  else if (dynamic_cast<CareOfTestInit *>(mipv6Msg)) {
222  EV_INFO << "Message recognised as CARE-OF TEST INIT (CoTI)" << endl;
223  processCoTIMessage((CareOfTestInit *)mipv6Msg, ctrlInfo);
224  }
225  else if (dynamic_cast<HomeTest *>(mipv6Msg)) {
226  EV_INFO << "Message recognised as HOME TEST (HoT)" << endl;
227  processHoTMessage((HomeTest *)mipv6Msg, ctrlInfo);
228  }
229  else if (dynamic_cast<CareOfTest *>(mipv6Msg)) {
230  EV_INFO << "Message recognised as CARE-OF TEST (CoT)" << endl;
231  processCoTMessage((CareOfTest *)mipv6Msg, ctrlInfo);
232  }
233  else if (dynamic_cast<BindingRefreshRequest *>(mipv6Msg)) {
234  EV_INFO << "Message recognised as Binding Refresh Request" << endl;
235  processBRRMessage((BindingRefreshRequest *)mipv6Msg, ctrlInfo);
236  }
237  else {
238  EV_WARN << "Unrecognised mobility message... Dropping" << endl;
239  delete ctrlInfo;
240  delete mipv6Msg;
241  }
242 }
void processHoTMessage(HomeTest *HoT, IPv6ControlInfo *ctrlInfo)
First verifies a received HoT message and sends a BU to the CN if the care-of keygen token is availab...
Definition: xMIPv6.cc:1786
void processBUMessage(BindingUpdate *bu, IPv6ControlInfo *ctrlInfo)
Process a BU - only applicable to HAs and CNs.
Definition: xMIPv6.cc:702
void processBAMessage(BindingAcknowledgement *ba, IPv6ControlInfo *ctrlInfo)
Processes the received BA and creates tunnels or mobility header paths if appropriate.
Definition: xMIPv6.cc:1157
void processCoTIMessage(CareOfTestInit *CoTI, IPv6ControlInfo *ctrlInfo)
Create and send a CoT message.
Definition: xMIPv6.cc:1764
void processBRRMessage(BindingRefreshRequest *brr, IPv6ControlInfo *ctrlInfo)
Processes the Binding Refresh Message.
Definition: xMIPv6.cc:2490
void processCoTMessage(CareOfTest *CoT, IPv6ControlInfo *ctrlInfo)
Like processHoTMessage(), but related to CoT.
Definition: xMIPv6.cc:1872
void processHoTIMessage(HomeTestInit *HoTI, IPv6ControlInfo *ctrlInfo)
Create and send a HoT message.
Definition: xMIPv6.cc:1742
void inet::xMIPv6::processType2RH ( IPv6Datagram datagram,
IPv6RoutingHeader rh 
)
protected

Process the Type 2 Routing Header which belongs to the provided datagram.

Swaps the addresses between the original destination address of the datagram and the field in the routing header.

Referenced by handleMessage().

2051 {
2052  //EV << "Processing RH2..." << endl;
2053 
2054  if (!validateType2RH(*datagram, *rh)) {
2055  delete rh;
2056  delete datagram;
2057  return;
2058  }
2059 
2060  bool validRH2 = false;
2061  IPv6Address& HoA = rh->getAddress(0);
2062 
2063  /*11.3.3
2064  A node receiving a packet addressed to itself (i.e., one of the
2065  node's addresses is in the IPv6 destination field) follows the next
2066  header chain of headers and processes them. When it encounters a
2067  type 2 routing header during this processing, it performs the
2068  following checks. If any of these checks fail, the node MUST
2069  silently discard the packet.*/
2070 
2071  /*The length field in the routing header is exactly 2.*/
2072  // omitted
2073 
2074  /*The segments left field in the routing header is 1 on the wire.*/
2075  if (rh->getSegmentsLeft() != 1) {
2076  EV_WARN << "Invalid RH2 - segments left field must be 1. Dropping packet." << endl;
2077  delete datagram;
2078  return;
2079  }
2080 
2081  // probably datagram from CN to MN
2082 
2083  /*The Home Address field in the routing header is one of the node's
2084  home addresses, if the segments left field was 1. Thus, in
2085  particular the address field is required to be a unicast routable
2086  address.*/
2087  if (rt6->isHomeAddress(HoA)) {
2088  /*Once the above checks have been performed, the node swaps the IPv6
2089  destination field with the Home Address field in the routing header,
2090  decrements segments left by one from the value it had on the wire,
2091  and resubmits the packet to IP for processing the next header.*/
2092  datagram->setDestAddress(HoA);
2093  validRH2 = true;
2094  }
2095  else {
2096  /*If any of these checks fail, the node MUST
2097  silently discard the packet.*/
2098  //delete datagram; // update 12.09.07 - CB
2099  EV_WARN << "Invalid RH2 - not a HoA. Dropping packet." << endl;
2100  }
2101 
2102  delete rh;
2103 
2104  if (validRH2) {
2105  EV_INFO << "Valid RH2 - copied address from RH2 to datagram" << endl;
2106  send(datagram, "toIPv6");
2107  }
2108  else // update 12.09.07 - CB
2109  delete datagram;
2110 }
bool isHomeAddress(const IPv6Address &addr)
Check whether provided address is a HoA.
Definition: IPv6RoutingTable.cc:776
bool validateType2RH(const IPv6Datagram &datagram, const IPv6RoutingHeader &rh)
Perform validity checks according to RFC 3775 - Section 6.4.
Definition: xMIPv6.cc:2112
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
void inet::xMIPv6::removeCoAEntries ( )
protected

Remove all entries from the interfaceCoAList.

Referenced by processBAMessage().

2387 {
2388  for (auto & elem : interfaceCoAList) {
2389  //if (it->first == ie->interfaceId())
2390  EV_DEBUG << "Cancelling timers for ifID=" << elem.first << " and CoA=" << elem.second << endl;
2391  cancelEntries(elem.first, elem.second);
2392  }
2393 
2394  // delete all entries after cleanup
2395  interfaceCoAList.clear();
2396 }
InterfaceCoAList interfaceCoAList
Definition: xMIPv6.h:139
void cancelEntries(int interfaceId, IPv6Address &CoA)
Cancel all timers (TransmitIf entities for HA and CNs) related to the provided interfaceId and CoA...
Definition: xMIPv6.cc:2356
void inet::xMIPv6::removeTimerEntries ( const IPv6Address dest,
int  interfaceId 
)
protected

Removes timers of all types for the specified destination address and interfaceId.

Whenever a new mobility related timer is added, is MUST be added within this method to ensure proper removal.

Referenced by handleBULExpiry(), processBAMessage(), and returningHome().

2330 {
2331  if (rt6->isMobileNode()) {
2332  // HoTI
2333  cancelTimerIfEntry(dest, interfaceId, KEY_HI);
2334  // CoTI
2335  cancelTimerIfEntry(dest, interfaceId, KEY_CI);
2336  // BU
2337  cancelTimerIfEntry(dest, interfaceId, KEY_BU);
2338  // BRR
2339  cancelTimerIfEntry(dest, interfaceId, KEY_BR);
2340  // BUL expiry
2341  cancelTimerIfEntry(dest, interfaceId, KEY_BUL_EXP);
2342  // BC expiry
2343  //cancelTimerIfEntry(dest, interfaceId, KEY_BC_EXP);
2344  // token expiry
2345  cancelTimerIfEntry(dest, interfaceId, KEY_HTOKEN_EXP);
2346  cancelTimerIfEntry(dest, interfaceId, KEY_CTOKEN_EXP);
2347  }
2348  else if (rt6->isHomeAgent()) {
2349  cancelTimerIfEntry(dest, interfaceId, KEY_BC_EXP);
2350  }
2351  else { // CN
2352  cancelTimerIfEntry(dest, interfaceId, KEY_BC_EXP);
2353  }
2354 }
#define KEY_BU
Definition: xMIPv6.h:50
#define KEY_BC_EXP
Definition: xMIPv6.h:55
#define KEY_CI
Definition: xMIPv6.h:52
bool isMobileNode() const
Determine whether a node is a Mobile Node or Correspondent Node: MN if TRUE or else a CN...
Definition: IPv6RoutingTable.h:181
#define KEY_HI
Definition: xMIPv6.h:51
#define KEY_BUL_EXP
Definition: xMIPv6.h:54
#define KEY_HTOKEN_EXP
Definition: xMIPv6.h:56
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
#define KEY_CTOKEN_EXP
Definition: xMIPv6.h:57
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
bool isHomeAgent() const
Determine whether normal Router or Home Agent.
Definition: IPv6RoutingTable.h:170
#define KEY_BR
Definition: xMIPv6.h:53
void inet::xMIPv6::resetBUIfEntry ( const IPv6Address dest,
int  interfaceID,
simtime_t  retransmissionTime 
)
protected

Cancels the current existing timer and reschedules it with initial values.

Similiar to the other resetTestInitIfEntry() method, but this one searches for the appropriate transmission structure first as the interfaceID is not known but needed as lookup key. Reset the transmission structure for a BU and reschedule it for the provided time.

1691 {
1692  /*ASSERT(msgType == KEY_BU);
1693  Key key(dest, interfaceID, msgType);*/ // update 11.6.08 - CB
1694 
1695  Key key(dest, interfaceID, KEY_BU);
1696 
1697  auto pos = transmitIfList.find(key);
1698 
1699  if (pos == transmitIfList.end()) {
1700  //EV << "### No corresponding TimerIfEntry found! ###\n";
1701  return;
1702  }
1703 
1704  TimerIfEntry *entry = (pos->second);
1705  ASSERT(entry);
1706 
1707  // first we cancel the current retransmission timer
1708  cancelEvent(entry->timer);
1709  // then we reset the timeout value to the initial value
1710  entry->ackTimeout = entry->ifEntry->ipv6Data()->_getInitialBindAckTimeout();
1711  // and then we reschedule again for BU expiry time
1712  // (with correct offset for scheduling)
1713  entry->nextScheduledTime = retransmissionTime;
1714 
1715  scheduleAt(entry->nextScheduledTime, entry->timer);
1716 
1717  EV_INFO << "Updated BUTransmitIfEntry and corresponding timer.\n";
1718 }
#define KEY_BU
Definition: xMIPv6.h:50
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
void * Key
Definition: Macho.h:325
void inet::xMIPv6::returningHome ( const IPv6Address CoA,
InterfaceEntry ie 
)

This method destroys all tunnels associated to the previous CoA and sends appropriate BU(s) to HA and CN(s).

This method destroys the HA tunnel associated to the previous CoA and sends an appropriate BU to the HA.

Referenced by inet::IPv6NeighbourDiscovery::processRAPrefixInfoForAddrAutoConf().

279 {
280  Enter_Method_Silent(); // can be called by NeighborDiscovery module
281 
282  /*11.5.4
283  A mobile node detects that it has returned to its home link through
284  the movement detection algorithm in use (Section 11.5.1), when the
285  mobile node detects that its home subnet prefix is again on-link.*/
286 
287  EV_INFO << "MIPv6 Returning home procedure..." << endl;
288 
289  // cancel timers, 14.9.07 - CB
290 
291  // eventually we could have some unacknowledged BUs
292  // we have to cancel these: first the one for the Home Agent...
293  const IPv6Address& HA = ie->ipv6Data()->getHomeAgentAddress();
294  removeTimerEntries(HA, ie->getInterfaceId());
295  // destroy tunnel to HA
296  tunneling->destroyTunnel(CoA, HA);
297  // unregister binding from HA..
298  createDeregisterBUTimer(HA, ie);
300 
301  // ...and then the messages for CNs
302  for (itCNList = cnList.begin(); itCNList != cnList.end(); itCNList++) { // run an iterator through the CN map
303  // we first cancel potential timers for the respective CN
304  removeTimerEntries(*(itCNList), ie->getInterfaceId());
305 
306  // then we send the BU for deregistration
307  if (bul->isValidBinding(*(itCNList))) { // 20.9.07 - CB
308  IPv6Address cn = *(itCNList);
309  //createDeregisterBUTimer(*(itCNList), ie);
310  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->lookup(cn);
311  ASSERT(bulEntry != nullptr);
312  bulEntry->state = BindingUpdateList::DEREGISTER;
313  checkForBUtoCN(*bulEntry, ie);
314  }
315 
316  // destroy the tunnel now
317  // we have to as it is invalid (bound to old CoA that is not available anymore)
318  tunneling->destroyTunnelForExitAndTrigger(ie->ipv6Data()->getMNHomeAddress(), *(itCNList));
319  }
320 }
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
CNList cnList
Definition: xMIPv6.h:143
void removeTimerEntries(const IPv6Address &dest, int interfaceId)
Removes timers of all types for the specified destination address and interfaceId.
Definition: xMIPv6.cc:2329
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
CNList::iterator itCNList
Definition: xMIPv6.h:144
void createDeregisterBUTimer(const IPv6Address &buDest, InterfaceEntry *ie)
Similiar to the previous one, this method creates an BU timer with registration lifetime equal to 0...
Definition: xMIPv6.cc:346
BindingUpdateList * bul
Definition: xMIPv6.h:79
void destroyTunnelForExitAndTrigger(const IPv6Address &exit, const IPv6Address &trigger)
Remove the tunnel with the provided exit point and trigger.
Definition: IPv6Tunneling.cc:249
Definition: BindingUpdateList.h:58
bool checkForBUtoCN(BindingUpdateList::BindingUpdateListEntry &bulEntry, InterfaceEntry *ie)
Send a BU depending on current status of:
Definition: xMIPv6.cc:1968
virtual bool isValidBinding(const IPv6Address &dest)
Returns true if a binding has been acknowledged and it&#39;s lifetime has not yet expired.
Definition: BindingUpdateList.cc:334
virtual void setMobilityState(const IPv6Address &dest, BindingUpdateList::MobilityState state)
Sets the mobility state to provided state for the CN identified by the provided IP address...
Definition: BindingUpdateList.cc:225
bool destroyTunnel(const IPv6Address &src, const IPv6Address &dest, const IPv6Address &destTrigger)
Creates a pseudo-tunnel for use with either Type 2 Routing Header or Home Address Option with given e...
Definition: IPv6Tunneling.cc:203
xMIPv6::TimerIfEntry * inet::xMIPv6::searchTimerIfEntry ( IPv6Address dest,
int  timerType 
)
protected

Searches for a transmitEntry with the given destination address which is of type timerType.

Returns nullptr if no such entry exists.

2320 {
2321  for (auto & elem : transmitIfList) {
2322  if (elem.first.type == timerType && elem.first.dest == dest)
2323  return elem.second;
2324  }
2325 
2326  return nullptr;
2327 }
TransmitIfList transmitIfList
Definition: xMIPv6.h:135
void inet::xMIPv6::sendBUtoCN ( BindingUpdateList::BindingUpdateListEntry bulEntry,
InterfaceEntry ie 
)
protected

Creates a timer for sending a BU.

Referenced by checkForBUtoCN(), and initReturnRoutability().

2028 {
2029  /*11.7.2
2030  Upon successfully completing the return routability procedure, and
2031  after receiving a successful Binding Acknowledgement from the Home
2032  Agent, a Binding Update MAY be sent to the correspondent node.*/
2033  EV_INFO << "Sending BU to CN" << endl;
2034 
2035  /*
2036  // 10.07.08 - CB
2037  // The createBU method requires information on the interface. This is not available in the
2038  // bul entry though. Hence we just fetch a token expiry timer to retrieve this information.
2039  TimerIfEntry* transmitEntry = searchTimerIfEntry(bulEntry.destAddress, KEY_HTOKEN_EXP); // we could also use a care-of keygen token of course...
2040  ASSERT(transmitEntry!=nullptr);
2041  InterfaceEntry* ie = transmitEntry->ifEntry;*/
2042 
2043  if (bulEntry.state != BindingUpdateList::DEREGISTER)
2044  bulEntry.state = BindingUpdateList::REGISTER;
2045 
2046  createBUTimer(bulEntry.destAddress, ie); // update 07.09.07 - CB
2047  //createBUTimer(bulEntry.destAddress, ie, false); // update 07.09.07 - CB
2048 }
Definition: BindingUpdateList.h:56
void createBUTimer(const IPv6Address &buDest, InterfaceEntry *ie, const uint lifeTime, bool homeRegistration)
This method finally creates the timer structure and schedules the message for sending.
Definition: xMIPv6.cc:368
Definition: BindingUpdateList.h:58
void inet::xMIPv6::sendMobilityMessageToIPv6Module ( cMessage *  msg,
const IPv6Address destAddr,
const IPv6Address srcAddr = IPv6Address::UNSPECIFIED_ADDRESS,
int  interfaceId = -1,
simtime_t  sendTime = 0 
)
protected

Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Module.

Referenced by createAndSendBAMessage(), createAndSendBEMessage(), createAndSendBRRMessage(), createAndSendBUMessage(), processCoTIMessage(), processHoTIMessage(), and sendTestInit().

643 {
644  EV_INFO << "Appending ControlInfo to mobility message\n";
645  IPv6ControlInfo *controlInfo = new IPv6ControlInfo();
646  controlInfo->setProtocol(IP_PROT_IPv6EXT_MOB); // specifies the next header value for the Mobility Header (=135)
647  controlInfo->setDestAddr(destAddr);
648  controlInfo->setSrcAddr(srcAddr);
649  controlInfo->setHopLimit(255);
650  controlInfo->setInterfaceId(interfaceId);
651  msg->setControlInfo(controlInfo);
652 
653  EV_INFO << "ControlInfo appended successfully. Sending mobility message to IPv6 module\n";
654 
655  EV_DETAIL << "controlInfo: DestAddr=" << controlInfo->getDestAddr()
656  << "SrcAddr=" << controlInfo->getSrcAddr()
657  << "InterfaceId=" << controlInfo->getInterfaceId() << endl;
658 
659  // TODO solve the HA DAD problem in a different way
660  // (delay currently specified via the sendTime parameter)
661  if (sendTime > 0)
662  sendDelayed(msg, sendTime, "toIPv6");
663  else
664  send(msg, "toIPv6");
665 }
Definition: IPProtocolId_m.h:100
void inet::xMIPv6::sendPeriodicBRR ( cMessage *  msg)
protected

Handles a fired BRR message transmission structure.

Creates and sends and appropriate Binding Refresh Request. Transmission structure is rescheduled afterwards.

Referenced by handleMessage().

2446 {
2447  EV_INFO << "\n<<====== Periodic BRR MESSAGE at time: " << simTime() << " seconds =====>>\n";
2448  BRTransmitIfEntry *brIfEntry = (BRTransmitIfEntry *)msg->getContextPointer(); //detaching the corresponding brIfEntry pointer
2449  InterfaceEntry *ie = brIfEntry->ifEntry;
2450  IPv6Address& brDest = brIfEntry->dest;
2451 
2452  /*9.5.5
2453  The correspondent node MAY retransmit Binding Refresh Request
2454  messages as long as the rate limitation is applied. The
2455  correspondent node MUST stop retransmitting when it receives a
2456  Binding Update.*/
2457  if (brIfEntry->retries < BRR_RETRIES) { // we'll not retransmit infinite times
2458  brIfEntry->retries++;
2459 
2460  createAndSendBRRMessage(brDest, ie);
2461 
2462  // retransmit the Binding Refresh Message
2463  scheduleAt(simTime() + BRR_TIMEOUT_THRESHOLD, msg);
2464  }
2465  else {
2466  // we've tried often enough - remove the timer
2467  cancelTimerIfEntry(brDest, ie->getInterfaceId(), KEY_BR);
2468  }
2469 }
bool cancelTimerIfEntry(const IPv6Address &dest, int interfaceID, int msgType)
Deletes the appropriate entry from the transmitIfList and cancels the corresponding retransmission ti...
Definition: xMIPv6.cc:2199
void createAndSendBRRMessage(const IPv6Address &dest, InterfaceEntry *ie)
Creates a Binding Refresh Request and sends it to the IPv6 module.
Definition: xMIPv6.cc:2471
#define BRR_TIMEOUT_THRESHOLD
Definition: xMIPv6.cc:47
#define BRR_RETRIES
Definition: xMIPv6.cc:48
#define KEY_BR
Definition: xMIPv6.h:53
void inet::xMIPv6::sendPeriodicBU ( cMessage *  msg)
protected

This method is called when the timer created in createBUTimer() has fired.

The BU is created and the appropriate method for sending it called. The timer structure is updated and rescheduled.

Referenced by handleMessage().

416 {
417  EV_INFO << "Sending periodic BU message at time: " << simTime() << " seconds." << endl;
418  BUTransmitIfEntry *buIfEntry = (BUTransmitIfEntry *)msg->getContextPointer(); //detaching the corresponding buIfEntry pointer
419  //EV << "### lifetime of buIfEntry=" << buIfEntry->lifeTime << " and seq#= " << buIfEntry->buSequenceNumber << endl;
420  InterfaceEntry *ie = buIfEntry->ifEntry; //copy the ie info
421  IPv6Address& buDest = buIfEntry->dest;
422  buIfEntry->presentSentTimeBU = simTime(); //records the present time at which BU is sent
423 
424  buIfEntry->nextScheduledTime = buIfEntry->presentSentTimeBU + buIfEntry->ackTimeout;
425  /*11.8
426  The retransmissions by the mobile node MUST use an exponential back-
427  off process in which the timeout period is doubled upon each
428  retransmission*/
429  buIfEntry->ackTimeout = (buIfEntry->ackTimeout) * 2;
430 
431  // update 12.9.07 - CB
432  // moved to here, 24.9.07 - CB
433  /*Each Binding Update MUST have a Sequence Number greater than the
434  Sequence Number value sent in the previous Binding Update to the same
435  destination address (if any). The sequence numbers are compared
436  modulo 2**16, as described in Section 9.5.1.*/
437  buIfEntry->buSequenceNumber = (buIfEntry->buSequenceNumber + 1) % 65536;
438 
439  // Added by CB, 28.08.07
440  if (!buIfEntry->homeRegistration) { // this BU goes to a CN
441  //IPv6Address CoA = ie->ipv6()->globalAddress();
442  IPv6Address CoA = bul->getCoA(buDest); // 24.9.07 - CB
443  //TODO think of a good mechanism to obtain the appropriate/correct CoA
444  // Problem 1: ie->ipv6()->globalAddress() retrieves the HoA
445  // Problem 2: bul->getCoA(buDest) becomes a problem in case of Multihoming
446  // Solution: globalAddress(TYPE_COA) ?
447  int bindingAuthorizationData = bul->generateBAuthData(buDest, CoA);
448  createAndSendBUMessage(buDest, ie, buIfEntry->buSequenceNumber, buIfEntry->lifeTime, bindingAuthorizationData);
449 
450  // statistic collection
451  /*statVectorBUtoCN.record(1);*/
452  }
453  else {
454  createAndSendBUMessage(buDest, ie, buIfEntry->buSequenceNumber, buIfEntry->lifeTime);
455 
456  // statistic collection
457  /*statVectorBUtoHA.record(1);*/
458  }
459 
460  /*if (buIfEntry->ackTimeout < ie->ipv6()->_maxBindAckTimeout()) // update comparison operator, 12.9.07 - CB
461  {
462  //buIfEntry->presentBindAckTimeout = buIfEntry->nextBindAckTimeout; //reassign the timeout value
463  //scheduleAt(buIfEntry->nextScheduledTime, msg);
464  }
465  else*/
466  if (!(buIfEntry->ackTimeout < ie->ipv6Data()->_getMaxBindAckTimeout())) {
467  EV_DETAIL << "Crossed maximum BINDACK timeout...resetting to predefined maximum." << endl; //buIfEntry->nextBindAckTimeout << " ++++++\n";
468  //ev << "\n++++Present Sent Time: " << buIfEntry->presentSentTimeBU << " Present TimeOut: " << buIfEntry->ackTimeout << endl;
469  //buIfEntry->nextScheduledTime = buIfEntry->presentSentTimeBU + buIfEntry->maxBindAckTimeout;
470  buIfEntry->ackTimeout = ie->ipv6Data()->_getMaxBindAckTimeout();
471  //buIfEntry->nextScheduledTime = ie->ipv6()->_maxBindAckTimeout();
472  //ev << "\n++++Next Sent Time: " << buIfEntry->nextScheduledTime << endl;//" Next TimeOut: " << buIfEntry->nextBindAckTimeout << endl;
473  //scheduleAt(buIfEntry->nextScheduledTime, msg);
474  }
475 
476  EV_DETAIL << "Present Sent Time: " << buIfEntry->presentSentTimeBU << ", Present TimeOut: " << buIfEntry->ackTimeout << endl;
477  EV_DETAIL << "Next Sent Time: " << buIfEntry->nextScheduledTime << endl; // << " Next TimeOut: " << buIfEntry->nextBindAckTimeout << endl;
478  scheduleAt(buIfEntry->nextScheduledTime, msg);
479 }
void createAndSendBUMessage(const IPv6Address &dest, InterfaceEntry *ie, const uint buSeq, const uint lifeTime, const int bindAuthData=0)
Method for creating and sending a BU by a MN.
Definition: xMIPv6.cc:481
virtual int generateBAuthData(const IPv6Address &dest, const IPv6Address &CoA)
Generates the Binding Authorization Data based on a certain destination address and CoA...
Definition: BindingUpdateList.cc:233
virtual const IPv6Address & getCoA(const IPv6Address &dest)
Returns the CoA that was registered for the provided dest.
Definition: BindingUpdateList.cc:314
BindingUpdateList * bul
Definition: xMIPv6.h:79
void inet::xMIPv6::sendTestInit ( cMessage *  msg)
protected

If a TestInit timer was fired, this method gets called.

The message is sent and the Binding Update List accordingly updated. Afterwards the transmission timer is rescheduled.

Referenced by handleMessage().

1542 {
1543  // FIXME the following line is unsafe, rewrite it
1544  TestInitTransmitIfEntry *tiIfEntry = (TestInitTransmitIfEntry *)msg->getContextPointer(); //check_and_cast<TestInitTransmitIfEntry*>((TestInitTransmitIfEntry*) msg->contextPointer());
1545  InterfaceEntry *ie = tiIfEntry->ifEntry;
1546 
1547  /*11.6.1
1548  When sending a Home Test Init or Care-of Test Init message
1549  the mobile node MUST record in its Binding Update List the following
1550  fields from the messages:
1551  o The IP address of the node to which the message was sent.
1552  o The home address of the mobile node. This value will appear in
1553  the Source Address field of the Home Test Init message. When
1554  sending the Care-of Test Init message, this address does not
1555  appear in the message, but represents the home address for which
1556  the binding is desired.
1557  o The time at which each of these messages was sent.
1558  o The cookies used in the messages.
1559  Note that a single Care-of Test Init message may be sufficient even
1560  when there are multiple home addresses. In this case the mobile node
1561  MAY record the same information in multiple Binding Update List
1562  entries.*/
1563 
1564  // retrieve the cookie from the Test Init message
1565  if (dynamic_cast<HomeTestInit *>(tiIfEntry->testInitMsg)) {
1566  // 24.07.08 - CB
1567  // moved the following two lines to here
1568  IPv6Address HoA = ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::HoA);
1569  ASSERT(!HoA.isUnspecified());
1570 
1571  HomeTestInit *HoTI = new HomeTestInit(*check_and_cast<HomeTestInit *>(tiIfEntry->testInitMsg));
1572 
1573  // update cache
1574  bul->addOrUpdateBUL(tiIfEntry->dest, HoA, simTime(), HoTI->getHomeInitCookie(), true);
1575  // mark the current home token as invalid - update 10.01.08 CB
1576  bul->resetHomeToken(tiIfEntry->dest, HoA);
1577  // and send message
1578  sendMobilityMessageToIPv6Module(HoTI, tiIfEntry->dest, HoA);
1579 
1580  // statistic collection
1581  /*statVectorHoTItoCN.record(1);*/
1582  }
1583  else { // must be of type CareOfTestInit*
1584  // 24.07.08 - CB
1585  // moved the following two lines to here
1586  IPv6Address CoA = ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::CoA);
1587  ASSERT(!CoA.isUnspecified());
1588 
1589  CareOfTestInit *CoTI = new CareOfTestInit(*check_and_cast<CareOfTestInit *>(tiIfEntry->testInitMsg));
1590 
1591  // update cache
1592  bul->addOrUpdateBUL(tiIfEntry->dest, CoA, simTime(), CoTI->getCareOfInitCookie(), false);
1593  // mark the current care-of token as invalid - update 10.01.08 CB
1594  bul->resetCareOfToken(tiIfEntry->dest, CoA);
1595  // and send message
1596  sendMobilityMessageToIPv6Module(CoTI, tiIfEntry->dest, CoA, ie->getInterfaceId());
1597 
1598  // statistic collection
1599  /*statVectorCoTItoCN.record(1);*/
1600  }
1601 
1602  // update 13.9.07 - CB
1603  /*11.8
1604  If the mobile node fails to receive a valid matching response within
1605  the selected initial retransmission interval, the mobile node SHOULD
1606  retransmit the message until a response is received.*/
1607  tiIfEntry->nextScheduledTime = tiIfEntry->ackTimeout + simTime();
1608 
1609  /*The retransmissions by the mobile node MUST use an exponential back-
1610  off process in which the timeout period is doubled upon each
1611  retransmission, until either the node receives a response or the
1612  timeout period reaches the value MAX_BINDACK_TIMEOUT. The mobile
1613  node MAY continue to send these messages at this slower rate
1614  indefinitely.*/
1615  tiIfEntry->ackTimeout = tiIfEntry->ackTimeout * 2;
1616  if (!(tiIfEntry->ackTimeout < ie->ipv6Data()->_getMaxBindAckTimeout()))
1617  tiIfEntry->ackTimeout = ie->ipv6Data()->_getMaxBindAckTimeout();
1618 
1619  msg->setContextPointer(tiIfEntry);
1620  scheduleAt(tiIfEntry->nextScheduledTime, msg);
1621 
1622  EV_INFO << "Scheduled next HoTI/CoTI for time=" << tiIfEntry->nextScheduledTime
1623  << " with timeout=" << tiIfEntry->ackTimeout << " for dest="
1624  << tiIfEntry->dest << endl;
1625 
1626  //delete tiIfEntry;
1627  //delete msg;
1628 }
void sendMobilityMessageToIPv6Module(cMessage *msg, const IPv6Address &destAddr, const IPv6Address &srcAddr=IPv6Address::UNSPECIFIED_ADDRESS, int interfaceId=-1, simtime_t sendTime=0)
Append an IPv6ControlInfo object to the Mobility Messages (BU, BA etc) and send it out to the IPv6 Mo...
Definition: xMIPv6.cc:641
Definition: IPv6InterfaceData.h:211
BindingUpdateList * bul
Definition: xMIPv6.h:79
virtual void resetHomeToken(const IPv6Address &dest, const IPv6Address &hoa)
Resets the token to UNDEFINED.
Definition: BindingUpdateList.cc:262
Definition: IPv6InterfaceData.h:211
virtual void addOrUpdateBUL(const IPv6Address &dest, const IPv6Address &hoa, const IPv6Address &coa, const uint lifetime, const uint seq, const simtime_t buSentTime)
Sets entry in the Binding Update List with provided values.
Definition: BindingUpdateList.cc:109
virtual void resetCareOfToken(const IPv6Address &dest, const IPv6Address &hoa)
Resets the token to UNDEFINED.
Definition: BindingUpdateList.cc:271
void inet::xMIPv6::triggerRouteOptimization ( const IPv6Address destAddress,
const IPv6Address HoA,
InterfaceEntry ie 
)
virtual

Alain Tigyo, 21.03.2008 The following method is used for triggering RO to a CN.

Alain Tigyo, 21.03.2008 The following code is used for triggering RO to a CN.

Referenced by inet::IPv6Tunneling::decapsulateDatagram(), and processBAMessage().

1388 {
1389  if (bul->getMobilityState(destAddress) == BindingUpdateList::NONE)
1391 
1392  int vIndex = tunneling->getVIfIndexForDest(destAddress, IPv6Tunneling::MOBILITY); // update 10.06.08 - CB
1393 
1394  if (vIndex > ift->getNumInterfaces()) {
1395  EV_INFO << "Route Optimization for: " << destAddress << " already triggered";
1396 
1397  // we have to check whether our current CoA is different from the one saved in the BUL
1398  // (this would mean we have moved to a new access network on this interface)
1399  if ((bul->getCoA(destAddress) != ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::CoA))
1400  || bul->getMobilityState(destAddress) == BindingUpdateList::NONE)
1401  {
1402  // we have a new CoA compared to BUL entry -> redo RO
1403  initReturnRoutability(destAddress, ie);
1404  EV_INFO << " ...moved to new network. Initializing RO.";
1405  }
1406 
1407  EV_INFO << endl;
1408  }
1409  else {
1410  if ((!bul->isInBindingUpdateList(destAddress, HoA))
1411  || (bul->getMobilityState(destAddress) == BindingUpdateList::RR))
1412  {
1413  EV_INFO << "Initialise Route Optimization for: " << destAddress << "\n";
1414  initReturnRoutability(destAddress, ie);
1415 
1416  auto CRiterator = find(cnList.begin(), cnList.end(), destAddress);
1417  if (CRiterator == cnList.end())
1418  cnList.push_back(destAddress);
1419  }
1420  }
1421 }
IPv6Tunneling * tunneling
Definition: xMIPv6.h:81
CNList cnList
Definition: xMIPv6.h:143
virtual const IPv6Address & getCoA(const IPv6Address &dest)
Returns the CoA that was registered for the provided dest.
Definition: BindingUpdateList.cc:314
IInterfaceTable * ift
Definition: xMIPv6.h:77
virtual MobilityState getMobilityState(const IPv6Address &dest) const
Returns the current mobility state for the CN identified by the provided IP address.
Definition: BindingUpdateList.cc:215
BindingUpdateList * bul
Definition: xMIPv6.h:79
int getVIfIndexForDest(const IPv6Address &destAddress)
Returns the virtual interface identifier for the tunnel which has the provided destination as destina...
Definition: IPv6Tunneling.cc:310
Definition: IPv6Tunneling.h:55
virtual int getNumInterfaces() const =0
Returns the number of interfaces.
Definition: IPv6InterfaceData.h:211
Definition: BindingUpdateList.h:53
virtual void initReturnRoutability(const IPv6Address &cnDest, InterfaceEntry *ie)
Creates HoTI and CoTI messages and sends them to the CN if timers are not already existing...
Definition: xMIPv6.cc:1423
virtual void setMobilityState(const IPv6Address &dest, BindingUpdateList::MobilityState state)
Sets the mobility state to provided state for the CN identified by the provided IP address...
Definition: BindingUpdateList.cc:225
Definition: BindingUpdateList.h:54
virtual bool isInBindingUpdateList(const IPv6Address &dest) const
Checks whether there exists an entry in the BUL for the given destination address.
Definition: BindingUpdateList.cc:298
std::vector< T >::iterator find(std::vector< T > &v, const T &a)
Definition: stlutils.h:48
void inet::xMIPv6::updateBUL ( BindingUpdate bu,
const IPv6Address dest,
const IPv6Address CoA,
InterfaceEntry ie,
const simtime_t  sendTime 
)
protected

Update the an entry of the BUL with the provided parameters.

Referenced by createAndSendBUMessage().

604 {
605  uint buLife = 4 * bu->getLifetime(); /* 6.1.7 One time unit is 4 seconds. */ // update 11.06.08 - CB
606  uint buSeq = bu->getSequence();
607 
608  IPv6Address HoA = bu->getHomeAddressMN();
609 
610  // to point to the struct where i am globally recording the startisitcs for sent time and next sent time for the BU:
611  BUTransmitIfEntry *buIfEntry = fetchBUTransmitIfEntry(ie, dest);
612 
613  if (buIfEntry == nullptr) {
614  EV_WARN << "No scheduled BU entry available!\n";
615  return;
616  }
617 
618  //simtime_t sentTime = buIfEntry->presentSentTimeBU;
619  //simtime_t nextSentTime = buIfEntry->nextScheduledTime;
620 
621  //ASSERT(bul);
622  bul->addOrUpdateBUL(dest, HoA, CoA, buLife, buSeq, sendTime); //, nextSentTime); //updates the binding Update List
623  //EV << "#### Updated BUL with lifetime=" << buLife << "and sentTime=" << sentTime << endl;
624 }
unsigned int uint
Definition: INETDefs.h:63
BindingUpdateList * bul
Definition: xMIPv6.h:79
xMIPv6::BUTransmitIfEntry * fetchBUTransmitIfEntry(InterfaceEntry *ie, const IPv6Address &dest)
This method takes an interface and a destination address and returns the appropriate IfEntry for an B...
Definition: xMIPv6.cc:626
virtual void addOrUpdateBUL(const IPv6Address &dest, const IPv6Address &hoa, const IPv6Address &coa, const uint lifetime, const uint seq, const simtime_t buSentTime)
Sets entry in the Binding Update List with provided values.
Definition: BindingUpdateList.cc:109
bool inet::xMIPv6::validateBAck ( const BindingAcknowledgement ba,
const IPv6ControlInfo ctrlInfo 
)
protected

Validates a Binding Acknowledgement for a mobile node.

Referenced by processBAMessage().

1350 {
1351  /*11.7.3
1352  Upon receiving a packet carrying a Binding Acknowledgement, a mobile
1353  node MUST validate the packet according to the following tests:
1354 
1355  o The packet meets the authentication requirements for Binding
1356  Acknowledgements defined in Section 6.1.8 and Section 5. That is,
1357  if the Binding Update was sent to the home agent, underlying IPsec
1358  protection is used. If the Binding Update was sent to the
1359  correspondent node, the Binding Authorization Data mobility option
1360  MUST be present and have a valid value.*/
1361  IPv6Address cnAddress = ctrlInfo->getSrcAddr();
1362  InterfaceEntry *ie = ift->getInterfaceById(ctrlInfo->getInterfaceId());
1363 
1364  if (cnAddress != ie->ipv6Data()->getHomeAgentAddress()) { // BAck comes from a CN and not from the HA
1365  if (ba.getBindingAuthorizationData() == UNDEFINED_BIND_AUTH_DATA) {
1366  EV_WARN << "BA Validation Failed: Binding Authorization Data invalid !" << endl;
1367  return false;
1368  }
1369  }
1370 
1371  /*o The Sequence Number field matches the Sequence Number sent by the
1372  mobile node to this destination address in an outstanding Binding
1373  Update.*/
1374  // 24.9.07 - CB
1375  if (bul->getSequenceNumber(cnAddress) != ba.getSequenceNumber()) {
1376  EV_WARN << "BA Validation Failed: Sequence number from BA does not match the one from the BUL!!\n";
1377  return false;
1378  }
1379 
1380  return true;
1381 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
#define UNDEFINED_BIND_AUTH_DATA
Definition: BindingUpdateList.h:38
IInterfaceTable * ift
Definition: xMIPv6.h:77
virtual uint getSequenceNumber(const IPv6Address &dest)
Returns the last used sequence number for the given dest.
Definition: BindingUpdateList.cc:303
BindingUpdateList * bul
Definition: xMIPv6.h:79
bool inet::xMIPv6::validateBUderegisterMessage ( BindingUpdate bu,
IPv6ControlInfo ctrlInfo 
)
protected

Similiar to validateBUMessage().

However, this one is used only by HA to verify deregistration BU.

Referenced by processBUMessage().

1077 {
1078  /*To begin processing the Binding Update, the home agent MUST perform
1079  the following test:
1080 
1081  o If the receiving node has no entry marked as a home registration
1082  in its Binding Cache for this mobile node, then this node MUST
1083  reject the Binding Update and SHOULD return a Binding
1084  Acknowledgement to the mobile node, in which the Status field is
1085  set to 133 (not home agent for this mobile node).*/
1086  return bc->isInBindingCache(bu->getHomeAddressMN())
1087  && bc->getHomeRegistration(bu->getHomeAddressMN());
1088 }
bool getHomeRegistration(const IPv6Address &HoA) const
Returns the value of the homeRegistration flag for the given HoA.
Definition: BindingCache.cc:109
bool isInBindingCache(const IPv6Address &HoA, IPv6Address &CoA) const
Added by CB, 29.08.07 Checks whether there is an entry in the BC for the given HoA and CoA...
Definition: BindingCache.cc:86
BindingCache * bc
Definition: xMIPv6.h:80
bool inet::xMIPv6::validateBUMessage ( BindingUpdate bu,
IPv6ControlInfo ctrlInfo 
)
protected

Validate a BU - only applicable to HAs and CNs.

Referenced by processBUMessage().

972 {
973  // Performs BU Validation according to RFC3775 Sec 9.5.1
974 
975  EV_INFO << "\n<<<<<<<<<ROUTINE WHERE BU GETS VALIDATED>>>>>>>>>>>>>>><<\n";
976 
977  // ################################
978  // modifed structure, 28.08.07 - CB
979  // ################################
980  //bool result = true;
981 
982  IPv6Address& src = ctrlInfo->getSrcAddr();
983  IPv6Address homeAddress = bu->getHomeAddressMN(); //confirm whether it is getHomeAddressMN() or simply homeAddress()
984  uint seqNumber = bu->getSequence(); //The seq Number of the recieved BU
985  uint bcSeqNumber = bc->readBCSequenceNumber(homeAddress); //The seq Number of the last recieved BU in the Binding cache
986 
987  // restructured the following and removed "delete bu" - CB
988  if (!(src.isGlobal() && src.isUnicast())) {
989  EV_WARN << "BU Validation Failed: SrcAdress is not unicast Global !" << endl;
990  EV_WARN << "Dropping unvalidated BU message" << endl;
991  bubble("!! BU Validation Failed !!");
992  return false; //result = false;
993  }
994  if (!(homeAddress.isGlobal() && homeAddress.isUnicast())) {
995  EV_WARN << "BU Validation Failed: Home Adress of MN is not unicast Global !" << endl;
996  bubble("!! BU Validation Failed !!");
997  EV_WARN << "Dropping unvalidated BU message" << endl;
998  return false; //result = false;
999  }
1000  /*9.5.1
1001  This Sequence Number comparison MUST be performed modulo 2**16, i.e.,
1002  the number is a free running counter represented modulo 65536. A
1003  Sequence Number in a received Binding Update is considered less than
1004  or equal to the last received number if its value lies in the range
1005  of the last received number and the preceding 32768 values, inclusive.*/
1006  else if (((bcSeqNumber % 65536) > seqNumber) || ((32768 + bcSeqNumber) % 65536 < seqNumber)) { // update 10.9.07 - CB
1007  EV_WARN << "BU Validation Failed: Received Seq#: " << seqNumber << " is LESS THAN in BC: "
1008  << bcSeqNumber << endl;
1009  bubble("!! BU Validation Failed !!");
1010  EV_WARN << "Dropping unvalidated BU message" << endl;
1011 
1012  /*9.5.1
1013  If the mobile node sends a sequence number which is not greater than
1014  the sequence number from the last valid Binding Update for this home
1015  address, then the receiving node MUST send back a Binding
1016  Acknowledgement with status code 135, and the last accepted sequence
1017  number in the Sequence Number field of the Binding Acknowledgement.*/
1018  IPv6Address& destAddress = ctrlInfo->getDestAddr();
1019  createAndSendBAMessage(destAddress, homeAddress, ctrlInfo, REGISTRATION_TYPE_CHANGE_DISALLOWED,
1020  bu->getBindingAuthorizationData(), bcSeqNumber, 0);
1021 
1022  return false;
1023  }
1024 
1025  // this is the CN validation part
1026  if (!bu->getHomeRegistrationFlag()) {
1027  if (bc->getHomeRegistration(homeAddress) != bu->getHomeRegistrationFlag()) { // update 10.9.07 - CB
1028  /*9.5.1
1029  If a binding already exists for the given home address and the home
1030  registration flag has a different value than the Home Registration
1031  (H) bit in the Binding Update, then the receiving node MUST send back
1032  a Binding Acknowledgement with status code 139 (registration type
1033  change disallowed). The home registration flag stored in the Binding
1034  Cache entry MUST NOT be changed.*/
1035  EV_WARN << "BU Validation Failed: home registration flag in binding cache has different value than in the binding update" << endl;
1036  createAndSendBAMessage(src, homeAddress, ctrlInfo, REGISTRATION_TYPE_CHANGE_DISALLOWED,
1037  bu->getBindingAuthorizationData(), bcSeqNumber, 0);
1038 
1039  return false;
1040  }
1041 
1042  int homeToken = bc->generateHomeToken(homeAddress, 0); // TODO nonce
1043  int careOfToken = bc->generateCareOfToken(src, 0); // TODO nonce
1044  int bindAuthData = bc->generateKey(homeToken, careOfToken, src);
1045 
1046  // update 10.10.08 - CB
1047  if (bu->getLifetime() == 0) { // deregistration BU
1048  EV_DETAIL << "homeToken=" << homeToken << ", careOfToken=" << careOfToken
1049  << " , bindAuthData=" << bindAuthData
1050  << ", BU data=" << bu->getBindingAuthorizationData() << endl;
1051 
1052  if ((bu->getBindingAuthorizationData() != bindAuthData)
1053  && (bu->getBindingAuthorizationData() != homeToken)) // this is quick and dirty -> TODO
1054  {
1055  EV_WARN << "BU Validation Failed: Binding Authorization Data invalid!" << endl;
1056  return false;
1057  }
1058  }
1059  else { // registration BU
1060  if (bu->getBindingAuthorizationData() != bindAuthData) {
1061  EV_WARN << "BU Validation Failed: Binding Authorization Data invalid!" << endl;
1062  return false;
1063  }
1064  }
1065  }
1066 
1067  // If all the above tests are passed the Received BU is valid
1068  EV_INFO << "BU validation passed" << endl;
1069 
1070  if (hasGUI())
1071  bubble("BU Validated");
1072 
1073  return true; //result;
1074 }
void createAndSendBAMessage(const IPv6Address &src, const IPv6Address &dest, IPv6ControlInfo *ctrlInfo, const BAStatus &baStatus, const uint baSeq, const int bindingAuthorizationData, const uint lifeTime, simtime_t sendTime=0)
Constructs and send a BA to the IPv6 module.
Definition: xMIPv6.cc:1090
bool getHomeRegistration(const IPv6Address &HoA) const
Returns the value of the homeRegistration flag for the given HoA.
Definition: BindingCache.cc:109
virtual int generateCareOfToken(const IPv6Address &CoA, int nonce)
Generates a care-of token from the provided parameters.
Definition: BindingCache.cc:134
unsigned int uint
Definition: INETDefs.h:63
virtual int generateHomeToken(const IPv6Address &HoA, int nonce)
Generates a home token from the provided parameters.
Definition: BindingCache.cc:129
virtual int generateKey(int homeToken, int careOfToken, const IPv6Address &CoA)
Generates the key Kbm from home and care-of keygen token.
Definition: BindingCache.cc:139
Definition: MobilityHeader_m.h:218
uint readBCSequenceNumber(const IPv6Address &HoA) const
Returns sequence number of BCE for provided HoA.
Definition: BindingCache.cc:68
BindingCache * bc
Definition: xMIPv6.h:80
bool inet::xMIPv6::validateCoTMessage ( const CareOfTest CoT,
const IPv6ControlInfo ctrlInfo 
)
protected

Like validateHoTMessage(), but related to CoT.

Referenced by processCoTMessage().

1919 {
1920  // RFC - 11.6.2
1921  IPv6Address srcAddr = ctrlInfo->getSrcAddr();
1922  IPv6Address destAddr = ctrlInfo->getDestAddr();
1923  int interfaceID = ctrlInfo->getInterfaceId();
1924 
1925  /* The Source Address of the packet belongs to a correspondent node
1926  for which the mobile node has a Binding Update List entry with a
1927  state indicating that return routability procedure is in progress.
1928  Note that there may be multiple such entries. */
1929  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->lookup(srcAddr);
1930  if (bulEntry == nullptr) {
1931  EV_WARN << "Invalid CoT: No entry in BUL" << endl;
1932  return false; // no entry in BUL
1933  }
1934 
1935  if (bulEntry->sentHoTI == 0 && bulEntry->sentCoTI == 0) {
1936  EV_WARN << "Invalid CoT: No RR procedure initialized for this CN." << endl;
1937  return false; // no RR procedure started for this entry
1938  }
1939 
1940  /* The Binding Update List indicates that no care-of keygen token has
1941  been received yet.. */
1942  // TODO reactive this code as soon as token expiry is available in the BUL
1943  /*if (bulEntry->tokenC != UNDEFINED_TOKEN)
1944  {
1945  EV << "Invalid CoT: Already received a care-of keygen token." << endl;
1946  return false; // 0 is expected to indicate "undefined"
1947  }*/
1948 
1949  /* The Destination Address of the packet is the current care-of
1950  address of the mobile node. */
1951  InterfaceEntry *ie = ift->getInterfaceById(interfaceID);
1952  if (destAddr != ie->ipv6Data()->getGlobalAddress(IPv6InterfaceData::CoA)) {
1953  EV_WARN << "Invalid CoT: CoA not valid anymore." << endl;
1954  return false;
1955  }
1956 
1957  /* The Care-of Init Cookie field in the message matches the value
1958  stored in the Binding Update List. */
1959  if (bulEntry->cookieCoTI != (int)CoT.getCareOfInitCookie()) {
1960  EV_WARN << "Invalid CoT: Cookie value different from the stored one." << endl;
1961  return false;
1962  }
1963 
1964  // if we have come that far, the CoT is valid
1965  return true;
1966 }
virtual InterfaceEntry * getInterfaceById(int id) const =0
Returns an interface by its Id.
IInterfaceTable * ift
Definition: xMIPv6.h:77
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
BindingUpdateList * bul
Definition: xMIPv6.h:79
Definition: IPv6InterfaceData.h:211
bool inet::xMIPv6::validateHoTMessage ( const HomeTest HoT,
const IPv6ControlInfo ctrlInfo 
)
protected

Verifies a HoT according to the RFC, Section 11.6.2.

Referenced by processHoTMessage().

1826 {
1827  // RFC - 11.6.2
1828  IPv6Address srcAddr = ctrlInfo->getSrcAddr();
1829  IPv6Address destAddr = ctrlInfo->getDestAddr();
1830  //int interfaceID = ctrlInfo->interfaceId();
1831 
1832  /* The Source Address of the packet belongs to a correspondent node
1833  for which the mobile node has a Binding Update List entry with a
1834  state indicating that return routability procedure is in progress.
1835  Note that there may be multiple such entries. */
1836  BindingUpdateList::BindingUpdateListEntry *bulEntry = bul->lookup(srcAddr);
1837  if (bulEntry == nullptr) {
1838  EV_WARN << "Invalid HoT: No entry in BUL" << endl;
1839  return false; // no entry in BUL
1840  }
1841 
1842  /* The Binding Update List indicates that no home keygen token has
1843  been received yet. */
1844  // TODO reactivate this code as soon as token expiry is available in the BUL
1845  /*if (bulEntry->tokenH != UNDEFINED_TOKEN)
1846  {
1847  EV << "Invalid HoT: Home keygen token already exists." << endl;
1848  return false; // 0 is expected to indicate "undefined"
1849  }*/
1850 
1851  /* The Destination Address of the packet has the home address of the
1852  mobile node, and the packet has been received in a tunnel from the
1853  home agent. */
1854  // TODO check whether it is necessary to check HoA exlusively for the
1855  // interface the message was received on.
1856  if (!rt6->isHomeAddress(destAddr)) {
1857  EV_WARN << "Invalid HoT: Destination Address not HoA." << endl;
1858  return false; // TODO check whether packet was received from HA tunnel
1859  }
1860 
1861  /* The Home Init Cookie field in the message matches the value stored
1862  in the Binding Update List. */
1863  if (bulEntry->cookieHoTI != (int)HoT.getHomeInitCookie()) {
1864  EV_WARN << "Invalid HoT: Cookie value different from the stored one." << endl;
1865  return false;
1866  }
1867 
1868  // if we have come that far, the HoT is valid
1869  return true;
1870 }
virtual BindingUpdateList::BindingUpdateListEntry * lookup(const IPv6Address &dest)
Returns the BUL entry for a certain destination address.
Definition: BindingUpdateList.cc:198
BindingUpdateList * bul
Definition: xMIPv6.h:79
bool isHomeAddress(const IPv6Address &addr)
Check whether provided address is a HoA.
Definition: IPv6RoutingTable.cc:776
IPv6RoutingTable * rt6
Definition: xMIPv6.h:78
bool inet::xMIPv6::validateType2RH ( const IPv6Datagram datagram,
const IPv6RoutingHeader rh 
)
protected

Perform validity checks according to RFC 3775 - Section 6.4.

Referenced by processType2RH().

2113 {
2114  // cf. RFC 3775 - 6.4
2115 
2116  if (rh.getAddressArraySize() != 1) {
2117  EV_WARN << "Invalid RH2 header: no HoA provided!" << endl;
2118  return false;
2119  }
2120 
2121  IPv6Address CoA = datagram.getSrcAddress();
2122  IPv6Address HoA = rh.getAddress(0);
2123 
2124  /* The IP address contained in the routing header, since it is the mobile
2125  node's home address, MUST be a unicast routable address. */
2126  if (!HoA.isUnicast()) {
2127  EV_WARN << "Invalid RH2 header: address in RH2 is not a unicast routable address!" << endl;
2128  return false;
2129  }
2130 
2131  /* Furthermore, if the scope of the home address is smaller than the
2132  scope of the care-of address, the mobile node MUST discard the packet */
2133  if (HoA.getScope() < CoA.getScope()) {
2134  EV_WARN << "Invalid RH2 header: scope of Address in RH2 is smaller than the source address of the datagram!" << endl;
2135  return false;
2136  }
2137 
2138  return true;
2139 }

Member Data Documentation

InterfaceCoAList inet::xMIPv6::interfaceCoAList
protected
IPv6NeighbourDiscovery* inet::xMIPv6::ipv6nd
protected

Referenced by initialize(), and processBAMessage().

CNList::iterator inet::xMIPv6::itCNList
protected
cOutVector inet::xMIPv6::statVectorBAfromCN
protected
cOutVector inet::xMIPv6::statVectorBAfromHA
protected
cOutVector inet::xMIPv6::statVectorBAtoMN
protected
cOutVector inet::xMIPv6::statVectorBUtoCN
protected
cOutVector inet::xMIPv6::statVectorBUtoHA
protected
cOutVector inet::xMIPv6::statVectorBUtoMN
protected
cOutVector inet::xMIPv6::statVectorCoTfromCN
protected
cOutVector inet::xMIPv6::statVectorCoTItoCN
protected
cOutVector inet::xMIPv6::statVectorCoTtoMN
protected
cOutVector inet::xMIPv6::statVectorHoTfromCN
protected
cOutVector inet::xMIPv6::statVectorHoTItoCN
protected
cOutVector inet::xMIPv6::statVectorHoTtoMN
protected

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