summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2006-07-17 15:07:14 +0200
committerMichael Brown2006-07-17 15:07:14 +0200
commit6c01d3bb95c8dfbbbc3f2b4fb36fce6bd2f3e952 (patch)
treea43152f027ef99025063ac818393e45ea8480629 /src/include
parentTidy up hex_dump() output. (diff)
downloadipxe-6c01d3bb95c8dfbbbc3f2b4fb36fce6bd2f3e952.tar.gz
ipxe-6c01d3bb95c8dfbbbc3f2b4fb36fce6bd2f3e952.tar.xz
ipxe-6c01d3bb95c8dfbbbc3f2b4fb36fce6bd2f3e952.zip
Fix creation of the htype field; the ll_proto field from which it is
derived is a 16-bit big-endian field, but htype is only 8 bits wide.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/dhcp.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h
index e35b7eaba..71c6c14a0 100644
--- a/src/include/gpxe/dhcp.h
+++ b/src/include/gpxe/dhcp.h
@@ -23,7 +23,9 @@ struct dhcp_packet {
uint8_t op;
/** Hardware address type
*
- * This is an ARPHRD_XXX constant.
+ * This is an ARPHRD_XXX constant. Note that ARPHRD_XXX
+ * constants are nominally 16 bits wide; this could be
+ * considered to be a bug in the BOOTP/DHCP specification.
*/
uint8_t htype;
/** Hardware address length */
@@ -274,6 +276,14 @@ struct dhcp_option_block {
signed int priority;
};
+/** A DHCP session */
+struct dhcp_session {
+ /** Network device being configured */
+ struct net_device *netdev;
+ /** Transaction ID, in network-endian order */
+ uint32_t xid;
+};
+
extern unsigned long dhcp_num_option ( struct dhcp_option *option );
extern struct dhcp_option *
find_dhcp_option ( struct dhcp_option_block *options, unsigned int tag );