From 224529d8ddb6c31bbefa33ba3396ca2471fd5d91 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 19 Jul 2006 20:50:50 +0000 Subject: Now capable of sending what, to me, looks like a valid DHCPDISCOVER (apart from the bad UDP checksum). --- src/include/gpxe/dhcp.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h index 2cb4f0167..6825e406a 100644 --- a/src/include/gpxe/dhcp.h +++ b/src/include/gpxe/dhcp.h @@ -13,6 +13,12 @@ #include #include +/** BOOTP/DHCP server port */ +#define BOOTPS_PORT 67 + +/** BOOTP/DHCP client port */ +#define BOOTPC_PORT 68 + /** Construct a tag value for an encapsulated option * * This tag value can be passed to Etherboot functions when searching @@ -345,9 +351,11 @@ struct dhcphdr { uint32_t magic; /** DHCP options * - * Variable length; extends to the end of the packet. + * Variable length; extends to the end of the packet. Minimum + * length (for the sake of sanity) is 1, to allow for a single + * @c DHCP_END tag. */ - uint8_t options[0]; + uint8_t options[1]; }; /** Opcode for a request from client to server */ -- cgit v1.2.3-55-g7522