Struct netstack3_core::CoreApi
source · pub struct CoreApi<'a, BP>(/* private fields */)
where
BP: ContextProvider,
BP::Context: BindingsTypes;
Expand description
The single entry point for function calls into netstack3 core.
Implementations§
source§impl<'a, BP> CoreApi<'a, BP>where
BP: ContextProvider,
BP::Context: BindingsTypes,
impl<'a, BP> CoreApi<'a, BP>where
BP: ContextProvider,
BP::Context: BindingsTypes,
sourcepub fn udp<I: Ip>(
self
) -> UdpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn udp<I: Ip>( self ) -> UdpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the UDP API for IP version I
.
sourcepub fn icmp_echo<I: Ip>(
self
) -> IcmpEchoSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn icmp_echo<I: Ip>( self ) -> IcmpEchoSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the ICMP socket API for IP version I
.
sourcepub fn tcp<I: Ip>(
self
) -> TcpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn tcp<I: Ip>( self ) -> TcpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the TCP API for IP version I
.
sourcepub fn device_socket(
self
) -> DeviceSocketApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn device_socket( self ) -> DeviceSocketApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the device socket API.
sourcepub fn filter(
self
) -> FilterApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn filter( self ) -> FilterApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the filtering API.
sourcepub fn routes<I: Ip>(
self
) -> RoutesApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn routes<I: Ip>( self ) -> RoutesApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the routes API for IP version I
.
sourcepub fn routes_any(
self
) -> RoutesAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn routes_any( self ) -> RoutesAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the routes API for IP version I
.
sourcepub fn neighbor<I: Ip, D>(
self
) -> NeighborApi<I, D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn neighbor<I: Ip, D>( self ) -> NeighborApi<I, D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the neighbor API for IP version I
and device D
.
sourcepub fn device<D>(
self
) -> DeviceApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn device<D>( self ) -> DeviceApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the device API for device type D
.
sourcepub fn device_any(
self
) -> DeviceAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn device_any( self ) -> DeviceAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the device API for all device types.
sourcepub fn device_ip<I: Ip>(
self
) -> DeviceIpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn device_ip<I: Ip>( self ) -> DeviceIpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the device IP API for IP version `I``.
sourcepub fn device_ip_any(
self
) -> DeviceIpAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn device_ip_any( self ) -> DeviceIpAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the device IP API for all IP versions.
sourcepub fn transmit_queue<D>(
self
) -> TransmitQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn transmit_queue<D>( self ) -> TransmitQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the transmit queue API for device type D
.
sourcepub fn receive_queue<D>(
self
) -> ReceiveQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn receive_queue<D>( self ) -> ReceiveQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the receive queue API for device type D
.
sourcepub fn counters(
self
) -> CountersApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn counters( self ) -> CountersApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the counters API.
sourcepub fn handle_timer(&mut self, timer: TimerId<BP::Context>)where
BP::Context: BindingsContext,
pub fn handle_timer(&mut self, timer: TimerId<BP::Context>)where
BP::Context: BindingsContext,
Handles a timer.