diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/errno.h | 1 | ||||
| -rw-r--r-- | src/include/gpxe/dhcp.h | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/include/errno.h b/src/include/errno.h index 8c9f515ef..d59880bc4 100644 --- a/src/include/errno.h +++ b/src/include/errno.h @@ -151,6 +151,7 @@ #define ENOENT 0xe8 /**< No such file or directory */ #define ENOEXEC 0xe9 /**< Exec format error */ #define ENOMSG ENODATA /**< No message of the desired type */ +#define ENOSPC ENOMEM /**< No space left on device */ #define ENOSR 0xea /**< No stream resources */ #define ENOSTR 0xeb /**< Not a stream */ #define ENOSYS 0xec /**< Function not implemented */ diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h index 9442f8579..e35b7eaba 100644 --- a/src/include/gpxe/dhcp.h +++ b/src/include/gpxe/dhcp.h @@ -118,6 +118,12 @@ struct dhcp_packet { */ #define DHCP_PAD 0 +/** Minimum normal DHCP option */ +#define DHCP_MIN_OPTION 1 + +/** Vendor encapsulated options */ +#define DHCP_VENDOR_ENCAP 43 + /** Option overloading * * The value of this option is the bitwise-OR of zero or more @@ -131,6 +137,17 @@ struct dhcp_packet { /** The "sname" field is overloaded to contain extra DHCP options */ #define DHCP_OPTION_OVERLOAD_SNAME 2 +/** DHCP message type */ +#define DHCP_MESSAGE_TYPE 53 +#define DHCPDISCOVER 1 +#define DHCPOFFER 2 +#define DHCPREQUEST 3 +#define DHCPDECLINE 4 +#define DHCPACK 5 +#define DHCPNAK 6 +#define DHCPRELEASE 7 +#define DHCPINFORM 8 + /** TFTP server name * * This option replaces the fixed "sname" field, when that field is @@ -178,6 +195,9 @@ struct dhcp_packet { */ #define DHCP_EB_SIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 3 ) +/** Maximum normal DHCP option */ +#define DHCP_MAX_OPTION 254 + /** End of options * * This tag does not have a length field; it is always only a single @@ -260,6 +280,8 @@ find_dhcp_option ( struct dhcp_option_block *options, unsigned int tag ); extern struct dhcp_option * find_global_dhcp_option ( unsigned int tag ); extern void register_dhcp_options ( struct dhcp_option_block *options ); extern void unregister_dhcp_options ( struct dhcp_option_block *options ); +extern void init_dhcp_options ( struct dhcp_option_block *options, + void *data, size_t max_len ); extern struct dhcp_option_block * alloc_dhcp_options ( size_t max_len ); extern void free_dhcp_options ( struct dhcp_option_block *options ); extern struct dhcp_option * |
