]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dhcp-protocol: define BOOTP_MESSAGE_SIZE
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Mar 2026 10:19:18 +0000 (19:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Apr 2026 23:31:07 +0000 (08:31 +0900)
It will be used later.

src/libsystemd-network/dhcp-protocol.h

index 14ccde10ddee7a03419311efdef0accb51cbfbe4..7dccd585a80a9af27e7f51e5e54fba66744ff84b 100644 (file)
@@ -65,6 +65,10 @@ typedef struct DHCPPacket DHCPPacket;
 #define DHCP_MIN_PACKET_SIZE    (DHCP_MIN_MESSAGE_SIZE + DHCP_IP_UDP_SIZE)
 #define DHCP_MAGIC_COOKIE       (uint32_t)(0x63825363)
 
+/* The size of BOOTP message. The BOOTP message does not have the magic field, but has the 64-byte
+ * vendor-specific area. */
+#define BOOTP_MESSAGE_SIZE (offsetof(DHCPMessageHeader, magic) + 64)
+
 enum {
         DHCP_PORT_SERVER                        = 67,
         DHCP_PORT_CLIENT                        = 68,