summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/dhcp.h12
1 files changed, 10 insertions, 2 deletions
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 <gpxe/udp.h>
#include <gpxe/async.h>
+/** 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 */