A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ndisc-cache.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007-2009 Strasbourg University
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
18 */
19
20#include "ndisc-cache.h"
21
22#include "icmpv6-l4-protocol.h"
23#include "ipv6-interface.h"
24#include "ipv6-l3-protocol.h"
25
26#include "ns3/log.h"
27#include "ns3/names.h"
28#include "ns3/node.h"
29#include "ns3/uinteger.h"
30
31namespace ns3
32{
33
34NS_LOG_COMPONENT_DEFINE("NdiscCache");
35
37
38TypeId
40{
41 static TypeId tid = TypeId("ns3::NdiscCache")
43 .SetGroupName("Internet")
44 .AddAttribute("UnresolvedQueueSize",
45 "Size of the queue for packets pending an NA reply.",
48 MakeUintegerChecker<uint32_t>());
49 return tid;
50}
51
53{
54 NS_LOG_FUNCTION(this);
55}
56
58{
59 NS_LOG_FUNCTION(this);
60 Flush();
61}
62
63void
65{
66 NS_LOG_FUNCTION(this);
67 Flush();
68 m_device = nullptr;
69 m_interface = nullptr;
70 m_icmpv6 = nullptr;
72}
73
74void
76 Ptr<Ipv6Interface> interface,
78{
79 NS_LOG_FUNCTION(this << device << interface);
80 m_device = device;
81 m_interface = interface;
82 m_icmpv6 = icmpv6;
83}
84
87{
88 NS_LOG_FUNCTION(this);
89 return m_interface;
90}
91
94{
95 NS_LOG_FUNCTION(this);
96 return m_device;
97}
98
101{
102 NS_LOG_FUNCTION(this << dst);
103
104 if (m_ndCache.find(dst) != m_ndCache.end())
105 {
106 NdiscCache::Entry* entry = m_ndCache[dst];
107 NS_LOG_LOGIC("Found an entry: " << *entry);
108
109 return entry;
110 }
111 NS_LOG_LOGIC("Nothing found");
112 return nullptr;
113}
114
115std::list<NdiscCache::Entry*>
117{
118 NS_LOG_FUNCTION(this << dst);
119
120 std::list<NdiscCache::Entry*> entryList;
121 for (auto i = m_ndCache.begin(); i != m_ndCache.end(); i++)
122 {
123 NdiscCache::Entry* entry = (*i).second;
124 if (entry->GetMacAddress() == dst)
125 {
126 NS_LOG_LOGIC("Found an entry:" << (*entry));
127 entryList.push_back(entry);
128 }
129 }
130 return entryList;
131}
132
135{
136 NS_LOG_FUNCTION(this << to);
137 NS_ASSERT(m_ndCache.find(to) == m_ndCache.end());
138
139 auto entry = new NdiscCache::Entry(this);
140 entry->SetIpv6Address(to);
141 m_ndCache[to] = entry;
142 return entry;
143}
144
145void
147{
148 NS_LOG_FUNCTION(this << entry);
149
150 for (auto i = m_ndCache.begin(); i != m_ndCache.end(); i++)
151 {
152 if ((*i).second == entry)
153 {
154 m_ndCache.erase(i);
155 entry->ClearWaitingPacket();
156 delete entry;
157 return;
158 }
159 }
160}
161
162void
164{
165 NS_LOG_FUNCTION(this);
166
167 for (auto i = m_ndCache.begin(); i != m_ndCache.end(); i++)
168 {
169 delete (*i).second; /* delete the pointer NdiscCache::Entry */
170 }
171
172 m_ndCache.erase(m_ndCache.begin(), m_ndCache.end());
173}
174
175void
177{
178 NS_LOG_FUNCTION(this << unresQlen);
179 m_unresQlen = unresQlen;
180}
181
184{
185 NS_LOG_FUNCTION(this);
186 return m_unresQlen;
187}
188
189void
191{
192 NS_LOG_FUNCTION(this << stream);
193 std::ostream* os = stream->GetStream();
194
195 for (auto i = m_ndCache.begin(); i != m_ndCache.end(); i++)
196 {
197 *os << i->first << " dev ";
198 std::string found = Names::FindName(m_device);
199 if (!Names::FindName(m_device).empty())
200 {
201 *os << found;
202 }
203 else
204 {
205 *os << static_cast<int>(m_device->GetIfIndex());
206 }
207
208 *os << " lladdr " << i->second->GetMacAddress();
209
210 if (i->second->IsReachable())
211 {
212 *os << " REACHABLE\n";
213 }
214 else if (i->second->IsDelay())
215 {
216 *os << " DELAY\n";
217 }
218 else if (i->second->IsIncomplete())
219 {
220 *os << " INCOMPLETE\n";
221 }
222 else if (i->second->IsProbe())
223 {
224 *os << " PROBE\n";
225 }
226 else if (i->second->IsStale())
227 {
228 *os << " STALE\n";
229 }
230 else if (i->second->IsPermanent())
231 {
232 *os << " PERMANENT\n";
233 }
234 else if (i->second->IsAutoGenerated())
235 {
236 *os << " STATIC_AUTOGENERATED\n";
237 }
238 else
239 {
240 NS_FATAL_ERROR("Test for possibly unreachable code-- please file a bug report, with a "
241 "test case, if this is ever hit");
242 }
243 }
244}
245
247 : m_ndCache(nd),
248 m_waiting(),
249 m_router(false),
250 m_nudTimer(Timer::CANCEL_ON_DESTROY),
251 m_lastReachabilityConfirmation(Seconds(0.0)),
252 m_nsRetransmit(0)
253{
254 NS_LOG_FUNCTION(this);
255}
256
257void
259{
260 NS_LOG_FUNCTION(this << router);
261 m_router = router;
262}
263
264bool
266{
267 NS_LOG_FUNCTION(this);
268 return m_router;
269}
270
271void
273{
274 NS_LOG_FUNCTION(this << p.second << p.first);
275
276 if (m_waiting.size() >= m_ndCache->GetUnresQlen())
277 {
278 /* we store only m_unresQlen packet => first packet in first packet remove */
279 /** \todo report packet as 'dropped' */
280 m_waiting.pop_front();
281 }
282 m_waiting.push_back(p);
283}
284
285void
287{
288 NS_LOG_FUNCTION(this);
289 /** \todo report packets as 'dropped' */
290 m_waiting.clear();
291}
292
293void
295{
296 NS_LOG_FUNCTION(this);
297 this->MarkStale();
298}
299
300void
302{
303 NS_LOG_FUNCTION(this);
304 Ipv6Address addr;
305
306 /* determine source address */
307 if (m_ipv6Address.IsLinkLocal())
308 {
309 addr = m_ndCache->GetInterface()->GetLinkLocalAddress().GetAddress();
310 }
311 else if (!m_ipv6Address.IsAny())
312 {
313 addr = m_ndCache->GetInterface()->GetAddressMatchingDestination(m_ipv6Address).GetAddress();
314
315 if (addr.IsAny()) /* maybe address has expired */
316 {
317 /* delete the entry */
318 m_ndCache->Remove(this);
319 return;
320 }
321 }
322
323 if (m_nsRetransmit < m_ndCache->m_icmpv6->GetMaxMulticastSolicit())
324 {
325 m_nsRetransmit++;
326
327 m_ndCache->m_icmpv6->SendNS(addr,
329 m_ipv6Address,
330 m_ndCache->GetDevice()->GetAddress());
331 /* arm the timer again */
332 StartRetransmitTimer();
333 }
334 else
335 {
336 Ipv6PayloadHeaderPair malformedPacket = m_waiting.front();
337 if (!malformedPacket.first)
338 {
339 malformedPacket.first = Create<Packet>();
340 }
341 else
342 {
343 malformedPacket.first->AddHeader(malformedPacket.second);
344 }
345
346 m_ndCache->m_icmpv6->SendErrorDestinationUnreachable(malformedPacket.first,
347 addr,
349
350 /* delete the entry */
351 m_ndCache->Remove(this);
352 }
353}
354
355void
357{
358 NS_LOG_FUNCTION(this);
359 Ipv6Address addr;
360
361 this->MarkProbe();
362
363 if (m_ipv6Address.IsLinkLocal())
364 {
365 addr = m_ndCache->GetInterface()->GetLinkLocalAddress().GetAddress();
366 }
367 else if (!m_ipv6Address.IsAny())
368 {
369 addr = m_ndCache->GetInterface()->GetAddressMatchingDestination(m_ipv6Address).GetAddress();
370 if (addr.IsAny()) /* maybe address has expired */
371 {
372 /* delete the entry */
373 m_ndCache->Remove(this);
374 return;
375 }
376 }
377 else
378 {
379 /* should not happen */
380 return;
381 }
382
383 Ipv6PayloadHeaderPair p = m_ndCache->m_icmpv6->ForgeNS(addr,
384 m_ipv6Address,
385 m_ipv6Address,
386 m_ndCache->GetDevice()->GetAddress());
387 p.first->AddHeader(p.second);
388 m_ndCache->GetDevice()->Send(p.first, this->GetMacAddress(), Ipv6L3Protocol::PROT_NUMBER);
389
390 m_nsRetransmit = 1;
391 StartProbeTimer();
392}
393
394void
396{
397 NS_LOG_FUNCTION(this);
398
399 if (m_nsRetransmit < m_ndCache->m_icmpv6->GetMaxUnicastSolicit())
400 {
401 m_nsRetransmit++;
402
403 Ipv6Address addr;
404
405 if (m_ipv6Address.IsLinkLocal())
406 {
407 addr = m_ndCache->GetInterface()->GetLinkLocalAddress().GetAddress();
408 }
409 else if (!m_ipv6Address.IsAny())
410 {
411 addr = m_ndCache->GetInterface()
412 ->GetAddressMatchingDestination(m_ipv6Address)
413 .GetAddress();
414 if (addr.IsAny()) /* maybe address has expired */
415 {
416 /* delete the entry */
417 m_ndCache->Remove(this);
418 return;
419 }
420 }
421 else
422 {
423 /* should not happen */
424 return;
425 }
426
427 /* icmpv6->SendNS (m_ndCache->GetInterface ()->GetLinkLocalAddress (), m_ipv6Address,
428 * m_ipv6Address, m_ndCache->GetDevice ()->GetAddress ()); */
430 m_ndCache->m_icmpv6->ForgeNS(addr,
431 m_ipv6Address,
432 m_ipv6Address,
433 m_ndCache->GetDevice()->GetAddress());
434 p.first->AddHeader(p.second);
435 m_ndCache->GetDevice()->Send(p.first, this->GetMacAddress(), Ipv6L3Protocol::PROT_NUMBER);
436
437 /* arm the timer again */
438 StartProbeTimer();
439 }
440 else
441 {
442 /* delete the entry */
443 m_ndCache->Remove(this);
444 }
445}
446
447void
449{
450 NS_LOG_FUNCTION(this << ipv6Address);
451 m_ipv6Address = ipv6Address;
452}
453
456{
457 NS_LOG_FUNCTION(this);
458 return m_ipv6Address;
459}
460
461Time
463{
464 NS_LOG_FUNCTION(this);
465 return m_lastReachabilityConfirmation;
466}
467
468void
470{
471 NS_LOG_FUNCTION(this);
472 if (m_nudTimer.IsRunning())
473 {
474 m_nudTimer.Cancel();
475 }
476
477 m_lastReachabilityConfirmation = Simulator::Now();
478 m_nudTimer.SetFunction(&NdiscCache::Entry::FunctionReachableTimeout, this);
479 m_nudTimer.SetDelay(m_ndCache->m_icmpv6->GetReachableTime());
480 m_nudTimer.Schedule();
481}
482
483void
485{
486 NS_LOG_FUNCTION(this);
487
488 if (m_state == REACHABLE)
489 {
490 m_lastReachabilityConfirmation = Simulator::Now();
491 if (m_nudTimer.IsRunning())
492 {
493 m_nudTimer.Cancel();
494 }
495 m_nudTimer.Schedule();
496 }
497}
498
499void
501{
502 NS_LOG_FUNCTION(this);
503 if (m_nudTimer.IsRunning())
504 {
505 m_nudTimer.Cancel();
506 }
507
508 m_nudTimer.SetFunction(&NdiscCache::Entry::FunctionProbeTimeout, this);
509 m_nudTimer.SetDelay(m_ndCache->m_icmpv6->GetRetransmissionTime());
510 m_nudTimer.Schedule();
511}
512
513void
515{
516 NS_LOG_FUNCTION(this);
517 if (m_nudTimer.IsRunning())
518 {
519 m_nudTimer.Cancel();
520 }
521
522 m_nudTimer.SetFunction(&NdiscCache::Entry::FunctionDelayTimeout, this);
523 m_nudTimer.SetDelay(m_ndCache->m_icmpv6->GetDelayFirstProbe());
524 m_nudTimer.Schedule();
525}
526
527void
529{
530 NS_LOG_FUNCTION(this);
531 if (m_nudTimer.IsRunning())
532 {
533 m_nudTimer.Cancel();
534 }
535
536 m_nudTimer.SetFunction(&NdiscCache::Entry::FunctionRetransmitTimeout, this);
537 m_nudTimer.SetDelay(m_ndCache->m_icmpv6->GetRetransmissionTime());
538 m_nudTimer.Schedule();
539}
540
541void
543{
544 NS_LOG_FUNCTION(this);
545 m_nudTimer.Cancel();
546 m_nsRetransmit = 0;
547}
548
549void
551{
552 NS_LOG_FUNCTION(this << p.second << p.first);
553 m_state = INCOMPLETE;
554
555 if (p.first)
556 {
557 m_waiting.push_back(p);
558 }
559}
560
561std::list<NdiscCache::Ipv6PayloadHeaderPair>
563{
564 NS_LOG_FUNCTION(this << mac);
565 m_state = REACHABLE;
566 m_macAddress = mac;
567 return m_waiting;
568}
569
570void
572{
573 NS_LOG_FUNCTION(this);
574 m_state = PROBE;
575}
576
577void
579{
580 NS_LOG_FUNCTION(this);
581 m_state = STALE;
582}
583
584void
586{
587 NS_LOG_FUNCTION(this);
588 m_state = REACHABLE;
589}
590
591std::list<NdiscCache::Ipv6PayloadHeaderPair>
593{
594 NS_LOG_FUNCTION(this << mac);
595 m_state = STALE;
596 m_macAddress = mac;
597 return m_waiting;
598}
599
600void
602{
603 NS_LOG_FUNCTION(this);
604 m_state = DELAY;
605}
606
607void
609{
610 NS_LOG_FUNCTION(this);
611 StopNudTimer();
612 m_state = PERMANENT;
613}
614
615void
617{
618 NS_LOG_FUNCTION(this);
619 StopNudTimer();
620 m_state = STATIC_AUTOGENERATED;
621}
622
623bool
625{
626 NS_LOG_FUNCTION(this);
627 return (m_state == STALE);
628}
629
630bool
632{
633 NS_LOG_FUNCTION(this);
634 return (m_state == REACHABLE);
635}
636
637bool
639{
640 NS_LOG_FUNCTION(this);
641 return (m_state == DELAY);
642}
643
644bool
646{
647 NS_LOG_FUNCTION(this);
648 return (m_state == INCOMPLETE);
649}
650
651bool
653{
654 NS_LOG_FUNCTION(this);
655 return (m_state == PROBE);
656}
657
658bool
660{
661 NS_LOG_FUNCTION(this);
662 return (m_state == PERMANENT);
663}
664
665bool
667{
668 NS_LOG_FUNCTION(this);
669 return (m_state == STATIC_AUTOGENERATED);
670}
671
674{
675 NS_LOG_FUNCTION(this);
676 return m_macAddress;
677}
678
679void
681{
682 NS_LOG_FUNCTION(this << mac << int(m_state));
683 m_macAddress = mac;
684}
685
686void
687NdiscCache::Entry::Print(std::ostream& os) const
688{
689 os << m_ipv6Address << " lladdr " << m_macAddress << " state ";
690 switch (m_state)
691 {
692 case INCOMPLETE:
693 os << "INCOMPLETE";
694 break;
695 case REACHABLE:
696 os << "REACHABLE";
697 break;
698 case STALE:
699 os << "STALE";
700 break;
701 case DELAY:
702 os << "DELAY";
703 break;
704 case PROBE:
705 os << "PROBE";
706 break;
707 case PERMANENT:
708 os << "PERMANENT";
709 break;
710 case STATIC_AUTOGENERATED:
711 os << "STATIC_AUTOGENERATED";
712 break;
713 }
714}
715
716void
718{
719 NS_LOG_FUNCTION(this);
720 for (auto i = m_ndCache.begin(); i != m_ndCache.end();)
721 {
722 if (i->second->IsAutoGenerated())
723 {
724 i->second->ClearWaitingPacket();
725 delete i->second;
726 m_ndCache.erase(i++);
727 continue;
728 }
729 i++;
730 }
731}
732
733std::ostream&
734operator<<(std::ostream& os, const NdiscCache::Entry& entry)
735{
736 entry.Print(os);
737 return os;
738}
739
740} /* namespace ns3 */
a polymophic address class
Definition: address.h:101
Describes an IPv6 address.
Definition: ipv6-address.h:49
static Ipv6Address MakeSolicitedAddress(Ipv6Address addr)
Make the solicited IPv6 address.
bool IsAny() const
If the IPv6 address is the "Any" address.
static const uint16_t PROT_NUMBER
The protocol number for IPv6 (0x86DD).
static std::string FindName(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and,...
Definition: names.cc:829
A record that holds information about a NdiscCache entry.
Definition: ndisc-cache.h:167
void MarkProbe()
Changes the state to this entry to PROBE.
Definition: ndisc-cache.cc:571
bool IsPermanent() const
Is the entry PERMANENT.
Definition: ndisc-cache.cc:659
void MarkPermanent()
Change the state to this entry to PERMANENT.
Definition: ndisc-cache.cc:608
void ClearWaitingPacket()
Clear the waiting packet list.
Definition: ndisc-cache.cc:286
void StartProbeTimer()
Start probe timer.
Definition: ndisc-cache.cc:500
void MarkReachable()
Changes the state to this entry to REACHABLE.
Definition: ndisc-cache.cc:585
void StartReachableTimer()
Start the reachable timer.
Definition: ndisc-cache.cc:469
void Print(std::ostream &os) const
Print this entry to the given output stream.
Definition: ndisc-cache.cc:687
void UpdateReachableTimer()
Update the reachable timer.
Definition: ndisc-cache.cc:484
void FunctionProbeTimeout()
Function called when probe timer timeout.
Definition: ndisc-cache.cc:395
void MarkStale()
Changes the state to this entry to STALE.
Definition: ndisc-cache.cc:578
Address GetMacAddress() const
Get the MAC address of this entry.
Definition: ndisc-cache.cc:673
Ipv6Address GetIpv6Address() const
Get the IPv6 address.
Definition: ndisc-cache.cc:455
void StartDelayTimer()
Start delay timer.
Definition: ndisc-cache.cc:514
void MarkAutoGenerated()
Changes the state of this entry to auto-generated.
Definition: ndisc-cache.cc:616
bool IsIncomplete() const
Is the entry INCOMPLETE.
Definition: ndisc-cache.cc:645
void FunctionDelayTimeout()
Function called when delay timer timeout.
Definition: ndisc-cache.cc:356
bool IsDelay() const
Is the entry DELAY.
Definition: ndisc-cache.cc:638
void StartRetransmitTimer()
Start retransmit timer.
Definition: ndisc-cache.cc:528
void SetIpv6Address(Ipv6Address ipv6Address)
Set the IPv6 address.
Definition: ndisc-cache.cc:448
void MarkIncomplete(Ipv6PayloadHeaderPair p)
Changes the state to this entry to INCOMPLETE.
Definition: ndisc-cache.cc:550
bool IsStale() const
Is the entry STALE.
Definition: ndisc-cache.cc:624
void SetMacAddress(Address mac)
Set the MAC address of this entry.
Definition: ndisc-cache.cc:680
bool IsProbe() const
Is the entry PROBE.
Definition: ndisc-cache.cc:652
Time GetLastReachabilityConfirmation() const
Get the time of last reachability confirmation.
Definition: ndisc-cache.cc:462
void FunctionRetransmitTimeout()
Function called when retransmit timer timeout.
Definition: ndisc-cache.cc:301
void MarkDelay()
Change the state to this entry to DELAY.
Definition: ndisc-cache.cc:601
Entry(NdiscCache *nd)
Constructor.
Definition: ndisc-cache.cc:246
bool IsRouter() const
If the entry is a host or a router.
Definition: ndisc-cache.cc:265
void SetRouter(bool router)
Set the node type.
Definition: ndisc-cache.cc:258
void FunctionReachableTimeout()
Function called when reachable timer timeout.
Definition: ndisc-cache.cc:294
bool IsAutoGenerated() const
Is the entry STATIC_AUTOGENERATED.
Definition: ndisc-cache.cc:666
void AddWaitingPacket(Ipv6PayloadHeaderPair p)
Add a packet (or replace old value) in the queue.
Definition: ndisc-cache.cc:272
bool IsReachable() const
Is the entry REACHABLE.
Definition: ndisc-cache.cc:631
void StopNudTimer()
Stop NUD timer and reset the NUD retransmission counter.
Definition: ndisc-cache.cc:542
IPv6 Neighbor Discovery cache.
Definition: ndisc-cache.h:49
void SetDevice(Ptr< NetDevice > device, Ptr< Ipv6Interface > interface, Ptr< Icmpv6L4Protocol > icmpv6)
Set the device and interface.
Definition: ndisc-cache.cc:75
std::pair< Ptr< Packet >, Ipv6Header > Ipv6PayloadHeaderPair
Pair of a packet and an Ipv4 header.
Definition: ndisc-cache.h:159
virtual NdiscCache::Entry * Add(Ipv6Address to)
Add an entry.
Definition: ndisc-cache.cc:134
void Flush()
Flush the cache.
Definition: ndisc-cache.cc:163
Ptr< Ipv6Interface > m_interface
the interface.
Definition: ndisc-cache.h:480
void Remove(NdiscCache::Entry *entry)
Delete an entry.
Definition: ndisc-cache.cc:146
NdiscCache()
Constructor.
Definition: ndisc-cache.cc:52
void PrintNdiscCache(Ptr< OutputStreamWrapper > stream)
Print the NDISC cache entries.
Definition: ndisc-cache.cc:190
~NdiscCache() override
Destructor.
Definition: ndisc-cache.cc:57
Ptr< NetDevice > m_device
The NetDevice.
Definition: ndisc-cache.h:475
uint32_t GetUnresQlen()
Get the max number of waiting packet.
Definition: ndisc-cache.cc:183
virtual NdiscCache::Entry * Lookup(Ipv6Address dst)
Lookup in the cache.
Definition: ndisc-cache.cc:100
void RemoveAutoGeneratedEntries()
Clear the NDISC cache of all Auto-Generated entries.
Definition: ndisc-cache.cc:717
void DoDispose() override
Dispose this object.
Definition: ndisc-cache.cc:64
Ptr< NetDevice > GetDevice() const
Get the NetDevice associated with this cache.
Definition: ndisc-cache.cc:93
static const uint32_t DEFAULT_UNRES_QLEN
Default value for unres qlen.
Definition: ndisc-cache.h:62
static TypeId GetTypeId()
Get the type ID.
Definition: ndisc-cache.cc:39
Cache m_ndCache
A list of Entry.
Definition: ndisc-cache.h:469
std::list< NdiscCache::Entry * > LookupInverse(Address dst)
Lookup in the cache for a MAC address.
Definition: ndisc-cache.cc:116
void SetUnresQlen(uint32_t unresQlen)
Set the max number of waiting packet.
Definition: ndisc-cache.cc:176
Ptr< Icmpv6L4Protocol > m_icmpv6
the icmpv6 L4 protocol for this cache.
Definition: ndisc-cache.h:485
Ptr< Ipv6Interface > GetInterface() const
Get the Ipv6Interface associated with this cache.
Definition: ndisc-cache.cc:86
uint32_t m_unresQlen
Max number of packet stored in m_waiting.
Definition: ndisc-cache.h:490
A base class which provides memory management and object aggregation.
Definition: object.h:89
virtual void DoDispose()
Destructor implementation.
Definition: object.cc:444
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:208
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
A simple virtual Timer class.
Definition: timer.h:78
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:932
Hold an unsigned integer type.
Definition: uinteger.h:45
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition: uinteger.h:46
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:159
#define DELAY(time)
Gets the delay between a given time and the current time.