|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
71 for (std::map<Ipv4Address, RreqTableEntry >::const_iterator i =
89 std::map<Ipv4Address, RreqTableEntry >::const_iterator i =
93 NS_LOG_LOGIC (
"The request table entry for " << dst <<
" not found");
109 NS_LOG_LOGIC (
"Find the request table entry for " << dst <<
", increment the request count");
122 std::map<Ipv4Address, RreqTableEntry >::const_iterator i =
139 std::map<Ipv4Address, RreqTableEntry >::const_iterator i =
162 std::map<Ipv4Address, uint32_t>::const_iterator i =
166 NS_LOG_LOGIC (
"No Request id for " << dst <<
" found, initialize it to 0");
172 NS_LOG_LOGIC (
"Request id for " << dst <<
" found in the cache");
185 NS_LOG_INFO (
"The Request id for " << dst <<
" is " << rreqId);
215 for (std::vector<BlackList>::iterator i =
m_blackList.begin ();
218 if (i->m_neighborAddress == neighbor)
232 if (i->m_neighborAddress == neighbor)
234 NS_LOG_DEBUG (
"Update the blacklist list timeout if found the blacklist entry");
262 std::list<DsrReceivedRreqEntry> receivedRreqEntryList;
266 std::map<Ipv4Address, std::list<DsrReceivedRreqEntry> >::const_iterator i =
m_sourceRreqMap.find (src);
269 NS_LOG_LOGIC (
"The source request table entry for " << src <<
" not found");
271 receivedRreqEntryList.clear ();
272 receivedRreqEntryList.push_back (rreqEntry);
279 NS_LOG_LOGIC (
"Find the request table entry for " << src <<
", check if it is exact duplicate");
283 receivedRreqEntryList = i->second;
286 receivedRreqEntryList.pop_front ();
290 for (std::list<DsrReceivedRreqEntry>::const_iterator j = receivedRreqEntryList.begin (); j != receivedRreqEntryList.end (); ++j)
298 receivedRreqEntryList.push_back (rreqEntry);
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint32_t GetRreqCnt(Ipv4Address dst)
Get the request count number for one destination address.
void SetIdentification(uint16_t i)
Set identification.
BlackList * FindUnidirectional(Ipv4Address neighbor)
Verify if entry is unidirectional or not(e.g.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time m_expire
Expire time.
static TypeId GetTypeId()
Get the type ID.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::map< Ipv4Address, uint32_t > m_rreqIdCache
The id cache to ensure all the ids are unique, it is used when sending out route request.
std::vector< BlackList > m_blackList
The Black list.
uint32_t GetRreqSize()
Get the request id size.
bool FindSourceEntry(Ipv4Address src, Ipv4Address dst, uint16_t id)
Find the source request entry in the route request queue, return false if not found.
Ipv4 addresses are stored in host order in this class.
maintain list of DsrRreqTable entry
The request entry for intermediate nodes to check if they have received this request or not This is u...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void Invalidate()
set the unidirectional entry as QUESTIONABLE state
uint32_t m_reqNo
Route request number.
std::map< Ipv4Address, std::list< DsrReceivedRreqEntry > > m_sourceRreqMap
The cache to ensure all the route request from unique source.
A base class which provides memory management and object aggregation.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
void FindAndUpdate(Ipv4Address dst)
Find the entry in the route request queue to see if already exists.
The route request table entries.
LinkStates m_linkStates
The state of the unidirectional link.
Simulation virtual time values and global simulation resolution.
Check if the entry is expired or not.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
uint32_t CheckUniqueRreqId(Ipv4Address dst)
The following code generates new request id for each destination.
uint32_t m_maxRreqId
The unique request id for any destination.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
std::map< Ipv4Address, RreqTableEntry > m_rreqDstMap
The cache to save route request table entries indexed with destination address.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
bool MarkLinkAsUnidirectional(Ipv4Address neighbor, Time blacklistTimeout)
Mark entry as unidirectional (e.g.
void SetDestination(Ipv4Address d)
Set IPv4 address of the destination.
@ QUESTIONABLE
QUESTIONABLE.
uint32_t m_requestTableSize
The request table size.
double max(double x, double y)
void PurgeNeighbor()
Remove all expired black list entries.
void RemoveRreqEntry(Ipv4Address dst)
Remove route request entry for dst.
void RemoveLeastExpire()
Remove the least used entry.
uint32_t m_requestIdSize
The request source id size.