ns-3
|
An ARP cache. More...
#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 | SetAliveTimeout (Time aliveTimeout) |
void | SetDeadTimeout (Time deadTimeout) |
void | SetWaitReplyTimeout (Time waitReplyTimeout) |
Time | GetAliveTimeout (void) const |
Time | GetDeadTimeout (void) const |
Time | GetWaitReplyTimeout (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. | |
![]() | |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Dispose (void) |
void | AggregateObject (Ptr< Object > other) |
AggregateIterator | GetAggregateIterator (void) const |
void | Start (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
uint32_t | GetReferenceCount (void) const |
![]() | |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::ArpCache. |
Additional Inherited Members | |
![]() | |
virtual void | NotifyNewAggregate (void) |
virtual void | DoStart (void) |
Object (const Object &o) |
An ARP cache.
A cached lookup table for translating layer 3 addresses to layer 2. This implementation does lookups from IPv4 to a MAC address
Ptr< Ipv4Interface > ns3::ArpCache::GetInterface | ( | void | ) | const |
|
static |
This method returns the TypeId associated to ns3::ArpCache.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::Object.
References ns3::MakeTraceSourceAccessor(), ns3::Seconds(), and ns3::TypeId::SetParent().
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 |
Referenced by ns3::ArpL3Protocol::Lookup().
void ns3::ArpCache::SetArpRequestCallback | ( | Callback< void, Ptr< const ArpCache >, Ipv4Address > | arpRequestCallback | ) |
This callback is set when the ArpCache is set up and allows the cache to generate an Arp request when the WaitReply time expires and a retransmission must be sent
arpRequestCallback | Callback for transmitting an Arp request. |
References NS_LOG_FUNCTION.
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 |
References NS_LOG_FUNCTION.
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.
References ns3::EventId::IsRunning(), ns3::Simulator::Now(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::Simulator::Schedule().