pub struct PacketInfoBuilder { /* private fields */ }Implementations§
Source§impl PacketInfoBuilder
impl PacketInfoBuilder
pub fn new() -> Self
pub fn with_device_id(&mut self, device_id: u16)
Sourcepub fn with_l2(
&mut self,
interface_id: u16,
smac: MacAddr,
dmac: MacAddr,
eth_type: u16,
)
pub fn with_l2( &mut self, interface_id: u16, smac: MacAddr, dmac: MacAddr, eth_type: u16, )
l2
Sourcepub fn with_l2_vlan(&mut self, vlan_id: u16, vlan_id_qinq: u16)
pub fn with_l2_vlan(&mut self, vlan_id: u16, vlan_id_qinq: u16)
vlan
pub fn with_tunnel_l2(&mut self, eth_type: u16)
Sourcepub fn with_l3(
&mut self,
ip_version: IPversion,
proto: u8,
tos: u8,
src: IpAddr,
dst: IpAddr,
)
pub fn with_l3( &mut self, ip_version: IPversion, proto: u8, tos: u8, src: IpAddr, dst: IpAddr, )
l3
pub fn with_tunnel_l3( &mut self, ip_version: IPversion, proto: u8, tos: u8, src: IpAddr, dst: IpAddr, )
pub fn with_tunnel_l4(&mut self, src_port: u16, dst_port: u16)
Sourcepub fn with_l7_master_proto(&mut self, master_l7_proto: u16)
pub fn with_l7_master_proto(&mut self, master_l7_proto: u16)
l7
pub fn with_l7_proto(&mut self, l7_proto: u16)
pub fn build(self) -> PacketInfo
Trait Implementations§
Source§impl Default for PacketInfoBuilder
impl Default for PacketInfoBuilder
Source§fn default() -> PacketInfoBuilder
fn default() -> PacketInfoBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PacketInfoBuilder
impl RefUnwindSafe for PacketInfoBuilder
impl Send for PacketInfoBuilder
impl Sync for PacketInfoBuilder
impl Unpin for PacketInfoBuilder
impl UnwindSafe for PacketInfoBuilder
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