IPv6 Neighbor Discovery cache. More...
#include "ndisc-cache.h"
 Inheritance diagram for ns3::NdiscCache:
 Inheritance diagram for ns3::NdiscCache: Collaboration diagram for ns3::NdiscCache:
 Collaboration diagram for ns3::NdiscCache:| Classes | |
| class | Entry | 
| A record that holds information about a NdiscCache entry.  More... | |
| Public Types | |
| typedef std::pair< Ptr< Packet >, Ipv6Header > | Ipv6PayloadHeaderPair | 
| Pair of a packet and an Ipv4 header. | |
| Public Member Functions | |
| NdiscCache () | |
| Constructor. | |
| NdiscCache (const NdiscCache &)=delete | |
| ~NdiscCache () override | |
| Destructor. | |
| virtual NdiscCache::Entry * | Add (Ipv6Address to) | 
| Add an entry. | |
| void | Flush () | 
| Flush the cache. | |
| Ptr< NetDevice > | GetDevice () const | 
| Get the NetDevice associated with this cache. | |
| Ptr< Ipv6Interface > | GetInterface () const | 
| Get the Ipv6Interface associated with this cache. | |
| uint32_t | GetUnresQlen () | 
| Get the max number of waiting packet. | |
| virtual NdiscCache::Entry * | Lookup (Ipv6Address dst) | 
| Lookup in the cache. | |
| std::list< NdiscCache::Entry * > | LookupInverse (Address dst) | 
| Lookup in the cache for a MAC address. | |
| NdiscCache & | operator= (const NdiscCache &)=delete | 
| void | PrintNdiscCache (Ptr< OutputStreamWrapper > stream) | 
| Print the NDISC cache entries. | |
| void | Remove (NdiscCache::Entry *entry) | 
| Delete an entry. | |
| void | RemoveAutoGeneratedEntries () | 
| Clear the NDISC cache of all Auto-Generated entries. | |
| void | SetDevice (Ptr< NetDevice > device, Ptr< Ipv6Interface > interface, Ptr< Icmpv6L4Protocol > icmpv6) | 
| Set the device and interface. | |
| void | SetUnresQlen (uint32_t unresQlen) | 
| Set the max number of waiting packet. | |
|  Public Member Functions inherited from ns3::Object | |
| Object () | |
| Constructor. | |
| ~Object () override | |
| Destructor. | |
| void | AggregateObject (Ptr< Object > other) | 
| Aggregate two Objects together. | |
| void | Dispose () | 
| Dispose of this Object. | |
| AggregateIterator | GetAggregateIterator () const | 
| Get an iterator to the Objects aggregated to this one. | |
| TypeId | GetInstanceTypeId () const final | 
| Get the most derived TypeId for this Object. | |
| template<typename T > | |
| Ptr< T > | GetObject () const | 
| Get a pointer to the requested aggregated Object. | |
| template<> | |
| Ptr< Object > | GetObject () const | 
| Specialization of ()  for objects of type ns3::Object. | |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const | 
| Get a pointer to the requested aggregated Object by TypeId. | |
| template<> | |
| Ptr< Object > | GetObject (TypeId tid) const | 
| Specialization of (TypeId tid)  for objects of type ns3::Object. | |
| void | Initialize () | 
| Invoke DoInitialize on all Objects aggregated to this one. | |
| bool | IsInitialized () const | 
| Check if the object has been initialized. | |
| void | UnidirectionalAggregateObject (Ptr< Object > other) | 
| Aggregate an Object to another Object. | |
|  Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Default constructor. | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. | |
| uint32_t | GetReferenceCount () const | 
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) | 
| Assignment operator. | |
| void | Ref () const | 
| Increment the reference count. | |
| void | Unref () const | 
| Decrement the reference count. | |
|  Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () | 
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const | 
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const | 
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) | 
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) | 
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) | 
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) | 
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) | 
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) | 
| Disconnect from a TraceSource a Callback previously connected without a context. | |
| Static Public Member Functions | |
| static TypeId | GetTypeId () | 
| Get the type ID. | |
|  Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId () | 
| Register this type. | |
|  Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () | 
| Get the type ID. | |
| Static Public Attributes | |
| static const uint32_t | DEFAULT_UNRES_QLEN = 3 | 
| Default value for unres qlen. | |
| Protected Types | |
| typedef std::map< Ipv6Address, NdiscCache::Entry * > | Cache | 
| Neighbor Discovery Cache container. | |
| typedef std::map< Ipv6Address, NdiscCache::Entry * >::iterator | CacheI | 
| Neighbor Discovery Cache container iterator. | |
| Protected Member Functions | |
| void | DoDispose () override | 
| Dispose this object. | |
|  Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object. | |
| virtual void | DoInitialize () | 
| Initialize() implementation. | |
| virtual void | NotifyNewAggregate () | 
| Notify all Objects aggregated to this one of a new Object being aggregated. | |
|  Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) | 
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () | 
| Notifier called once the ObjectBase is fully constructed. | |
| Protected Attributes | |
| Cache | m_ndCache | 
| A list of Entry. | |
| Private Attributes | |
| Ptr< NetDevice > | m_device | 
| The NetDevice. | |
| Ptr< Icmpv6L4Protocol > | m_icmpv6 | 
| the icmpv6 L4 protocol for this cache. | |
| Ptr< Ipv6Interface > | m_interface | 
| the interface. | |
| uint32_t | m_unresQlen | 
| Max number of packet stored in m_waiting. | |
| Additional Inherited Members | |
|  Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () | 
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
IPv6 Neighbor Discovery cache.
Introspection did not find any typical Config paths.
 
No TraceSources are defined for this type.
 Group: Internet
Size of this type is 136 bytes (on a 64-bit architecture).
Definition at line 37 of file ndisc-cache.h.
| 
 | protected | 
Neighbor Discovery Cache container.
Definition at line 449 of file ndisc-cache.h.
| 
 | protected | 
Neighbor Discovery Cache container iterator.
Definition at line 453 of file ndisc-cache.h.
| typedef std::pair<Ptr<Packet>, Ipv6Header> ns3::NdiscCache::Ipv6PayloadHeaderPair | 
Pair of a packet and an Ipv4 header.
Definition at line 148 of file ndisc-cache.h.
| ns3::NdiscCache::NdiscCache | ( | ) | 
| 
 | override | 
Destructor.
Definition at line 46 of file ndisc-cache.cc.
References Flush(), and NS_LOG_FUNCTION.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | delete | 
| 
 | virtual | 
Add an entry.
| to | address to add | 
Definition at line 123 of file ndisc-cache.cc.
References m_ndCache, NS_ASSERT, and NS_LOG_FUNCTION.
| 
 | overrideprotectedvirtual | 
Dispose this object.
Reimplemented from ns3::Object.
Definition at line 53 of file ndisc-cache.cc.
References ns3::Object::DoDispose(), Flush(), m_device, m_icmpv6, m_interface, and NS_LOG_FUNCTION.
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::NdiscCache::Flush | ( | ) | 
Flush the cache.
Definition at line 152 of file ndisc-cache.cc.
References m_ndCache, and NS_LOG_FUNCTION.
Referenced by ~NdiscCache(), ns3::Icmpv6L4Protocol::CreateCache(), DoDispose(), and ns3::Ipv6Interface::SetDown().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Get the NetDevice associated with this cache.
Definition at line 82 of file ndisc-cache.cc.
References m_device, and NS_LOG_FUNCTION.
| Ptr< Ipv6Interface > ns3::NdiscCache::GetInterface | ( | ) | const | 
Get the Ipv6Interface associated with this cache.
Definition at line 75 of file ndisc-cache.cc.
References m_interface, and NS_LOG_FUNCTION.
| 
 | static | 
Get the type ID.
Definition at line 28 of file ndisc-cache.cc.
References DEFAULT_UNRES_QLEN, m_unresQlen, ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), and ns3::TypeId::SetParent().
 Here is the call graph for this function:
 Here is the call graph for this function:| uint32_t ns3::NdiscCache::GetUnresQlen | ( | ) | 
Get the max number of waiting packet.
Definition at line 172 of file ndisc-cache.cc.
References m_unresQlen, and NS_LOG_FUNCTION.
| 
 | virtual | 
Lookup in the cache.
| dst | destination address. | 
Definition at line 89 of file ndisc-cache.cc.
References m_ndCache, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
| std::list< NdiscCache::Entry * > ns3::NdiscCache::LookupInverse | ( | Address | dst | ) | 
Lookup in the cache for a MAC address.
| dst | destination MAC address. | 
Definition at line 105 of file ndisc-cache.cc.
References ns3::NdiscCache::Entry::GetMacAddress(), m_ndCache, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | delete | 
| void ns3::NdiscCache::PrintNdiscCache | ( | Ptr< OutputStreamWrapper > | stream | ) | 
Print the NDISC cache entries.
| stream | the ostream the NDISC cache entries is printed to | 
Definition at line 179 of file ndisc-cache.cc.
References ns3::Names::FindName(), m_device, m_ndCache, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::NdiscCache::Remove | ( | NdiscCache::Entry * | entry | ) | 
Delete an entry.
| entry | pointer to delete from the list. | 
Definition at line 135 of file ndisc-cache.cc.
References ns3::NdiscCache::Entry::ClearWaitingPacket(), m_ndCache, and NS_LOG_FUNCTION.
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::NdiscCache::RemoveAutoGeneratedEntries | ( | ) | 
Clear the NDISC cache of all Auto-Generated entries.
Definition at line 706 of file ndisc-cache.cc.
References m_ndCache, and NS_LOG_FUNCTION.
| void ns3::NdiscCache::SetDevice | ( | Ptr< NetDevice > | device, | 
| Ptr< Ipv6Interface > | interface, | ||
| Ptr< Icmpv6L4Protocol > | icmpv6 ) | 
Set the device and interface.
| device | the device | 
| interface | the IPv6 interface | 
| icmpv6 | the ICMPv6 protocol | 
Definition at line 64 of file ndisc-cache.cc.
References m_device, m_icmpv6, m_interface, and NS_LOG_FUNCTION.
| void ns3::NdiscCache::SetUnresQlen | ( | uint32_t | unresQlen | ) | 
Set the max number of waiting packet.
| unresQlen | value to set | 
Definition at line 165 of file ndisc-cache.cc.
References m_unresQlen, and NS_LOG_FUNCTION.
| 
 | static | 
Default value for unres qlen.
Definition at line 51 of file ndisc-cache.h.
Referenced by GetTypeId().
The NetDevice.
Definition at line 464 of file ndisc-cache.h.
Referenced by DoDispose(), GetDevice(), PrintNdiscCache(), and SetDevice().
| 
 | private | 
the icmpv6 L4 protocol for this cache.
Definition at line 474 of file ndisc-cache.h.
Referenced by DoDispose(), ns3::NdiscCache::Entry::FunctionProbeTimeout(), ns3::NdiscCache::Entry::FunctionRetransmitTimeout(), and SetDevice().
| 
 | private | 
the interface.
Definition at line 469 of file ndisc-cache.h.
Referenced by DoDispose(), GetInterface(), and SetDevice().
| 
 | protected | 
A list of Entry.
Definition at line 458 of file ndisc-cache.h.
Referenced by Add(), ns3::NdiscCache::Entry::AddWaitingPacket(), Flush(), ns3::NdiscCache::Entry::FunctionDelayTimeout(), ns3::NdiscCache::Entry::FunctionProbeTimeout(), ns3::NdiscCache::Entry::FunctionRetransmitTimeout(), Lookup(), LookupInverse(), PrintNdiscCache(), Remove(), RemoveAutoGeneratedEntries(), ns3::NdiscCache::Entry::StartDelayTimer(), ns3::NdiscCache::Entry::StartProbeTimer(), ns3::NdiscCache::Entry::StartReachableTimer(), and ns3::NdiscCache::Entry::StartRetransmitTimer().
| 
 | private | 
Max number of packet stored in m_waiting.
Definition at line 479 of file ndisc-cache.h.
Referenced by GetTypeId(), GetUnresQlen(), and SetUnresQlen().