From 4857491882d75e39ce5edf35c3bd4d97ef65a946 Mon Sep 17 00:00:00 2001 From: clerie Date: Sat, 24 Aug 2024 14:40:49 +0200 Subject: [PATCH] Make constants uppercase --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 752d9b7..2d82855 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,9 +22,9 @@ use tokio::net::UdpSocket; const scope_id: u32 = 15; const duid: [u8; 4] = [0x13, 0x37, 0x23, 0x42]; -const All_DHCP_Relay_Agents_and_Servers: &str = "ff02::1:2"; -const DHCP_Client_port: u16 = 546; -const DHCP_Relay_Agent_and_Server_port: u16 = 547; +const ALL_DHCP_RELAY_AGENTS_AND_SERVERS: &str = "ff02::1:2"; +const DHCP_CLIENT_PORT: u16 = 546; +const DHCP_RELAY_AGENT_AND_SERVER_PORT: u16 = 547; #[tokio::main] async fn main() { @@ -52,10 +52,10 @@ async fn main() { let selected_address = ipv6_link_local_addresses.next() .expect("No IPv6 link local address assigned to this interface"); - let socket_addr = SocketAddrV6::new(selected_address.ip(), DHCP_Client_port, 0, selected_interface.index.clone()); + let socket_addr = SocketAddrV6::new(selected_address.ip(), DHCP_CLIENT_PORT, 0, selected_interface.index.clone()); let sock = UdpSocket::bind(socket_addr).await.unwrap(); - let remote_addr = SocketAddrV6::new(All_DHCP_Relay_Agents_and_Servers.parse().unwrap(), DHCP_Relay_Agent_and_Server_port, 0, scope_id); + let remote_addr = SocketAddrV6::new(ALL_DHCP_RELAY_AGENTS_AND_SERVERS.parse().unwrap(), DHCP_RELAY_AGENT_AND_SERVER_PORT, 0, scope_id); let mut msg = Message::new(MessageType::InformationRequest); let msg_opts = msg.opts_mut();