OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace diagnostics { |
| 6 dictionary SendPacketOptions { |
| 7 // Target IP address. |
| 8 DOMString ip; |
| 9 // Packet time to live value. If omitted, the system default value will be |
| 10 // used. |
| 11 long? ttl; |
| 12 // Packet timeout in seconds. If omitted, the system default value will be |
| 13 // used. |
| 14 long? timeout; |
| 15 // Size of the payload. If omitted, the system default value will be used. |
| 16 long? size; |
| 17 }; |
| 18 |
| 19 dictionary SendPacketResult { |
| 20 // The IP of the host which we recieves the ICMP reply from. |
| 21 // The IP may differs from our target IP if the packet's ttl is used up. |
| 22 DOMString ip; |
| 23 |
| 24 // Latency in millisenconds. |
| 25 double latency; |
| 26 }; |
| 27 |
| 28 callback SendPacketCallback = void(SendPacketResult result); |
| 29 |
| 30 interface Functions { |
| 31 // Send a packet of the given type with the given parameters. |
| 32 static void sendPacket(SendPacketOptions options, |
| 33 SendPacketCallback callback); |
| 34 }; |
| 35 }; |
OLD | NEW |