29 #ifndef AODVNEIGHBOR_H
30 #define AODVNEIGHBOR_H
33 #include "ns3/simulator.h"
34 #include "ns3/timer.h"
35 #include "ns3/ipv4-address.h"
36 #include "ns3/callback.h"
37 #include "ns3/arp-cache.h"
45 class RoutingProtocol;
Ipv4 addresses are stored in host order in this class.
Simulation virtual time values and global simulation resolution.
A simple virtual Timer class.
maintain list of active neighbors
Time GetExpireTime(Ipv4Address addr)
Return expire time for neighbor node with address addr, if exists, else return 0.
void ScheduleTimer()
Schedule m_ntimer.
Neighbors(Time delay)
constructor
void Clear()
Remove all entries.
void Purge()
Remove all expired entries.
std::vector< Ptr< ArpCache > > m_arp
list of ARP cached to be used for layer 2 notifications processing
Mac48Address LookupMacAddress(Ipv4Address addr)
Find MAC address by IP using list of ARP caches.
void ProcessTxError(WifiMacHeader const &hdr)
Process layer 2 TX error notification.
void Update(Ipv4Address addr, Time expire)
Update expire time for entry with address addr, if it exists, else add new entry.
std::vector< Neighbor > m_nb
vector of entries
Callback< void, Ipv4Address > GetCallback() const
Get link failure callback.
Callback< void, WifiMacHeader const & > GetTxErrorCallback() const
Get callback to ProcessTxError.
Timer m_ntimer
Timer for neighbor's list. Schedule Purge().
Callback< void, Ipv4Address > m_handleLinkFailure
link failure callback
void SetCallback(Callback< void, Ipv4Address > cb)
Set link failure callback.
Callback< void, WifiMacHeader const & > m_txErrorCallback
TX error callback.
void DelArpCache(Ptr< ArpCache > a)
Don't use given ARP cache any more (interface is down)
bool IsNeighbor(Ipv4Address addr)
Check that node with address addr is neighbor.
void AddArpCache(Ptr< ArpCache > a)
Add ARP cache to be used to allow layer 2 notifications processing.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool close
Neighbor close indicator.
Neighbor(Ipv4Address ip, Mac48Address mac, Time t)
Neighbor structure constructor.
Mac48Address m_hardwareAddress
Neighbor MAC address.
Ipv4Address m_neighborAddress
Neighbor IPv4 address.
Time m_expireTime
Neighbor expire time.