blob: 2d6649bb94af377b1498386ebe79ccdc9c94e68f [file] [log] [blame]
// Copyright 2023 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.starnix.container;
using zx;
type ConsoleWindowSize = struct {
rows uint16;
cols uint16;
x_pixels uint16;
y_pixels uint16;
};
@discoverable
protocol Controller {
/// Connects `bridge_socket` to a vsocket at `port` in the container.
VsockConnect(resource struct {
port uint32;
bridge_socket zx.Handle:SOCKET;
});
SpawnConsole(resource table {
1: console zx.Handle:SOCKET;
2: binary_path string:MAX;
3: argv vector<string:MAX>:MAX;
4: environ vector<string:MAX>:MAX;
5: window_size ConsoleWindowSize;
}) -> (struct {
exit_code uint8;
}) error zx.Status;
};