diff --git a/src/inet/networklayer/icmpv6/Ipv6NeighbourDiscovery.cc b/src/inet/networklayer/icmpv6/Ipv6NeighbourDiscovery.cc index 9f703e9e73a..8efb3370d7d 100644 --- a/src/inet/networklayer/icmpv6/Ipv6NeighbourDiscovery.cc +++ b/src/inet/networklayer/icmpv6/Ipv6NeighbourDiscovery.cc @@ -2100,9 +2100,7 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie) // Section 7.2.6: Sending Unsolicited Neighbor Advertisements #ifdef INET_WITH_xMIPv6 Enter_Method("sendUnsolicitedNa"); -#endif /* INET_WITH_xMIPv6 */ -#ifndef INET_WITH_xMIPv6 // In some cases a node may be able to determine that its link-layer // address has changed (e.g., hot-swap of an interface card) and may // wish to inform its neighbors of the new link-layer address quickly. @@ -2110,33 +2108,25 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie) // unsolicited Neighbor Advertisement messages to the all-nodes // multicast address. These advertisements MUST be separated by at // least RetransTimer seconds. -#else /* INET_WITH_xMIPv6 */ auto na = makeShared(); Ipv6Address myIPv6Addr = ie->getProtocolData()->getPreferredAddress(); -#endif /* INET_WITH_xMIPv6 */ // The Target Address field in the unsolicited advertisement is set to // an IP address of the interface, and the Target Link-Layer Address // option is filled with the new link-layer address. -#ifdef INET_WITH_xMIPv6 na->setTargetAddress(myIPv6Addr); auto sla = new Ipv6NdTargetLinkLayerAddress(); sla->setLinkLayerAddress(ie->getMacAddress()); na->getOptionsForUpdate().appendOption(sla); na->addChunkLength(IPv6ND_LINK_LAYER_ADDRESS_OPTION_LENGTH); -#endif /* INET_WITH_xMIPv6 */ // The Solicited flag MUST be set to zero, in order to avoid confusing // the Neighbor Unreachability Detection algorithm. -#ifdef INET_WITH_xMIPv6 na->setSolicitedFlag(false); -#endif /* INET_WITH_xMIPv6 */ // If the node is a router, it MUST set the Router flag to one; // otherwise it MUST set it to zero. -#ifdef INET_WITH_xMIPv6 na->setRouterFlag(rt6->isRouter()); -#endif /* INET_WITH_xMIPv6 */ // The Override flag MAY be set to either zero or one. In either case, // neighboring nodes will immediately change the state of their Neighbor @@ -2145,9 +2135,7 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie) // one, neighboring nodes will install the new link-layer address in // their caches. Otherwise, they will ignore the new link-layer // address, choosing instead to probe the cached address. -#ifdef INET_WITH_xMIPv6 na->setOverrideFlag(true); -#endif /* INET_WITH_xMIPv6 */ // A node that has multiple IP addresses assigned to an interface MAY // multicast a separate Neighbor Advertisement for each address. In @@ -2174,7 +2162,6 @@ void Ipv6NeighbourDiscovery::sendUnsolicitedNa(NetworkInterface *ie) // Neighbor Unreachability Detection algorithm ensures that all nodes // obtain a reachable link-layer address, though the delay may be // slightly longer. -#ifdef INET_WITH_xMIPv6 auto packet = new Packet("NApacket"); Icmpv6::insertCrc(crcMode, na, packet); packet->insertAtFront(na); diff --git a/src/inet/networklayer/ipv6/Ipv6InterfaceData.cc b/src/inet/networklayer/ipv6/Ipv6InterfaceData.cc index a90d63ac0a8..413e153449a 100644 --- a/src/inet/networklayer/ipv6/Ipv6InterfaceData.cc +++ b/src/inet/networklayer/ipv6/Ipv6InterfaceData.cc @@ -71,9 +71,6 @@ std::string Ipv6InterfaceData::RouterMulticastData::detailedInfo() Ipv6InterfaceData::Ipv6InterfaceData() : InterfaceProtocolData(NetworkInterface::F_IPV6_DATA) { -#ifdef INET_WITH_xMIPv6 -// rt6 = IPv6RoutingTableAccess().get(); -#endif /* INET_WITH_xMIPv6 */ /*******************Setting host/node/router Protocol Constants************/ routerConstants.maxInitialRtrAdvertInterval = IPv6_MAX_INITIAL_RTR_ADVERT_INTERVAL; routerConstants.maxInitialRtrAdvertisements = IPv6_MAX_INITIAL_RTR_ADVERTISEMENTS; @@ -85,15 +82,6 @@ Ipv6InterfaceData::Ipv6InterfaceData() hostConstants.rtrSolicitationInterval = IPv6_RTR_SOLICITATION_INTERVAL; hostConstants.maxRtrSolicitations = IPv6_MAX_RTR_SOLICITATIONS; -#ifdef INET_WITH_xMIPv6 - hostConstants.initialBindAckTimeout = MIPv6_INITIAL_BINDACK_TIMEOUT; // MIPv6: added by Zarrar Yousaf @ CNI UniDo 17.06.07 - hostConstants.maxBindAckTimeout = MIPv6_MAX_BINDACK_TIMEOUT; // MIPv6: added by Zarrar Yousaf @ CNI UniDo 17.06.07 - hostConstants.initialBindAckTimeoutFirst = MIPv6_INITIAL_BINDACK_TIMEOUT_FIRST; // MIPv6: 12.9.07 - CB - hostConstants.maxRRBindingLifeTime = MIPv6_MAX_RR_BINDING_LIFETIME; // 14.9.07 - CB - hostConstants.maxHABindingLifeTime = MIPv6_MAX_HA_BINDING_LIFETIME; // 14.9.07 - CB - hostConstants.maxTokenLifeTime = MIPv6_MAX_TOKEN_LIFETIME; // 14.9.07 - CB -#endif /* INET_WITH_xMIPv6 */ - nodeConstants.maxMulticastSolicit = IPv6_MAX_MULTICAST_SOLICIT; nodeConstants.maxUnicastSolicit = IPv6_MAX_UNICAST_SOLICIT; nodeConstants.maxAnycastDelayTime = IPv6_MAX_ANYCAST_DELAY_TIME; @@ -120,16 +108,22 @@ Ipv6InterfaceData::Ipv6InterfaceData() rtrVars.advManagedFlag = false; rtrVars.advOtherConfigFlag = false; -#ifdef INET_WITH_xMIPv6 - rtrVars.advHomeAgentFlag = false; // Zarrar Yousaf Feb-March 2007 -#endif /* INET_WITH_xMIPv6 */ - rtrVars.advLinkMTU = IPv6_MIN_MTU; rtrVars.advReachableTime = IPv6_DEFAULT_ADV_REACHABLE_TIME; rtrVars.advRetransTimer = IPv6_DEFAULT_ADV_RETRANS_TIMER; rtrVars.advCurHopLimit = IPv6_DEFAULT_ADVCURHOPLIMIT; rtrVars.advDefaultLifetime = 3 * rtrVars.maxRtrAdvInterval; +#ifdef INET_WITH_xMIPv6 + rtrVars.advHomeAgentFlag = false; // Zarrar Yousaf Feb-March 2007 + hostConstants.initialBindAckTimeout = MIPv6_INITIAL_BINDACK_TIMEOUT; // MIPv6: added by Zarrar Yousaf @ CNI UniDo 17.06.07 + hostConstants.maxBindAckTimeout = MIPv6_MAX_BINDACK_TIMEOUT; // MIPv6: added by Zarrar Yousaf @ CNI UniDo 17.06.07 + hostConstants.initialBindAckTimeoutFirst = MIPv6_INITIAL_BINDACK_TIMEOUT_FIRST; // MIPv6: 12.9.07 - CB + hostConstants.maxRRBindingLifeTime = MIPv6_MAX_RR_BINDING_LIFETIME; // 14.9.07 - CB + hostConstants.maxHABindingLifeTime = MIPv6_MAX_HA_BINDING_LIFETIME; // 14.9.07 - CB + hostConstants.maxTokenLifeTime = MIPv6_MAX_TOKEN_LIFETIME; // 14.9.07 - CB +#endif /* INET_WITH_xMIPv6 */ + #if USE_MOBILITY if (rtrVars.advDefaultLifetime < 1) rtrVars.advDefaultLifetime = 1;