40 m_ntimer (
Timer::CANCEL_ON_DESTROY)
51 for (std::vector<Neighbor>::const_iterator i =
m_nb.begin ();
52 i !=
m_nb.end (); ++i)
54 if (i->m_neighborAddress == addr)
64 for (std::vector<Neighbor>::const_iterator i =
m_nb.begin (); i
67 if (i->m_neighborAddress == addr)
76 for (std::vector<Neighbor>::iterator i =
m_nb.begin (); i !=
m_nb.end (); ++i)
77 if (i->m_neighborAddress == addr)
88 m_nb.push_back (neighbor);
109 for (std::vector<Neighbor>::iterator j =
m_nb.begin (); j !=
m_nb.end (); ++j)
113 NS_LOG_LOGIC (
"Close link to " << j->m_neighborAddress);
118 m_nb.erase (std::remove_if (
m_nb.begin (),
m_nb.end (), pred),
m_nb.end ());
147 i !=
m_arp.end (); ++i)
164 for (std::vector<Neighbor>::iterator i =
m_nb.begin (); i !=
m_nb.end (); ++i)
166 if (i->m_hardwareAddress == addr)
Callback< void, WifiMacHeader const & > m_txErrorCallback
TX error callback.
keep track of time values and allow control of global simulation resolution
Timer m_ntimer
Timer for neighbor's list. Schedule Purge().
NS_LOG_COMPONENT_DEFINE("AodvNeighbors")
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
void Schedule(void)
Schedule a new event using the currently-configured delay, function, and arguments.
bool IsNeighbor(Ipv4Address addr)
Check that node with address addr is neighbor.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
bool IsExpired(void) const
void AddArpCache(Ptr< ArpCache >)
Add ARP cache to be used to allow layer 2 notifications processing.
void SetDelay(const Time &delay)
#define NS_LOG_LOGIC(msg)
Address GetMacAddress(void) const
static Mac48Address ConvertFrom(const Address &address)
std::vector< Neighbor > m_nb
vector of entries
bool operator()(const Neighbors::Neighbor &nb) const
A record that that holds information about an ArpCache entry.
void Update(Ipv4Address addr, Time expire)
Update expire time for entry with address addr, if it exists, else add new entry. ...
static Time Now(void)
Return the "current simulation time".
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.
void Cancel(void)
Cancel the currently-running event if there is one.
void ScheduleTimer()
Schedule m_ntimer.