IGMPv3_host2.test 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. %description:
  2. Checks that a host responds to a General Query with a correct response.
  3. %#--------------------------------------------------------------------------------------------------------------
  4. %inifile: omnetpp.ini
  5. [General]
  6. ned-path = .;../../../../src;../../lib
  7. sim-time-limit=300s
  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 = false
  18. **.multicastForwarding = false
  19. **.scenarioManager.script = xmldoc("scenario.xml")
  20. %#--------------------------------------------------------------------------------------------------------------
  21. %file: scenario.xml
  22. <scenario>
  23. <join t="2" module="node.tester" ifname="eth0" group="225.0.0.1" sources="10.0.0.1"/>
  24. <dump t="2" module="node.tester" ifname="eth0" what="groups"/>
  25. <send t="2" module="node.tester" ifname="eth0" type="IGMPv3Query" maxRespCode="10"/>
  26. <set-filter t="3" module="node.tester" ifname="eth0" group="225.0.0.1" sources="E 10.0.0.2"/>
  27. <dump t="3" module="node.tester" ifname="eth0" what="groups"/>
  28. <send t="3" module="node.tester" ifname="eth0" type="IGMPv3Query" maxRespCode="10"/>
  29. </scenario>
  30. %#--------------------------------------------------------------------------------------------------------------
  31. %#
  32. %# First check that the join was successful
  33. %#
  34. %postrun-command: grep "IGMPTester: .*groups =" test.out > groups.out || true
  35. %contains: groups.out
  36. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 I 10.0.0.1.
  37. IGMPTester: eth0: groups = 224.0.0.1 E, 224.0.0.2 E, 225.0.0.1 E 10.0.0.2.
  38. %#
  39. %# Now check that the IGMP module responded with a correct report
  40. %#
  41. %postrun-command: grep "IGMPTester: .*Received" test.out > received.out || true
  42. %contains-regex: received.out
  43. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=IS_IN 10.0.0.1>.
  44. .*
  45. IGMPTester: Received: inet::IGMPv3Report<225.0.0.1=IS_EX 10.0.0.2>.
  46. %#--------------------------------------------------------------------------------------------------------------
  47. %not-contains: stdout
  48. undisposed object:
  49. %not-contains: stdout
  50. -- check module destructor
  51. %#--------------------------------------------------------------------------------------------------------------