grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v6 2/5] net/dhcp: Consistently use decimal numbers for DHCP/BOOTP


From: Javier Martinez Canillas
Subject: [PATCH v6 2/5] net/dhcp: Consistently use decimal numbers for DHCP/BOOTP options enum
Date: Wed, 22 Jan 2020 12:01:53 +0100

The DHCP Options and BOOTP Vendor Extensions enum values are a mixture of
decimal and hexadecimal numbers. Change this to consistently use decimal
numbers for all since that is how these values are defined by RFC 2132.

Suggested-by: Daniel Kiper <address@hidden>
Signed-off-by: Javier Martinez Canillas <address@hidden>
Reviewed-by: Daniel Kiper <address@hidden>

---

Changes in v6: None
Changes in v5:
- Add Reviewed-by from Daniel Kiper to patch #2.

Changes in v4:
- Use decimal instead of hexadecimal numbers to be consistent with RFC 2132.

Changes in v3:
- Add patch to cleanup bootp/dhcp options enum.

Changes in v2: None

 include/grub/net.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/grub/net.h b/include/grub/net.h
index 4a9069a1474..b5fedb28b9c 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -454,14 +454,14 @@ struct grub_net_bootp_packet
 
 enum
   {
-    GRUB_NET_BOOTP_PAD = 0x00,
-    GRUB_NET_BOOTP_NETMASK = 0x01,
-    GRUB_NET_BOOTP_ROUTER = 0x03,
-    GRUB_NET_BOOTP_DNS = 0x06,
-    GRUB_NET_BOOTP_HOSTNAME = 0x0c,
-    GRUB_NET_BOOTP_DOMAIN = 0x0f,
-    GRUB_NET_BOOTP_ROOT_PATH = 0x11,
-    GRUB_NET_BOOTP_EXTENSIONS_PATH = 0x12,
+    GRUB_NET_BOOTP_PAD = 0,
+    GRUB_NET_BOOTP_NETMASK = 1,
+    GRUB_NET_BOOTP_ROUTER = 3,
+    GRUB_NET_BOOTP_DNS = 6,
+    GRUB_NET_BOOTP_HOSTNAME = 12,
+    GRUB_NET_BOOTP_DOMAIN = 15,
+    GRUB_NET_BOOTP_ROOT_PATH = 17,
+    GRUB_NET_BOOTP_EXTENSIONS_PATH = 18,
     GRUB_NET_DHCP_REQUESTED_IP_ADDRESS = 50,
     GRUB_NET_DHCP_OVERLOAD = 52,
     GRUB_NET_DHCP_MESSAGE_TYPE = 53,
@@ -469,7 +469,7 @@ enum
     GRUB_NET_DHCP_PARAMETER_REQUEST_LIST = 55,
     GRUB_NET_DHCP_TFTP_SERVER_NAME = 66,
     GRUB_NET_DHCP_BOOTFILE_NAME = 67,
-    GRUB_NET_BOOTP_END = 0xff
+    GRUB_NET_BOOTP_END = 255
   };
 
 struct grub_net_network_level_interface *
-- 
2.24.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]