|
398 |
} |
398 |
} |
399 |
|
399 |
|
400 |
void |
400 |
void |
401 |
PcapHelperForDevice::EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename) |
401 |
TraceHelperForDevice::EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename) |
402 |
{ |
402 |
{ |
403 |
EnablePcapInternal (prefix, nd, promiscuous, explicitFilename); |
403 |
EnablePcapInternal (prefix, nd, promiscuous, explicitFilename); |
404 |
} |
404 |
} |
405 |
|
405 |
|
406 |
void |
406 |
void |
407 |
PcapHelperForDevice::EnablePcap (std::string prefix, std::string ndName, bool promiscuous, bool explicitFilename) |
407 |
TraceHelperForDevice::EnablePcap (std::string prefix, std::string ndName, bool promiscuous, bool explicitFilename) |
408 |
{ |
408 |
{ |
409 |
Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName); |
409 |
Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName); |
410 |
EnablePcap (prefix, nd, promiscuous, explicitFilename); |
410 |
EnablePcap (prefix, nd, promiscuous, explicitFilename); |
411 |
} |
411 |
} |
412 |
|
412 |
|
413 |
void |
413 |
void |
414 |
PcapHelperForDevice::EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous) |
414 |
TraceHelperForDevice::EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous) |
415 |
{ |
415 |
{ |
416 |
for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) |
416 |
for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) |
417 |
{ |
417 |
{ |
|
421 |
} |
421 |
} |
422 |
|
422 |
|
423 |
void |
423 |
void |
424 |
PcapHelperForDevice::EnablePcap (std::string prefix, NodeContainer n, bool promiscuous) |
424 |
TraceHelperForDevice::EnablePcap (std::string prefix, NodeContainer n, bool promiscuous) |
425 |
{ |
425 |
{ |
426 |
NetDeviceContainer devs; |
426 |
NetDeviceContainer devs; |
427 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
427 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
|
436 |
} |
436 |
} |
437 |
|
437 |
|
438 |
void |
438 |
void |
439 |
PcapHelperForDevice::EnablePcapAll (std::string prefix, bool promiscuous) |
439 |
TraceHelperForDevice::EnablePcapAll (std::string prefix, bool promiscuous) |
440 |
{ |
440 |
{ |
441 |
EnablePcap (prefix, NodeContainer::GetGlobal (), promiscuous); |
441 |
EnablePcap (prefix, NodeContainer::GetGlobal (), promiscuous); |
442 |
} |
442 |
} |
443 |
|
443 |
|
444 |
void |
444 |
void |
445 |
PcapHelperForDevice::EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous) |
445 |
TraceHelperForDevice::EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous) |
446 |
{ |
446 |
{ |
447 |
NodeContainer n = NodeContainer::GetGlobal (); |
447 |
NodeContainer n = NodeContainer::GetGlobal (); |
448 |
|
448 |
|
|
454 |
continue; |
454 |
continue; |
455 |
} |
455 |
} |
456 |
|
456 |
|
457 |
NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), "PcapHelperForDevice::EnablePcap(): Unknown deviceid = " |
457 |
NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), "TraceHelperForDevice::EnablePcap(): Unknown deviceid = " |
458 |
<< deviceid); |
458 |
<< deviceid); |
459 |
Ptr<NetDevice> nd = node->GetDevice (deviceid); |
459 |
Ptr<NetDevice> nd = node->GetDevice (deviceid); |
460 |
EnablePcap (prefix, nd, promiscuous); |
460 |
EnablePcap (prefix, nd, promiscuous); |
|
466 |
// Public API |
466 |
// Public API |
467 |
// |
467 |
// |
468 |
void |
468 |
void |
469 |
AsciiTraceHelperForDevice::EnableAscii (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename) |
469 |
TraceHelperForDevice::EnableAscii (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename) |
470 |
{ |
470 |
{ |
471 |
EnableAsciiInternal (Ptr<OutputStreamWrapper> (), prefix, nd, explicitFilename); |
471 |
EnableAsciiInternal (Ptr<OutputStreamWrapper> (), prefix, nd, explicitFilename); |
472 |
} |
472 |
} |
|
475 |
// Public API |
475 |
// Public API |
476 |
// |
476 |
// |
477 |
void |
477 |
void |
478 |
AsciiTraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, Ptr<NetDevice> nd) |
478 |
TraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, Ptr<NetDevice> nd) |
479 |
{ |
479 |
{ |
480 |
EnableAsciiInternal (stream, std::string (), nd, false); |
480 |
EnableAsciiInternal (stream, std::string (), nd, false); |
481 |
} |
481 |
} |
|
484 |
// Public API |
484 |
// Public API |
485 |
// |
485 |
// |
486 |
void |
486 |
void |
487 |
AsciiTraceHelperForDevice::EnableAscii (std::string prefix, std::string ndName, bool explicitFilename) |
487 |
TraceHelperForDevice::EnableAscii (std::string prefix, std::string ndName, bool explicitFilename) |
488 |
{ |
488 |
{ |
489 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, ndName, explicitFilename); |
489 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, ndName, explicitFilename); |
490 |
} |
490 |
} |
|
493 |
// Public API |
493 |
// Public API |
494 |
// |
494 |
// |
495 |
void |
495 |
void |
496 |
AsciiTraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, std::string ndName) |
496 |
TraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, std::string ndName) |
497 |
{ |
497 |
{ |
498 |
EnableAsciiImpl (stream, std::string (), ndName, false); |
498 |
EnableAsciiImpl (stream, std::string (), ndName, false); |
499 |
} |
499 |
} |
|
502 |
// Private API |
502 |
// Private API |
503 |
// |
503 |
// |
504 |
void |
504 |
void |
505 |
AsciiTraceHelperForDevice::EnableAsciiImpl ( |
505 |
TraceHelperForDevice::EnableAsciiImpl ( |
506 |
Ptr<OutputStreamWrapper> stream, |
506 |
Ptr<OutputStreamWrapper> stream, |
507 |
std::string prefix, |
507 |
std::string prefix, |
508 |
std::string ndName, |
508 |
std::string ndName, |
|
516 |
// Public API |
516 |
// Public API |
517 |
// |
517 |
// |
518 |
void |
518 |
void |
519 |
AsciiTraceHelperForDevice::EnableAscii (std::string prefix, NetDeviceContainer d) |
519 |
TraceHelperForDevice::EnableAscii (std::string prefix, NetDeviceContainer d) |
520 |
{ |
520 |
{ |
521 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, d); |
521 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, d); |
522 |
} |
522 |
} |
|
525 |
// Public API |
525 |
// Public API |
526 |
// |
526 |
// |
527 |
void |
527 |
void |
528 |
AsciiTraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, NetDeviceContainer d) |
528 |
TraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, NetDeviceContainer d) |
529 |
{ |
529 |
{ |
530 |
EnableAsciiImpl (stream, std::string (), d); |
530 |
EnableAsciiImpl (stream, std::string (), d); |
531 |
} |
531 |
} |
|
534 |
// Private API |
534 |
// Private API |
535 |
// |
535 |
// |
536 |
void |
536 |
void |
537 |
AsciiTraceHelperForDevice::EnableAsciiImpl (Ptr<OutputStreamWrapper> stream, std::string prefix, NetDeviceContainer d) |
537 |
TraceHelperForDevice::EnableAsciiImpl (Ptr<OutputStreamWrapper> stream, std::string prefix, NetDeviceContainer d) |
538 |
{ |
538 |
{ |
539 |
for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) |
539 |
for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) |
540 |
{ |
540 |
{ |
|
547 |
// Public API |
547 |
// Public API |
548 |
// |
548 |
// |
549 |
void |
549 |
void |
550 |
AsciiTraceHelperForDevice::EnableAscii (std::string prefix, NodeContainer n) |
550 |
TraceHelperForDevice::EnableAscii (std::string prefix, NodeContainer n) |
551 |
{ |
551 |
{ |
552 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, n); |
552 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, n); |
553 |
} |
553 |
} |
|
556 |
// Public API |
556 |
// Public API |
557 |
// |
557 |
// |
558 |
void |
558 |
void |
559 |
AsciiTraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, NodeContainer n) |
559 |
TraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, NodeContainer n) |
560 |
{ |
560 |
{ |
561 |
EnableAsciiImpl (stream, std::string (), n); |
561 |
EnableAsciiImpl (stream, std::string (), n); |
562 |
} |
562 |
} |
|
565 |
// Private API |
565 |
// Private API |
566 |
// |
566 |
// |
567 |
void |
567 |
void |
568 |
AsciiTraceHelperForDevice::EnableAsciiImpl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n) |
568 |
TraceHelperForDevice::EnableAsciiImpl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n) |
569 |
{ |
569 |
{ |
570 |
NetDeviceContainer devs; |
570 |
NetDeviceContainer devs; |
571 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
571 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
|
583 |
// Public API |
583 |
// Public API |
584 |
// |
584 |
// |
585 |
void |
585 |
void |
586 |
AsciiTraceHelperForDevice::EnableAsciiAll (std::string prefix) |
586 |
TraceHelperForDevice::EnableAsciiAll (std::string prefix) |
587 |
{ |
587 |
{ |
588 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, NodeContainer::GetGlobal ()); |
588 |
EnableAsciiImpl (Ptr<OutputStreamWrapper> (), prefix, NodeContainer::GetGlobal ()); |
589 |
} |
589 |
} |
|
592 |
// Public API |
592 |
// Public API |
593 |
// |
593 |
// |
594 |
void |
594 |
void |
595 |
AsciiTraceHelperForDevice::EnableAsciiAll (Ptr<OutputStreamWrapper> stream) |
595 |
TraceHelperForDevice::EnableAsciiAll (Ptr<OutputStreamWrapper> stream) |
596 |
{ |
596 |
{ |
597 |
EnableAsciiImpl (stream, std::string (), NodeContainer::GetGlobal ()); |
597 |
EnableAsciiImpl (stream, std::string (), NodeContainer::GetGlobal ()); |
598 |
} |
598 |
} |
|
601 |
// Public API |
601 |
// Public API |
602 |
// |
602 |
// |
603 |
void |
603 |
void |
604 |
AsciiTraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t deviceid) |
604 |
TraceHelperForDevice::EnableAscii (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t deviceid) |
605 |
{ |
605 |
{ |
606 |
EnableAsciiImpl (stream, std::string (), nodeid, deviceid, false); |
606 |
EnableAsciiImpl (stream, std::string (), nodeid, deviceid, false); |
607 |
} |
607 |
} |
|
610 |
// Public API |
610 |
// Public API |
611 |
// |
611 |
// |
612 |
void |
612 |
void |
613 |
AsciiTraceHelperForDevice::EnableAscii ( |
613 |
TraceHelperForDevice::EnableAscii ( |
614 |
std::string prefix, |
614 |
std::string prefix, |
615 |
uint32_t nodeid, |
615 |
uint32_t nodeid, |
616 |
uint32_t deviceid, |
616 |
uint32_t deviceid, |
|
623 |
// Private API |
623 |
// Private API |
624 |
// |
624 |
// |
625 |
void |
625 |
void |
626 |
AsciiTraceHelperForDevice::EnableAsciiImpl ( |
626 |
TraceHelperForDevice::EnableAsciiImpl ( |
627 |
Ptr<OutputStreamWrapper> stream, |
627 |
Ptr<OutputStreamWrapper> stream, |
628 |
std::string prefix, |
628 |
std::string prefix, |
629 |
uint32_t nodeid, |
629 |
uint32_t nodeid, |
|
641 |
} |
641 |
} |
642 |
|
642 |
|
643 |
NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), |
643 |
NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), |
644 |
"AsciiTraceHelperForDevice::EnableAscii(): Unknown deviceid = " << deviceid); |
644 |
"TraceHelperForDevice::EnableAscii(): Unknown deviceid = " << deviceid); |
645 |
|
645 |
|
646 |
Ptr<NetDevice> nd = node->GetDevice (deviceid); |
646 |
Ptr<NetDevice> nd = node->GetDevice (deviceid); |
647 |
|
647 |
|
|
651 |
} |
651 |
} |
652 |
|
652 |
|
653 |
void |
653 |
void |
654 |
PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename) |
654 |
TraceHelperForIpvx::EnablePcapIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename) |
655 |
{ |
655 |
{ |
656 |
EnablePcapIpv4Internal (prefix, ipv4, interface, explicitFilename); |
656 |
EnablePcapIpv4Internal (prefix, ipv4, interface, explicitFilename); |
657 |
} |
657 |
} |
658 |
|
658 |
|
659 |
void |
659 |
void |
660 |
PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename) |
660 |
TraceHelperForIpvx::EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename) |
661 |
{ |
661 |
{ |
662 |
Ptr<Ipv4> ipv4 = Names::Find<Ipv4> (ipv4Name); |
662 |
Ptr<Ipv4> ipv4 = Names::Find<Ipv4> (ipv4Name); |
663 |
EnablePcapIpv4 (prefix, ipv4, interface, explicitFilename); |
663 |
EnablePcapIpv4 (prefix, ipv4, interface, explicitFilename); |
664 |
} |
664 |
} |
665 |
|
665 |
|
666 |
void |
666 |
void |
667 |
PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, Ipv4InterfaceContainer c) |
667 |
TraceHelperForIpvx::EnablePcapIpv4 (std::string prefix, Ipv4InterfaceContainer c) |
668 |
{ |
668 |
{ |
669 |
for (Ipv4InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
669 |
for (Ipv4InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
670 |
{ |
670 |
{ |
|
674 |
} |
674 |
} |
675 |
|
675 |
|
676 |
void |
676 |
void |
677 |
PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, NodeContainer n) |
677 |
TraceHelperForIpvx::EnablePcapIpv4 (std::string prefix, NodeContainer n) |
678 |
{ |
678 |
{ |
679 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
679 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
680 |
{ |
680 |
{ |
|
691 |
} |
691 |
} |
692 |
|
692 |
|
693 |
void |
693 |
void |
694 |
PcapHelperForIpv4::EnablePcapIpv4All (std::string prefix) |
694 |
TraceHelperForIpvx::EnablePcapIpv4All (std::string prefix) |
695 |
{ |
695 |
{ |
696 |
EnablePcapIpv4 (prefix, NodeContainer::GetGlobal ()); |
696 |
EnablePcapIpv4 (prefix, NodeContainer::GetGlobal ()); |
697 |
} |
697 |
} |
698 |
|
698 |
|
699 |
void |
699 |
void |
700 |
PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
700 |
TraceHelperForIpvx::EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
701 |
{ |
701 |
{ |
702 |
NodeContainer n = NodeContainer::GetGlobal (); |
702 |
NodeContainer n = NodeContainer::GetGlobal (); |
703 |
|
703 |
|
|
722 |
// Public API |
722 |
// Public API |
723 |
// |
723 |
// |
724 |
void |
724 |
void |
725 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename) |
725 |
TraceHelperForIpvx::EnableAsciiIpv4 (std::string prefix, Ptr<Ipv4> ipv4, uint32_t interface, bool explicitFilename) |
726 |
{ |
726 |
{ |
727 |
EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> (), prefix, ipv4, interface, explicitFilename); |
727 |
EnableAsciiIpv4Internal (Ptr<OutputStreamWrapper> (), prefix, ipv4, interface, explicitFilename); |
728 |
} |
728 |
} |
|
731 |
// Public API |
731 |
// Public API |
732 |
// |
732 |
// |
733 |
void |
733 |
void |
734 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv4> ipv4, uint32_t interface) |
734 |
TraceHelperForIpvx::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv4> ipv4, uint32_t interface) |
735 |
{ |
735 |
{ |
736 |
EnableAsciiIpv4Internal (stream, std::string (), ipv4, interface, false); |
736 |
EnableAsciiIpv4Internal (stream, std::string (), ipv4, interface, false); |
737 |
} |
737 |
} |
|
740 |
// Public API |
740 |
// Public API |
741 |
// |
741 |
// |
742 |
void |
742 |
void |
743 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( |
743 |
TraceHelperForIpvx::EnableAsciiIpv4 ( |
744 |
std::string prefix, |
744 |
std::string prefix, |
745 |
std::string ipv4Name, |
745 |
std::string ipv4Name, |
746 |
uint32_t interface, |
746 |
uint32_t interface, |
|
753 |
// Public API |
753 |
// Public API |
754 |
// |
754 |
// |
755 |
void |
755 |
void |
756 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, std::string ipv4Name, uint32_t interface) |
756 |
TraceHelperForIpvx::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, std::string ipv4Name, uint32_t interface) |
757 |
{ |
757 |
{ |
758 |
EnableAsciiIpv4Impl (stream, std::string (), ipv4Name, interface, false); |
758 |
EnableAsciiIpv4Impl (stream, std::string (), ipv4Name, interface, false); |
759 |
} |
759 |
} |
|
762 |
// Private API |
762 |
// Private API |
763 |
// |
763 |
// |
764 |
void |
764 |
void |
765 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( |
765 |
TraceHelperForIpvx::EnableAsciiIpv4Impl ( |
766 |
Ptr<OutputStreamWrapper> stream, |
766 |
Ptr<OutputStreamWrapper> stream, |
767 |
std::string prefix, |
767 |
std::string prefix, |
768 |
std::string ipv4Name, |
768 |
std::string ipv4Name, |
|
777 |
// Public API |
777 |
// Public API |
778 |
// |
778 |
// |
779 |
void |
779 |
void |
780 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (std::string prefix, Ipv4InterfaceContainer c) |
780 |
TraceHelperForIpvx::EnableAsciiIpv4 (std::string prefix, Ipv4InterfaceContainer c) |
781 |
{ |
781 |
{ |
782 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, c); |
782 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, c); |
783 |
} |
783 |
} |
|
786 |
// Public API |
786 |
// Public API |
787 |
// |
787 |
// |
788 |
void |
788 |
void |
789 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ipv4InterfaceContainer c) |
789 |
TraceHelperForIpvx::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, Ipv4InterfaceContainer c) |
790 |
{ |
790 |
{ |
791 |
EnableAsciiIpv4Impl (stream, std::string (), c); |
791 |
EnableAsciiIpv4Impl (stream, std::string (), c); |
792 |
} |
792 |
} |
|
795 |
// Private API |
795 |
// Private API |
796 |
// |
796 |
// |
797 |
void |
797 |
void |
798 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv4InterfaceContainer c) |
798 |
TraceHelperForIpvx::EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv4InterfaceContainer c) |
799 |
{ |
799 |
{ |
800 |
for (Ipv4InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
800 |
for (Ipv4InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
801 |
{ |
801 |
{ |
|
808 |
// Public API |
808 |
// Public API |
809 |
// |
809 |
// |
810 |
void |
810 |
void |
811 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (std::string prefix, NodeContainer n) |
811 |
TraceHelperForIpvx::EnableAsciiIpv4 (std::string prefix, NodeContainer n) |
812 |
{ |
812 |
{ |
813 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, n); |
813 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, n); |
814 |
} |
814 |
} |
|
817 |
// Public API |
817 |
// Public API |
818 |
// |
818 |
// |
819 |
void |
819 |
void |
820 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, NodeContainer n) |
820 |
TraceHelperForIpvx::EnableAsciiIpv4 (Ptr<OutputStreamWrapper> stream, NodeContainer n) |
821 |
{ |
821 |
{ |
822 |
EnableAsciiIpv4Impl (stream, std::string (), n); |
822 |
EnableAsciiIpv4Impl (stream, std::string (), n); |
823 |
} |
823 |
} |
|
826 |
// Private API |
826 |
// Private API |
827 |
// |
827 |
// |
828 |
void |
828 |
void |
829 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n) |
829 |
TraceHelperForIpvx::EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n) |
830 |
{ |
830 |
{ |
831 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
831 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
832 |
{ |
832 |
{ |
|
846 |
// Public API |
846 |
// Public API |
847 |
// |
847 |
// |
848 |
void |
848 |
void |
849 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4All (std::string prefix) |
849 |
TraceHelperForIpvx::EnableAsciiIpv4All (std::string prefix) |
850 |
{ |
850 |
{ |
851 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, NodeContainer::GetGlobal ()); |
851 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, NodeContainer::GetGlobal ()); |
852 |
} |
852 |
} |
|
855 |
// Public API |
855 |
// Public API |
856 |
// |
856 |
// |
857 |
void |
857 |
void |
858 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4All (Ptr<OutputStreamWrapper> stream) |
858 |
TraceHelperForIpvx::EnableAsciiIpv4All (Ptr<OutputStreamWrapper> stream) |
859 |
{ |
859 |
{ |
860 |
EnableAsciiIpv4Impl (stream, std::string (), NodeContainer::GetGlobal ()); |
860 |
EnableAsciiIpv4Impl (stream, std::string (), NodeContainer::GetGlobal ()); |
861 |
} |
861 |
} |
|
864 |
// Public API |
864 |
// Public API |
865 |
// |
865 |
// |
866 |
void |
866 |
void |
867 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 ( |
867 |
TraceHelperForIpvx::EnableAsciiIpv4 ( |
868 |
Ptr<OutputStreamWrapper> stream, |
868 |
Ptr<OutputStreamWrapper> stream, |
869 |
uint32_t nodeid, |
869 |
uint32_t nodeid, |
870 |
uint32_t interface, |
870 |
uint32_t interface, |
|
877 |
// Public API |
877 |
// Public API |
878 |
// |
878 |
// |
879 |
void |
879 |
void |
880 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
880 |
TraceHelperForIpvx::EnableAsciiIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
881 |
{ |
881 |
{ |
882 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, nodeid, interface, explicitFilename); |
882 |
EnableAsciiIpv4Impl (Ptr<OutputStreamWrapper> (), prefix, nodeid, interface, explicitFilename); |
883 |
} |
883 |
} |
|
886 |
// Private API |
886 |
// Private API |
887 |
// |
887 |
// |
888 |
void |
888 |
void |
889 |
AsciiTraceHelperForIpv4::EnableAsciiIpv4Impl ( |
889 |
TraceHelperForIpvx::EnableAsciiIpv4Impl ( |
890 |
Ptr<OutputStreamWrapper> stream, |
890 |
Ptr<OutputStreamWrapper> stream, |
891 |
std::string prefix, |
891 |
std::string prefix, |
892 |
uint32_t nodeid, |
892 |
uint32_t nodeid, |
|
914 |
} |
914 |
} |
915 |
|
915 |
|
916 |
void |
916 |
void |
917 |
PcapHelperForIpv6::EnablePcapIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename) |
917 |
TraceHelperForIpvx::EnablePcapIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename) |
918 |
{ |
918 |
{ |
919 |
EnablePcapIpv6Internal (prefix, ipv6, interface, explicitFilename); |
919 |
EnablePcapIpv6Internal (prefix, ipv6, interface, explicitFilename); |
920 |
} |
920 |
} |
921 |
|
921 |
|
922 |
void |
922 |
void |
923 |
PcapHelperForIpv6::EnablePcapIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename) |
923 |
TraceHelperForIpvx::EnablePcapIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename) |
924 |
{ |
924 |
{ |
925 |
Ptr<Ipv6> ipv6 = Names::Find<Ipv6> (ipv6Name); |
925 |
Ptr<Ipv6> ipv6 = Names::Find<Ipv6> (ipv6Name); |
926 |
EnablePcapIpv6 (prefix, ipv6, interface, explicitFilename); |
926 |
EnablePcapIpv6 (prefix, ipv6, interface, explicitFilename); |
927 |
} |
927 |
} |
928 |
|
928 |
|
929 |
void |
929 |
void |
930 |
PcapHelperForIpv6::EnablePcapIpv6 (std::string prefix, Ipv6InterfaceContainer c) |
930 |
TraceHelperForIpvx::EnablePcapIpv6 (std::string prefix, Ipv6InterfaceContainer c) |
931 |
{ |
931 |
{ |
932 |
for (Ipv6InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
932 |
for (Ipv6InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
933 |
{ |
933 |
{ |
|
937 |
} |
937 |
} |
938 |
|
938 |
|
939 |
void |
939 |
void |
940 |
PcapHelperForIpv6::EnablePcapIpv6 (std::string prefix, NodeContainer n) |
940 |
TraceHelperForIpvx::EnablePcapIpv6 (std::string prefix, NodeContainer n) |
941 |
{ |
941 |
{ |
942 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
942 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
943 |
{ |
943 |
{ |
|
954 |
} |
954 |
} |
955 |
|
955 |
|
956 |
void |
956 |
void |
957 |
PcapHelperForIpv6::EnablePcapIpv6All (std::string prefix) |
957 |
TraceHelperForIpvx::EnablePcapIpv6All (std::string prefix) |
958 |
{ |
958 |
{ |
959 |
EnablePcapIpv6 (prefix, NodeContainer::GetGlobal ()); |
959 |
EnablePcapIpv6 (prefix, NodeContainer::GetGlobal ()); |
960 |
} |
960 |
} |
961 |
|
961 |
|
962 |
void |
962 |
void |
963 |
PcapHelperForIpv6::EnablePcapIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
963 |
TraceHelperForIpvx::EnablePcapIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
964 |
{ |
964 |
{ |
965 |
NodeContainer n = NodeContainer::GetGlobal (); |
965 |
NodeContainer n = NodeContainer::GetGlobal (); |
966 |
|
966 |
|
|
985 |
// Public API |
985 |
// Public API |
986 |
// |
986 |
// |
987 |
void |
987 |
void |
988 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename) |
988 |
TraceHelperForIpvx::EnableAsciiIpv6 (std::string prefix, Ptr<Ipv6> ipv6, uint32_t interface, bool explicitFilename) |
989 |
{ |
989 |
{ |
990 |
EnableAsciiIpv6Internal (Ptr<OutputStreamWrapper> (), prefix, ipv6, interface, explicitFilename); |
990 |
EnableAsciiIpv6Internal (Ptr<OutputStreamWrapper> (), prefix, ipv6, interface, explicitFilename); |
991 |
} |
991 |
} |
|
994 |
// Public API |
994 |
// Public API |
995 |
// |
995 |
// |
996 |
void |
996 |
void |
997 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv6> ipv6, uint32_t interface) |
997 |
TraceHelperForIpvx::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ptr<Ipv6> ipv6, uint32_t interface) |
998 |
{ |
998 |
{ |
999 |
EnableAsciiIpv6Internal (stream, std::string (), ipv6, interface, false); |
999 |
EnableAsciiIpv6Internal (stream, std::string (), ipv6, interface, false); |
1000 |
} |
1000 |
} |
|
1003 |
// Public API |
1003 |
// Public API |
1004 |
// |
1004 |
// |
1005 |
void |
1005 |
void |
1006 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename) |
1006 |
TraceHelperForIpvx::EnableAsciiIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename) |
1007 |
{ |
1007 |
{ |
1008 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, ipv6Name, interface, explicitFilename); |
1008 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, ipv6Name, interface, explicitFilename); |
1009 |
} |
1009 |
} |
|
1012 |
// Public API |
1012 |
// Public API |
1013 |
// |
1013 |
// |
1014 |
void |
1014 |
void |
1015 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, std::string ipv6Name, uint32_t interface) |
1015 |
TraceHelperForIpvx::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, std::string ipv6Name, uint32_t interface) |
1016 |
{ |
1016 |
{ |
1017 |
EnableAsciiIpv6Impl (stream, std::string (), ipv6Name, interface, false); |
1017 |
EnableAsciiIpv6Impl (stream, std::string (), ipv6Name, interface, false); |
1018 |
} |
1018 |
} |
|
1021 |
// Private API |
1021 |
// Private API |
1022 |
// |
1022 |
// |
1023 |
void |
1023 |
void |
1024 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl ( |
1024 |
TraceHelperForIpvx::EnableAsciiIpv6Impl ( |
1025 |
Ptr<OutputStreamWrapper> stream, |
1025 |
Ptr<OutputStreamWrapper> stream, |
1026 |
std::string prefix, |
1026 |
std::string prefix, |
1027 |
std::string ipv6Name, |
1027 |
std::string ipv6Name, |
|
1036 |
// Public API |
1036 |
// Public API |
1037 |
// |
1037 |
// |
1038 |
void |
1038 |
void |
1039 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (std::string prefix, Ipv6InterfaceContainer c) |
1039 |
TraceHelperForIpvx::EnableAsciiIpv6 (std::string prefix, Ipv6InterfaceContainer c) |
1040 |
{ |
1040 |
{ |
1041 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, c); |
1041 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, c); |
1042 |
} |
1042 |
} |
|
1045 |
// Public API |
1045 |
// Public API |
1046 |
// |
1046 |
// |
1047 |
void |
1047 |
void |
1048 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ipv6InterfaceContainer c) |
1048 |
TraceHelperForIpvx::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, Ipv6InterfaceContainer c) |
1049 |
{ |
1049 |
{ |
1050 |
EnableAsciiIpv6Impl (stream, std::string (), c); |
1050 |
EnableAsciiIpv6Impl (stream, std::string (), c); |
1051 |
} |
1051 |
} |
|
1054 |
// Private API |
1054 |
// Private API |
1055 |
// |
1055 |
// |
1056 |
void |
1056 |
void |
1057 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv6InterfaceContainer c) |
1057 |
TraceHelperForIpvx::EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, Ipv6InterfaceContainer c) |
1058 |
{ |
1058 |
{ |
1059 |
for (Ipv6InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
1059 |
for (Ipv6InterfaceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
1060 |
{ |
1060 |
{ |
|
1067 |
// Public API |
1067 |
// Public API |
1068 |
// |
1068 |
// |
1069 |
void |
1069 |
void |
1070 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (std::string prefix, NodeContainer n) |
1070 |
TraceHelperForIpvx::EnableAsciiIpv6 (std::string prefix, NodeContainer n) |
1071 |
{ |
1071 |
{ |
1072 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, n); |
1072 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, n); |
1073 |
} |
1073 |
} |
|
1076 |
// Public API |
1076 |
// Public API |
1077 |
// |
1077 |
// |
1078 |
void |
1078 |
void |
1079 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, NodeContainer n) |
1079 |
TraceHelperForIpvx::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, NodeContainer n) |
1080 |
{ |
1080 |
{ |
1081 |
EnableAsciiIpv6Impl (stream, std::string (), n); |
1081 |
EnableAsciiIpv6Impl (stream, std::string (), n); |
1082 |
} |
1082 |
} |
|
1085 |
// Private API |
1085 |
// Private API |
1086 |
// |
1086 |
// |
1087 |
void |
1087 |
void |
1088 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n) |
1088 |
TraceHelperForIpvx::EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> stream, std::string prefix, NodeContainer n) |
1089 |
{ |
1089 |
{ |
1090 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
1090 |
for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) |
1091 |
{ |
1091 |
{ |
|
1105 |
// Public API |
1105 |
// Public API |
1106 |
// |
1106 |
// |
1107 |
void |
1107 |
void |
1108 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6All (std::string prefix) |
1108 |
TraceHelperForIpvx::EnableAsciiIpv6All (std::string prefix) |
1109 |
{ |
1109 |
{ |
1110 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, NodeContainer::GetGlobal ()); |
1110 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, NodeContainer::GetGlobal ()); |
1111 |
} |
1111 |
} |
|
1114 |
// Public API |
1114 |
// Public API |
1115 |
// |
1115 |
// |
1116 |
void |
1116 |
void |
1117 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6All (Ptr<OutputStreamWrapper> stream) |
1117 |
TraceHelperForIpvx::EnableAsciiIpv6All (Ptr<OutputStreamWrapper> stream) |
1118 |
{ |
1118 |
{ |
1119 |
EnableAsciiIpv6Impl (stream, std::string (), NodeContainer::GetGlobal ()); |
1119 |
EnableAsciiIpv6Impl (stream, std::string (), NodeContainer::GetGlobal ()); |
1120 |
} |
1120 |
} |
|
1123 |
// Public API |
1123 |
// Public API |
1124 |
// |
1124 |
// |
1125 |
void |
1125 |
void |
1126 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface) |
1126 |
TraceHelperForIpvx::EnableAsciiIpv6 (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t interface) |
1127 |
{ |
1127 |
{ |
1128 |
EnableAsciiIpv6Impl (stream, std::string (), nodeid, interface, false); |
1128 |
EnableAsciiIpv6Impl (stream, std::string (), nodeid, interface, false); |
1129 |
} |
1129 |
} |
|
1132 |
// Public API |
1132 |
// Public API |
1133 |
// |
1133 |
// |
1134 |
void |
1134 |
void |
1135 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
1135 |
TraceHelperForIpvx::EnableAsciiIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
1136 |
{ |
1136 |
{ |
1137 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, nodeid, interface, explicitFilename); |
1137 |
EnableAsciiIpv6Impl (Ptr<OutputStreamWrapper> (), prefix, nodeid, interface, explicitFilename); |
1138 |
} |
1138 |
} |
|
1141 |
// Private API |
1141 |
// Private API |
1142 |
// |
1142 |
// |
1143 |
void |
1143 |
void |
1144 |
AsciiTraceHelperForIpv6::EnableAsciiIpv6Impl ( |
1144 |
TraceHelperForIpvx::EnableAsciiIpv6Impl ( |
1145 |
Ptr<OutputStreamWrapper> stream, |
1145 |
Ptr<OutputStreamWrapper> stream, |
1146 |
std::string prefix, |
1146 |
std::string prefix, |
1147 |
uint32_t nodeid, |
1147 |
uint32_t nodeid, |