A record that that holds information about an ArpCache entry. More...
#include "arp-cache.h"
Public Member Functions | |
Entry (ArpCache *arp) | |
Constructor. More... | |
void | ClearPendingPacket (void) |
Clear the pending packet list. More... | |
void | ClearRetries (void) |
Zero the counter of number of retries for an entry. More... | |
Ipv4PayloadHeaderPair | DequeuePending (void) |
Ipv4Address | GetIpv4Address (void) const |
Address | GetMacAddress (void) const |
uint32_t | GetRetries (void) const |
void | IncrementRetries (void) |
Increment the counter of number of retries for an entry. More... | |
bool | IsAlive (void) |
bool | IsDead (void) |
bool | IsExpired (void) const |
bool | IsPermanent (void) |
bool | IsWaitReply (void) |
void | MarkAlive (Address macAddress) |
void | MarkDead (void) |
Changes the state of this entry to dead. More... | |
void | MarkPermanent (void) |
Changes the state of this entry to Permanent. More... | |
void | MarkWaitReply (Ipv4PayloadHeaderPair waiting) |
void | SetIpv4Address (Ipv4Address destination) |
void | SetMacAddress (Address macAddress) |
NS_DEPRECATED void | SetMacAddresss (Address macAddress) |
void | UpdateSeen (void) |
Update the entry when seeing a packet. More... | |
bool | UpdateWaitReply (Ipv4PayloadHeaderPair waiting) |
Private Types | |
enum | ArpCacheEntryState_e { ALIVE, WAIT_REPLY, DEAD, PERMANENT } |
ARP cache entry states. More... | |
Private Member Functions | |
Time | GetTimeout (void) const |
Returns the entry timeout. More... | |
Private Attributes | |
ArpCache * | m_arp |
pointer to the ARP cache owning the entry More... | |
Ipv4Address | m_ipv4Address |
entry's IP address More... | |
Time | m_lastSeen |
last moment a packet from that address has been seen More... | |
Address | m_macAddress |
entry's MAC address More... | |
std::list< Ipv4PayloadHeaderPair > | m_pending |
list of pending packets for the entry's IP More... | |
uint32_t | m_retries |
rerty counter More... | |
ArpCacheEntryState_e | m_state |
state of the entry More... | |
A record that that holds information about an ArpCache entry.
Definition at line 188 of file arp-cache.h.
|
private |
ARP cache entry states.
Enumerator | |
---|---|
ALIVE | |
WAIT_REPLY | |
DEAD | |
PERMANENT |
Definition at line 296 of file arp-cache.h.
ns3::ArpCache::Entry::Entry | ( | ArpCache * | arp | ) |
Constructor.
arp | The ArpCache this entry belongs to |
Definition at line 359 of file arp-cache.cc.
References NS_LOG_FUNCTION.
void ns3::ArpCache::Entry::ClearPendingPacket | ( | void | ) |
Clear the pending packet list.
Definition at line 532 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::Remove().
void ns3::ArpCache::Entry::ClearRetries | ( | void | ) |
Zero the counter of number of retries for an entry.
Definition at line 557 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
ArpCache::Ipv4PayloadHeaderPair ns3::ArpCache::Entry::DequeuePending | ( | void | ) |
Definition at line 516 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), and ns3::ArpL3Protocol::Receive().
Ipv4Address ns3::ArpCache::Entry::GetIpv4Address | ( | void | ) | const |
Definition at line 472 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
Address ns3::ArpCache::Entry::GetMacAddress | ( | void | ) | const |
Definition at line 454 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup(), ns3::ArpCache::LookupInverse(), ns3::aodv::Neighbors::LookupMacAddress(), and ns3::dsr::DsrRouteCache::LookupMacAddress().
uint32_t ns3::ArpCache::Entry::GetRetries | ( | void | ) | const |
Definition at line 544 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
|
private |
Returns the entry timeout.
Definition at line 484 of file arp-cache.cc.
References ALIVE, DEAD, ns3::Time::Max(), NS_ASSERT, NS_LOG_FUNCTION, PERMANENT, ns3::Seconds(), and WAIT_REPLY.
void ns3::ArpCache::Entry::IncrementRetries | ( | void | ) |
Increment the counter of number of retries for an entry.
Definition at line 550 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
bool ns3::ArpCache::Entry::IsAlive | ( | void | ) |
Definition at line 375 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup(), ns3::aodv::Neighbors::LookupMacAddress(), ns3::dsr::DsrRouteCache::LookupMacAddress(), and ns3::Ipv4L3Protocol::Receive().
bool ns3::ArpCache::Entry::IsDead | ( | void | ) |
Definition at line 369 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup().
bool ns3::ArpCache::Entry::IsExpired | ( | void | ) | const |
This function returns true if the time elapsed strictly exceeds the timeout value (i.e., is not less than or equal to the timeout).
Definition at line 503 of file arp-cache.cc.
References ns3::Time::GetSeconds(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and timeout.
Referenced by ns3::ArpL3Protocol::Lookup(), ns3::aodv::Neighbors::LookupMacAddress(), and ns3::dsr::DsrRouteCache::LookupMacAddress().
bool ns3::ArpCache::Entry::IsPermanent | ( | void | ) |
Definition at line 387 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::aodv::Neighbors::LookupMacAddress(), and ns3::dsr::DsrRouteCache::LookupMacAddress().
bool ns3::ArpCache::Entry::IsWaitReply | ( | void | ) |
Definition at line 381 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), ns3::ArpL3Protocol::Lookup(), and ns3::ArpL3Protocol::Receive().
void ns3::ArpCache::Entry::MarkAlive | ( | Address | macAddress | ) |
macAddress |
Definition at line 404 of file arp-cache.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Receive().
void ns3::ArpCache::Entry::MarkDead | ( | void | ) |
Changes the state of this entry to dead.
Definition at line 395 of file arp-cache.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
void ns3::ArpCache::Entry::MarkPermanent | ( | void | ) |
Changes the state of this entry to Permanent.
The entry must have a valid MacAddress.
Definition at line 414 of file arp-cache.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by EpcS1uUlTestCase::DoRun().
void ns3::ArpCache::Entry::MarkWaitReply | ( | Ipv4PayloadHeaderPair | waiting | ) |
waiting |
Definition at line 440 of file arp-cache.cc.
References NS_ASSERT, NS_ASSERT_MSG(), and NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup().
void ns3::ArpCache::Entry::SetIpv4Address | ( | Ipv4Address | destination | ) |
destination | The Ipv4Address for this entry |
Definition at line 478 of file arp-cache.cc.
References NS_LOG_FUNCTION.
void ns3::ArpCache::Entry::SetMacAddress | ( | Address | macAddress | ) |
macAddress | The MacAddress for this entry |
Definition at line 466 of file arp-cache.cc.
References NS_LOG_FUNCTION.
Referenced by EpcS1uUlTestCase::DoRun().
void ns3::ArpCache::Entry::SetMacAddresss | ( | Address | macAddress | ) |
macAddress | The MacAddress for this entry |
Definition at line 460 of file arp-cache.cc.
References NS_LOG_FUNCTION.
void ns3::ArpCache::Entry::UpdateSeen | ( | void | ) |
Update the entry when seeing a packet.
Definition at line 538 of file arp-cache.cc.
References ns3::Simulator::Now(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4L3Protocol::Receive().
bool ns3::ArpCache::Entry::UpdateWaitReply | ( | Ipv4PayloadHeaderPair | waiting | ) |
waiting |
Definition at line 424 of file arp-cache.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup().
|
private |
pointer to the ARP cache owning the entry
Definition at line 309 of file arp-cache.h.
|
private |
entry's IP address
Definition at line 313 of file arp-cache.h.
|
private |
last moment a packet from that address has been seen
Definition at line 311 of file arp-cache.h.
|
private |
entry's MAC address
Definition at line 312 of file arp-cache.h.
|
private |
list of pending packets for the entry's IP
Definition at line 314 of file arp-cache.h.
|
private |
rerty counter
Definition at line 315 of file arp-cache.h.
|
private |
state of the entry
Definition at line 310 of file arp-cache.h.