ns3::ArpCache::Entry Class Reference

A record that that holds information about an ArpCache entry. More...

#include <arp-cache.h>

Collaboration diagram for ns3::ArpCache::Entry:
Collaboration graph
[legend]

List of all members.

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< PacketDequeuePending (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

ArpCachem_arp
ArpCacheEntryState_e m_state
Time m_lastSeen
Address m_macAddress
Ipv4Address m_ipv4Address
std::list< Ptr< Packet > > m_pending
uint32_t m_retries

Detailed Description

A record that that holds information about an ArpCache entry.

Definition at line 112 of file arp-cache.h.


Member Enumeration Documentation

Enumerator:
ALIVE 
WAIT_REPLY 
DEAD 

Definition at line 187 of file arp-cache.h.


Constructor & Destructor Documentation

ns3::ArpCache::Entry::Entry ( ArpCache arp  ) 

Constructor.

Parameters:
arp The ArpCache this entry belongs to

Definition at line 266 of file arp-cache.cc.

References NS_LOG_FUNCTION_NOARGS.


Member Function Documentation

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().

Ptr< Packet > ns3::ArpCache::Entry::DequeuePending ( void   ) 
Returns:
0 is no packet is pending, the next packet to send if packets are pending.

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
Returns:
The Ipv4Address for this entry

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
Returns:
The MacAddress of this entry

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
Returns:
number of retries that have been sent for an ArpRequest in WaitReply state.

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   ) 
Returns:
True if the state of this entry is alive; false otherwise.

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   ) 
Returns:
True if the state of this entry is dead; false otherwise.

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   ) 
bool ns3::ArpCache::Entry::IsWaitReply ( void   ) 
Returns:
True if the state of this entry is wait_reply; false otherwise.

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  ) 
Parameters:
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().

void ns3::ArpCache::Entry::MarkWaitReply ( Ptr< Packet waiting  ) 
void ns3::ArpCache::Entry::SetIpv4Address ( Ipv4Address  destination  ) 
Parameters:
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().

bool ns3::ArpCache::Entry::UpdateWaitReply ( Ptr< Packet waiting  ) 
Parameters:
waiting 
Returns:

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().


Member Data Documentation

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().

Definition at line 196 of file arp-cache.h.

Referenced by IsExpired(), and UpdateSeen().

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:36 2009 for NS-3 by  doxygen 1.6.3