diff options
| author | Michael Brown | 2007-07-05 19:38:14 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-05 19:38:14 +0200 |
| commit | 1567b698958cccde4c32e554ef56df7add3a06f6 (patch) | |
| tree | 208ea71016215b02fab90b835428568543619302 /src/include | |
| parent | First draft of PXE extensions API. (diff) | |
| download | ipxe-1567b698958cccde4c32e554ef56df7add3a06f6.tar.gz ipxe-1567b698958cccde4c32e554ef56df7add3a06f6.tar.xz ipxe-1567b698958cccde4c32e554ef56df7add3a06f6.zip | |
Add concept of DHCP option applicators.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/dhcp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h index 3183a3a9d..caac91443 100644 --- a/src/include/gpxe/dhcp.h +++ b/src/include/gpxe/dhcp.h @@ -11,6 +11,7 @@ #include <gpxe/list.h> #include <gpxe/in.h> #include <gpxe/refcnt.h> +#include <gpxe/tables.h> struct net_device; struct job_interface; @@ -438,6 +439,23 @@ struct dhcp_packet { struct dhcp_option_block options; }; +/** A DHCP option applicator */ +struct dhcp_option_applicator { + /** DHCP option tag */ + unsigned int tag; + /** Applicator + * + * @v tag DHCP option tag + * @v option DHCP option + * @ret rc Return status code + */ + int ( * apply ) ( unsigned int tag, struct dhcp_option *option ); +}; + +/** Declare a DHCP option applicator */ +#define __dhcp_applicator \ + __table ( struct dhcp_option_applicator, dhcp_appicators, 01 ) + /** * Get reference to DHCP options block * @@ -485,6 +503,7 @@ extern void find_global_dhcp_ipv4_option ( unsigned int tag, struct in_addr *inp ); extern void delete_dhcp_option ( struct dhcp_option_block *options, unsigned int tag ); +extern int apply_dhcp_options ( struct dhcp_option_block *options ); extern struct dhcp_option_block dhcp_request_options; extern int create_dhcp_packet ( struct net_device *netdev, uint8_t msgtype, |
