pub struct PacketBuildOption {
pub src_mac: MacAddr,
pub dst_mac: MacAddr,
pub ether_type: EtherType,
pub src_ip: IpAddr,
pub dst_ip: IpAddr,
pub src_port: Option<u16>,
pub dst_port: Option<u16>,
pub ip_protocol: Option<IpNextLevelProtocol>,
pub payload: Vec<u8>,
pub use_tun: bool,
}
Expand description
Higher level packet build option. For building packet, use PacketBuilder or protocol specific packet builder.
Fields§
§src_mac: MacAddr
§dst_mac: MacAddr
§ether_type: EtherType
§src_ip: IpAddr
§dst_ip: IpAddr
§src_port: Option<u16>
§dst_port: Option<u16>
§ip_protocol: Option<IpNextLevelProtocol>
§payload: Vec<u8>
§use_tun: bool
Implementations§
Trait Implementations§
Source§impl Clone for PacketBuildOption
impl Clone for PacketBuildOption
Source§fn clone(&self) -> PacketBuildOption
fn clone(&self) -> PacketBuildOption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PacketBuildOption
impl RefUnwindSafe for PacketBuildOption
impl Send for PacketBuildOption
impl Sync for PacketBuildOption
impl Unpin for PacketBuildOption
impl UnwindSafe for PacketBuildOption
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