blob: 9bab8480c42d52ec8522bfd117d626ebbce8beaf [file] [log] [blame]
// Copyright 2021 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.net.debug;
using fuchsia.net;
using fuchsia.hardware.network;
/// Network interface debugging functionality.
///
/// This protocol is intended for debugging and testing only; and not meant for
/// load-bearing code.
@discoverable
closed protocol Interfaces {
/// Provides access to the port backing an interface.
///
/// `port` is closed with `ZX_ERR_NOT_FOUND` if an interface referenced by
/// `id` does not exist or `ZX_ERR_NOT_SUPPORTED` if it is not backed by a
/// [`fuchsia.hardware.network/Port`].
///
/// + request `id` identifies the interface whose port is granted.
/// + request `port` grants access to the interface's device port.
strict GetPort(resource struct {
id fuchsia.net.InterfaceId;
port server_end:fuchsia.hardware.network.Port;
});
};