diff -r 34acfd7ad508 src/routing/global-routing/global-route-manager-impl.cc --- a/src/routing/global-routing/global-route-manager-impl.cc Tue Aug 25 08:52:57 2009 +0200 +++ b/src/routing/global-routing/global-route-manager-impl.cc Fri Aug 28 11:40:25 2009 -0700 @@ -243,6 +243,15 @@ SPFVertex::IsVertexProcessed (void) cons return m_vertexProcessed; } +void +SPFVertex::ClearVertexProcessed (void) +{ + for (uint32_t i = 0; i < this->GetNChildren (); i++) + { + this->GetChild (i)->ClearVertexProcessed (); + } + this->SetVertexProcessed (false); +} // --------------------------------------------------------------------------- // @@ -252,7 +261,8 @@ SPFVertex::IsVertexProcessed (void) cons GlobalRouteManagerLSDB::GlobalRouteManagerLSDB () : - m_database () + m_database (), + m_extdatabase () { NS_LOG_FUNCTION_NOARGS (); } @@ -265,6 +275,12 @@ GlobalRouteManagerLSDB::~GlobalRouteMana { NS_LOG_LOGIC ("free LSA"); GlobalRoutingLSA* temp = i->second; + delete temp; + } + for (uint32_t j=0; jGetLSType() == GlobalRoutingLSA::ASExternalLSAs) { + m_extdatabase.push_back (lsa); + } else + { + m_database.insert (LSDBPair_t (addr, lsa)); + } +} + + GlobalRoutingLSA* +GlobalRouteManagerLSDB::GetExtLSA (uint32_t index) const +{ + return m_extdatabase.at (index); +} + + uint32_t +GlobalRouteManagerLSDB::GetNumExtLSAs () const +{ + return m_extdatabase.size (); } GlobalRoutingLSA* @@ -438,6 +471,7 @@ GlobalRouteManagerImpl::BuildGlobalRouti // DiscoverLSAs () will get zero as the number since no routes have been // found. // + Ptr grouting = rtr->GetRoutingProtocol (); uint32_t numLSAs = rtr->DiscoverLSAs (); NS_LOG_LOGIC ("Found " << numLSAs << " LSAs"); @@ -824,7 +858,7 @@ GlobalRouteManagerImpl::SPFNexthopCalcul " via outgoing interface " << w->GetOutgoingInterfaceId () << " with distance " << distance); } // end W is a router vertes - else + else { NS_ASSERT (w->GetVertexType () == SPFVertex::VertexNetwork); // W is a directly connected network; no next hop is required @@ -1237,6 +1271,14 @@ GlobalRouteManagerImpl::SPFCalculate (Ip // Second stage of SPF calculation procedure SPFProcessStubs (m_spfroot); + for (uint32_t i = 0;iGetNumExtLSAs ();i++) + { + m_spfroot->ClearVertexProcessed (); + GlobalRoutingLSA *extlsa = m_lsdb->GetExtLSA (i); + NS_LOG_LOGIC ("Processing External LSA with id " << extlsa->GetLinkStateId ()); + ProcessASExternals (m_spfroot, extlsa); + } + // // We're all done setting the routing information for the node at the root of // the SPF tree. Delete all of the vertices and corresponding resources. Go @@ -1245,6 +1287,163 @@ GlobalRouteManagerImpl::SPFCalculate (Ip delete m_spfroot; m_spfroot = 0; } + +void +GlobalRouteManagerImpl::ProcessASExternals (SPFVertex* v, GlobalRoutingLSA* extlsa) +{ + NS_LOG_FUNCTION_NOARGS (); + NS_LOG_LOGIC ("Processing external for destination " << + extlsa->GetLinkStateId () << + ", for router " << v->GetVertexId () << + ", advertised by " << extlsa->GetAdvertisingRouter ()); + if (v->GetVertexType () == SPFVertex::VertexRouter) + { + GlobalRoutingLSA *rlsa = v->GetLSA (); + NS_LOG_LOGIC ("Processing router LSA with id " << rlsa->GetLinkStateId ()); + if ((rlsa->GetLinkStateId ()) == (extlsa->GetAdvertisingRouter ())) + { + NS_LOG_LOGIC ("Found advertising router to destination"); + SPFAddASExternal(extlsa,v); + } + } + for (uint32_t i = 0; i < v->GetNChildren (); i++) + { + if (!v->GetChild (i)->IsVertexProcessed ()) + { + NS_LOG_LOGIC ("Vertex's child " << i << " not yet processed, processing..."); + ProcessASExternals (v->GetChild (i), extlsa); + v->GetChild (i)->SetVertexProcessed (true); + } + } +} + +// +// Adding external routes to routing table - modeled after +// SPFAddIntraAddStub() +// + +void +GlobalRouteManagerImpl::SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v) +{ + NS_LOG_FUNCTION_NOARGS (); + + NS_ASSERT_MSG (m_spfroot, + "GlobalRouteManagerImpl::SPFAddASExternal (): Root pointer not set"); + // Two cases to consider: We are advertising the external ourselves + // => No need to add anything + // OR find best path to the advertising router + if (v->GetVertexId () == m_spfroot->GetVertexId ()) + { + NS_LOG_LOGIC ("External is on local host: " + << v->GetVertexId () << "; returning"); + return; + } + NS_LOG_LOGIC ("External is on remote host: " + << extlsa->GetAdvertisingRouter () << "; installing"); + + Ipv4Address routerId = m_spfroot->GetVertexId (); + + NS_LOG_LOGIC ("Vertex ID = " << routerId); + // +// We need to walk the list of nodes looking for the one that has the router +// ID corresponding to the root vertex. This is the one we're going to write +// the routing information to. +// + NodeList::Iterator i = NodeList::Begin (); + for (; i != NodeList::End (); i++) + { + Ptr node = *i; +// +// The router ID is accessible through the GlobalRouter interface, so we need +// to QI for that interface. If there's no GlobalRouter interface, the node +// in question cannot be the router we want, so we continue. +// + Ptr rtr = + node->GetObject (); + + if (rtr == 0) + { + NS_LOG_LOGIC ("No GlobalRouter interface on node " << + node->GetId ()); + continue; + } +// +// If the router ID of the current node is equal to the router ID of the +// root of the SPF tree, then this node is the one for which we need to +// write the routing tables. +// + NS_LOG_LOGIC ("Considering router " << rtr->GetRouterId ()); + + if (rtr->GetRouterId () == routerId) + { + NS_LOG_LOGIC ("Setting routes for node " << node->GetId ()); +// +// Routing information is updated using the Ipv4 interface. We need to QI +// for that interface. If the node is acting as an IP version 4 router, it +// should absolutely have an Ipv4 interface. +// + Ptr ipv4 = node->GetObject (); + NS_ASSERT_MSG (ipv4, + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "QI for interface failed"); +// +// Get the Global Router Link State Advertisement from the vertex we're +// adding the routes to. The LSA will have a number of attached Global Router +// Link Records corresponding to links off of that vertex / node. We're going +// to be interested in the records corresponding to point-to-point links. +// + NS_ASSERT_MSG (v->GetLSA (), + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "Expected valid LSA in SPFVertex* v"); + Ipv4Mask tempmask = extlsa->GetNetworkLSANetworkMask(); + Ipv4Address tempip = extlsa->GetLinkStateId (); + tempip = tempip.CombineMask (tempmask); + + NS_LOG_LOGIC (" Node " << node->GetId () << + " add route to " << tempip << + " with mask " << tempmask << + " using next hop " << v->GetNextHop () << + " via interface " << v->GetOutgoingInterfaceId ()); +// +// Here's why we did all of that work. We're going to add a host route to the +// host address found in the m_linkData field of the point-to-point link +// record. In the case of a point-to-point link, this is the local IP address +// of the node connected to the link. Each of these point-to-point links +// will correspond to a local interface that has an IP address to which +// the node at the root of the SPF tree can send packets. The vertex +// (corresponding to the node that has these links and interfaces) has +// an m_nextHop address precalculated for us that is the address to which the +// root node should send packets to be forwarded to these IP addresses. +// Similarly, the vertex has an m_rootOif (outbound interface index) to +// which the packets should be send for forwarding. +// + Ptr router = node->GetObject (); + if (router == 0) + { + continue; + } + Ptr gr = router->GetRoutingProtocol (); + NS_ASSERT (gr); + if (v->GetOutgoingInterfaceId () >= 0) + { + gr->AddASExternalRouteTo (tempip, tempmask, v->GetNextHop (), v->GetOutgoingInterfaceId ()); + NS_LOG_LOGIC ("Node " << node->GetId () << + " add network route to " << tempip << + " using next hop " << v->GetNextHop () << + " via interface " << v->GetOutgoingInterfaceId ()); + } + else + { + NS_LOG_LOGIC ("Node " << node->GetId () << + " NOT able to add network route to " << tempip << + " using next hop " << v->GetNextHop () << + " since outgoing interface id is negative"); + } + return; + } // if + } // for +} + // Processing logic from RFC 2328, page 166 and quagga ospf_spf_process_stubs () // stub link records will exist for point-to-point interfaces and for diff -r 34acfd7ad508 src/routing/global-routing/global-route-manager-impl.h --- a/src/routing/global-routing/global-route-manager-impl.h Tue Aug 25 08:52:57 2009 +0200 +++ b/src/routing/global-routing/global-route-manager-impl.h Fri Aug 28 11:40:25 2009 -0700 @@ -26,6 +26,7 @@ #include #include #include +#include #include "ns3/object.h" #include "ns3/ptr.h" #include "ns3/ipv4-address.h" @@ -76,7 +77,7 @@ public: enum VertexType { VertexUnknown = 0, /**< Uninitialized Link Record */ VertexRouter, /**< Vertex representing a router in the topology */ - VertexNetwork /**< Vertex representing a network in the topology */ + VertexNetwork /**< Vertex representing a network in the topology */ }; /** @@ -563,6 +564,9 @@ public: * @returns value of underlying flag */ bool IsVertexProcessed (void) const; + + void ClearVertexProcessed (void); + private: VertexType m_vertexType; Ipv4Address m_vertexId; @@ -683,12 +687,18 @@ public: * @see SPFVertex */ void Initialize (); + + GlobalRoutingLSA* GetExtLSA (uint32_t index) const; + uint32_t GetNumExtLSAs () const; + private: typedef std::map LSDBMap_t; typedef std::pair LSDBPair_t; LSDBMap_t m_database; + std::vector m_extdatabase; + /** * @brief GlobalRouteManagerLSDB copy construction is disallowed. There's no * need for it and a compiler provided shallow copy would be wrong. @@ -775,6 +785,7 @@ private: bool CheckForStubNode (Ipv4Address root); void SPFCalculate (Ipv4Address root); void SPFProcessStubs (SPFVertex* v); + void ProcessASExternals (SPFVertex* v, GlobalRoutingLSA* extlsa); void SPFNext (SPFVertex*, CandidateQueue&); int SPFNexthopCalculation (SPFVertex* v, SPFVertex* w, GlobalRoutingLinkRecord* l, uint32_t distance); @@ -784,6 +795,7 @@ private: void SPFIntraAddRouter (SPFVertex* v); void SPFIntraAddTransit (SPFVertex* v); void SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* v); + void SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v); int32_t FindOutgoingInterfaceId (Ipv4Address a, Ipv4Mask amask = Ipv4Mask("255.255.255.255")); }; diff -r 34acfd7ad508 src/routing/global-routing/global-router-interface.cc --- a/src/routing/global-routing/global-router-interface.cc Tue Aug 25 08:52:57 2009 +0200 +++ b/src/routing/global-routing/global-router-interface.cc Fri Aug 28 11:40:25 2009 -0700 @@ -413,6 +413,10 @@ GlobalRoutingLSA::Print (std::ostream &o { os << " (GlobalRoutingLSA::NetworkLSA)"; } + else if (m_lsType == GlobalRoutingLSA::ASExternalLSAs) + { + os << " (GlobalRoutingLSA::ASExternalLSA)"; + } else { os << "(Unknown LSType)"; @@ -474,6 +478,12 @@ GlobalRoutingLSA::Print (std::ostream &o } os << "---------- End NetworkLSA Link Record ----------" << std::endl; } + else if (m_lsType == GlobalRoutingLSA::ASExternalLSAs) + { + os << "---------- ASExternalLSA Link Record --------" << std::endl; + os << "m_linkStateId = " << m_linkStateId << std::endl; + os << "m_networkLSANetworkMask = " << m_networkLSANetworkMask << std::endl; + } else { NS_ASSERT_MSG(0, "Illegal LSA LSType: " << m_lsType); @@ -532,6 +542,12 @@ GlobalRouter::DoDispose () { NS_LOG_FUNCTION_NOARGS (); m_routingProtocol = 0; + for (InjectedRoutesI k = m_injectedRoutes.begin (); + k != m_injectedRoutes.end (); + k = m_injectedRoutes.erase (k)) + { + delete (*k); + } Object::DoDispose (); } @@ -568,8 +584,8 @@ GlobalRouter::GetRouterId (void) const // and build the Link State Advertisements that reflect them and their associated // networks. // - uint32_t -GlobalRouter::DiscoverLSAs (void) +uint32_t +GlobalRouter::DiscoverLSAs () { NS_LOG_FUNCTION_NOARGS (); Ptr node = GetObject (); @@ -696,6 +712,22 @@ GlobalRouter::DiscoverLSAs (void) BuildNetworkLSAs (c); } + // + // Build injected route LSAs as external routes + // RFC 2328, section 12.4.4 + // + for (InjectedRoutesCI i = m_injectedRoutes.begin(); + i != m_injectedRoutes.end(); + i++) + { + GlobalRoutingLSA *pLSA = new GlobalRoutingLSA; + pLSA->SetLSType (GlobalRoutingLSA::ASExternalLSAs); + pLSA->SetLinkStateId ((*i)->GetDestNetwork ()); + pLSA->SetAdvertisingRouter (m_routerId); + pLSA->SetNetworkLSANetworkMask ((*i)->GetDestNetworkMask ()); + pLSA->SetStatus (GlobalRoutingLSA::LSA_SPF_NOT_EXPLORED); + m_LSAs.push_back (pLSA); + } return m_LSAs.size (); } @@ -1467,6 +1499,86 @@ GlobalRouter::GetLSA (uint32_t n, Global return false; } +void +GlobalRouter::InjectRoute (Ipv4Address network, Ipv4Mask networkMask) +{ + NS_LOG_FUNCTION (network << networkMask); + Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); +// +// Interface number does not matter here, using 1. +// + *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, + networkMask, + 1); + m_injectedRoutes.push_back (route); +} + +Ipv4RoutingTableEntry * +GlobalRouter::GetInjectedRoute (uint32_t index) +{ + NS_LOG_FUNCTION (index); + if (index < m_injectedRoutes.size ()) + { + uint32_t tmp = 0; + for (InjectedRoutesCI i = m_injectedRoutes.begin (); + i != m_injectedRoutes.end (); + i++) + { + if (tmp == index) + { + return *i; + } + tmp++; + } + } + NS_ASSERT (false); + // quiet compiler. + return 0; +} + +uint32_t +GlobalRouter::GetNInjectedRoutes () +{ + return m_injectedRoutes.size (); +} + +void +GlobalRouter::RemoveInjectedRoute (uint32_t index) +{ + NS_LOG_FUNCTION (index); + NS_ASSERT (index < m_injectedRoutes.size ()); + uint32_t tmp = 0; + for (InjectedRoutesI i = m_injectedRoutes.begin (); i != m_injectedRoutes.end (); i++) + { + if (tmp == index) + { + NS_LOG_LOGIC ("Removing route " << index << "; size = " << m_injectedRoutes.size()); + delete *i; + m_injectedRoutes.erase (i); + return; + } + tmp++; + } +} + +bool +GlobalRouter::WithdrawRoute (Ipv4Address network, Ipv4Mask networkMask) +{ + NS_LOG_FUNCTION (index); + for (InjectedRoutesI i = m_injectedRoutes.begin (); i != m_injectedRoutes.end (); i++) + { + if ((*i)->GetDestNetwork () == network && (*i)->GetDestNetworkMask () == networkMask) + { + NS_LOG_LOGIC ("Withdrawing route to network/mask " << network << "/" << networkMask); + delete *i; + m_injectedRoutes.erase (i); + return true; + } + } + return false; +} + + // // Link through the given channel and find the net device that's on the // other end. This only makes sense with a point-to-point channel. diff -r 34acfd7ad508 src/routing/global-routing/global-router-interface.h --- a/src/routing/global-routing/global-router-interface.h Tue Aug 25 08:52:57 2009 +0200 +++ b/src/routing/global-routing/global-router-interface.h Fri Aug 28 11:40:25 2009 -0700 @@ -32,6 +32,7 @@ #include "ns3/net-device-container.h" #include "ns3/bridge-net-device.h" #include "ns3/global-route-manager.h" +#include "ns3/ipv4-routing-table-entry.h" namespace ns3 { @@ -614,6 +615,8 @@ public: * advertisements after a network topology change by calling DiscoverLSAs * and then by reading those advertisements. * + * \param List of routing table entries of external routes to be injected. + * * @see GlobalRoutingLSA * @see GlobalRouter::GetLSA () * @returns The number of Global Routing Link State Advertisements. @@ -657,6 +660,63 @@ public: */ bool GetLSA (uint32_t n, GlobalRoutingLSA &lsa) const; +/** + * @brief Inject a route to be circulated to other routers as an external + * route + * + * Most of the public API for Ipv4GlobalRouting is for adding or deleting + * routes that will be installed on this node. However, this class also + * stores routes that are intended to be propagated as AS-external-LSAs. + * + * @param network The Network to inject + * @param networkMask The Network Mask to inject + */ + void InjectRoute (Ipv4Address network, Ipv4Mask networkMask); + +/** + * @brief Get the number of injected routes that have been added + * to the routing table. + * @return number of injected routes + */ + uint32_t GetNInjectedRoutes (void); + +/** + * @brief Return the injected route indexed by i + * @param i the index of the route + * @return a pointer to that Ipv4RoutingTableEntry is returned + * + */ + Ipv4RoutingTableEntry *GetInjectedRoute (uint32_t i); + +/** + * @brief Withdraw a route from the global unicast routing table. + * + * Calling this function will cause all indexed routes numbered above + * index i to have their index decremented. For instance, it is possible to + * remove N injected routes by calling RemoveInjectedRoute (0) N times. + * + * @param i The index (into the injected routing list) of the route to remove. + * + * @see GlobalRouter::WithdrawRoute () + */ + void RemoveInjectedRoute (uint32_t i); + +/** + * @brief Withdraw a route from the global unicast routing table. + * + * Calling this function will cause all indexed routes numbered above + * index i to have their index decremented. For instance, it is possible to + * remove N injected routes by calling RemoveInjectedRoute (0) N times. + * + * @param i The index (into the injected routing list) of the route to remove. + * @param network The Network to inject + * @param networkMask The Network Mask to inject + * @return whether the operation succeeded (will return false if no such route) + * + * @see GlobalRouter::RemoveInjectedRoute () + */ + bool WithdrawRoute (Ipv4Address network, Ipv4Mask networkMask); + private: virtual ~GlobalRouter (); void ClearLSAs (void); @@ -679,6 +739,11 @@ private: Ipv4Address m_routerId; Ptr m_routingProtocol; + + typedef std::list InjectedRoutes; + typedef std::list::const_iterator InjectedRoutesCI; + typedef std::list::iterator InjectedRoutesI; + InjectedRoutes m_injectedRoutes; // Routes we are exporting // inherited from Object virtual void DoDispose (void); diff -r 34acfd7ad508 src/routing/global-routing/ipv4-global-routing.cc --- a/src/routing/global-routing/ipv4-global-routing.cc Tue Aug 25 08:52:57 2009 +0200 +++ b/src/routing/global-routing/ipv4-global-routing.cc Fri Aug 28 11:40:25 2009 -0700 @@ -98,10 +98,27 @@ Ipv4GlobalRouting::AddNetworkRouteTo (Ip m_networkRoutes.push_back (route); } +void +Ipv4GlobalRouting::AddASExternalRouteTo (Ipv4Address network, + Ipv4Mask networkMask, + Ipv4Address nextHop, + uint32_t interface) +{ + NS_LOG_FUNCTION (network << networkMask << nextHop); + Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); + *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, + networkMask, + nextHop, + interface); + m_ASexternalRoutes.push_back (route); +} + + Ptr Ipv4GlobalRouting::LookupGlobal (Ipv4Address dest) { NS_LOG_FUNCTION_NOARGS (); + NS_LOG_LOGIC ("Looking for route for destination " << dest); Ptr rtentry = 0; bool found = false; Ipv4RoutingTableEntry* route = 0; @@ -137,6 +154,23 @@ Ipv4GlobalRouting::LookupGlobal (Ipv4Add } } } + if (found == false) + { + for (ASExternalRoutesI k = m_ASexternalRoutes.begin (); + k != m_ASexternalRoutes.end (); + k++) + { + Ipv4Mask mask = (*k)->GetDestNetworkMask (); + Ipv4Address entry = (*k)->GetDestNetwork (); + if (mask.IsMatch (dest, entry)) + { + NS_LOG_LOGIC ("Found external route" << *k); + route = (*k); + found = true; + break; + } + } + } if (found == true) { rtentry = Create (); @@ -161,6 +195,7 @@ Ipv4GlobalRouting::GetNRoutes (void) uint32_t n = 0; n += m_hostRoutes.size (); n += m_networkRoutes.size (); + n += m_ASexternalRoutes.size (); return n; } @@ -184,16 +219,31 @@ Ipv4GlobalRouting::GetRoute (uint32_t in } index -= m_hostRoutes.size (); uint32_t tmp = 0; - for (NetworkRoutesI j = m_networkRoutes.begin (); - j != m_networkRoutes.end (); - j++) + if (index < m_networkRoutes.size()) { - if (tmp == index) + for (NetworkRoutesI j = m_networkRoutes.begin (); + j != m_networkRoutes.end (); + j++) { - return *j; + if (tmp == index) + { + return *j; + } + tmp++; } - tmp++; } + index -= m_networkRoutes.size(); + tmp = 0; + for (ASExternalRoutesI k = m_ASexternalRoutes.begin (); + k != m_ASexternalRoutes.end (); + k++) + { + if (tmp == index) + { + return *k; + } + tmp++; + } NS_ASSERT (false); // quiet compiler. return 0; @@ -236,6 +286,22 @@ Ipv4GlobalRouting::RemoveRoute (uint32_t } tmp++; } + index -= m_networkRoutes.size (); + tmp = 0; + for (ASExternalRoutesI k = m_ASexternalRoutes.begin (); + k != m_ASexternalRoutes.end (); + k++) + { + if (tmp == index) + { + NS_LOG_LOGIC ("Removing route " << index << "; size = " << m_ASexternalRoutes.size()); + delete *k; + m_ASexternalRoutes.erase (k); + NS_LOG_LOGIC ("Done removing network route " << index << "; network route remaining size = " << m_networkRoutes.size()); + return; + } + tmp++; + } NS_ASSERT (false); } @@ -255,6 +321,13 @@ Ipv4GlobalRouting::DoDispose (void) { delete (*j); } + for (ASExternalRoutesI l = m_ASexternalRoutes.begin (); + l != m_ASexternalRoutes.end (); + l = m_ASexternalRoutes.erase (l)) + { + delete (*l); + } + Ipv4RoutingProtocol::DoDispose (); } diff -r 34acfd7ad508 src/routing/global-routing/ipv4-global-routing.h --- a/src/routing/global-routing/ipv4-global-routing.h Tue Aug 25 08:52:57 2009 +0200 +++ b/src/routing/global-routing/ipv4-global-routing.h Fri Aug 28 11:40:25 2009 -0700 @@ -147,6 +147,20 @@ public: uint32_t interface); /** + * \brief Add an external route to the global routing table. + * + * \param network The Ipv4Address network for this route. + * \param networkMask The Ipv4Mask to extract the network. + * \param nextHop The next hop Ipv4Address + * \param interface The network interface index used to send packets to the + * destination. + */ + void AddASExternalRouteTo (Ipv4Address network, + Ipv4Mask networkMask, + Ipv4Address nextHop, + uint32_t interface); + +/** * \brief Get the number of individual unicast routes that have been added * to the routing table. * @@ -204,12 +218,16 @@ private: typedef std::list NetworkRoutes; typedef std::list::const_iterator NetworkRoutesCI; typedef std::list::iterator NetworkRoutesI; + typedef std::list ASExternalRoutes; + typedef std::list::const_iterator ASExternalRoutesCI; + typedef std::list::iterator ASExternalRoutesI; Ptr LookupGlobal (Ipv4Address dest); HostRoutes m_hostRoutes; NetworkRoutes m_networkRoutes; - + ASExternalRoutes m_ASexternalRoutes; // External routes imported + Ptr m_ipv4; };