NClientsPPP.ned 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // Copyright (C) 2004 Andras Varga
  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.nclients;
  19. import inet.networklayer.configurator.ipv6.FlatNetworkConfigurator6;
  20. import inet.node.ipv6.Router6;
  21. import inet.node.ipv6.StandardHost6;
  22. import ned.DatarateChannel;
  23. network NClientsPPP
  24. {
  25. parameters:
  26. int n;
  27. types:
  28. channel fiberline extends DatarateChannel
  29. {
  30. delay = 1us;
  31. datarate = 512Mbps;
  32. }
  33. submodules:
  34. configurator: FlatNetworkConfigurator6;
  35. r1: Router6;
  36. r2: Router6;
  37. r3: Router6;
  38. cli[n]: StandardHost6;
  39. srv: StandardHost6;
  40. connections:
  41. for i=0..n-1 {
  42. cli[i].pppg++ <--> fiberline <--> r1.pppg++;
  43. }
  44. r1.pppg++ <--> fiberline <--> r2.pppg++;
  45. r2.pppg++ <--> fiberline <--> r3.pppg++;
  46. r3.pppg++ <--> fiberline <--> srv.pppg++;
  47. }