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;
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
Neighbor MAC address.
Timer m_ntimer
Timer for neighbor's list. Schedule Purge().
Neighbors(Time delay)
constructor
void Purge()
Remove all expired entries.
std::vector< Ptr< ArpCache > > m_arp
list of ARP cached to be used for layer 2 notifications processing
void DelArpCache(Ptr< ArpCache > a)
Don't use given ARP cache any more (interface is down)
Callback< void, WifiMacHeader const & > GetTxErrorCallback() const
Get callback to ProcessTxError.
bool IsNeighbor(Ipv4Address addr)
Check that node with address addr is neighbor.
bool close
Neighbor close indicator.
void Clear()
Remove all entries.
Mac48Address LookupMacAddress(Ipv4Address addr)
Find MAC address by IP using list of ARP caches.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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
Callback< void, Ipv4Address > GetCallback() const
Get 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.
Neighbor(Ipv4Address ip, Mac48Address mac, Time t)
Neighbor structure constructor.
void SetCallback(Callback< void, Ipv4Address > cb)
Set link failure callback.
Time m_expireTime
Neighbor expire time.
void AddArpCache(Ptr< ArpCache > a)
Add ARP cache to be used to allow layer 2 notifications processing.
Ipv4Address m_neighborAddress
Neighbor IPv4 address.
void ScheduleTimer()
Schedule m_ntimer.