m/test/e2e/connectivity: add connectivity tester

This adds a connectivity testing framework. It uses pod agents and
communicates with them over stdio. This is used to implement a simple
smoke test and will later be used to test network policy controllers.

Change-Id: If40673a91336dbe3a7a383bf2e9d17736fad3bdc
Reviewed-on: https://review.monogon.dev/c/monogon/+/3756
Reviewed-by: Jan Schär <jan@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/test/e2e/connectivity/spec/spec.proto b/metropolis/test/e2e/connectivity/spec/spec.proto
new file mode 100644
index 0000000..8ab8a0c
--- /dev/null
+++ b/metropolis/test/e2e/connectivity/spec/spec.proto
@@ -0,0 +1,59 @@
+syntax = "proto3";
+
+import "google/protobuf/duration.proto";
+
+package metropolis.test.e2e.connectivty_tester;
+
+message Request {
+    oneof req {
+        TestRequest test = 1;
+        StartServerRequest start_server = 2;
+        StopServerRequest stop_server = 3;
+    }
+}
+
+message Response {
+    oneof res {
+        TestResponse test = 1;
+        StartServerResponse start_server = 2;
+        StopServerResponse stop_server = 3;
+    }
+}
+
+message TestRequest {
+    string address = 1;
+    uint64 token = 2;
+    google.protobuf.Duration timeout = 3;
+}
+
+message TestResponse {
+    enum Result {
+        UNKNOWN = 0;
+        CONNECTION_REJECTED = 1;
+        CONNECTION_TIMEOUT = 2;
+        WRONG_TOKEN = 3;
+        SUCCESS = 4;
+    }
+    Result result = 1;
+    string error_description = 2;
+}
+
+message StartServerRequest {
+    string address = 1;
+    uint64 token = 2;
+}
+
+message StartServerResponse {
+    bool ok = 1;
+    string error_description = 2;
+}
+
+message StopServerRequest {
+    uint64 token = 1;
+}
+
+message StopServerResponse {
+    bool ok = 1;
+    string error_description = 2;
+}
+