multihomed.ned 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // Copyright (C) 2008 Irene Ruengeler
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. //
  18. package inet.examples.sctp.cmttest;
  19. import inet.node.inet.Router;
  20. import inet.node.inet.StandardHost;
  21. import ned.DatarateChannel;
  22. network multihomed
  23. {
  24. parameters:
  25. double testTimeout @unit(s) = default(0s);
  26. bool testing = default(false);
  27. submodules:
  28. sctp_client: StandardHost {
  29. parameters:
  30. forwarding = false;
  31. networkLayer.configurator.networkConfiguratorModule = "";
  32. @display("p=61,142;i=device/laptop");
  33. gates:
  34. pppg[2];
  35. }
  36. sctp_server: StandardHost {
  37. parameters:
  38. forwarding = false;
  39. networkLayer.configurator.networkConfiguratorModule = "";
  40. @display("p=426,135;i=device/server2");
  41. gates:
  42. pppg[2];
  43. }
  44. router1: Router {
  45. parameters:
  46. networkLayer.configurator.networkConfiguratorModule = "";
  47. @display("p=188,77;i=abstract/router");
  48. gates:
  49. pppg[4];
  50. }
  51. router2: Router {
  52. parameters:
  53. networkLayer.configurator.networkConfiguratorModule = "";
  54. @display("p=323,75;i=abstract/router");
  55. gates:
  56. pppg[4];
  57. }
  58. connections:
  59. sctp_client.pppg[0] <--> NormalPath <--> router1.pppg[0];
  60. sctp_client.pppg[1] <--> NormalPath <--> router1.pppg[1];
  61. router1.pppg[2] <--> BottlePath <--> router2.pppg[0];
  62. router1.pppg[3] <--> BottlePath <--> router2.pppg[1];
  63. router2.pppg[2] <--> NormalPath <--> sctp_server.pppg[0];
  64. router2.pppg[3] <--> NormalPath <--> sctp_server.pppg[1];
  65. }
  66. channel BottlePath extends DatarateChannel
  67. {
  68. parameters:
  69. delay = 0s;
  70. datarate = 1Mbps;
  71. per = 0.005;
  72. }
  73. channel NormalPath extends DatarateChannel
  74. {
  75. parameters:
  76. delay = 0ms;
  77. datarate = 1Gbps;
  78. }