diff options
| author | Michael Brown | 2006-07-19 22:50:50 +0200 |
|---|---|---|
| committer | Michael Brown | 2006-07-19 22:50:50 +0200 |
| commit | 224529d8ddb6c31bbefa33ba3396ca2471fd5d91 (patch) | |
| tree | 78dda12c4641696af5751f3c3102c9b1d2340859 /src/include | |
| parent | Make udp_send() call udp_sendto(), rather than vice-versa. (diff) | |
| download | ipxe-224529d8ddb6c31bbefa33ba3396ca2471fd5d91.tar.gz ipxe-224529d8ddb6c31bbefa33ba3396ca2471fd5d91.tar.xz ipxe-224529d8ddb6c31bbefa33ba3396ca2471fd5d91.zip | |
Now capable of sending what, to me, looks like a valid DHCPDISCOVER
(apart from the bad UDP checksum).
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/dhcp.h | 12 |
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 */ |
