blob: 22b5da51f75c1ff8f8096f1ba3c0b63e1a4036b4 [file] [log] [blame]
// Copyright 2020 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.hardware.network;
/// An instance of a network device exposed on devfs.
// NOTE(brunodalbo) This protocol exists to sidestep the fact that the DDK
// doesn't allow devices to own their channels. The Device framework implicitly
// composes fuchsia.device/Controller on channels obtained through devfs, and
// the "composed" implementation is always provided by the framework itself. At
// the time of this writing it is unclear what is going to replace that or when,
// only that there is a desire to improve the pattern. The expectation is that
// pattern will be improved with Unified Services (https://fxbug.dev/42160684) and
// Drivers as Components (https://fxbug.dev/42108351).
@available(added=HEAD)
closed protocol DeviceInstance {
/// Connects to the [`Device`] implementation.
///
/// + request `device` device handle.
strict GetDevice(resource struct {
device server_end:Device;
});
};