| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.developer.remotecontrol; |
| |
| using fuchsia.net; |
| using fuchsia.hwinfo; |
| using fuchsia.buildinfo; |
| |
| const NODE_NAME_MAX uint32 = 255; |
| |
| /// State of the compatibility between the host tools and the target. |
| type CompatibilityState = flexible enum { |
| /// An error was encountered determining the compatibility status. |
| ERROR = 0; |
| /// The compatibility information is not present. |
| ABSENT = 1; |
| /// ABI revision is supported |
| SUPPORTED = 2; |
| /// ABI revision was not recognized. |
| UNKNOWN = 3; |
| /// ABI revision it presented is not supported. |
| UNSUPPORTED = 4; |
| }; |
| |
| /// Compatibility information about the target |
| type CompatibilityInfo = struct { |
| /// The state of the compatibity between the host tools and the target. |
| state CompatibilityState; |
| /// The ABI revision of the target platform. |
| // Note: aliases that create newtypes for existing types is not supported |
| // so the basic type is used directly. |
| platform_abi uint64; |
| /// A status message string suitable for displaying to english reading users. |
| message string:MAX; |
| }; |
| |
| type IdentifyHostResponse = table { |
| 2: nodename string:NODE_NAME_MAX; |
| // UTC timestamp of the target's time of boot, in nanoseconds. |
| 3: boot_timestamp_nanos uint64; |
| 4: serial_number string:fuchsia.hwinfo.MAX_VALUE_SIZE; |
| 5: ids vector<uint64>:MAX; |
| // The name of the product as set via `fx set` in-tree. Products can be seen |
| // in-tree via `fx list-products`. |
| 6: product_config string:fuchsia.buildinfo.MAX_STRING_LENGTH; |
| // The board as set via `fx set` in-tree, like `x64` for example. |
| 7: board_config string:fuchsia.buildinfo.MAX_STRING_LENGTH; |
| // TODO(https://fxbug.dev/287693745): The semantics of this field are not well |
| // defined. Are these addresses intended to be used to connect to the |
| // device, or only identify it? Various comments in the code refer to |
| // needing the scope id of a given address, but such a scope id would |
| // inherently refer to the device side, rather than the host side, |
| // rendering it not helpful for connecting to the device. If this field is |
| // for identification, the scope ID can serve as additional information, |
| // but may tempt its use for connection, which might be incorrect. |
| 8: addresses vector<fuchsia.net.Subnet>:MAX; |
| }; |
| |
| type IdentifyHostError = flexible enum : uint32 { |
| // Indicates that the attempt to list device network interfaces failed. |
| LIST_INTERFACES_FAILED = 1; |
| // Indicates that attempting to get the nodename of the target failed. |
| GET_DEVICE_NAME_FAILED = 2; |
| // Indicates a failure to connect to the proxies for host identification. |
| PROXY_CONNECTION_FAILED = 3; |
| }; |