IGMP_basic.test 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. %description:
  2. This test checks that:
  3. 1. The host joined to the 224.0.0.1 (all-systems) multicast group on startup
  4. 2. The router joined to the 224.0.0.2 (all-routers) group too
  5. 3. When the host joins to 225.0.0.1 on an interface, then 225.0.0.1 appears on the list of joined groups of the host immediately
  6. 4. The router receives an IGMP report from the host and updates its list of listeners in the interface data
  7. 5. When the host leaves the 225.0.0.1 group, then the group is removed from the multicast group list of its interface immediately
  8. 6. The router removes 225.0.0.1 from its listener list after lastMemberQueryCount*lastMemberQueryInterval time elapsed
  9. %inifile: omnetpp.ini
  10. [General]
  11. ned-path = .;../../../../src;../../lib
  12. sim-time-limit=100s
  13. cmdenv-express-mode = true
  14. #omnetpp 5.0 - 5.1 compatibility:
  15. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  16. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  17. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  18. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  19. network=IGMPTestNetwork
  20. **.igmpType = "TestIGMP"
  21. **.scenarioManager.script = xmldoc("scenario.xml")
  22. **.host.networkLayer.igmp.outputFile = "host-output.txt"
  23. **.router.networkLayer.igmp.outputFile = "router-output.txt"
  24. %file: scenario.xml
  25. <scenario>
  26. <dump t="1" module="host.networkLayer.igmp" ifname="eth0" what="groups"/>
  27. <dump t="1" module="router.networkLayer.igmp" ifname="eth0" what="groups"/>
  28. <join t="2" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.1"/>
  29. <dump t="2" module="host.networkLayer.igmp" ifname="eth0" what="groups"/>
  30. <dump t="2.1" module="router.networkLayer.igmp" ifname="eth0" what="listeners"/>
  31. <leave t="3" module="host.networkLayer.igmp" ifname="eth0" group="225.0.0.1"/>
  32. <dump t="3" module="host.networkLayer.igmp" ifname="eth0" what="groups"/>
  33. <dump t="5.1" module="router.networkLayer.igmp" node="router" ifname="eth0" what="listeners"/>
  34. </scenario>
  35. %contains-regex: host-output.txt
  36. t=1 host/eth0: groups = <224.0.0.1>
  37. .*
  38. t=2 host/eth0: groups = <224.0.0.1,225.0.0.1>
  39. .*
  40. t=3 host/eth0: groups = <224.0.0.1>
  41. %contains-regex: router-output.txt
  42. t=1 router/eth0: groups = <224.0.0.1,224.0.0.2>
  43. .*
  44. t=2\.1 router/eth0: listeners = <225.0.0.1>
  45. .*
  46. t=5\.1 router/eth0: listeners = <>
  47. %#--------------------------------------------------------------------------------------------------------------
  48. %not-contains: stdout
  49. undisposed object:
  50. %not-contains: stdout
  51. -- check module destructor
  52. %#--------------------------------------------------------------------------------------------------------------