fn prepare_message(&mut self, mac: &Eui48Addr, xid: u32) -> Result<(), Error<W::Error>> {
        self.set_op(Op::BOOTREQUEST)?;
        self.set_htype_ethernet()?;
        self.set_hlen(HW_ADDR_LEN)?;
        self.set_hops(0)?;
        self.set_xid(xid)?;
        self.set_secs(0)?;
        self.set_flags(true)?;
        self.set_ciaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_yiaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_siaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_giaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_chaddr(mac)?;
        self.set_sname_zero()?;
        self.set_file_zero()?;
        self.set_magic_cookie()?;
        self.writer.seek(SeekFrom::Start(240))?;

        Ok(())
    }
/// Prepares the buffer for a new DHCP message.
///
/// From [RFC 2131 Section 2](https://tools.ietf.org/html/rfc2131#section-2)
Prepares the buffer for a new DHCP message.
From [RFC 2131 Section 2]
Prepares the buffer for a new DHCP message . From [ RFC 2131 Section 2 ]
fn prepare_message(&mut self, mac: &Eui48Addr, xid: u32) -> Result<(), Error<W::Error>> {
        self.set_op(Op::BOOTREQUEST)?;
        self.set_htype_ethernet()?;
        self.set_hlen(HW_ADDR_LEN)?;
        self.set_hops(0)?;
        self.set_xid(xid)?;
        self.set_secs(0)?;
        self.set_flags(true)?;
        self.set_ciaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_yiaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_siaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_giaddr(&Ipv4Addr::UNSPECIFIED)?;
        self.set_chaddr(mac)?;
        self.set_sname_zero()?;
        self.set_file_zero()?;
        self.set_magic_cookie()?;
        self.writer.seek(SeekFrom::Start(240))?;
        Ok(())
    }
fn prepare_message ( & mut self , mac : & Eui48Addr , xid : u32 ) -> Result < ( ) , Error < W :: Error > > { self . set_op ( Op :: BOOTREQUEST ) ? ; self . set_htype_ethernet ( ) ? ; self . set_hlen ( HW_ADDR_LEN ) ? ; self . set_hops ( 0 ) ? ; self . set_xid ( xid ) ? ; self . set_secs ( 0 ) ? ; self . set_flags ( true ) ? ; self . set_ciaddr ( & Ipv4Addr :: UNSPECIFIED ) ? ; self . set_yiaddr ( & Ipv4Addr :: UNSPECIFIED ) ? ; self . set_siaddr ( & Ipv4Addr :: UNSPECIFIED ) ? ; self . set_giaddr ( & Ipv4Addr :: UNSPECIFIED ) ? ; self . set_chaddr ( mac ) ? ; self . set_sname_zero ( ) ? ; self . set_file_zero ( ) ? ; self . set_magic_cookie ( ) ? ; self . writer . seek ( SeekFrom :: Start ( 240 ) ) ? ; Ok ( ( ) ) }
Prepares the buffer for a new DHCP message.
Prepares the buffer for a new DHCP message .
&mut self
mac
&Eui48Addr
xid
u32
&mut self
mac
&Eui48Addr
xid
u32