fidl_fuchsia_net_stack_ext/
lib.rs
1mod error;
6pub use self::error::{FidlReturn, NetstackError};
7
8use fidl_fuchsia_net_stack as fidl;
9
10pub struct ForwardingEntry {
11 pub subnet: fidl_fuchsia_net_ext::Subnet,
12 pub device_id: u64,
13 pub next_hop: Option<fidl_fuchsia_net_ext::IpAddress>,
14 pub metric: u32,
15}
16
17impl From<fidl::ForwardingEntry> for ForwardingEntry {
18 fn from(forwarding_entry: fidl::ForwardingEntry) -> Self {
19 let fidl::ForwardingEntry { subnet, device_id, next_hop, metric } = forwarding_entry;
20 let subnet = subnet.into();
21 let next_hop = next_hop.map(|next_hop| (*next_hop).into());
22 Self { subnet, device_id, next_hop, metric }
23 }
24}