arc: Move platform2/arc/network/ to platform2/patchpanel
Next step in the arc-networkd -> patchpanel rename, this patch moves the
location of the code.
BUG=b:151879931
TEST=units,flashed image to atlas
TEST=tasts arc.PlayStore, crostini.LaunchTerminal.download
Change-Id: I1b5cf8d670e1631d46f6449b725395157bf88dde
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2115863
Tested-by: Garrick Evans <garrick@chromium.org>
Commit-Queue: Garrick Evans <garrick@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Hugo Benichi <hugobenichi@google.com>
diff --git a/patchpanel/ipc.proto b/patchpanel/ipc.proto
new file mode 100644
index 0000000..6ad265a
--- /dev/null
+++ b/patchpanel/ipc.proto
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto2";
+option optimize_for = LITE_RUNTIME;
+
+package patchpanel;
+
+// Best practice is to use optional fields, but since the client and server
+// are always in sync, these messages use required fields to save on
+// validation.
+
+// If |br_ifname| exists in the message, a creation or deletion event
+// occurred for the bridge interface.
+// Otherwise, the event is occurred for the physical interface
+// |dev_ifname|.
+message DeviceMessage {
+ required string dev_ifname = 1;
+ optional string br_ifname = 2;
+ optional bool teardown = 3; // value is ignored
+ optional string guest_ip6addr = 4;
+}
+
+message GuestMessage {
+ enum GuestType {
+ UNKNOWN_GUEST = 0;
+ ARC = 1; // ARC++ Container (P & higher)
+ ARC_VM = 2; // ARC VM
+ TERMINA_VM = 3; // Crostini Termina VM
+ PLUGIN_VM = 4; // Plugin VM
+ }
+ required GuestType type = 1;
+
+ enum GuestEvent {
+ UNKNOWN_EVENT = 0;
+ START = 1;
+ STOP = 2;
+ }
+ required GuestEvent event = 2;
+
+ // The PID of the ARC++ container.
+ optional int32 arc_pid = 3;
+
+ // The VSOCK CID of the ARCVM.
+ optional int32 arcvm_vsock_cid = 4;
+}
+
+message IpHelperMessage {
+ oneof message_type {
+ GuestMessage guest_message = 1;
+ DeviceMessage device_message = 2;
+ }
+}