A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::NdiscCache Class Reference

IPv6 Neighbor Discovery cache. More...

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::NdiscCache:

Classes

class  Entry
 A record that holds information about an NdiscCache entry. More...
 

Public Member Functions

 NdiscCache ()
 Constructor.
 
 ~NdiscCache ()
 Destructor.
 
NdiscCache::EntryAdd (Ipv6Address to)
 Add an entry. More...
 
void Flush ()
 Flush the cache.
 
Ptr< NetDeviceGetDevice () const
 Get the NetDevice associated with this cache. More...
 
Ptr< Ipv6InterfaceGetInterface () const
 Get the Ipv6Interface associated with this cache.
 
uint32_t GetUnresQlen ()
 Get the max number of waiting packet. More...
 
NdiscCache::EntryLookup (Ipv6Address dst)
 Lookup in the cache. More...
 
void Remove (NdiscCache::Entry *entry)
 Delete an entry. More...
 
void SetDevice (Ptr< NetDevice > device, Ptr< Ipv6Interface > interface)
 Set the device and interface. More...
 
void SetUnresQlen (uint32_t unresQlen)
 Set the max number of waiting packet. More...
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Static Public Attributes

static const uint32_t DEFAULT_UNRES_QLEN = 3
 Default value for unres qlen.
 

Private Types

typedef sgi::hash_map
< Ipv6Address,
NdiscCache::Entry
*, Ipv6AddressHash
Cache
 
typedef sgi::hash_map
< Ipv6Address,
NdiscCache::Entry
*, Ipv6AddressHash >::iterator 
CacheI
 

Private Member Functions

 NdiscCache (NdiscCache const &a)
 Copy constructor. More...
 
void DoDispose ()
 Dispose this object.
 
NdiscCacheoperator= (NdiscCache const &a)
 Equal operator. More...
 

Private Attributes

Ptr< NetDevicem_device
 The NetDevice.
 
Ptr< Ipv6Interfacem_interface
 the interface.
 
Cache m_ndCache
 A list of Entry.
 
uint32_t m_unresQlen
 Max number of packet stored in m_waiting.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoInitialize (void)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Detailed Description

IPv6 Neighbor Discovery cache.

Doxygen introspection did not find any typical Config paths.

Attributes

  • UnresolvedQueueSize: Size of the queue for packets pending an NA reply.

No TraceSources are defined for this type.

Definition at line 46 of file ndisc-cache.h.

Constructor & Destructor Documentation

ns3::NdiscCache::NdiscCache ( NdiscCache const &  a)
private

Copy constructor.

Parameters
acache to copy

Member Function Documentation

Ptr< NetDevice > ns3::NdiscCache::GetDevice ( void  ) const

Get the NetDevice associated with this cache.

Returns
NetDevice

Definition at line 83 of file ndisc-cache.cc.

References m_device, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Icmpv6L4Protocol::Lookup().

TypeId ns3::NdiscCache::GetTypeId ( void  )
static

Get the type ID.

Returns
type ID

Definition at line 37 of file ndisc-cache.cc.

References DEFAULT_UNRES_QLEN, m_unresQlen, and ns3::TypeId::SetParent().

uint32_t ns3::NdiscCache::GetUnresQlen ( )

Get the max number of waiting packet.

Returns
max number

Definition at line 146 of file ndisc-cache.cc.

References m_unresQlen, and NS_LOG_FUNCTION_NOARGS.

NdiscCache::Entry * ns3::NdiscCache::Lookup ( Ipv6Address  dst)

Lookup in the cache.

Parameters
dstdestination address
Returns
the entry if found, 0 otherwise

Definition at line 89 of file ndisc-cache.cc.

References m_ndCache, and NS_LOG_FUNCTION.

Referenced by ns3::Icmpv6L4Protocol::HandleNA(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Icmpv6L4Protocol::HandleRedirection(), ns3::Icmpv6L4Protocol::HandleRS(), ns3::Icmpv6L4Protocol::Lookup(), and ns3::Icmpv6L4Protocol::ReceiveLLA().

NdiscCache& ns3::NdiscCache::operator= ( NdiscCache const &  a)
private

Equal operator.

Parameters
acache to copy
void ns3::NdiscCache::Remove ( NdiscCache::Entry entry)

Delete an entry.

Parameters
entrypointer to delete from the list.

Definition at line 112 of file ndisc-cache.cc.

References ns3::NdiscCache::Entry::ClearWaitingPacket(), m_ndCache, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Icmpv6L4Protocol::Lookup().

void ns3::NdiscCache::SetDevice ( Ptr< NetDevice device,
Ptr< Ipv6Interface interface 
)

Set the device and interface.

Parameters
devicethe device
interfacethe IPv6 interface

Definition at line 70 of file ndisc-cache.cc.

References m_device, m_interface, and NS_LOG_FUNCTION.

Referenced by ns3::Icmpv6L4Protocol::CreateCache().

void ns3::NdiscCache::SetUnresQlen ( uint32_t  unresQlen)

Set the max number of waiting packet.

Parameters
unresQlenvalue to set

Definition at line 140 of file ndisc-cache.cc.

References m_unresQlen, and NS_LOG_FUNCTION.


The documentation for this class was generated from the following files: