pub struct DeviceIpAnyApi<C>(/* private fields */);
Expand description
The device IP API interacting with all IP versions.
Implementations§
Source§impl<C> DeviceIpAnyApi<C>
impl<C> DeviceIpAnyApi<C>
Source§impl<C> DeviceIpAnyApi<C>where
C: ContextPair,
C::CoreContext: IpDeviceConfigurationContext<Ipv4, C::BindingsContext> + IpDeviceConfigurationHandler<Ipv4, C::BindingsContext> + IpRoutingDeviceContext<Ipv4> + IpDeviceConfigurationContext<Ipv6, C::BindingsContext> + IpDeviceConfigurationHandler<Ipv6, C::BindingsContext> + IpRoutingDeviceContext<Ipv6>,
C::BindingsContext: IpDeviceBindingsContext<Ipv4, <C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId> + IpDeviceBindingsContext<Ipv6, <C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId>,
impl<C> DeviceIpAnyApi<C>where
C: ContextPair,
C::CoreContext: IpDeviceConfigurationContext<Ipv4, C::BindingsContext> + IpDeviceConfigurationHandler<Ipv4, C::BindingsContext> + IpRoutingDeviceContext<Ipv4> + IpDeviceConfigurationContext<Ipv6, C::BindingsContext> + IpDeviceConfigurationHandler<Ipv6, C::BindingsContext> + IpRoutingDeviceContext<Ipv6>,
C::BindingsContext: IpDeviceBindingsContext<Ipv4, <C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId> + IpDeviceBindingsContext<Ipv6, <C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId>,
Sourcepub fn add_ip_addr_subnet(
&mut self,
device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId,
addr_sub_and_config: impl Into<AddrSubnetAndManualConfigEither<<C::BindingsContext as InstantBindingsTypes>::Instant>>,
) -> Result<(), AddIpAddrSubnetError>
pub fn add_ip_addr_subnet( &mut self, device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId, addr_sub_and_config: impl Into<AddrSubnetAndManualConfigEither<<C::BindingsContext as InstantBindingsTypes>::Instant>>, ) -> Result<(), AddIpAddrSubnetError>
Sourcepub fn del_ip_addr(
&mut self,
device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId,
addr: impl Into<SpecifiedAddr<IpAddr>>,
) -> Result<RemoveResourceResult<AddrSubnetEither, Either<<C::BindingsContext as ReferenceNotifiers>::ReferenceReceiver<AddrSubnet<Ipv4Addr>>, <C::BindingsContext as ReferenceNotifiers>::ReferenceReceiver<AddrSubnet<Ipv6Addr>>>>, NotFoundError>
pub fn del_ip_addr( &mut self, device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId, addr: impl Into<SpecifiedAddr<IpAddr>>, ) -> Result<RemoveResourceResult<AddrSubnetEither, Either<<C::BindingsContext as ReferenceNotifiers>::ReferenceReceiver<AddrSubnet<Ipv4Addr>>, <C::BindingsContext as ReferenceNotifiers>::ReferenceReceiver<AddrSubnet<Ipv6Addr>>>>, NotFoundError>
Like DeviceIpApi::del_ip_addr
.
Sourcepub fn get_routing_metric(
&mut self,
device_id: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId,
) -> RawMetric
pub fn get_routing_metric( &mut self, device_id: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId, ) -> RawMetric
Sourcepub fn for_each_assigned_ip_addr_subnet<F: FnMut(AddrSubnetEither)>(
&mut self,
device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId,
f: F,
)
pub fn for_each_assigned_ip_addr_subnet<F: FnMut(AddrSubnetEither)>( &mut self, device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId, f: F, )
Like [DeviceIpApi::collect_assigned_ip_addr_subnets
], collecting
addresses for both IP versions.
Sourcepub fn get_assigned_ip_addr_subnets(
&mut self,
device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId,
) -> Vec<AddrSubnetEither>
pub fn get_assigned_ip_addr_subnets( &mut self, device: &<C::CoreContext as DeviceIdContext<AnyDevice>>::DeviceId, ) -> Vec<AddrSubnetEither>
Like DeviceIpApi::get_assigned_ip_addr_subnets
, returning addresses
for both IP versions.
Auto Trait Implementations§
impl<C> Freeze for DeviceIpAnyApi<C>where
C: Freeze,
impl<C> RefUnwindSafe for DeviceIpAnyApi<C>where
C: RefUnwindSafe,
impl<C> Send for DeviceIpAnyApi<C>where
C: Send,
impl<C> Sync for DeviceIpAnyApi<C>where
C: Sync,
impl<C> Unpin for DeviceIpAnyApi<C>where
C: Unpin,
impl<C> UnwindSafe for DeviceIpAnyApi<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more