pub struct Init {
pub src_addr: Address,
pub dst_addr: Address,
pub ethertype: EtherType,
pub payload: usize,
}Expand description
Initializer for a packet.
Fields§
§src_addr: AddressThe ethernet source address to use.
Most often you’ll want to select the address assigned to the ethernet endpoint at which responses are to be received. But in theory you are free to use other addresses, for example to emulate a very temporary endpoint or use manual addresses for less standard compliant networking.
dst_addr: AddressThe destination address for the frame.
Can be broadcast, multi-cast, unicast or some application specific addressing magic within an organizational reserved block.
ethertype: EtherTypeThe protocol of the next layer, contained in the frame payload.
payload: usizeThe length in bytes that the payload requires.
Auto Trait Implementations§
impl Freeze for Init
impl RefUnwindSafe for Init
impl Send for Init
impl Sync for Init
impl Unpin for Init
impl UnwindSafe for Init
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