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