20 #ifndef NDN_GLOBAL_ROUTER_H 21 #define NDN_GLOBAL_ROUTER_H 23 #include "ns3/ndnSIM/model/ndn-common.hpp" 25 #include "ns3/object.h" 48 typedef std::tuple<Ptr<GlobalRouter>, shared_ptr<Face>, Ptr<GlobalRouter>>
Incidency;
124 Ptr<L3Protocol> m_ndn;
128 static uint32_t m_idCounter;
134 return std::get<0>(a) == std::get<0>(b) && std::get<1>(a) == std::get<1>(b)
135 && std::get<2>(a) == std::get<2>(b);
147 #endif // NDN_GLOBAL_ROUTER_H void AddLocalPrefix(shared_ptr< Name > prefix)
Add new locally exported prefix.
Copyright (c) 2011-2015 Regents of the University of California.
GlobalRouter()
Default constructor.
std::list< shared_ptr< Name > > LocalPrefixList
List of locally exported prefixes.
Class representing global router interface for ndnSIM.
const LocalPrefixList & GetLocalPrefixes() const
Get list of locally exported prefixes.
std::tuple< Ptr< GlobalRouter >, shared_ptr< Face >, Ptr< GlobalRouter > > Incidency
Graph edge.
void AddIncidency(shared_ptr< Face > face, Ptr< GlobalRouter > ndn)
Add edge to the node.
virtual void NotifyNewAggregate()
Notify when the object is aggregated to another object (e.g., Node)
std::list< Incidency > IncidencyList
List of graph edges.
uint32_t GetId() const
Get numeric ID of the node (internally assigned)
Copyright (c) 2011-2015 Regents of the University of California.
IncidencyList & GetIncidencies()
Get list of edges that are connected to this node.
ndn L3Protocol
Copyright (c) 2011-2015 Regents of the University of California.
static TypeId GetTypeId()
Interface ID.
bool operator!=(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)
static void clear()
Clear global state.
Ptr< L3Protocol > GetL3Protocol() const
Helper function to get smart pointer to ndn::L3Protocol object (basically, self)
bool operator==(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)