dos03.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {
  2. devices:[
  3. {
  4. id:"Alice",
  5. image: "macbook",
  6. ports:1,
  7. x:0.25,
  8. y:0.2,
  9. player:true
  10. },
  11. {
  12. id:"Barbara",
  13. image: "iphone-1",
  14. ports:1,
  15. x:0.25,
  16. y:0.4,
  17. script: deviceScripts.ping
  18. },
  19. {
  20. id:"Carol",
  21. image: "macbook",
  22. ports:1,
  23. x:0.25,
  24. y:0.6,
  25. script: deviceScripts.ping
  26. },
  27. {
  28. id:"Darcy",
  29. ports:1,
  30. x:0.25,
  31. y:0.8,
  32. script: deviceScripts.ping
  33. },
  34. {
  35. id:"Google",
  36. image: "server",
  37. ports:1,
  38. x:0.8,
  39. y:0.5,
  40. bufferWait:170
  41. },
  42. {
  43. id:"Router",
  44. image: "router",
  45. ports:5,
  46. x:0.5,
  47. y:0.5,
  48. script: deviceScripts.broadcast,
  49. rules:[
  50. {dstip:"Alice",portNum:0},
  51. {dstip:"Barbara",portNum:1},
  52. {dstip:"Carol",portNum:2},
  53. {dstip:"Darcy",portNum:3},
  54. {dstip:"Google",portNum:4}
  55. ]
  56. }
  57. ],
  58. links:[
  59. {
  60. src:"Alice", srcport:0,
  61. dst:"Router", dstport:0
  62. },
  63. {
  64. src:"Barbara", srcport:0,
  65. dst:"Router", dstport:1
  66. },
  67. {
  68. src:"Carol", srcport:0,
  69. dst:"Router", dstport:2
  70. },
  71. {
  72. src:"Darcy", srcport:0,
  73. dst:"Router", dstport:3
  74. },
  75. {
  76. src:"Google", srcport:0,
  77. dst:"Router", dstport:4
  78. }
  79. ],
  80. timeline:[],
  81. triggers:[
  82. {
  83. type:"packet",
  84. device:"Google",
  85. payload:{
  86. network:{srcip:"Barbara", dstip:"Google"}
  87. },
  88. times:20
  89. },
  90. {
  91. type:"packet",
  92. device:"Google",
  93. payload:{
  94. network:{srcip:"Carol", dstip:"Google"}
  95. },
  96. times:20
  97. },
  98. {
  99. type:"packet",
  100. device:"Google",
  101. payload:{
  102. network:{srcip:"Darcy", dstip:"Google"}
  103. },
  104. times:20
  105. }
  106. ],
  107. nextLevel:11
  108. }