netstack3_udp/
settings.rs

1// Copyright 2025 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use netstack3_datagram::DatagramSettings;
6
7/// UDP layer settings.
8#[derive(Clone)]
9pub struct UdpSettings {
10    /// Common datagram socket settings.
11    pub datagram: DatagramSettings,
12}
13
14impl Default for UdpSettings {
15    fn default() -> Self {
16        Self { datagram: Default::default() }
17    }
18}
19
20impl AsRef<DatagramSettings> for UdpSettings {
21    fn as_ref(&self) -> &DatagramSettings {
22        &self.datagram
23    }
24}