Kevin Cernekee | 27bcaa6 | 2016-12-03 11:16:26 -0800 | [diff] [blame] | 1 | // Copyright 2016 The Chromium OS 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 | syntax = "proto2"; |
| 6 | option optimize_for = LITE_RUNTIME; |
| 7 | |
Garrick Evans | 3388a03 | 2020-03-24 11:25:55 +0900 | [diff] [blame] | 8 | package patchpanel; |
Kevin Cernekee | 27bcaa6 | 2016-12-03 11:16:26 -0800 | [diff] [blame] | 9 | |
| 10 | // Best practice is to use optional fields, but since the client and server |
| 11 | // are always in sync, these messages use required fields to save on |
| 12 | // validation. |
| 13 | |
Jason Jeremy Iman | 3f062ea | 2019-11-12 08:37:53 +0900 | [diff] [blame] | 14 | // If |br_ifname| exists in the message, a creation or deletion event |
| 15 | // occurred for the bridge interface. |
| 16 | // Otherwise, the event is occurred for the physical interface |
| 17 | // |dev_ifname|. |
Garrick Evans | 96e0304 | 2019-05-28 14:30:52 +0900 | [diff] [blame] | 18 | message DeviceMessage { |
Taoyu Li | f0370c9 | 2019-09-18 15:04:37 +0900 | [diff] [blame] | 19 | required string dev_ifname = 1; |
Jason Jeremy Iman | d89b5f5 | 2019-10-24 10:39:17 +0900 | [diff] [blame] | 20 | optional string br_ifname = 2; |
| 21 | optional bool teardown = 3; // value is ignored |
Jason Jeremy Iman | 0e9f826 | 2020-03-06 14:50:49 +0900 | [diff] [blame] | 22 | optional string guest_ip6addr = 4; |
Kevin Cernekee | 27bcaa6 | 2016-12-03 11:16:26 -0800 | [diff] [blame] | 23 | } |
Garrick Evans | 96e0304 | 2019-05-28 14:30:52 +0900 | [diff] [blame] | 24 | |
| 25 | message GuestMessage { |
| 26 | enum GuestType { |
| 27 | UNKNOWN_GUEST = 0; |
Garrick Evans | 1cce71a | 2019-06-21 10:43:14 +0900 | [diff] [blame] | 28 | ARC = 1; // ARC++ Container (P & higher) |
Garrick Evans | b05a7ff | 2020-02-18 12:59:55 +0900 | [diff] [blame] | 29 | ARC_VM = 2; // ARC VM |
| 30 | TERMINA_VM = 3; // Crostini Termina VM |
| 31 | PLUGIN_VM = 4; // Plugin VM |
Garrick Evans | 96e0304 | 2019-05-28 14:30:52 +0900 | [diff] [blame] | 32 | } |
| 33 | required GuestType type = 1; |
| 34 | |
| 35 | enum GuestEvent { |
| 36 | UNKNOWN_EVENT = 0; |
| 37 | START = 1; |
| 38 | STOP = 2; |
| 39 | } |
| 40 | required GuestEvent event = 2; |
| 41 | |
| 42 | // The PID of the ARC++ container. |
| 43 | optional int32 arc_pid = 3; |
Garrick Evans | 1cce71a | 2019-06-21 10:43:14 +0900 | [diff] [blame] | 44 | |
| 45 | // The VSOCK CID of the ARCVM. |
| 46 | optional int32 arcvm_vsock_cid = 4; |
Garrick Evans | 96e0304 | 2019-05-28 14:30:52 +0900 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | message IpHelperMessage { |
| 50 | oneof message_type { |
| 51 | GuestMessage guest_message = 1; |
| 52 | DeviceMessage device_message = 2; |
| 53 | } |
| 54 | } |