pub struct PacketMatcher<I: IpExt, BT: MatcherBindingsTypes> {
pub in_interface: Option<InterfaceMatcher<BT::DeviceClass>>,
pub out_interface: Option<InterfaceMatcher<BT::DeviceClass>>,
pub src_address: Option<AddressMatcher<I::Addr>>,
pub dst_address: Option<AddressMatcher<I::Addr>>,
pub transport_protocol: Option<TransportProtocolMatcher<I::Proto>>,
pub external_matcher: Option<BT::BindingsPacketMatcher>,
}Expand description
Top-level matcher for IP packets.
Fields§
§in_interface: Option<InterfaceMatcher<BT::DeviceClass>>The interface on which the packet entered the stack.
Only available in INGRESS, LOCAL_INGRESS, and FORWARDING.
out_interface: Option<InterfaceMatcher<BT::DeviceClass>>The interface through which the packet exits the stack.
Only available in FORWARDING, LOCAL_EGRESS, and EGRESS.
src_address: Option<AddressMatcher<I::Addr>>Matcher for the source IP address.
dst_address: Option<AddressMatcher<I::Addr>>Matcher for the destination IP address.
transport_protocol: Option<TransportProtocolMatcher<I::Proto>>Matchers for the transport layer.
external_matcher: Option<BT::BindingsPacketMatcher>A custom matcher to run on the packet.
Trait Implementations§
Source§impl<I: IpExt, BT: MatcherBindingsTypes> Clone for PacketMatcher<I, BT>
impl<I: IpExt, BT: MatcherBindingsTypes> Clone for PacketMatcher<I, BT>
Source§impl<I: IpExt, BT: MatcherBindingsTypes> Debug for PacketMatcher<I, BT>
impl<I: IpExt, BT: MatcherBindingsTypes> Debug for PacketMatcher<I, BT>
Source§impl<I: IpExt, BT: MatcherBindingsTypes> Default for PacketMatcher<I, BT>
impl<I: IpExt, BT: MatcherBindingsTypes> Default for PacketMatcher<I, BT>
Auto Trait Implementations§
impl<I, BT> Freeze for PacketMatcher<I, BT>where
<BT as MatcherBindingsTypes>::BindingsPacketMatcher: Freeze,
<BT as MatcherBindingsTypes>::DeviceClass: Freeze,
<I as IpProtoExt>::Proto: Freeze,
<I as Ip>::Addr: Freeze,
impl<I, BT> RefUnwindSafe for PacketMatcher<I, BT>where
<BT as MatcherBindingsTypes>::BindingsPacketMatcher: RefUnwindSafe,
<BT as MatcherBindingsTypes>::DeviceClass: RefUnwindSafe,
<I as IpProtoExt>::Proto: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
impl<I, BT> Send for PacketMatcher<I, BT>where
<BT as MatcherBindingsTypes>::BindingsPacketMatcher: Send,
<BT as MatcherBindingsTypes>::DeviceClass: Send,
impl<I, BT> Sync for PacketMatcher<I, BT>where
<BT as MatcherBindingsTypes>::BindingsPacketMatcher: Sync,
<BT as MatcherBindingsTypes>::DeviceClass: Sync,
impl<I, BT> Unpin for PacketMatcher<I, BT>where
<BT as MatcherBindingsTypes>::BindingsPacketMatcher: Unpin,
<BT as MatcherBindingsTypes>::DeviceClass: Unpin,
<I as IpProtoExt>::Proto: Unpin,
<I as Ip>::Addr: Unpin,
impl<I, BT> UnwindSafe for PacketMatcher<I, BT>where
<BT as MatcherBindingsTypes>::BindingsPacketMatcher: UnwindSafe,
<BT as MatcherBindingsTypes>::DeviceClass: UnwindSafe,
<I as IpProtoExt>::Proto: UnwindSafe,
<I as Ip>::Addr: 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<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>>
fn send_frame<S>( &mut self, bindings_ctx: &mut BC, metadata: Meta, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Send a frame. Read more
Source§impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta
impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta
Source§fn send_meta<SS>(
self,
core_ctx: &mut FakeCoreCtx<S, Meta, DeviceId>,
bindings_ctx: &mut BC,
frame: SS,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, SS>>
fn send_meta<SS>( self, core_ctx: &mut FakeCoreCtx<S, Meta, DeviceId>, bindings_ctx: &mut BC, frame: SS, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, SS>>
Sends this frame metadata to the provided contexts.
Source§impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta
Source§fn send_meta<S>(
self,
core_ctx: &mut FakeFrameCtx<Meta>,
_bindings_ctx: &mut BC,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
fn send_meta<S>( self, core_ctx: &mut FakeFrameCtx<Meta>, _bindings_ctx: &mut BC, frame: S, ) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>
Sends this frame metadata to the provided contexts.
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