DemoNetworkEth.ned 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // Copyright (C) 2005 Wei Yang, Ng
  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.ipv6.demonetworketh;
  19. import inet.common.packet.TCPDump;
  20. import inet.networklayer.configurator.ipv6.FlatNetworkConfigurator6;
  21. import inet.node.ipv6.Router6;
  22. import inet.node.ipv6.StandardHost6;
  23. import ned.DatarateChannel;
  24. network DemoNetworkEth
  25. {
  26. parameters:
  27. int n;
  28. types:
  29. channel ethernetline extends DatarateChannel
  30. {
  31. delay = 0.1us;
  32. datarate = 10Mbps;
  33. }
  34. submodules:
  35. configurator: FlatNetworkConfigurator6;
  36. r1: Router6;
  37. r2: Router6;
  38. cli[n]: StandardHost6;
  39. srv[n]: StandardHost6;
  40. linemonitor[n]: TCPDump;
  41. connections:
  42. for i=0..n-1 {
  43. // FIXME adjust to the new TCPDump module
  44. // cli[i].ethg++ <--> ethernetline <--> linemonitor[i].a;
  45. // linemonitor[i].b <--> ethernetline <--> r1.ethg++;
  46. cli[i].ethg++ <--> ethernetline <--> r1.ethg++;
  47. srv[i].ethg++ <--> ethernetline <--> r2.ethg++;
  48. }
  49. r1.ethg++ <--> ethernetline <--> r2.ethg++;
  50. }