A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::SixLowPanNdBindingTable Class Reference

A binding table for 6LoWPAN ND. More...

#include "sixlowpan-nd-binding-table.h"

Inheritance diagram for ns3::SixLowPanNdBindingTable:
Collaboration diagram for ns3::SixLowPanNdBindingTable:

Classes

class  SixLowPanNdBindingTableEntry
 A record that holds information about an SixLowPanNdBindingTable entry. More...

Public Member Functions

 SixLowPanNdBindingTable ()
 Constructor.
 ~SixLowPanNdBindingTable ()
 Destructor.
SixLowPanNdBindingTable::SixLowPanNdBindingTableEntryAdd (Ipv6Address to)
 Add an entry.
Ptr< NetDeviceGetDevice () const
 Get the NetDevice associated with this cache.
Ptr< Ipv6InterfaceGetInterface () const
 Get the IPv6 interface associated with this binding table.
SixLowPanNdBindingTable::SixLowPanNdBindingTableEntryLookup (Ipv6Address dst)
 Lookup in the binding table.
void PrintBindingTable (Ptr< OutputStreamWrapper > stream)
 Print the SixLowPanNdBindingTable entries.
void Remove (SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry *entry)
 Remove an entry from the binding table.
void SetDevice (Ptr< NetDevice > device, Ptr< Ipv6Interface > interface, Ptr< Icmpv6L4Protocol > icmpv6)
 Set the device and interface.
Public Member Functions inherited from ns3::Object
 Object ()
 Caller graph was not generated because of its size.
 ~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<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
template<typename T>
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) 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.
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.
uint32_t GetReferenceCount () const
 Get the reference count of the object.
SimpleRefCountoperator= (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.

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.

Private Types

typedef std::unordered_map< Ipv6Address, SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry *, Ipv6AddressHashSixLowPanTable
 6LoWPAN Neighbor Discovery Table container

Private Attributes

Ptr< NetDevicem_device
 The NetDevice associated with this binding table.
Ptr< Icmpv6L4Protocolm_icmpv6
 The ICMPv6 protocol associated with this binding table.
Ptr< Ipv6Interfacem_interface
 The IPv6 interface associated with this binding table.
SixLowPanTable m_sixLowPanNdBindingTable
 The actual binding table.
Time m_staleDuration
 The duration (in hours) an entry remains in STALE state before being removed from the binding table.

Additional Inherited Members

Detailed Description

A binding table for 6LoWPAN ND.

Introspection did not find any typical Config paths

Attributes

  • StaleDuration: The duration (in hours) an entry remains in STALE state before being removed from the binding table.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +0ns:+2.35926e+17ns
    • Initial value: +8.64e+13ns
    • Flags: constructwriteread
    • Support level: SUPPORTED

No TraceSources are defined for this type
Group: SixLowPan
Size of this type is 144 bytes (on a 64-bit architecture).

Definition at line 29 of file sixlowpan-nd-binding-table.h.

Member Typedef Documentation

◆ SixLowPanTable

6LoWPAN Neighbor Discovery Table container

Definition at line 232 of file sixlowpan-nd-binding-table.h.

Constructor & Destructor Documentation

◆ SixLowPanNdBindingTable()

ns3::SixLowPanNdBindingTable::SixLowPanNdBindingTable ( )

Constructor.

Definition at line 52 of file sixlowpan-nd-binding-table.cc.

References ns3::Hours(), m_staleDuration, NS_LOG_FUNCTION, and ns3::STALE_DURATION.

Referenced by ns3::SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry::SixLowPanNdBindingTableEntry(), and GetTypeId().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~SixLowPanNdBindingTable()

ns3::SixLowPanNdBindingTable::~SixLowPanNdBindingTable ( )

Destructor.

Definition at line 58 of file sixlowpan-nd-binding-table.cc.

References DoDispose(), and NS_LOG_FUNCTION.

Here is the call graph for this function:

Member Function Documentation

◆ Add()

SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry * ns3::SixLowPanNdBindingTable::Add ( Ipv6Address to)

Add an entry.

Parameters
toaddress to add
Returns
an new Entry

Definition at line 119 of file sixlowpan-nd-binding-table.cc.

References m_sixLowPanNdBindingTable, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

◆ DoDispose()

void ns3::SixLowPanNdBindingTable::DoDispose ( )
overrideprotectedvirtual

Dispose this object.

Reimplemented from ns3::Object.

Definition at line 65 of file sixlowpan-nd-binding-table.cc.

References ns3::Object::DoDispose(), m_sixLowPanNdBindingTable, and NS_LOG_FUNCTION.

Referenced by ~SixLowPanNdBindingTable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDevice()

Ptr< NetDevice > ns3::SixLowPanNdBindingTable::GetDevice ( ) const

Get the NetDevice associated with this cache.

Returns
NetDevice

Definition at line 80 of file sixlowpan-nd-binding-table.cc.

References m_device, and NS_LOG_FUNCTION.

◆ GetInterface()

Ptr< Ipv6Interface > ns3::SixLowPanNdBindingTable::GetInterface ( ) const

Get the IPv6 interface associated with this binding table.

Returns
the Ipv6Interface pointer

Definition at line 104 of file sixlowpan-nd-binding-table.cc.

References m_interface.

◆ GetTypeId()

TypeId ns3::SixLowPanNdBindingTable::GetTypeId ( )
static

Get the type ID.

Returns
type ID

Definition at line 36 of file sixlowpan-nd-binding-table.cc.

References ns3::Object::Object(), SixLowPanNdBindingTable(), ns3::Hours(), m_staleDuration, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::TypeId::SetParent(), and ns3::STALE_DURATION.

Here is the call graph for this function:

◆ Lookup()

SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry * ns3::SixLowPanNdBindingTable::Lookup ( Ipv6Address dst)

Lookup in the binding table.

Parameters
dstdestination address
Returns
the entry if found, 0 otherwise

Definition at line 110 of file sixlowpan-nd-binding-table.cc.

References m_sixLowPanNdBindingTable, and NS_LOG_FUNCTION.

◆ PrintBindingTable()

void ns3::SixLowPanNdBindingTable::PrintBindingTable ( Ptr< OutputStreamWrapper > stream)

Print the SixLowPanNdBindingTable entries.

Parameters
streamthe ostream the SixLowPanNdBindingTable entries is printed to

Definition at line 155 of file sixlowpan-nd-binding-table.cc.

References m_sixLowPanNdBindingTable, and NS_LOG_FUNCTION.

◆ Remove()

void ns3::SixLowPanNdBindingTable::Remove ( SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry * entry)

Remove an entry from the binding table.

Parameters
entrypointer to the entry to remove

Definition at line 139 of file sixlowpan-nd-binding-table.cc.

References ns3::SixLowPanNdBindingTable::SixLowPanNdBindingTableEntry::GetIpv6Address(), m_sixLowPanNdBindingTable, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_WARN.

Here is the call graph for this function:

◆ SetDevice()

void ns3::SixLowPanNdBindingTable::SetDevice ( Ptr< NetDevice > device,
Ptr< Ipv6Interface > interface,
Ptr< Icmpv6L4Protocol > icmpv6 )

Set the device and interface.

Parameters
devicethe device
interfacethe IPv6 interface
icmpv6the ICMPv6 protocol

Definition at line 87 of file sixlowpan-nd-binding-table.cc.

References m_device, m_icmpv6, m_interface, NS_LOG_ERROR, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_device

Ptr<NetDevice> ns3::SixLowPanNdBindingTable::m_device
private

The NetDevice associated with this binding table.

Definition at line 236 of file sixlowpan-nd-binding-table.h.

Referenced by GetDevice(), and SetDevice().

◆ m_icmpv6

Ptr<Icmpv6L4Protocol> ns3::SixLowPanNdBindingTable::m_icmpv6
private

The ICMPv6 protocol associated with this binding table.

Definition at line 238 of file sixlowpan-nd-binding-table.h.

Referenced by SetDevice().

◆ m_interface

Ptr<Ipv6Interface> ns3::SixLowPanNdBindingTable::m_interface
private

The IPv6 interface associated with this binding table.

Definition at line 237 of file sixlowpan-nd-binding-table.h.

Referenced by GetInterface(), and SetDevice().

◆ m_sixLowPanNdBindingTable

SixLowPanTable ns3::SixLowPanNdBindingTable::m_sixLowPanNdBindingTable
private

The actual binding table.

Definition at line 234 of file sixlowpan-nd-binding-table.h.

Referenced by Add(), DoDispose(), Lookup(), PrintBindingTable(), and Remove().

◆ m_staleDuration

Time ns3::SixLowPanNdBindingTable::m_staleDuration
private

The duration (in hours) an entry remains in STALE state before being removed from the binding table.

Definition at line 240 of file sixlowpan-nd-binding-table.h.

Referenced by SixLowPanNdBindingTable(), and GetTypeId().


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