Index: chrome/common/extensions/api/diagnostics.idl |
diff --git a/chrome/common/extensions/api/diagnostics.idl b/chrome/common/extensions/api/diagnostics.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5b84bd9ed3d38f8d6f49ed7ec6be9098adae24da |
--- /dev/null |
+++ b/chrome/common/extensions/api/diagnostics.idl |
@@ -0,0 +1,35 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+namespace diagnostics { |
+ dictionary SendPacketOptions { |
+ // Target IP address. |
+ DOMString ip; |
+ // Packet time to live value. If omitted, the system default value will be |
+ // used. |
+ long? ttl; |
+ // Packet timeout in seconds. If omitted, the system default value will be |
+ // used. |
+ long? timeout; |
+ // Size of the payload. If omitted, the system default value will be used. |
+ long? size; |
+ }; |
+ |
+ dictionary SendPacketResult { |
+ // The IP of the host which we recieves the ICMP reply from. |
+ // The IP may differs from our target IP if the packet's ttl is used up. |
+ DOMString ip; |
+ |
+ // Latency in millisenconds. |
+ double latency; |
+ }; |
+ |
+ callback SendPacketCallback = void(SendPacketResult result); |
+ |
+ interface Functions { |
+ // Send a packet of the given type with the given parameters. |
+ static void sendPacket(SendPacketOptions options, |
+ SendPacketCallback callback); |
+ }; |
+}; |