A record that that holds information about an ArpCache entry. More...
#include "arp-cache.h"
Collaboration diagram for ns3::ArpCache::Entry:Public Member Functions | |
| Entry (ArpCache *arp) | |
| Constructor. | |
| void | ClearPendingPacket () |
| Clear the pending packet list. | |
| void | ClearRetries () |
| Zero the counter of number of retries for an entry. | |
| Ipv4PayloadHeaderPair | DequeuePending () |
| Ipv4Address | GetIpv4Address () const |
| Address | GetMacAddress () const |
| uint32_t | GetRetries () const |
| Time | GetTimeout () const |
| Returns the entry timeout. | |
| void | IncrementRetries () |
| Increment the counter of number of retries for an entry. | |
| bool | IsAlive () |
| bool | IsAutoGenerated () |
| bool | IsDead () |
| bool | IsExpired () const |
| bool | IsPermanent () |
| bool | IsWaitReply () |
| void | MarkAlive (Address macAddress) |
| void | MarkAutoGenerated () |
| Changes the state of this entry to auto-generated. | |
| void | MarkDead () |
| Changes the state of this entry to dead. | |
| void | MarkPermanent () |
| Changes the state of this entry to Permanent. | |
| void | MarkWaitReply (Ipv4PayloadHeaderPair waiting) |
| void | Print (std::ostream &os) const |
| Print this ARP entry to the given output stream. | |
| void | SetIpv4Address (Ipv4Address destination) |
| void | SetMacAddress (Address macAddress) |
| void | UpdateSeen () |
| Update the entry when seeing a packet. | |
| bool | UpdateWaitReply (Ipv4PayloadHeaderPair waiting) |
Private Types | |
| enum | ArpCacheEntryState_e { ALIVE , WAIT_REPLY , DEAD , PERMANENT , STATIC_AUTOGENERATED } |
| ARP cache entry states. More... | |
Private Attributes | |
| ArpCache * | m_arp |
| pointer to the ARP cache owning the entry | |
| Ipv4Address | m_ipv4Address |
| entry's IP address | |
| Time | m_lastSeen |
| last moment a packet from that address has been seen | |
| Address | m_macAddress |
| entry's MAC address | |
| std::list< Ipv4PayloadHeaderPair > | m_pending |
| list of pending packets for the entry's IP | |
| uint32_t | m_retries |
| retry counter | |
| ArpCacheEntryState_e | m_state |
| state of the entry | |
A record that that holds information about an ArpCache entry.
Definition at line 177 of file arp-cache.h.
|
private |
ARP cache entry states.
| Enumerator | |
|---|---|
| ALIVE | |
| WAIT_REPLY | |
| DEAD | |
| PERMANENT | |
| STATIC_AUTOGENERATED | |
Definition at line 303 of file arp-cache.h.
| ns3::ArpCache::Entry::Entry | ( | ArpCache * | arp | ) |
Constructor.
| arp | The ArpCache this entry belongs to |
Definition at line 384 of file arp-cache.cc.
References ns3::ArpCache::ArpCache(), ALIVE, m_arp, m_retries, m_state, and NS_LOG_FUNCTION.
Here is the call graph for this function:| void ns3::ArpCache::Entry::ClearPendingPacket | ( | ) |
Clear the pending packet list.
Definition at line 576 of file arp-cache.cc.
References m_pending, and NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::Remove().
Here is the caller graph for this function:| void ns3::ArpCache::Entry::ClearRetries | ( | ) |
Zero the counter of number of retries for an entry.
Definition at line 605 of file arp-cache.cc.
References m_retries, and NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), MarkAlive(), MarkAutoGenerated(), MarkDead(), and MarkPermanent().
Here is the caller graph for this function:| ArpCache::Ipv4PayloadHeaderPair ns3::ArpCache::Entry::DequeuePending | ( | ) |
Definition at line 559 of file arp-cache.cc.
References m_pending, and NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), and ns3::ArpL3Protocol::Receive().
Here is the caller graph for this function:| Ipv4Address ns3::ArpCache::Entry::GetIpv4Address | ( | ) | const |
Definition at line 516 of file arp-cache.cc.
References m_ipv4Address, and NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
Here is the caller graph for this function:| Address ns3::ArpCache::Entry::GetMacAddress | ( | ) | const |
Definition at line 502 of file arp-cache.cc.
References m_macAddress, and NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup(), ns3::ArpCache::LookupInverse(), ns3::aodv::Neighbors::LookupMacAddress(), and ns3::dsr::DsrRouteCache::LookupMacAddress().
Here is the caller graph for this function:| uint32_t ns3::ArpCache::Entry::GetRetries | ( | ) | const |
Definition at line 590 of file arp-cache.cc.
References m_retries, and NS_LOG_FUNCTION.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
Here is the caller graph for this function:| Time ns3::ArpCache::Entry::GetTimeout | ( | ) | const |
Returns the entry timeout.
Definition at line 530 of file arp-cache.cc.
References ALIVE, DEAD, m_arp, m_state, ns3::Time::Max(), NS_LOG_FUNCTION, PERMANENT, STATIC_AUTOGENERATED, and WAIT_REPLY.
Referenced by IsExpired(), and Print().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::IncrementRetries | ( | ) |
Increment the counter of number of retries for an entry.
Definition at line 597 of file arp-cache.cc.
References m_retries, NS_LOG_FUNCTION, and UpdateSeen().
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
Here is the call graph for this function:
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::IsAlive | ( | ) |
Definition at line 400 of file arp-cache.cc.
References ALIVE, m_state, and NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup(), ns3::aodv::Neighbors::LookupMacAddress(), ns3::dsr::DsrRouteCache::LookupMacAddress(), and ns3::Ipv4L3Protocol::Receive().
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::IsAutoGenerated | ( | ) |
Definition at line 421 of file arp-cache.cc.
References m_state, NS_LOG_FUNCTION, and STATIC_AUTOGENERATED.
Referenced by ns3::ArpL3Protocol::Lookup().
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::IsDead | ( | ) |
Definition at line 393 of file arp-cache.cc.
References DEAD, m_state, and NS_LOG_FUNCTION.
Referenced by ns3::ArpL3Protocol::Lookup().
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::IsExpired | ( | ) | 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 549 of file arp-cache.cc.
References GetTimeout(), m_lastSeen, 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().
Here is the call graph for this function:
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::IsPermanent | ( | ) |
Definition at line 414 of file arp-cache.cc.
References m_state, NS_LOG_FUNCTION, and PERMANENT.
Referenced by ns3::ArpL3Protocol::Lookup(), ns3::aodv::Neighbors::LookupMacAddress(), and ns3::dsr::DsrRouteCache::LookupMacAddress().
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::IsWaitReply | ( | ) |
Definition at line 407 of file arp-cache.cc.
References m_state, NS_LOG_FUNCTION, and WAIT_REPLY.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout(), ns3::ArpL3Protocol::Lookup(), and ns3::ArpL3Protocol::Receive().
Here is the caller graph for this function:| void ns3::ArpCache::Entry::MarkAlive | ( | Address | macAddress | ) |
| macAddress |
Definition at line 438 of file arp-cache.cc.
References ALIVE, ClearRetries(), m_macAddress, m_state, NS_ASSERT, NS_LOG_FUNCTION, UpdateSeen(), and WAIT_REPLY.
Referenced by ns3::ArpL3Protocol::Receive().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::MarkAutoGenerated | ( | ) |
Changes the state of this entry to auto-generated.
The entry must have a valid MacAddress.
Definition at line 460 of file arp-cache.cc.
References ClearRetries(), m_macAddress, m_state, NS_ASSERT, NS_LOG_FUNCTION, STATIC_AUTOGENERATED, and UpdateSeen().
Referenced by ns3::NeighborCacheHelper::AddEntry().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::MarkDead | ( | ) |
Changes the state of this entry to dead.
Definition at line 428 of file arp-cache.cc.
References ALIVE, ClearRetries(), DEAD, m_state, NS_ASSERT, NS_LOG_FUNCTION, UpdateSeen(), and WAIT_REPLY.
Referenced by ns3::ArpCache::HandleWaitReplyTimeout().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::MarkPermanent | ( | ) |
Changes the state of this entry to Permanent.
The entry must have a valid MacAddress.
Definition at line 449 of file arp-cache.cc.
References ClearRetries(), m_macAddress, m_state, NS_ASSERT, NS_LOG_FUNCTION, PERMANENT, and UpdateSeen().
Referenced by EpcS1uUlTestCase::DoRun(), and FlushTest::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::MarkWaitReply | ( | Ipv4PayloadHeaderPair | waiting | ) |
| waiting |
Definition at line 488 of file arp-cache.cc.
References ALIVE, DEAD, m_arp, m_pending, m_state, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, UpdateSeen(), and WAIT_REPLY.
Referenced by ns3::ArpL3Protocol::Lookup().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::Print | ( | std::ostream & | os | ) | const |
Print this ARP entry to the given output stream.
| os | The output stream to which this ARP entry is printed |
Definition at line 612 of file arp-cache.cc.
References ALIVE, DEAD, GetTimeout(), m_ipv4Address, m_lastSeen, m_macAddress, m_state, PERMANENT, STATIC_AUTOGENERATED, and WAIT_REPLY.
Referenced by ns3::operator<<().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ArpCache::Entry::SetIpv4Address | ( | Ipv4Address | destination | ) |
| destination | The Ipv4Address for this entry |
Definition at line 523 of file arp-cache.cc.
References m_ipv4Address, and NS_LOG_FUNCTION.
| void ns3::ArpCache::Entry::SetMacAddress | ( | Address | macAddress | ) |
| macAddress | The MacAddress for this entry |
Definition at line 509 of file arp-cache.cc.
References m_macAddress, and NS_LOG_FUNCTION.
Referenced by ns3::NeighborCacheHelper::AddEntry(), EpcS1uUlTestCase::DoRun(), and FlushTest::DoRun().
Here is the caller graph for this function:| void ns3::ArpCache::Entry::UpdateSeen | ( | ) |
Update the entry when seeing a packet.
Definition at line 583 of file arp-cache.cc.
References m_lastSeen, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
Referenced by IncrementRetries(), MarkAlive(), MarkAutoGenerated(), MarkDead(), MarkPermanent(), MarkWaitReply(), and ns3::Ipv4L3Protocol::Receive().
Here is the call graph for this function:
Here is the caller graph for this function:| bool ns3::ArpCache::Entry::UpdateWaitReply | ( | Ipv4PayloadHeaderPair | waiting | ) |
| waiting |
Definition at line 471 of file arp-cache.cc.
References m_arp, m_pending, m_state, NS_ASSERT, NS_LOG_FUNCTION, and WAIT_REPLY.
Referenced by ns3::ArpL3Protocol::Lookup().
Here is the caller graph for this function:
|
private |
pointer to the ARP cache owning the entry
Definition at line 312 of file arp-cache.h.
Referenced by Entry(), GetTimeout(), MarkWaitReply(), and UpdateWaitReply().
|
private |
entry's IP address
Definition at line 316 of file arp-cache.h.
Referenced by GetIpv4Address(), Print(), and SetIpv4Address().
|
private |
last moment a packet from that address has been seen
Definition at line 314 of file arp-cache.h.
Referenced by IsExpired(), Print(), and UpdateSeen().
|
private |
entry's MAC address
Definition at line 315 of file arp-cache.h.
Referenced by GetMacAddress(), MarkAlive(), MarkAutoGenerated(), MarkPermanent(), Print(), and SetMacAddress().
|
private |
list of pending packets for the entry's IP
Definition at line 317 of file arp-cache.h.
Referenced by ClearPendingPacket(), DequeuePending(), MarkWaitReply(), and UpdateWaitReply().
|
private |
retry counter
Definition at line 318 of file arp-cache.h.
Referenced by Entry(), ClearRetries(), GetRetries(), and IncrementRetries().
|
private |
state of the entry
Definition at line 313 of file arp-cache.h.
Referenced by Entry(), GetTimeout(), IsAlive(), IsAutoGenerated(), IsDead(), IsPermanent(), IsWaitReply(), MarkAlive(), MarkAutoGenerated(), MarkDead(), MarkPermanent(), MarkWaitReply(), Print(), and UpdateWaitReply().