pub struct FilterImpl<'a, CC>(pub &'a mut CC);
Expand description
The “production” implementation of packet filtering.
Provides an implementation of FilterHandler
for any CC
that implements
FilterIpContext
.
Tuple Fields§
§0: &'a mut CC
Trait Implementations§
Source§impl<CC: DeviceIdContext<AnyDevice>> DeviceIdContext<AnyDevice> for FilterImpl<'_, CC>
impl<CC: DeviceIdContext<AnyDevice>> DeviceIdContext<AnyDevice> for FilterImpl<'_, CC>
Source§type WeakDeviceId = <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId
type WeakDeviceId = <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId
The type of weakly referenced device IDs.
Source§impl<I, BC, CC> FilterHandler<I, BC> for FilterImpl<'_, CC>
impl<I, BC, CC> FilterHandler<I, BC> for FilterImpl<'_, CC>
Source§fn ingress_hook<P, M>(
&mut self,
bindings_ctx: &mut BC,
packet: &mut P,
interface: &Self::DeviceId,
metadata: &mut M,
) -> IngressVerdict<I>
fn ingress_hook<P, M>( &mut self, bindings_ctx: &mut BC, packet: &mut P, interface: &Self::DeviceId, metadata: &mut M, ) -> IngressVerdict<I>
The ingress hook intercepts incoming traffic before a routing decision
has been made.
Source§fn local_ingress_hook<P, M>(
&mut self,
bindings_ctx: &mut BC,
packet: &mut P,
interface: &Self::DeviceId,
metadata: &mut M,
) -> Verdict
fn local_ingress_hook<P, M>( &mut self, bindings_ctx: &mut BC, packet: &mut P, interface: &Self::DeviceId, metadata: &mut M, ) -> Verdict
The local ingress hook intercepts incoming traffic that is destined for
the local host.
Source§fn forwarding_hook<P, M>(
&mut self,
packet: &mut P,
in_interface: &Self::DeviceId,
out_interface: &Self::DeviceId,
metadata: &mut M,
) -> Verdict
fn forwarding_hook<P, M>( &mut self, packet: &mut P, in_interface: &Self::DeviceId, out_interface: &Self::DeviceId, metadata: &mut M, ) -> Verdict
The forwarding hook intercepts incoming traffic that is destined for
another host.
Source§fn local_egress_hook<P, M>(
&mut self,
bindings_ctx: &mut BC,
packet: &mut P,
interface: &Self::DeviceId,
metadata: &mut M,
) -> Verdict
fn local_egress_hook<P, M>( &mut self, bindings_ctx: &mut BC, packet: &mut P, interface: &Self::DeviceId, metadata: &mut M, ) -> Verdict
The local egress hook intercepts locally-generated traffic before a
routing decision has been made.
Source§fn egress_hook<P, M>(
&mut self,
bindings_ctx: &mut BC,
packet: &mut P,
interface: &Self::DeviceId,
metadata: &mut M,
) -> (Verdict, ProofOfEgressCheck)
fn egress_hook<P, M>( &mut self, bindings_ctx: &mut BC, packet: &mut P, interface: &Self::DeviceId, metadata: &mut M, ) -> (Verdict, ProofOfEgressCheck)
The egress hook intercepts all outgoing traffic after a routing decision
has been made.
Source§impl<I, CC> IpDeviceAddressIdContext<I> for FilterImpl<'_, CC>where
I: IpExt,
CC: IpDeviceAddressIdContext<I>,
impl<I, CC> IpDeviceAddressIdContext<I> for FilterImpl<'_, CC>where
I: IpExt,
CC: IpDeviceAddressIdContext<I>,
Source§type AddressId = <CC as IpDeviceAddressIdContext<I>>::AddressId
type AddressId = <CC as IpDeviceAddressIdContext<I>>::AddressId
The strong address identifier.
Source§type WeakAddressId = <CC as IpDeviceAddressIdContext<I>>::WeakAddressId
type WeakAddressId = <CC as IpDeviceAddressIdContext<I>>::WeakAddressId
The weak address identifier.
Auto Trait Implementations§
impl<'a, CC> Freeze for FilterImpl<'a, CC>
impl<'a, CC> RefUnwindSafe for FilterImpl<'a, CC>where
CC: RefUnwindSafe,
impl<'a, CC> Send for FilterImpl<'a, CC>where
CC: Send,
impl<'a, CC> Sync for FilterImpl<'a, CC>where
CC: Sync,
impl<'a, CC> Unpin for FilterImpl<'a, CC>
impl<'a, CC> !UnwindSafe for FilterImpl<'a, CC>
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
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