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>
impl<'a, BP> CoreApi<'a, BP>
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 raw_ip_socket<I: Ip>(
self,
) -> RawIpSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn raw_ip_socket<I: Ip>( self, ) -> RawIpSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the raw IP socket API.
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 all IP versions.
Sourcepub fn multicast_forwarding<I: Ip>(
self,
) -> MulticastForwardingApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn multicast_forwarding<I: Ip>( self, ) -> MulticastForwardingApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the multicast forwarding 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,
dispatch: TimerId<BP::Context>,
timer: <BP::Context as TimerBindingsTypes>::UniqueTimerId,
)where
BP::Context: BindingsContext,
pub fn handle_timer(
&mut self,
dispatch: TimerId<BP::Context>,
timer: <BP::Context as TimerBindingsTypes>::UniqueTimerId,
)where
BP::Context: BindingsContext,
Handles a timer.