Searched refs:MAGIC_COOKIE (Results 1 – 2 of 2) sorted by relevance
127 xor_value[0..4].copy_from_slice(&MAGIC_COOKIE.to_be_bytes()); in add_to_as()129 value[2..4].copy_from_slice(&(self.port ^ (MAGIC_COOKIE >> 16) as u16).to_be_bytes()); in add_to_as()157 self.port = u16::from_be_bytes([v[2], v[3]]) ^ (MAGIC_COOKIE >> 16) as u16; in get_from_as()159 xor_value[0..4].copy_from_slice(&MAGIC_COOKIE.to_be_bytes()); in get_from_as()
20 pub const MAGIC_COOKIE: u32 = 0x2112A442; constant48 b.len() >= MESSAGE_HEADER_SIZE && u32::from_be_bytes([b[4], b[5], b[6], b[7]]) == MAGIC_COOKIE in is_message()231 self.raw[4..8].copy_from_slice(&MAGIC_COOKIE.to_be_bytes()); // magic cookie in write_header()284 if cookie != MAGIC_COOKIE { in decode()