blob: 59cb0db1e7b5639a442c71eef43bd7193ad21dae [file] [log] [blame] [edit]
// 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
open protocol Controller {
/// Connects `bridge_socket` to a vsocket at `port` in the container.
flexible VsockConnect(resource struct {
port uint32;
bridge_socket zx.Handle:SOCKET;
});
flexible SpawnConsole(resource table {
1: console_in zx.Handle:SOCKET;
2: console_out zx.Handle:SOCKET;
3: binary_path string:MAX;
4: argv vector<string:MAX>:MAX;
5: environ vector<string:MAX>:MAX;
6: window_size ConsoleWindowSize;
}) -> (struct {
exit_code uint8;
}) error zx.Status;
};