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