Struct cross_socket::packet::builder::PacketBuildOption
source · 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>,
}
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>
Implementations§
Trait Implementations§
source§impl Clone for PacketBuildOption
impl Clone for PacketBuildOption
source§fn clone(&self) -> PacketBuildOption
fn clone(&self) -> PacketBuildOption
Returns a copy 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 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