569 "1. Unlimited pings, no losses, StopApplication () with no packets in flight IPv4",
571 testcase1v4->SetStartTime(
Seconds(1));
572 testcase1v4->SetStopTime(
Seconds(5.5));
573 testcase1v4->SetCount(0);
574 testcase1v4->CheckReportTransmitted(5);
575 testcase1v4->CheckReportReceived(5);
576 testcase1v4->CheckTraceTx(5);
577 testcase1v4->SetDestinationAddress(
Ipv4Address(
"10.0.0.2"));
578 AddTestCase(testcase1v4, TestCase::Duration::QUICK);
581 "1. Unlimited pings, no losses, StopApplication () with no packets in flight IPv6",
583 testcase1v6->SetStartTime(
Seconds(1));
584 testcase1v6->SetStopTime(
Seconds(5.5));
585 testcase1v6->SetCount(0);
586 testcase1v6->CheckReportTransmitted(5);
587 testcase1v6->CheckReportReceived(5);
588 testcase1v6->CheckTraceTx(5);
589 testcase1v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
590 AddTestCase(testcase1v6, TestCase::Duration::QUICK);
601 "2. Unlimited pings, no losses, StopApplication () with 1 packet in flight IPv4",
603 testcase2v4->SetStartTime(
Seconds(1));
604 testcase2v4->SetStopTime(
Seconds(1.0001));
605 testcase2v4->SetSimulatorStopTime(
Seconds(5));
606 testcase2v4->CheckReportTransmitted(1);
607 testcase2v4->CheckReportReceived(0);
608 testcase1v4->SetDestinationAddress(
Ipv4Address(
"10.0.0.2"));
609 AddTestCase(testcase2v4, TestCase::Duration::QUICK);
612 "2. Unlimited pings, no losses, StopApplication () with 1 packet in flight IPv6",
614 testcase2v6->SetStartTime(
Seconds(1));
615 testcase2v6->SetStopTime(
Seconds(1.0001));
616 testcase2v6->SetSimulatorStopTime(
Seconds(5));
617 testcase2v6->CheckReportTransmitted(1);
618 testcase2v6->CheckReportReceived(0);
619 testcase2v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
620 AddTestCase(testcase2v6, TestCase::Duration::QUICK);
637 auto testcase3v4 =
new PingTestCase(
"3. Test for operation of count attribute and exit "
638 "time after all pings were received, IPv4",
640 testcase3v4->SetStartTime(
Seconds(1));
641 testcase3v4->SetStopTime(
Seconds(5));
642 testcase3v4->SetCount(count);
643 testcase3v4->SetSimulatorStopTime(
Seconds(6));
644 testcase3v4->CheckReportTransmitted(2);
645 testcase3v4->CheckReportReceived(2);
647 testcase3v4->CheckTraceTx(expectedTx);
648 testcase3v4->SetDestinationAddress(
Ipv4Address(
"10.0.0.2"));
649 AddTestCase(testcase3v4, TestCase::Duration::QUICK);
651 auto testcase3v6 =
new PingTestCase(
"3. Test for operation of count attribute and exit "
652 "time after all pings were received, IPv6",
654 testcase3v6->SetStartTime(
Seconds(1));
655 testcase3v6->SetStopTime(
Seconds(5));
656 testcase3v6->SetCount(count);
657 testcase3v6->SetSimulatorStopTime(
Seconds(6));
658 testcase3v6->CheckReportTransmitted(2);
659 testcase3v6->CheckReportReceived(2);
661 testcase3v6->CheckTraceTx(expectedTx);
662 testcase3v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
663 AddTestCase(testcase3v6, TestCase::Duration::QUICK);
677 testcase4v4->SetStartTime(
Seconds(1));
678 testcase4v4->SetStopTime(
Seconds(5));
679 testcase4v4->SetInterval(interval);
680 testcase4v4->SetSimulatorStopTime(
Seconds(6));
681 testcase4v4->CheckReportTransmitted(2);
682 testcase4v4->CheckReportReceived(2);
683 testcase4v4->SetDestinationAddress(
Ipv4Address(
"10.0.0.2"));
684 AddTestCase(testcase4v4, TestCase::Duration::QUICK);
688 testcase4v6->SetStartTime(
Seconds(1));
689 testcase4v6->SetStopTime(
Seconds(5));
690 testcase4v6->SetInterval(interval);
691 testcase4v6->SetSimulatorStopTime(
Seconds(6));
692 testcase4v6->CheckReportTransmitted(2);
693 testcase4v6->CheckReportReceived(2);
694 testcase4v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
695 AddTestCase(testcase4v6, TestCase::Duration::QUICK);
716 testcase5v4->SetStartTime(
Seconds(1));
717 testcase5v4->SetStopTime(
Seconds(5.5));
718 testcase5v4->SetDestinationAddress(
Ipv4Address(
"1.2.3.4"));
719 testcase5v4->CheckReportTransmitted(5);
720 testcase5v4->CheckReportReceived(0);
721 testcase5v4->CheckReportLoss(100);
722 AddTestCase(testcase5v4, TestCase::Duration::QUICK);
726 testcase5v6->SetStartTime(
Seconds(1));
727 testcase5v6->SetStopTime(
Seconds(5.5));
728 testcase5v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:3"));
729 testcase5v6->CheckReportTransmitted(5);
730 testcase5v6->CheckReportReceived(0);
731 testcase5v6->CheckReportLoss(100);
732 AddTestCase(testcase5v6, TestCase::Duration::QUICK);
749 testcase6v4->SetStartTime(
Seconds(1));
750 testcase6v4->SetStopTime(
Seconds(5.5));
752 testcase6v4->CheckReportTransmitted(5);
753 testcase6v4->CheckReportReceived(5);
754 testcase6v4->CheckReportLoss(0);
755 AddTestCase(testcase6v4, TestCase::Duration::QUICK);
758 new PingTestCase(
"6. Test for behavior of ping to all-nodes multicast IPv6 address",
760 testcase6v6->SetStartTime(
Seconds(1));
761 testcase6v6->SetStopTime(
Seconds(5.5));
763 testcase6v6->CheckReportTransmitted(5);
764 testcase6v6->CheckReportReceived(5);
765 testcase6v6->CheckReportLoss(0);
766 AddTestCase(testcase6v6, TestCase::Duration::QUICK);
782 "7. Test behavior of first reply lost in a count-limited configuration, IPv4",
784 std::list<uint32_t> dropList{0};
785 testcase7v4->SetDropList(dropList);
786 testcase7v4->SetStartTime(
Seconds(1));
787 testcase7v4->SetCount(3);
788 testcase7v4->SetStopTime(
Seconds(5));
789 testcase7v4->CheckTraceTx(3);
790 testcase7v4->CheckTraceRtt(2);
791 testcase7v4->CheckReportTransmitted(3);
792 testcase7v4->CheckReportReceived(2);
793 testcase7v4->CheckReportLoss(33);
795 AddTestCase(testcase7v4, TestCase::Duration::QUICK);
798 "7. Test behavior of first reply lost in a count-limited configuration, IPv6",
800 testcase7v6->SetDropList(dropList);
801 testcase7v6->SetStartTime(
Seconds(1));
802 testcase7v6->SetCount(3);
803 testcase7v6->SetStopTime(
Seconds(5));
804 testcase7v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
805 testcase7v6->CheckTraceTx(3);
806 testcase7v6->CheckTraceRtt(2);
807 testcase7v6->CheckReportTransmitted(3);
808 testcase7v6->CheckReportReceived(2);
809 testcase7v6->CheckReportLoss(33);
811 AddTestCase(testcase7v6, TestCase::Duration::QUICK);
827 "8. Test behavior of second reply lost in a count-limited configuration, IPv4",
829 std::list<uint32_t> dropList2{1};
830 testcase8v4->SetDropList(dropList2);
831 testcase8v4->SetStartTime(
Seconds(1));
832 testcase8v4->SetCount(3);
833 testcase8v4->SetStopTime(
Seconds(5));
834 testcase8v4->CheckTraceTx(3);
835 testcase8v4->CheckTraceRtt(2);
836 testcase8v4->CheckReportTransmitted(3);
837 testcase8v4->CheckReportReceived(2);
838 testcase8v4->CheckReportLoss(33);
840 AddTestCase(testcase8v4, TestCase::Duration::QUICK);
843 "8. Test behavior of second reply lost in a count-limited configuration, IPv6",
845 testcase8v6->SetDropList(dropList2);
846 testcase8v6->SetStartTime(
Seconds(1));
847 testcase8v6->SetCount(3);
848 testcase8v6->SetStopTime(
Seconds(5));
849 testcase8v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
850 testcase8v6->CheckTraceTx(3);
851 testcase8v6->CheckTraceRtt(2);
852 testcase8v6->CheckReportTransmitted(3);
853 testcase8v6->CheckReportReceived(2);
854 testcase8v6->CheckReportLoss(33);
856 AddTestCase(testcase8v6, TestCase::Duration::QUICK);
872 "9. Test behavior of last reply lost in a count-limited configuration, IPv4",
874 std::list<uint32_t> dropList3{2};
875 testcase9v4->SetDropList(dropList3);
876 testcase9v4->SetStartTime(
Seconds(1));
877 testcase9v4->SetCount(3);
878 testcase9v4->SetStopTime(
Seconds(5));
879 testcase9v4->CheckTraceTx(3);
880 testcase9v4->CheckTraceRtt(2);
881 testcase9v4->CheckReportTransmitted(3);
882 testcase9v4->CheckReportReceived(2);
883 testcase9v4->CheckReportLoss(33);
885 AddTestCase(testcase9v4, TestCase::Duration::QUICK);
888 "9. Test behavior of last reply lost in a count-limited configuration, IPv6",
890 testcase9v6->SetDropList(dropList3);
891 testcase9v6->SetStartTime(
Seconds(1));
892 testcase9v6->SetCount(3);
893 testcase9v6->SetStopTime(
Seconds(5));
894 testcase9v6->SetDestinationAddress(
Ipv6Address(
"2001:1::200:ff:fe00:2"));
895 testcase9v6->CheckTraceTx(3);
896 testcase9v6->CheckTraceRtt(2);
897 testcase9v6->CheckReportTransmitted(3);
898 testcase9v6->CheckReportReceived(2);
899 testcase9v6->CheckReportLoss(33);
901 AddTestCase(testcase9v6, TestCase::Duration::QUICK);
925 AddTestCase(testcase10v4, TestCase::Duration::QUICK);