summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2025-07-04 14:42:37 +0530
committerSunil Nimmagadda <sunil@nimmagadda.net>2025-07-04 14:42:37 +0530
commit5698e1bcc806efc7f0cf54e300eb291ecb2734e1 (patch)
tree89e4f8736b2058e659847bb090e1ec66f15e21da
parent55c770ca23575e73ab19d1e8e36e46d3d0999349 (diff)
Mov to the right place.HEADmain
-rw-r--r--src/vrrpv2.rs11
1 files 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,