IGMPv3_router4.test 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. %description:
  2. Checks that the router updates the list of listeners in response to reports.
  3. %#--------------------------------------------------------------------------------------------------------------
  4. %inifile: omnetpp.ini
  5. [General]
  6. ned-path = .;../../../../src;../../lib
  7. sim-time-limit=100s
  8. cmdenv-express-mode = false
  9. #cmdenv-log-prefix = "%t %N: "
  10. #omnetpp 5.0 - 5.1 compatibility:
  11. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  12. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  13. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  14. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  15. network=TestIGMPNetwork
  16. **.igmpType = "IGMPv3"
  17. **.IPForward = true
  18. **.multicastForwarding = true
  19. **.scenarioManager.script = xmldoc("scenario.xml")
  20. %#--------------------------------------------------------------------------------------------------------------
  21. %file: scenario.xml
  22. <scenario>
  23. <!-- INCLUDE() -> ALLOW(10.0.0.1,10.0.0.2) -> INCLUDE(10.0.0.1,10.0.0.2) -->
  24. <send t="1" module="node.tester" ifname="eth0" type="IGMPv3Report">
  25. <record group="225.0.0.1" type="ALLOW" sources="10.0.0.1 10.0.0.2"/>
  26. </send>
  27. <dump t="1.001" module="node.tester" ifname="eth0" what="listeners"/>
  28. <!-- INCLUDE(10.0.0.1,10.0.0.2) -> BLOCK(10.0.0.1) -> INCLUDE(10.0.0.1,10.0.0.2) -->
  29. <send t="2" module="node.tester" ifname="eth0" type="IGMPv3Report">
  30. <record group="225.0.0.1" type="BLOCK" sources="10.0.0.1"/>
  31. </send>
  32. <dump t="2.001" module="node.tester" ifname="eth0" what="listeners"/>
  33. <!-- INCLUDE(10.0.0.1,10.0.0.2) -> TO_IN(10.0.0.3) -> INCLUDE(10.0.0.1,10.0.0.2,10.0.0.3) -->
  34. <send t="3" module="node.tester" ifname="eth0" type="IGMPv3Report">
  35. <record group="225.0.0.1" type="TO_IN" sources="10.0.0.3"/>
  36. </send>
  37. <dump t="3.001" module="node.tester" ifname="eth0" what="listeners"/>
  38. <!-- INCLUDE(10.0.0.1,10.0.0.2,10.0.0.3) -> TO_EX(10.0.0.3,10.0.0.4) -> EXCLUDE(10.0.0.3; 10.0.0.4) -->
  39. <send t="4" module="node.tester" ifname="eth0" type="IGMPv3Report">
  40. <record group="225.0.0.1" type="TO_EX" sources="10.0.0.3 10.0.0.4"/>
  41. </send>
  42. <dump t="4.001" module="node.tester" ifname="eth0" what="listeners"/>
  43. <!-- EXCLUDE(10.0.0.3; 10.0.0.4) -> ALLOW(10.0.0.4) -> EXCLUDE(10.0.0.3;) -->
  44. <send t="5" module="node.tester" ifname="eth0" type="IGMPv3Report">
  45. <record group="225.0.0.1" type="ALLOW" sources="10.0.0.4"/>
  46. </send>
  47. <dump t="5.001" module="node.tester" ifname="eth0" what="listeners"/>
  48. <!-- EXCLUDE(10.0.0.3;) -> BLOCK(10.0.0.4) -> EXCLUDE(10.0.0.3,10.0.0.4;) -->
  49. <send t="6" module="node.tester" ifname="eth0" type="IGMPv3Report">
  50. <record group="225.0.0.1" type="BLOCK" sources="10.0.0.4"/>
  51. </send>
  52. <dump t="6.001" module="node.tester" ifname="eth0" what="listeners"/>
  53. <!-- EXCLUDE(10.0.0.3,10.0.0.4;) -> TO_EX(10.0.0.1,10.0.0.3) -> EXCLUDE(10.0.0.1,10.0.0.3;) -->
  54. <send t="7" module="node.tester" ifname="eth0" type="IGMPv3Report">
  55. <record group="225.0.0.1" type="TO_EX" sources="10.0.0.1 10.0.0.3"/>
  56. </send>
  57. <dump t="7.001" module="node.tester" ifname="eth0" what="listeners"/>
  58. <!-- EXCLUDE(10.0.0.1,10.0.0.3;) -> TO_IN(10.0.0.1,10.0.0.2) -> EXCLUDE(10.0.0.1,10.0.0.2,10.0.0.3;) -->
  59. <send t="8" module="node.tester" ifname="eth0" type="IGMPv3Report">
  60. <record group="225.0.0.1" type="TO_IN" sources="10.0.0.1 10.0.0.2"/>
  61. </send>
  62. <dump t="8.001" module="node.tester" ifname="eth0" what="listeners"/>
  63. </scenario>
  64. %#--------------------------------------------------------------------------------------------------------------
  65. %#
  66. %# Check that Group-Specific or Group-and-Source-Specific Queries are sent.
  67. %#
  68. %postrun-command: grep "IGMPTester: .* listeners" test.out > tester.out || true
  69. %contains-regex: tester.out
  70. IGMPTester: eth0: listeners = 225.0.0.1 I 10.0.0.1 10.0.0.2.
  71. IGMPTester: eth0: listeners = 225.0.0.1 I 10.0.0.1 10.0.0.2.
  72. IGMPTester: eth0: listeners = 225.0.0.1 I 10.0.0.1 10.0.0.2 10.0.0.3.
  73. IGMPTester: eth0: listeners = 225.0.0.1 E 10.0.0.4.
  74. IGMPTester: eth0: listeners = 225.0.0.1 E.
  75. IGMPTester: eth0: listeners = 225.0.0.1 E.
  76. IGMPTester: eth0: listeners = 225.0.0.1 E.
  77. IGMPTester: eth0: listeners = 225.0.0.1 E.
  78. %#--------------------------------------------------------------------------------------------------------------
  79. %not-contains: stdout
  80. undisposed object:
  81. %not-contains: stdout
  82. -- check module destructor
  83. %#--------------------------------------------------------------------------------------------------------------