We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d1131 commit f271002Copy full SHA for f271002
src/proto/network/pxe.rs
@@ -976,6 +976,8 @@ pub struct DhcpV4Packet {
976
}
977
978
impl DhcpV4Packet {
979
+ const DHCP_MAGIK: u32 = 0x63825363;
980
+
981
/// Transaction ID, a random number, used to match this boot request with the responses it generates.
982
pub fn bootp_ident(&self) -> u32 {
983
u32::from_be(self.bootp_ident)
@@ -991,7 +993,7 @@ impl DhcpV4Packet {
991
993
DhcpV4Flags::from_bits_truncate(u16::from_be(self.bootp_flags))
992
994
995
- /// A magic cookie, should be `0x63825363`.
996
+ /// A magic cookie, should be [`Self::DHCP_MAGIK`].
997
pub fn dhcp_magik(&self) -> u32 {
998
u32::from_be(self.dhcp_magik)
999
0 commit comments