Struct fidl_fuchsia_net_filter::Matchers
source · pub struct Matchers {
pub in_interface: Option<InterfaceMatcher>,
pub out_interface: Option<InterfaceMatcher>,
pub src_addr: Option<AddressMatcher>,
pub dst_addr: Option<AddressMatcher>,
pub transport_protocol: Option<TransportProtocol>,
/* private fields */
}
Expand description
The criteria that a packet must match for a rule to be applied.
Each field is optional, and will only be checked if provided. An unset field will be considered to match any packet. (An entirely empty table would match every packet.) Another way to think of the matching criteria for a given rule is as an AND of every provided matcher.
Some matchers are only available in certain contexts. For example, the
in_interface
is not available in the EGRESS
hook. If a matcher is
provided that is not available in the context in which the rule is
installed, the installation will fail with an error.
Fields§
§in_interface: Option<InterfaceMatcher>
The interface on which the packet entered the stack.
Only available in INGRESS
, LOCAL_INGRESS
, and FORWARDING
.
out_interface: Option<InterfaceMatcher>
The interface through which the packet exits the stack.
Only available in FORWARDING
, LOCAL_EGRESS
, and EGRESS
.
src_addr: Option<AddressMatcher>
Matcher for the source IP address.
dst_addr: Option<AddressMatcher>
Matcher for the destination IP address.
transport_protocol: Option<TransportProtocol>
Matchers for the transport layer protocol.
Note that the variants of the TransportProtocol
union allow matching
on the transport layer protocol itself; to match on specific properties
at the transport layer (such as TCP or UDP ports), clients should use
the fields of a protocol-specific matcher.
Trait Implementations§
source§impl<D: ResourceDialect> Decode<Matchers, D> for Matchers
impl<D: ResourceDialect> Decode<Matchers, D> for Matchers
source§impl PartialEq for Matchers
impl PartialEq for Matchers
source§impl TypeMarker for Matchers
impl TypeMarker for Matchers
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for Matchers
impl ValueTypeMarker for Matchers
impl Persistable for Matchers
impl StructuralPartialEq for Matchers
Auto Trait Implementations§
impl Freeze for Matchers
impl RefUnwindSafe for Matchers
impl Send for Matchers
impl Sync for Matchers
impl Unpin for Matchers
impl UnwindSafe for Matchers
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)