INET Framework for OMNeT++/OMNEST
|
Implements RFC 3775 Mobility Support in IPv6. More...
#include <xMIPv6.h>
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, IPv6Address > | InterfaceCoAList |
holds the tuples of currently available {InterfaceID, CoA} pairs More... | |
typedef std::vector< IPv6Address > | CNList |
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::BUTransmitIfEntry * | fetchBUTransmitIfEntry (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... | |
TimerIfEntry * | getTimerIfEntry (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... | |
TimerIfEntry * | searchTimerIfEntry (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 | |
IInterfaceTable * | ift |
IPv6RoutingTable * | rt6 |
BindingUpdateList * | bul |
BindingCache * | bc |
IPv6Tunneling * | tunneling |
IPv6NeighbourDiscovery * | ipv6nd |
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... | |
Implements RFC 3775 Mobility Support in IPv6.
|
protected |
|
protected |
holds the tuples of currently available {InterfaceID, CoA} pairs
|
protected |
|
virtual |
Destructur.
Ensures that the memory from the list with all TimerIfEntry's gets properly released.
|
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().
|
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().
|
protected |
Send a BU depending on current status of:
Return true or false depending on whether a BU has been sent or not.
Referenced by handleBULExpiry(), processCoTMessage(), processHoTMessage(), and returningHome().
|
protected |
Constructs and send a BA to the IPv6 module.
Only applicable to HAs and CNs.
Referenced by processBUMessage(), and validateBUMessage().
|
protected |
Creates and sends Binding Error message.
Referenced by processHoAOpt().
|
protected |
Creates a Binding Refresh Request and sends it to the IPv6 module.
Referenced by sendPeriodicBRR().
|
protected |
Method for creating and sending a BU by a MN.
Referenced by sendPeriodicBU().
|
protected |
Creates and sends a CoTI message to the specified destination.
Referenced by checkForBUtoCN(), handleTokenExpiry(), and initReturnRoutability().
|
protected |
Creates and sends a HoTI message to the specified destination.
Referenced by checkForBUtoCN(), handleTokenExpiry(), and initReturnRoutability().
|
protected |
Creates or overwrites a timer for BC expiry that fires at provided scheduledTime.
Referenced by processBUMessage().
|
protected |
|
protected |
Creates or overwrites a timer for BUL expiry that fires at provided scheduledTime.
Referenced by handleBULExpiry(), and processBAMessage().
|
protected |
This method finally creates the timer structure and schedules the message for sending.
Referenced by createBUTimer(), createDeregisterBUTimer(), handleBULExpiry(), initiateMIPv6Protocol(), and sendBUtoCN().
|
protected |
|
inlineprotected |
Creates or overwrites a timer for care-of keygen token expiry that fires at provided scheduledTime.
Referenced by processCoTMessage().
|
protected |
Similiar to the previous one, this method creates an BU timer with registration lifetime equal to 0.
Referenced by createBUTimer(), and returningHome().
|
inlineprotected |
Creates or overwrites a timer for home keygen token expiry that fires at provided scheduledTime.
Referenced by processHoTMessage().
|
protected |
Creates and schedules a timer for either a HoTI or a CoTI transmission.
Referenced by createAndSendCoTIMessage(), and createAndSendHoTIMessage().
|
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
|
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().
|
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().
|
protected |
Handles the expiry of a BC entry.
Entry is removed from BC and tunnels/routing paths are destroyed.
Referenced by handleMessage().
|
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().
|
overrideprotectedvirtual |
|
private |
Handles the event that indicates that a {care-of,home} keygen token has expired.
Referenced by handleMessage().
|
overrideprotectedvirtual |
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().
|
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().
|
inlineoverrideprotectedvirtual |
|
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.
|
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().
|
protected |
Processes the Binding Refresh Message.
Referenced by processMobilityMessage().
|
protected |
Process a BU - only applicable to HAs and CNs.
Referenced by processMobilityMessage().
|
protected |
Create and send a CoT message.
Referenced by processMobilityMessage().
|
protected |
Like processHoTMessage(), but related to CoT.
Referenced by processMobilityMessage().
|
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().
|
protected |
Create and send a HoT message.
Referenced by processMobilityMessage().
|
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().
|
protected |
This is where all the mobility messages are sifted through and sent to appropriate functions for processing.
Referenced by handleMessage().
|
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().
|
protected |
Remove all entries from the interfaceCoAList.
Referenced by processBAMessage().
|
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().
|
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.
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().
|
protected |
Searches for a transmitEntry with the given destination address which is of type timerType.
Returns nullptr if no such entry exists.
|
protected |
Creates a timer for sending a BU.
Referenced by checkForBUtoCN(), and initReturnRoutability().
|
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().
|
protected |
Handles a fired BRR message transmission structure.
Creates and sends and appropriate Binding Refresh Request. Transmission structure is rescheduled afterwards.
Referenced by handleMessage().
|
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().
|
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().
|
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().
|
protected |
Update the an entry of the BUL with the provided parameters.
Referenced by createAndSendBUMessage().
|
protected |
Validates a Binding Acknowledgement for a mobile node.
Referenced by processBAMessage().
|
protected |
Similiar to validateBUMessage().
However, this one is used only by HA to verify deregistration BU.
Referenced by processBUMessage().
|
protected |
Validate a BU - only applicable to HAs and CNs.
Referenced by processBUMessage().
|
protected |
Like validateHoTMessage(), but related to CoT.
Referenced by processCoTMessage().
|
protected |
Verifies a HoT according to the RFC, Section 11.6.2.
Referenced by processHoTMessage().
|
protected |
Perform validity checks according to RFC 3775 - Section 6.4.
Referenced by processType2RH().
|
protected |
|
protected |
Referenced by checkForBUtoCN(), createBUTimer(), handleBULExpiry(), handleTokenExpiry(), initialize(), initiateMIPv6Protocol(), initReturnRoutability(), processBAMessage(), processBRRMessage(), processCoTMessage(), processHoTMessage(), returningHome(), sendPeriodicBU(), sendTestInit(), triggerRouteOptimization(), updateBUL(), validateBAck(), validateCoTMessage(), and validateHoTMessage().
|
protected |
Referenced by initialize(), initiateMIPv6Protocol(), processBAMessage(), returningHome(), and triggerRouteOptimization().
|
protected |
|
protected |
Referenced by initialize(), processBAMessage(), and removeCoAEntries().
|
protected |
Referenced by initialize(), and processBAMessage().
|
protected |
Referenced by initiateMIPv6Protocol(), processBAMessage(), and returningHome().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |