#[repr(C, packed(1))]pub struct TcpUdpFilter {
pub valid_fields: TcpUdpFilterFlags,
pub source_port: PortRange,
pub dest_port: PortRange,
pub tcp_flags: u8,
pub padding: [u8; 3],
}Expand description
This structure is used to define filtering rules for TCP and UDP packets.
Rust equivalent for _TCPUDP_FILTER.
The valid_fields field specifies which fields in the structure are valid for filtering.
The source_port field represents the range of source port numbers to filter.
The dest_port field represents the range of destination port numbers to filter.
The tcp_flags field is used to filter TCP packets based on their flags.
The padding field ensures proper alignment of the structure.
Fields§
§valid_fields: TcpUdpFilterFlags§source_port: PortRange§dest_port: PortRange§tcp_flags: u8§padding: [u8; 3]Implementations§
Source§impl TcpUdpFilter
Creates a new TcpUdpFilter instance.
impl TcpUdpFilter
Creates a new TcpUdpFilter instance.
§Arguments
valid_fields- Specifies which fields in the filter structure are valid for filtering.source_port- Represents the range of source port numbers to filter.dest_port- Represents the range of destination port numbers to filter.tcp_flags- Used to filter TCP packets based on their flags.
§Returns
- A new
TcpUdpFilterinstance.
Trait Implementations§
Source§impl Clone for TcpUdpFilter
impl Clone for TcpUdpFilter
Source§fn clone(&self) -> TcpUdpFilter
fn clone(&self) -> TcpUdpFilter
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TcpUdpFilter
impl Debug for TcpUdpFilter
Source§impl Default for TcpUdpFilter
impl Default for TcpUdpFilter
Source§fn default() -> TcpUdpFilter
fn default() -> TcpUdpFilter
Returns the “default value” for a type. Read more
impl Copy for TcpUdpFilter
Auto Trait Implementations§
impl Freeze for TcpUdpFilter
impl RefUnwindSafe for TcpUdpFilter
impl Send for TcpUdpFilter
impl Sync for TcpUdpFilter
impl Unpin for TcpUdpFilter
impl UnwindSafe for TcpUdpFilter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)