#include <arp-cache.h>
Classes | |
class | Entry |
A record that that holds information about an ArpCache entry. More... | |
Public Member Functions | |
void | SetDevice (Ptr< NetDevice > device, Ptr< Ipv4Interface > interface) |
Ptr< NetDevice > | GetDevice (void) const |
Ptr< Ipv4Interface > | GetInterface (void) const |
void | SetArpRequestCallback (Callback< void, Ptr< const ArpCache >, Ipv4Address > arpRequestCallback) |
void | StartWaitReplyTimer (void) |
ArpCache::Entry * | Lookup (Ipv4Address destination) |
Do lookup in the ARP cache against an IP address. | |
ArpCache::Entry * | Add (Ipv4Address to) |
Add an Ipv4Address to this ARP cache. | |
void | Flush (void) |
Clear the ArpCache of all entries. | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::ArpCache. | |
Private Member Functions | |
virtual void | DoDispose (void) |
void | HandleWaitReplyTimeout (void) |
A cached lookup table for translating layer 3 addresses to layer 2. This implementation does lookups from IPv4 to a MAC address
virtual void ns3::ArpCache::DoDispose | ( | void | ) | [private, virtual] |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
Reimplemented from ns3::Object.
Ptr<Ipv4Interface> ns3::ArpCache::GetInterface | ( | void | ) | const |
static TypeId ns3::ArpCache::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::ArpCache.
This object is accessible through the following paths with Config::Set and Config::Connect:
Reimplemented from ns3::Object.
void ns3::ArpCache::HandleWaitReplyTimeout | ( | void | ) | [private] |
This function is an event handler for the event that the ArpCache wants to check whether it must retry any Arp requests. If there are no Arp requests pending, this event is not scheduled.
ArpCache::Entry* ns3::ArpCache::Lookup | ( | Ipv4Address | destination | ) |
Do lookup in the ARP cache against an IP address.
destination | The destination IPv4 address to lookup the MAC address of |
void ns3::ArpCache::SetArpRequestCallback | ( | Callback< void, Ptr< const ArpCache >, Ipv4Address > | arpRequestCallback | ) |
void ns3::ArpCache::SetDevice | ( | Ptr< NetDevice > | device, | |
Ptr< Ipv4Interface > | interface | |||
) |
device | The hardware NetDevice associated with this ARP chache | |
interface | the Ipv4Interface associated with this ARP chache |
void ns3::ArpCache::StartWaitReplyTimer | ( | void | ) |
This method will schedule a timeout at WaitReplyTimeout interval in the future, unless a timer is already running for the cache, in which case this method does nothing.