blob: a686394c9029dac8dbc0d721e99e263e0ed1f6af [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.
//! State maintained by the device layer.
use crate::{ip::device::state::DualStackIpDeviceState, Instant};
/// State for a link-device that is also an IP device.
///
/// `D` is the link-specific state.
pub(crate) struct IpLinkDeviceState<I: Instant, D> {
pub ip: DualStackIpDeviceState<I>,
pub link: D,
}
impl<I: Instant, D> IpLinkDeviceState<I, D> {
/// Create a new `IpLinkDeviceState` with a link-specific state `link`.
pub(crate) fn new(link: D) -> Self {
Self { ip: DualStackIpDeviceState::default(), link }
}
}