netstack3_core

Struct 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>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn device_socket( self, ) -> DeviceSocketApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the device socket API.

Source

pub fn filter( self, ) -> FilterApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the filtering API.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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``.

Source

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.

Source

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.

Source

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.

Source

pub fn counters( self, ) -> CountersApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the counters API.

Source

pub fn handle_timer( &mut self, dispatch: TimerId<BP::Context>, timer: <BP::Context as TimerBindingsTypes>::UniqueTimerId, )

Handles a timer.

Auto Trait Implementations§

§

impl<'a, BP> Freeze for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: Sized, BP: Freeze,

§

impl<'a, BP> RefUnwindSafe for CoreApi<'a, BP>

§

impl<'a, BP> Send for CoreApi<'a, BP>

§

impl<'a, BP> Sync for CoreApi<'a, BP>

§

impl<'a, BP> Unpin for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: Sized, BP: Unpin,

§

impl<'a, BP> UnwindSafe for CoreApi<'a, BP>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CC
where Meta: ReceivableFrameMeta<CC, BC>,

Source§

fn receive_frame<B>(&mut self, bindings_ctx: &mut BC, metadata: Meta, frame: B)
where B: BufferMut + Debug,

Receive a frame. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CC
where 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,

Send a frame. Read more
Source§

impl<Id, CC, BC> TimerHandler<BC, Id> for CC
where BC: TimerBindingsTypes, Id: HandleableTimer<CC, BC>,

Source§

fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )

Handle a timer firing. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<L, T> UnlockedAccess<L> for T

Source§

type Data = <L as UnlockedAccessMarkerFor<T>>::Data

The type of state being accessed.
Source§

type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l

A guard providing read access to the data.
Source§

fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>

How to access the state.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<B, A> LockBefore<B> for A
where B: LockAfter<A>,