Browse Source

updated devicescript

cecylia 8 years ago
parent
commit
c45514bb9c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      js/devicescripts.js

+ 4 - 2
js/devicescripts.js

@@ -19,10 +19,12 @@ var deviceScripts = {
 		onPacketReceived: function(device, packet) {
                     if(packet.transport.proto == "ICMP"){
                         var new_packet = {
-                            from: packet.network.dstip,
-		            payload:{
+                            network: {
                                 srcip: packet.network.dstip,
                                 dstip: packet.network.srcip
+                            },
+                            transport: {
+                                proto: "ICMP"
                             }
                         };
                         doPacketAnimation(device.id, device.ports[0], new_packet);