UDP_ttl_ipv4.test 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. %description:
  2. Tests that TimeToLive UDP socket option takes effect over IPv4.
  3. NClients example network is used, with one client.
  4. The client sends a packet with a given TTL.
  5. It is checked that the server receives the datagram with the
  6. given TTL minus the number of hops.
  7. %#--------------------------------------------------------------------------------------------------------------
  8. %inifile: {}.ini
  9. [General]
  10. ned-path = ../../../../examples;../../../../src
  11. network = inet.examples.inet.nclients.NClients
  12. sim-time-limit = 15s
  13. cmdenv-express-mode = false
  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. # number of client computers
  20. *.n = 1
  21. # udp apps
  22. **.cli[*].numUdpApps = 1
  23. **.cli[*].udpApp[*].typename = "UDPBasicApp"
  24. **.cli[*].udpApp[0].destAddresses = "srv"
  25. **.cli[*].udpApp[0].destPort = 1000
  26. **.cli[*].udpApp[0].messageLength = 64B
  27. **.cli[*].udpApp[0].timeToLive = 77 # some peculiar value
  28. **.cli[*].udpApp[0].startTime = 10s
  29. **.cli[*].udpApp[0].stopTime = 11s
  30. **.cli[*].udpApp[0].sendInterval = 10s
  31. **.srv.numUdpApps = 1
  32. **.srv.udpApp[*].typename = "UDPSink"
  33. **.srv.udpApp[0].localPort = 1000
  34. %#--------------------------------------------------------------------------------------------------------------
  35. %subst: /omnetpp:://
  36. %#--------------------------------------------------------------------------------------------------------------
  37. %contains-regex: stdout
  38. Received packet: \(inet::ApplicationPacket\)UDPBasicAppData-0 .* TTL=73
  39. %#--------------------------------------------------------------------------------------------------------------
  40. %not-contains: stdout
  41. undisposed object:
  42. %not-contains: stdout
  43. -- check module destructor
  44. %#--------------------------------------------------------------------------------------------------------------