28 #include "ns3/packet.h"
29 #include "ns3/nstime.h"
30 #include "ns3/net-device.h"
31 #include "ns3/ipv6-address.h"
33 #include "ns3/timer.h"
34 #include "ns3/sgi-hashmap.h"
418 typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash>
Cache;
422 typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash>::iterator
CacheI;
void FunctionDelayTimeout()
Function called when delay timer timeout.
Timer m_probeTimer
Probe timer (used for NUD in PROBE state).
static TypeId GetTypeId()
Get the type ID.
keep track of time values and allow control of global simulation resolution
Time GetLastReachabilityConfirmation() const
Get the time of last reachability confirmation.
smart pointer class similar to boost::intrusive_ptr
void MarkIncomplete(Ptr< Packet > p)
Changes the state to this entry to INCOMPLETE.
Address GetMacAddress() const
Get the MAC address of this entry.
NdiscCache::Entry * Add(Ipv6Address to)
Add an entry.
void SetUnresQlen(uint32_t unresQlen)
Set the max number of waiting packet.
Ipv6Address m_ipv6Address
The IPv6 address.
uint8_t m_nsRetransmit
Number of NS retransmission.
void StopReachableTimer()
Stop the reachable timer.
Timer m_delayTimer
Delay timer (used for NUD when in DELAY state).
NdiscCacheEntryState_e m_state
The state of the entry.
Try to wait contact from remote host.
a polymophic address class
uint32_t GetUnresQlen()
Get the max number of waiting packet.
Address m_macAddress
The MAC address.
Ptr< Ipv6Interface > GetInterface() const
Get the Ipv6Interface associated with this cache.
bool IsDelay() const
Is the entry DELAY.
Ptr< Ipv6Interface > m_interface
the interface.
sgi::hash_map< Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash > Cache
Neighbor Discovery Cache container.
NdiscCacheEntryState_e
The Entry state enumeration.
void FunctionRetransmitTimeout()
Function called when retransmit timer timeout.
void MarkReachable()
Changes the state to this entry to REACHABLE.
bool m_router
Type of node (router or host).
void Flush()
Flush the cache.
Doxygen introspection did not find any typical Config paths.
Timer m_retransTimer
Retransmission timer (used for NUD in INCOMPLETE state).
Mapping exists between IPv6 and L2 addresses.
void StopProbeTimer()
Stop probe timer.
void StartRetransmitTimer()
Start retransmit timer.
void ClearWaitingPacket()
Clear the waiting packet list.
Entry(NdiscCache *nd)
Constructor.
bool IsProbe() const
Is the entry PROBE.
void AddWaitingPacket(Ptr< Packet > p)
Add a packet (or replace old value) in the queue.
void StartDelayTimer()
Start delay timer.
void StartReachableTimer()
Start the reachable timer.
bool IsIncomplete() const
Is the entry INCOMPLETE.
void FunctionReachableTimeout()
Function called when reachable timer timeout.
NdiscCache & operator=(NdiscCache const &)
Copy constructor.
void StartProbeTimer()
Start probe timer.
No mapping between IPv6 and L2 addresses.
static const uint32_t DEFAULT_UNRES_QLEN
Default value for unres qlen.
void Remove(NdiscCache::Entry *entry)
Delete an entry.
void FunctionProbeTimeout()
Function called when probe timer timeout.
uint32_t m_unresQlen
Max number of packet stored in m_waiting.
void SetMacAddress(Address mac)
Set the MAC address of this entry.
Time m_lastReachabilityConfirmation
Last time we see a reachability confirmation.
Describes an IPv6 address.
NdiscCache::Entry * Lookup(Ipv6Address dst)
Lookup in the cache.
void MarkStale()
Changes the state to this entry to STALE.
void IncNSRetransmit()
Increment NS retransmit.
void DoDispose()
Dispose this object.
void SetIpv6Address(Ipv6Address ipv6Address)
Set the IPv6 address.
void MarkDelay()
Change the state to this entry to DELAY.
NdiscCache * m_ndCache
the NdiscCache associated.
void StopRetransmitTimer()
Stop retransmit timer.
void UpdateLastReachabilityconfirmation()
Update the time of last reachability confirmation.
void StopDelayTimer()
Stop delay timer.
bool IsRouter() const
If the entry is a host or a router.
void SetDevice(Ptr< NetDevice > device, Ptr< Ipv6Interface > interface)
Set the device and interface.
Cache m_ndCache
A list of Entry.
A record that holds information about an NdiscCache entry.
void SetRouter(bool router)
Set the node type.
Try to contact IPv6 address to know again its L2 address.
a base class which provides memory management and object aggregation
sgi::hash_map< Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash >::iterator CacheI
Neighbor Discovery Cache container iterator.
Timer m_reachableTimer
Reachable timer (used for NUD in REACHABLE state).
bool IsReachable() const
Is the entry REACHABLE.
a unique identifier for an interface.
void ResetNSRetransmit()
Reset NS retransmit (=0).
Ptr< NetDevice > GetDevice() const
Get the NetDevice associated with this cache.
void MarkProbe()
Changes the state to this entry to PROBE.
bool IsStale() const
Is the entry STALE.
std::list< Ptr< Packet > > m_waiting
The list of packet waiting.
Ptr< NetDevice > m_device
The NetDevice.
uint8_t GetNSRetransmit() const
Get the number of NS retransmit.