blob: 6ad265a4c79af13b02d416521f68ef91725edf59 [file] [log] [blame]
Kevin Cernekee27bcaa62016-12-03 11:16:26 -08001// 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
5syntax = "proto2";
6option optimize_for = LITE_RUNTIME;
7
Garrick Evans3388a032020-03-24 11:25:55 +09008package patchpanel;
Kevin Cernekee27bcaa62016-12-03 11:16:26 -08009
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 Iman3f062ea2019-11-12 08:37:53 +090014// 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 Evans96e03042019-05-28 14:30:52 +090018message DeviceMessage {
Taoyu Lif0370c92019-09-18 15:04:37 +090019 required string dev_ifname = 1;
Jason Jeremy Imand89b5f52019-10-24 10:39:17 +090020 optional string br_ifname = 2;
21 optional bool teardown = 3; // value is ignored
Jason Jeremy Iman0e9f8262020-03-06 14:50:49 +090022 optional string guest_ip6addr = 4;
Kevin Cernekee27bcaa62016-12-03 11:16:26 -080023}
Garrick Evans96e03042019-05-28 14:30:52 +090024
25message GuestMessage {
26 enum GuestType {
27 UNKNOWN_GUEST = 0;
Garrick Evans1cce71a2019-06-21 10:43:14 +090028 ARC = 1; // ARC++ Container (P & higher)
Garrick Evansb05a7ff2020-02-18 12:59:55 +090029 ARC_VM = 2; // ARC VM
30 TERMINA_VM = 3; // Crostini Termina VM
31 PLUGIN_VM = 4; // Plugin VM
Garrick Evans96e03042019-05-28 14:30:52 +090032 }
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 Evans1cce71a2019-06-21 10:43:14 +090044
45 // The VSOCK CID of the ARCVM.
46 optional int32 arcvm_vsock_cid = 4;
Garrick Evans96e03042019-05-28 14:30:52 +090047}
48
49message IpHelperMessage {
50 oneof message_type {
51 GuestMessage guest_message = 1;
52 DeviceMessage device_message = 2;
53 }
54}