From 5698e1bcc806efc7f0cf54e300eb291ecb2734e1 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Fri, 4 Jul 2025 14:42:37 +0530 Subject: Mov to the right place. --- src/vrrpv2.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vrrpv2.rs b/src/vrrpv2.rs index 748f266..5f5de92 100644 --- a/src/vrrpv2.rs +++ b/src/vrrpv2.rs @@ -1,6 +1,11 @@ use std::io::{self, Cursor, Read}; use std::net::Ipv4Addr; +const VERSION: u8 = 2; +const TYPE: u8 = 1; +const VERSION_TYPE: u8 = (VERSION << 4) | TYPE; // 0x21 +const MIN_PACKET_SIZE: usize = 16; + /// A VRRP version 2 packet. /// /// Packet format @@ -25,12 +30,6 @@ use std::net::Ipv4Addr; /// | Authentication Data (2) | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// ``` - -const VERSION: u8 = 2; -const TYPE: u8 = 1; -const VERSION_TYPE: u8 = (VERSION << 4) | TYPE; // 0x21 -const MIN_PACKET_SIZE: usize = 16; - #[derive(Debug, PartialEq)] pub struct VRRPv2 { pub virtual_router_id: u8, -- cgit v1.2.3