A record that that holds information about an ArpCache entry. More...
#include <arp-cache.h>
Public Member Functions | |
Entry (ArpCache *arp) | |
Constructor. | |
void | MarkDead (void) |
Changes the state of this entry to dead. | |
void | MarkAlive (Address macAddress) |
void | MarkWaitReply (Ptr< Packet > waiting) |
bool | UpdateWaitReply (Ptr< Packet > waiting) |
bool | IsDead (void) |
bool | IsAlive (void) |
bool | IsWaitReply (void) |
Address | GetMacAddress (void) const |
Ipv4Address | GetIpv4Address (void) const |
void | SetIpv4Address (Ipv4Address destination) |
bool | IsExpired (void) |
Ptr< Packet > | DequeuePending (void) |
uint32_t | GetRetries (void) const |
void | IncrementRetries (void) |
Increment the counter of number of retries for an entry. | |
void | ClearRetries (void) |
Zero the counter of number of retries for an entry. | |
Private Types | |
enum | ArpCacheEntryState_e { ALIVE, WAIT_REPLY, DEAD } |
Private Member Functions | |
void | UpdateSeen (void) |
Private Attributes | |
ArpCache * | m_arp |
ArpCacheEntryState_e | m_state |
Time | m_lastSeen |
Address | m_macAddress |
Ipv4Address | m_ipv4Address |
std::list< Ptr< Packet > > | m_pending |
uint32_t | m_retries |
A record that that holds information about an ArpCache entry.
Definition at line 112 of file arp-cache.h.
enum ns3::ArpCache::Entry::ArpCacheEntryState_e [private] |
Definition at line 187 of file arp-cache.h.
ns3::ArpCache::Entry::Entry | ( | ArpCache * | arp | ) |
Constructor.
arp | The ArpCache this entry belongs to |
Definition at line 266 of file arp-cache.cc.
References NS_LOG_FUNCTION_NOARGS.
void ns3::ArpCache::Entry::ClearRetries | ( | void | ) |
Zero the counter of number of retries for an entry.
Definition at line 428 of file arp-cache.cc.
References m_retries, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), MarkAlive(), and MarkDead().
Definition at line 394 of file arp-cache.cc.
References m_pending, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), and ns3::ArpL3Protocol::Receive().
Ipv4Address ns3::ArpCache::Entry::GetIpv4Address | ( | void | ) | const |
Definition at line 350 of file arp-cache.cc.
References m_ipv4Address, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
Address ns3::ArpCache::Entry::GetMacAddress | ( | void | ) | const |
Definition at line 343 of file arp-cache.cc.
References ALIVE, m_macAddress, m_state, NS_ASSERT, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpL3Protocol::Lookup().
uint32_t ns3::ArpCache::Entry::GetRetries | ( | void | ) | const |
Definition at line 415 of file arp-cache.cc.
References m_retries, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
void ns3::ArpCache::Entry::IncrementRetries | ( | void | ) |
Increment the counter of number of retries for an entry.
Definition at line 421 of file arp-cache.cc.
References m_retries, NS_LOG_FUNCTION_NOARGS, and UpdateSeen().
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
bool ns3::ArpCache::Entry::IsAlive | ( | void | ) |
Definition at line 282 of file arp-cache.cc.
References ALIVE, m_state, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpL3Protocol::Lookup().
bool ns3::ArpCache::Entry::IsDead | ( | void | ) |
Definition at line 276 of file arp-cache.cc.
References DEAD, m_state, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::ArpL3Protocol::Lookup().
bool ns3::ArpCache::Entry::IsExpired | ( | void | ) |
Definition at line 363 of file arp-cache.cc.
References ALIVE, DEAD, ns3::ArpCache::GetAliveTimeout(), ns3::ArpCache::GetDeadTimeout(), ns3::ArpCache::GetWaitReplyTimeout(), m_arp, m_lastSeen, m_state, ns3::Now(), NS_ASSERT, NS_LOG_FUNCTION_NOARGS, ns3::Seconds(), and WAIT_REPLY.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), and ns3::ArpL3Protocol::Lookup().
bool ns3::ArpCache::Entry::IsWaitReply | ( | void | ) |
Definition at line 288 of file arp-cache.cc.
References m_state, NS_LOG_FUNCTION_NOARGS, and WAIT_REPLY.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), ns3::ArpL3Protocol::Lookup(), and ns3::ArpL3Protocol::Receive().
void ns3::ArpCache::Entry::MarkAlive | ( | Address | macAddress | ) |
macAddress |
Definition at line 304 of file arp-cache.cc.
References ALIVE, ClearRetries(), m_macAddress, m_state, NS_ASSERT, NS_LOG_FUNCTION_NOARGS, UpdateSeen(), and WAIT_REPLY.
Referenced by ns3::ArpL3Protocol::Receive().
void ns3::ArpCache::Entry::MarkDead | ( | void | ) |
Changes the state of this entry to dead.
Definition at line 296 of file arp-cache.cc.
References ClearRetries(), DEAD, m_state, NS_LOG_FUNCTION_NOARGS, and UpdateSeen().
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
waiting |
Definition at line 331 of file arp-cache.cc.
References ALIVE, DEAD, m_arp, m_pending, m_state, NS_ASSERT, NS_LOG_FUNCTION_NOARGS, ns3::ArpCache::StartWaitReplyTimer(), UpdateSeen(), and WAIT_REPLY.
Referenced by ns3::ArpL3Protocol::Lookup().
void ns3::ArpCache::Entry::SetIpv4Address | ( | Ipv4Address | destination | ) |
destination | The Ipv4Address for this entry |
Definition at line 356 of file arp-cache.cc.
References m_ipv4Address, and NS_LOG_FUNCTION.
void ns3::ArpCache::Entry::UpdateSeen | ( | void | ) | [private] |
Definition at line 409 of file arp-cache.cc.
References m_lastSeen, ns3::Now(), and NS_LOG_FUNCTION_NOARGS.
Referenced by IncrementRetries(), MarkAlive(), MarkDead(), and MarkWaitReply().
waiting |
Definition at line 315 of file arp-cache.cc.
References m_arp, m_pending, ns3::ArpCache::m_pendingQueueSize, m_state, NS_ASSERT, NS_LOG_FUNCTION_NOARGS, and WAIT_REPLY.
Referenced by ns3::ArpL3Protocol::Lookup().
ArpCache* ns3::ArpCache::Entry::m_arp [private] |
Definition at line 194 of file arp-cache.h.
Referenced by IsExpired(), MarkWaitReply(), and UpdateWaitReply().
Definition at line 198 of file arp-cache.h.
Referenced by GetIpv4Address(), and SetIpv4Address().
Time ns3::ArpCache::Entry::m_lastSeen [private] |
Definition at line 196 of file arp-cache.h.
Referenced by IsExpired(), and UpdateSeen().
Address ns3::ArpCache::Entry::m_macAddress [private] |
Definition at line 197 of file arp-cache.h.
Referenced by GetMacAddress(), and MarkAlive().
std::list<Ptr<Packet> > ns3::ArpCache::Entry::m_pending [private] |
Definition at line 199 of file arp-cache.h.
Referenced by DequeuePending(), MarkWaitReply(), and UpdateWaitReply().
uint32_t ns3::ArpCache::Entry::m_retries [private] |
Definition at line 200 of file arp-cache.h.
Referenced by ClearRetries(), GetRetries(), and IncrementRetries().
Definition at line 195 of file arp-cache.h.
Referenced by GetMacAddress(), IsAlive(), IsDead(), IsExpired(), IsWaitReply(), MarkAlive(), MarkDead(), MarkWaitReply(), and UpdateWaitReply().