소스 검색

updated devicescript

cecylia 8 년 전
부모
커밋
c45514bb9c
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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);