blob: 2b3eb492c29e190252ec1a9d980c8a9e1d5c0367 [file] [log] [blame] [edit]
// Copyright 2013 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.netstack;
using fuchsia.hardware.ethernet;
using fuchsia.net.interfaces;
using zx;
@discoverable
protocol Netstack {
/// Creates a bridge and returns the newly created nicid or an
/// error if the creation fails.
// TODO(https://fxbug.dev/86661): Redesign and re-home this.
BridgeInterfaces(struct {
nicids vector<uint32>:MAX;
}) -> (struct {
result strict union {
1: message string:<MAX>;
2: nicid uint32;
};
});
/// Adds a new interface backed by the given ethernet device.
AddEthernetDevice(resource struct {
topological_path string:MAX;
interface_config struct {
name fuchsia.net.interfaces.Name;
/// An unstable file path corresponding to the interface. Used in
/// watching the creation and destruction of the interface, or in
/// accessing the interface using netdump.
filepath string:MAX;
metric uint32;
};
device client_end:fuchsia.hardware.ethernet.Device;
}) -> (struct {
nicid uint32;
}) error zx.status;
};