IPv6 Neighbor Discovery cache. More...
#include <ndisc-cache.h>
Inheritance diagram for ns3::NdiscCache:
Collaboration 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::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. | |
| NdiscCache::Entry * | Lookup (Ipv6Address dst) |
| Lookup in the cache. | |
| void | Remove (NdiscCache::Entry *entry) |
| Delete an entry. | |
| void | SetDevice (Ptr< NetDevice > device, Ptr< Ipv6Interface > interface) |
| 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 () | |
| virtual | ~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 | Start (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| SimpleRefCount (const SimpleRefCount &o) | |
| uint32_t | GetReferenceCount (void) const |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| void | Ref (void) const |
| void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~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. | |
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. | |
| void | DoDispose () |
| Dispose this object. | |
| NdiscCache & | operator= (NdiscCache const &a) |
| Equal operator. | |
Private Attributes | |
| Ptr< NetDevice > | m_device |
| The NetDevice. | |
| Ptr< Ipv6Interface > | m_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 | DoDispose (void) |
| virtual void | DoStart (void) |
| virtual void | NotifyNewAggregate (void) |
IPv6 Neighbor Discovery cache.
Definition at line 46 of file ndisc-cache.h.
|
private |
Definition at line 415 of file ndisc-cache.h.
|
private |
Definition at line 416 of file ndisc-cache.h.
| ns3::NdiscCache::NdiscCache | ( | ) |
| ns3::NdiscCache::~NdiscCache | ( | ) |
Destructor.
Definition at line 55 of file ndisc-cache.cc.
References Flush(), and NS_LOG_FUNCTION_NOARGS.
Here is the call graph for this function:
|
private |
Copy constructor.
| a | cache to copy |
| NdiscCache::Entry * ns3::NdiscCache::Add | ( | Ipv6Address | to | ) |
Add an entry.
| to | address to add |
Definition at line 101 of file ndisc-cache.cc.
References m_ndCache, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::HandleNS(), ns3::Icmpv6L4Protocol::HandleRedirection(), ns3::Icmpv6L4Protocol::HandleRS(), ns3::Icmpv6L4Protocol::Lookup(), and ns3::Icmpv6L4Protocol::ReceiveLLA().
Here is the caller graph for this function:
|
private |
Dispose this object.
Definition at line 61 of file ndisc-cache.cc.
References Flush(), m_device, m_interface, and NS_LOG_FUNCTION_NOARGS.
Here is the call graph for this function:| void ns3::NdiscCache::Flush | ( | void | ) |
Flush the cache.
Definition at line 128 of file ndisc-cache.cc.
References m_ndCache, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::CreateCache(), DoDispose(), and ~NdiscCache().
Here is the caller graph for this function:Get the NetDevice associated with this cache.
Definition at line 83 of file ndisc-cache.cc.
References m_device, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::Lookup().
Here is the caller graph for this function:| Ptr< Ipv6Interface > ns3::NdiscCache::GetInterface | ( | void | ) | const |
Get the Ipv6Interface associated with this cache.
Definition at line 77 of file ndisc-cache.cc.
References m_interface, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::HandleNA(), ns3::Icmpv6L4Protocol::Lookup(), and ns3::Icmpv6L4Protocol::ReceiveLLA().
Here is the caller graph for this function:
|
static |
Get the type ID.
This method returns the TypeId associated to ns3::NdiscCache.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Definition at line 37 of file ndisc-cache.cc.
References DEFAULT_UNRES_QLEN, m_unresQlen, and ns3::TypeId::SetParent().
Here is the call graph for this function:| uint32_t ns3::NdiscCache::GetUnresQlen | ( | ) |
Get the max number of waiting packet.
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.
| dst | destination address |
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().
Here is the caller graph for this function:
|
private |
Equal operator.
| a | cache to copy |
| void ns3::NdiscCache::Remove | ( | NdiscCache::Entry * | entry | ) |
Delete an entry.
| entry | pointer 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().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::NdiscCache::SetDevice | ( | Ptr< NetDevice > | device, |
| Ptr< Ipv6Interface > | interface | ||
| ) |
Set the device and interface.
| device | the device |
| interface | the 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().
Here is the caller graph for this function:| void ns3::NdiscCache::SetUnresQlen | ( | uint32_t | unresQlen | ) |
Set the max number of waiting packet.
| unresQlen | value to set |
Definition at line 140 of file ndisc-cache.cc.
References m_unresQlen, and NS_LOG_FUNCTION.
|
static |
Default value for unres qlen.
Definition at line 60 of file ndisc-cache.h.
Referenced by GetTypeId().
The NetDevice.
Definition at line 438 of file ndisc-cache.h.
Referenced by DoDispose(), GetDevice(), and SetDevice().
|
private |
the interface.
Definition at line 443 of file ndisc-cache.h.
Referenced by DoDispose(), GetInterface(), and SetDevice().
|
private |
Definition at line 448 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(), and Remove().
|
private |
Max number of packet stored in m_waiting.
Definition at line 453 of file ndisc-cache.h.
Referenced by GetTypeId(), GetUnresQlen(), and SetUnresQlen().