25 #include "ns3/simulator.h"
26 #include "ns3/callback.h"
27 #include "ns3/packet.h"
28 #include "ns3/nstime.h"
29 #include "ns3/net-device.h"
30 #include "ns3/ipv4-address.h"
31 #include "ns3/address.h"
33 #include "ns3/object.h"
34 #include "ns3/traced-callback.h"
35 #include "ns3/sgi-hashmap.h"
56 static TypeId GetTypeId (
void);
75 void SetAliveTimeout (
Time aliveTimeout);
76 void SetDeadTimeout (
Time deadTimeout);
77 void SetWaitReplyTimeout (
Time waitReplyTimeout);
78 Time GetAliveTimeout (
void)
const;
79 Time GetDeadTimeout (
void)
const;
80 Time GetWaitReplyTimeout (
void)
const;
193 enum ArpCacheEntryState_e {
199 void UpdateSeen (
void);
200 Time GetTimeout (
void)
const;
202 ArpCacheEntryState_e m_state;
206 std::list<Ptr<Packet> > m_pending;
211 typedef sgi::hash_map<Ipv4Address, ArpCache::Entry *, Ipv4AddressHash> Cache;
212 typedef sgi::hash_map<Ipv4Address, ArpCache::Entry *, Ipv4AddressHash>::iterator CacheI;
220 Time m_waitReplyTimeout;
223 uint32_t m_maxRetries;
230 uint32_t m_pendingQueueSize;
void SetDevice(Ptr< NetDevice > device, Ptr< Ipv4Interface > interface)
void StartWaitReplyTimer(void)
void SetArpRequestCallback(Callback< void, Ptr< const ArpCache >, Ipv4Address > arpRequestCallback)
smart pointer class similar to boost::intrusive_ptr
ArpCache::Entry * Add(Ipv4Address to)
Add an Ipv4Address to this ARP cache.
virtual void DoDispose(void)
ArpCache::Entry * Lookup(Ipv4Address destination)
Do lookup in the ARP cache against an IP address.
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
Ptr< NetDevice > GetDevice(void) const
a polymophic address class
void SetIpv4Address(Ipv4Address destination)
void HandleWaitReplyTimeout(void)
void MarkWaitReply(Ptr< Packet > waiting)
uint32_t GetRetries(void) const
bool IsExpired(void) const
Ipv4Address GetIpv4Address(void) const
Address GetMacAddress(void) const
Ptr< Ipv4Interface > GetInterface(void) const
void IncrementRetries(void)
Increment the counter of number of retries for an entry.
void MarkAlive(Address macAddress)
A record that that holds information about an ArpCache entry.
void Flush(void)
Clear the ArpCache of all entries.
Entry(ArpCache *arp)
Constructor.
bool UpdateWaitReply(Ptr< Packet > waiting)
Ipv4 addresses are stored in host order in this class.
an identifier for simulation events.
Ptr< Packet > DequeuePending(void)
void ClearRetries(void)
Zero the counter of number of retries for an entry.
void MarkDead(void)
Changes the state of this entry to dead.
a base class which provides memory management and object aggregation
a unique identifier for an interface.