A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
internet-trace-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 University of Washington
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
18#ifndef INTERNET_TRACE_HELPER_H
19#define INTERNET_TRACE_HELPER_H
20
23
24#include "ns3/assert.h"
25#include "ns3/ipv4.h"
26#include "ns3/ipv6.h"
27#include "ns3/trace-helper.h"
28
29namespace ns3
30{
31
32/**
33 * \ingroup ipv4Helpers
34 *
35 * @brief Base class providing common user-level pcap operations for helpers
36 * representing IPv4 protocols .
37 */
39{
40 public:
41 /**
42 * @brief Construct a PcapHelperForIpv4.
43 */
45 {
46 }
47
48 /**
49 * @brief Destroy a PcapHelperForIpv4.
50 */
52 {
53 }
54
55 /**
56 * @brief Enable pcap output the indicated Ipv4 and interface pair.
57 *
58 * @param prefix Filename prefix to use for pcap files.
59 * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
60 * @param interface Interface on ipv4 on which you want to enable tracing.
61 * @param explicitFilename Treat the prefix as an explicit filename if true
62 */
63 virtual void EnablePcapIpv4Internal(std::string prefix,
64 Ptr<Ipv4> ipv4,
65 uint32_t interface,
66 bool explicitFilename) = 0;
67
68 /**
69 * @brief Enable pcap output the indicated Ipv4 and interface pair.
70 *
71 * @param prefix Filename prefix to use for pcap files.
72 * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
73 * @param interface Interface on ipv4 on which you want to enable tracing.
74 * @param explicitFilename Treat the prefix as an explicit filename if true.
75 */
76 void EnablePcapIpv4(std::string prefix,
77 Ptr<Ipv4> ipv4,
78 uint32_t interface,
79 bool explicitFilename = false);
80
81 /**
82 * @brief Enable pcap output the indicated Ipv4 and interface pair using a
83 * Ptr<Ipv4> previously named using the ns-3 object name service.
84 *
85 * @param prefix filename prefix to use for pcap files.
86 * @param ipv4Name Name of the Ptr<Ipv4> on which you want to enable tracing.
87 * @param interface Interface on ipv4 on which you want to enable tracing.
88 * @param explicitFilename Treat the prefix as an explicit filename if true.
89 */
90 void EnablePcapIpv4(std::string prefix,
91 std::string ipv4Name,
92 uint32_t interface,
93 bool explicitFilename = false);
94
95 /**
96 * @brief Enable pcap output on each Ipv4 and interface pair in the container.
97 *
98 * @param prefix Filename prefix to use for pcap files.
99 * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs
100 */
101 void EnablePcapIpv4(std::string prefix, Ipv4InterfaceContainer c);
102
103 /**
104 * @brief Enable pcap output on all Ipv4 and interface pairs existing in the
105 * nodes provided in the container.
106 *
107 * \param prefix Filename prefix to use for pcap files.
108 * \param n container of nodes.
109 */
110 void EnablePcapIpv4(std::string prefix, NodeContainer n);
111
112 /**
113 * @brief Enable pcap output on the Ipv4 and interface pair specified by a
114 * global node-id (of a previously created node) and interface. Since there
115 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
116 * determines the Ipv4.
117 *
118 * @param prefix Filename prefix to use for pcap files.
119 * @param nodeid The node identifier/number of the node on which to enable tracing.
120 * @param interface Interface on ipv4 on which you want to enable tracing.
121 * @param explicitFilename Treat the prefix as an explicit filename if true
122 */
123 void EnablePcapIpv4(std::string prefix,
124 uint32_t nodeid,
125 uint32_t interface,
126 bool explicitFilename);
127
128 /**
129 * @brief Enable pcap output on all Ipv4 and interface pairs existing in the
130 * set of all nodes created in the simulation.
131 *
132 * @param prefix Filename prefix to use for pcap files.
133 */
134 void EnablePcapIpv4All(std::string prefix);
135};
136
137/**
138 * \ingroup ipv4Helpers
139 *
140 * @brief Base class providing common user-level ascii trace operations for
141 * helpers representing IPv4 protocols .
142 */
144{
145 public:
146 /**
147 * @brief Construct an AsciiTraceHelperForIpv4.
148 */
150 {
151 }
152
153 /**
154 * @brief Destroy an AsciiTraceHelperForIpv4
155 */
157 {
158 }
159
160 /**
161 * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
162 *
163 * The implementation is expected to use a provided Ptr<OutputStreamWrapper>
164 * if it is non-null. If the OutputStreamWrapper is null, the implementation
165 * is expected to use a provided prefix to construct a new file name for
166 * each net device using the rules described in the class overview.
167 *
168 * If the prefix is provided, there will be one file per Ipv4 and interface pair
169 * created. In this case, adding a trace context to the file would be pointless,
170 * so the helper implementation is expected to TraceConnectWithoutContext.
171 *
172 * If the output stream object is provided, there may be many different Ipv4
173 * and interface pairs writing to a single file. In this case, the trace
174 * context could be important, so the helper implementation is expected to
175 * TraceConnect.
176 *
177 * @param stream An OutputStreamWrapper representing an existing file to use
178 * when writing trace data.
179 * @param prefix Filename prefix to use for ascii trace files.
180 * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
181 * @param interface The interface on which you want to enable tracing.
182 * @param explicitFilename Treat the prefix as an explicit filename if true.
183 */
185 std::string prefix,
186 Ptr<Ipv4> ipv4,
187 uint32_t interface,
188 bool explicitFilename) = 0;
189
190 /**
191 * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
192 *
193 * @param prefix Filename prefix to use for ascii files.
194 * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
195 * @param interface The interface on which you want to enable tracing.
196 * @param explicitFilename Treat the prefix as an explicit filename if true.
197 */
198 void EnableAsciiIpv4(std::string prefix,
199 Ptr<Ipv4> ipv4,
200 uint32_t interface,
201 bool explicitFilename = false);
202
203 /**
204 * @brief Enable ascii trace output on the indicated Ipv4 and interface pair.
205 *
206 * @param stream An OutputStreamWrapper representing an existing file to use
207 * when writing trace data.
208 * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
209 * @param interface The interface on which you want to enable tracing.
210 */
211 void EnableAsciiIpv4(Ptr<OutputStreamWrapper> stream, Ptr<Ipv4> ipv4, uint32_t interface);
212
213 /**
214 * @brief Enable ascii trace output the indicated Ipv4 and interface pair
215 * using an Ipv4 previously named using the ns-3 object name service.
216 *
217 * @param prefix filename prefix to use for ascii files.
218 * @param ipv4Name The name of the Ipv4 on which you want to enable tracing.
219 * @param interface The interface on which you want to enable tracing.
220 * @param explicitFilename Treat the prefix as an explicit filename if true.
221 */
222 void EnableAsciiIpv4(std::string prefix,
223 std::string ipv4Name,
224 uint32_t interface,
225 bool explicitFilename = false);
226
227 /**
228 * @brief Enable ascii trace output the indicated net device using a device
229 * previously named using the ns-3 object name service.
230 *
231 * @param stream An OutputStreamWrapper representing an existing file to use
232 * when writing trace data.
233 * @param ipv4Name The name of the Ipv4 on which you want to enable tracing.
234 * @param interface The interface on which you want to enable tracing.
235 */
236 void EnableAsciiIpv4(Ptr<OutputStreamWrapper> stream, std::string ipv4Name, uint32_t interface);
237
238 /**
239 * @brief Enable ascii trace output on each Ipv4 and interface pair in the
240 * container
241 *
242 * @param prefix Filename prefix to use for ascii files.
243 * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs on which to
244 * enable tracing.
245 */
246 void EnableAsciiIpv4(std::string prefix, Ipv4InterfaceContainer c);
247
248 /**
249 * @brief Enable ascii trace output on each device in the container which is
250 * of the appropriate type.
251 *
252 * @param stream An OutputStreamWrapper representing an existing file to use
253 * when writing trace data.
254 * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs on which to
255 * enable tracing.
256 */
258
259 /**
260 * @brief Enable ascii trace output on all Ipv4 and interface pairs existing
261 * in the nodes provided in the container.
262 *
263 * \param prefix Filename prefix to use for ascii files.
264 * \param n container of nodes.
265 */
266 void EnableAsciiIpv4(std::string prefix, NodeContainer n);
267
268 /**
269 * @brief Enable ascii trace output on all Ipv4 and interface pairs existing
270 * in the nodes provided in the container.
271 *
272 * @param stream An OutputStreamWrapper representing an existing file to use
273 * when writing trace data.
274 * \param n container of nodes.
275 */
277
278 /**
279 * @brief Enable ascii trace output on all Ipv4 and interface pairs existing
280 * in the set of all nodes created in the simulation.
281 *
282 * @param prefix Filename prefix to use for ascii files.
283 */
284 void EnableAsciiIpv4All(std::string prefix);
285
286 /**
287 * @brief Enable ascii trace output on each device (which is of the
288 * appropriate type) in the set of all nodes created in the simulation.
289 *
290 * @param stream An OutputStreamWrapper representing an existing file to use
291 * when writing trace data.
292 */
294
295 /**
296 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
297 * global node-id (of a previously created node) and interface. Since there
298 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
299 * determines the Ipv4.
300 *
301 * @param prefix Filename prefix to use when creating ascii trace files
302 * @param nodeid The node identifier/number of the node on which to enable
303 * ascii tracing
304 * @param deviceid The device identifier/index of the device on which to enable
305 * ascii tracing
306 * @param explicitFilename Treat the prefix as an explicit filename if true
307 */
308 void EnableAsciiIpv4(std::string prefix,
309 uint32_t nodeid,
310 uint32_t deviceid,
311 bool explicitFilename);
312
313 /**
314 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
315 * global node-id (of a previously created node) and interface. Since there
316 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
317 * determines the Ipv4.
318 *
319 * @param stream An OutputStreamWrapper representing an existing file to use
320 * when writing trace data.
321 * @param nodeid The node identifier/number of the node on which to enable
322 * ascii tracing
323 * @param interface The interface on which you want to enable tracing.
324 * @param explicitFilename Treat the prefix as an explicit filename if true
325 */
327 uint32_t nodeid,
328 uint32_t interface,
329 bool explicitFilename);
330
331 private:
332 /**
333 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
334 * global node-id (of a previously created node) and interface. Since there
335 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
336 * determines the Ipv4.
337 *
338 * @param stream An OutputStreamWrapper representing an existing file to use
339 * when writing trace data.
340 * @param prefix Filename prefix to use when creating ascii trace files
341 * @param nodeid The node identifier/number of the node on which to enable
342 * ascii tracing
343 * @param interface The device identifier/index of the device on which to enable
344 * ascii tracing
345 * @param explicitFilename Treat the prefix as an explicit filename if true.
346 */
348 std::string prefix,
349 uint32_t nodeid,
350 uint32_t interface,
351 bool explicitFilename);
352
353 /**
354 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
355 * global node-id (of a previously created node) and interface. Since there
356 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
357 * determines the Ipv4.
358 *
359 * @param stream An OutputStreamWrapper representing an existing file to use
360 * when writing trace data.
361 * @param prefix Filename prefix to use when creating ascii trace files
362 * @param n container of nodes.
363 */
364 void EnableAsciiIpv4Impl(Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n);
365
366 /**
367 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
368 * global node-id (of a previously created node) and interface. Since there
369 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
370 * determines the Ipv4.
371 *
372 * @param stream An OutputStreamWrapper representing an existing file to use
373 * when writing trace data.
374 * @param prefix Filename prefix to use when creating ascii trace files
375 * @param c Ipv4InterfaceContainer of Ipv4 and interface pairs
376 */
378 std::string prefix,
380
381 /**
382 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
383 * global node-id (of a previously created node) and interface. Since there
384 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
385 * determines the Ipv4.
386 *
387 * @param stream An OutputStreamWrapper representing an existing file to use
388 * when writing trace data.
389 * @param prefix Filename prefix to use when creating ascii trace files
390 * @param ipv4Name Name of the Ptr<Ipv4> on which you want to enable tracing.
391 * @param interface The device identifier/index of the device on which to enable
392 * ascii tracing
393 * @param explicitFilename Treat the prefix as an explicit filename if true.
394 */
396 std::string prefix,
397 std::string ipv4Name,
398 uint32_t interface,
399 bool explicitFilename);
400
401 /**
402 * @brief Enable ascii trace output on the Ipv4 and interface pair specified by a
403 * global node-id (of a previously created node) and interface. Since there
404 * can be only one Ipv4 aggregated to a node, the node-id unambiguously
405 * determines the Ipv4.
406 *
407 * @param stream An OutputStreamWrapper representing an existing file to use
408 * when writing trace data.
409 * @param prefix Filename prefix to use when creating ascii trace files
410 * @param ipv4 Ptr<Ipv4> on which you want to enable tracing.
411 * @param interface The device identifier/index of the device on which to enable
412 * ascii tracing
413 * @param explicitFilename Treat the prefix as an explicit filename if true.
414 */
416 std::string prefix,
417 Ptr<Ipv4> ipv4,
418 uint32_t interface,
419 bool explicitFilename);
420};
421
422/**
423 * \ingroup ipv6Helpers
424 *
425 * @brief Base class providing common user-level pcap operations for helpers
426 * representing IPv6 protocols .
427 */
429{
430 public:
431 /**
432 * @brief Construct a PcapHelperForIpv6.
433 */
435 {
436 }
437
438 /**
439 * @brief Destroy a PcapHelperForIpv6
440 */
442 {
443 }
444
445 /**
446 * @brief Enable pcap output the indicated Ipv6 and interface pair.
447 *
448 * @param prefix Filename prefix to use for pcap files.
449 * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
450 * @param interface Interface on ipv6 on which you want to enable tracing.
451 * @param explicitFilename Treat the prefix as an explicit filename if true.
452 */
453 virtual void EnablePcapIpv6Internal(std::string prefix,
454 Ptr<Ipv6> ipv6,
455 uint32_t interface,
456 bool explicitFilename) = 0;
457
458 /**
459 * @brief Enable pcap output the indicated Ipv6 and interface pair.
460 *
461 * @param prefix Filename prefix to use for pcap files.
462 * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
463 * @param interface Interface on ipv6 on which you want to enable tracing.
464 * @param explicitFilename Treat the prefix as an explicit filename if true.
465 */
466 void EnablePcapIpv6(std::string prefix,
467 Ptr<Ipv6> ipv6,
468 uint32_t interface,
469 bool explicitFilename = false);
470
471 /**
472 * @brief Enable pcap output the indicated Ipv6 and interface pair using a
473 * Ptr<Ipv6> previously named using the ns-3 object name service.
474 *
475 * @param prefix filename prefix to use for pcap files.
476 * @param ipv6Name Name of the Ptr<Ipv6> on which you want to enable tracing.
477 * @param interface Interface on ipv6 on which you want to enable tracing.
478 * @param explicitFilename Treat the prefix as an explicit filename if true.
479 */
480 void EnablePcapIpv6(std::string prefix,
481 std::string ipv6Name,
482 uint32_t interface,
483 bool explicitFilename = false);
484
485 /**
486 * @brief Enable pcap output on each Ipv6 and interface pair in the container.
487 *
488 * @param prefix Filename prefix to use for pcap files.
489 * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs
490 */
491 void EnablePcapIpv6(std::string prefix, Ipv6InterfaceContainer c);
492
493 /**
494 * @brief Enable pcap output on all Ipv6 and interface pairs existing in the
495 * nodes provided in the container.
496 *
497 * \param prefix Filename prefix to use for pcap files.
498 * \param n container of nodes.
499 */
500 void EnablePcapIpv6(std::string prefix, NodeContainer n);
501
502 /**
503 * @brief Enable pcap output on the Ipv6 and interface pair specified by a
504 * global node-id (of a previously created node) and interface. Since there
505 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
506 * determines the Ipv6.
507 *
508 * @param prefix Filename prefix to use for pcap files.
509 * @param nodeid The node identifier/number of the node on which to enable tracing.
510 * @param interface Interface on ipv6 on which you want to enable tracing.
511 * @param explicitFilename Treat the prefix as an explicit filename if true
512 */
513 void EnablePcapIpv6(std::string prefix,
514 uint32_t nodeid,
515 uint32_t interface,
516 bool explicitFilename);
517
518 /**
519 * @brief Enable pcap output on all Ipv6 and interface pairs existing in the
520 * set of all nodes created in the simulation.
521 *
522 * @param prefix Filename prefix to use for pcap files.
523 */
524 void EnablePcapIpv6All(std::string prefix);
525};
526
527/**
528 * \ingroup ipv6Helpers
529 *
530 * @brief Base class providing common user-level ascii trace operations for
531 * helpers representing IPv6 protocols .
532 */
534{
535 public:
536 /**
537 * @brief Construct an AsciiTraceHelperForIpv6.
538 */
540 {
541 }
542
543 /**
544 * @brief Destroy an AsciiTraceHelperForIpv6
545 */
547 {
548 }
549
550 /**
551 * @brief Enable ascii trace output on the indicated Ipv6 and interface pair.
552 *
553 * The implementation is expected to use a provided Ptr<OutputStreamWrapper>
554 * if it is non-null. If the OutputStreamWrapper is null, the implementation
555 * is expected to use a provided prefix to construct a new file name for
556 * each net device using the rules described in the class overview.
557 *
558 * If the prefix is provided, there will be one file per Ipv6 and interface pair
559 * created. In this case, adding a trace context to the file would be pointless,
560 * so the helper implementation is expected to TraceConnectWithoutContext.
561 *
562 * If the output stream object is provided, there may be many different Ipv6
563 * and interface pairs writing to a single file. In this case, the trace
564 * context could be important, so the helper implementation is expected to
565 * TraceConnect.
566 *
567 * @param stream An OutputStreamWrapper representing an existing file to use
568 * when writing trace data.
569 * @param prefix Filename prefix to use for ascii trace files.
570 * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
571 * @param interface The interface on which you want to enable tracing.
572 * @param explicitFilename Treat the prefix as an explicit filename if true.
573 */
575 std::string prefix,
576 Ptr<Ipv6> ipv6,
577 uint32_t interface,
578 bool explicitFilename) = 0;
579
580 /**
581 * @brief Enable ascii trace output on the indicated Ipv6 and interface pair.
582 *
583 * @param prefix Filename prefix to use for ascii files.
584 * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
585 * @param interface The interface on which you want to enable tracing.
586 * @param explicitFilename Treat the prefix as an explicit filename if true.
587 */
588 void EnableAsciiIpv6(std::string prefix,
589 Ptr<Ipv6> ipv6,
590 uint32_t interface,
591 bool explicitFilename = false);
592
593 /**
594 * @brief Enable ascii trace output on the indicated Ipv6 and interface pair.
595 *
596 * @param stream An OutputStreamWrapper representing an existing file to use
597 * when writing trace data.
598 * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
599 * @param interface The interface on which you want to enable tracing.
600 */
601 void EnableAsciiIpv6(Ptr<OutputStreamWrapper> stream, Ptr<Ipv6> ipv6, uint32_t interface);
602
603 /**
604 * @brief Enable ascii trace output the indicated Ipv6 and interface pair
605 * using an Ipv6 previously named using the ns-3 object name service.
606 *
607 * @param prefix filename prefix to use for ascii files.
608 * @param ipv6Name The name of the Ipv6 on which you want to enable tracing.
609 * @param interface The interface on which you want to enable tracing.
610 * @param explicitFilename Treat the prefix as an explicit filename if true.
611 */
612 void EnableAsciiIpv6(std::string prefix,
613 std::string ipv6Name,
614 uint32_t interface,
615 bool explicitFilename = false);
616
617 /**
618 * @brief Enable ascii trace output the indicated net device using a device
619 * previously named using the ns-3 object name service.
620 *
621 * @param stream An OutputStreamWrapper representing an existing file to use
622 * when writing trace data.
623 * @param ipv6Name The name of the Ipv6 on which you want to enable tracing.
624 * @param interface The interface on which you want to enable tracing.
625 */
626 void EnableAsciiIpv6(Ptr<OutputStreamWrapper> stream, std::string ipv6Name, uint32_t interface);
627
628 /**
629 * @brief Enable ascii trace output on each Ipv6 and interface pair in the
630 * container
631 *
632 * @param prefix Filename prefix to use for ascii files.
633 * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs on which to
634 * enable tracing.
635 */
636 void EnableAsciiIpv6(std::string prefix, Ipv6InterfaceContainer c);
637
638 /**
639 * @brief Enable ascii trace output on each device in the container which is
640 * of the appropriate type.
641 *
642 * @param stream An OutputStreamWrapper representing an existing file to use
643 * when writing trace data.
644 * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs on which to
645 * enable tracing.
646 */
648
649 /**
650 * @brief Enable ascii trace output on all Ipv6 and interface pairs existing
651 * in the nodes provided in the container.
652 *
653 * \param prefix Filename prefix to use for ascii files.
654 * \param n container of nodes.
655 */
656 void EnableAsciiIpv6(std::string prefix, NodeContainer n);
657
658 /**
659 * @brief Enable ascii trace output on all Ipv6 and interface pairs existing
660 * in the nodes provided in the container.
661 *
662 * @param stream An OutputStreamWrapper representing an existing file to use
663 * when writing trace data.
664 * \param n container of nodes.
665 */
667
668 /**
669 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
670 * global node-id (of a previously created node) and interface. Since there
671 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
672 * determines the Ipv6.
673 *
674 * @param prefix Filename prefix to use when creating ascii trace files
675 * @param nodeid The node identifier/number of the node on which to enable
676 * ascii tracing
677 * @param interface The device identifier/index of the device on which to enable
678 * ascii tracing
679 * @param explicitFilename Treat the prefix as an explicit filename if true.
680 */
681 void EnableAsciiIpv6(std::string prefix,
682 uint32_t nodeid,
683 uint32_t interface,
684 bool explicitFilename);
685
686 /**
687 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
688 * global node-id (of a previously created node) and interface. Since there
689 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
690 * determines the Ipv6.
691 *
692 * @param stream An OutputStreamWrapper representing an existing file to use
693 * when writing trace data.
694 * @param nodeid The node identifier/number of the node on which to enable
695 * ascii tracing
696 * @param interface The interface on which you want to enable tracing.
697 */
698 void EnableAsciiIpv6(Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface);
699
700 /**
701 * @brief Enable ascii trace output on all Ipv6 and interface pairs existing
702 * in the set of all nodes created in the simulation.
703 *
704 * @param prefix Filename prefix to use for ascii files.
705 */
706 void EnableAsciiIpv6All(std::string prefix);
707
708 /**
709 * @brief Enable ascii trace output on each device (which is of the
710 * appropriate type) in the set of all nodes created in the simulation.
711 *
712 * @param stream An OutputStreamWrapper representing an existing file to use
713 * when writing trace data.
714 */
716
717 private:
718 /**
719 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
720 * global node-id (of a previously created node) and interface. Since there
721 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
722 * determines the Ipv6.
723 *
724 * @param stream An OutputStreamWrapper representing an existing file to use
725 * when writing trace data.
726 * @param prefix Filename prefix to use when creating ascii trace files
727 * @param nodeid The node identifier/number of the node on which to enable
728 * ascii tracing
729 * @param interface The device identifier/index of the device on which to enable
730 * ascii tracing
731 * @param explicitFilename Treat the prefix as an explicit filename if true.
732 */
734 std::string prefix,
735 uint32_t nodeid,
736 uint32_t interface,
737 bool explicitFilename);
738
739 /**
740 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
741 * global node-id (of a previously created node) and interface. Since there
742 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
743 * determines the Ipv6.
744 *
745 * @param stream An OutputStreamWrapper representing an existing file to use
746 * when writing trace data.
747 * @param prefix Filename prefix to use when creating ascii trace files
748 * @param n container of nodes.
749 */
750 void EnableAsciiIpv6Impl(Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n);
751
752 /**
753 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
754 * global node-id (of a previously created node) and interface. Since there
755 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
756 * determines the Ipv6.
757 *
758 * @param stream An OutputStreamWrapper representing an existing file to use
759 * when writing trace data.
760 * @param prefix Filename prefix to use when creating ascii trace files
761 * @param c Ipv6InterfaceContainer of Ipv6 and interface pairs
762 */
764 std::string prefix,
766
767 /**
768 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
769 * global node-id (of a previously created node) and interface. Since there
770 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
771 * determines the Ipv6.
772 *
773 * @param stream An OutputStreamWrapper representing an existing file to use
774 * when writing trace data.
775 * @param prefix Filename prefix to use when creating ascii trace files
776 * @param ipv6Name Name of the Ptr<Ipv6> on which you want to enable tracing.
777 * @param interface The device identifier/index of the device on which to enable
778 * ascii tracing
779 * @param explicitFilename Treat the prefix as an explicit filename if true.
780 */
782 std::string prefix,
783 std::string ipv6Name,
784 uint32_t interface,
785 bool explicitFilename);
786
787 /**
788 * @brief Enable ascii trace output on the Ipv6 and interface pair specified by a
789 * global node-id (of a previously created node) and interface. Since there
790 * can be only one Ipv6 aggregated to a node, the node-id unambiguously
791 * determines the Ipv6.
792 *
793 * @param stream An OutputStreamWrapper representing an existing file to use
794 * when writing trace data.
795 * @param prefix Filename prefix to use when creating ascii trace files
796 * @param ipv6 Ptr<Ipv6> on which you want to enable tracing.
797 * @param interface The device identifier/index of the device on which to enable
798 * ascii tracing
799 * @param explicitFilename Treat the prefix as an explicit filename if true.
800 */
802 std::string prefix,
803 Ptr<Ipv6> ipv6,
804 uint32_t interface,
805 bool explicitFilename);
806};
807
808} // namespace ns3
809
810#endif /* INTERNET_TRACE_HELPER_H */
Base class providing common user-level ascii trace operations for helpers representing IPv4 protocols...
void EnableAsciiIpv4Impl(Ptr< OutputStreamWrapper > stream, std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename)
Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previous...
virtual ~AsciiTraceHelperForIpv4()
Destroy an AsciiTraceHelperForIpv4.
void EnableAsciiIpv4Impl(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)
Enable ascii trace output on the Ipv4 and interface pair specified by a global node-id (of a previous...
AsciiTraceHelperForIpv4()
Construct an AsciiTraceHelperForIpv4.
void EnableAsciiIpv4All(std::string prefix)
Enable ascii trace output on all Ipv4 and interface pairs existing in the set of all nodes created in...
void EnableAsciiIpv4(std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename=false)
Enable ascii trace output on the indicated Ipv4 and interface pair.
virtual void EnableAsciiIpv4Internal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)=0
Enable ascii trace output on the indicated Ipv4 and interface pair.
Base class providing common user-level ascii trace operations for helpers representing IPv6 protocols...
void EnableAsciiIpv6All(std::string prefix)
Enable ascii trace output on all Ipv6 and interface pairs existing in the set of all nodes created in...
void EnableAsciiIpv6(std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename=false)
Enable ascii trace output on the indicated Ipv6 and interface pair.
virtual void EnableAsciiIpv6Internal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename)=0
Enable ascii trace output on the indicated Ipv6 and interface pair.
AsciiTraceHelperForIpv6()
Construct an AsciiTraceHelperForIpv6.
virtual ~AsciiTraceHelperForIpv6()
Destroy an AsciiTraceHelperForIpv6.
void EnableAsciiIpv6Impl(Ptr< OutputStreamWrapper > stream, std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename)
Enable ascii trace output on the Ipv6 and interface pair specified by a global node-id (of a previous...
void EnableAsciiIpv6Impl(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename)
Enable ascii trace output on the Ipv6 and interface pair specified by a global node-id (of a previous...
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Keep track of a set of IPv6 interfaces.
keep track of a set of node pointers.
Base class providing common user-level pcap operations for helpers representing IPv4 protocols .
virtual void EnablePcapIpv4Internal(std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)=0
Enable pcap output the indicated Ipv4 and interface pair.
virtual ~PcapHelperForIpv4()
Destroy a PcapHelperForIpv4.
void EnablePcapIpv4(std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename=false)
Enable pcap output the indicated Ipv4 and interface pair.
PcapHelperForIpv4()
Construct a PcapHelperForIpv4.
void EnablePcapIpv4All(std::string prefix)
Enable pcap output on all Ipv4 and interface pairs existing in the set of all nodes created in the si...
Base class providing common user-level pcap operations for helpers representing IPv6 protocols .
void EnablePcapIpv6All(std::string prefix)
Enable pcap output on all Ipv6 and interface pairs existing in the set of all nodes created in the si...
PcapHelperForIpv6()
Construct a PcapHelperForIpv6.
virtual ~PcapHelperForIpv6()
Destroy a PcapHelperForIpv6.
void EnablePcapIpv6(std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename=false)
Enable pcap output the indicated Ipv6 and interface pair.
virtual void EnablePcapIpv6Internal(std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename)=0
Enable pcap output the indicated Ipv6 and interface pair.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Every class exported by the ns3 library is enclosed in the ns3 namespace.