summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/dhcp.h
diff options
context:
space:
mode:
authorMichael Brown2006-07-20 04:49:59 +0200
committerMichael Brown2006-07-20 04:49:59 +0200
commit00a1f000b192f277e52b1d2ac63b2a066a9814a3 (patch)
tree25bf2441524fe96cf46e99032143f71acfeb2c68 /src/include/gpxe/dhcp.h
parentFree up any allocated options if we fail (diff)
downloadipxe-00a1f000b192f277e52b1d2ac63b2a066a9814a3.tar.gz
ipxe-00a1f000b192f277e52b1d2ac63b2a066a9814a3.tar.xz
ipxe-00a1f000b192f277e52b1d2ac63b2a066a9814a3.zip
Added dhcp_ipv4_option() and friends.
Added test code to configure the interface for IPv4 after DHCP.
Diffstat (limited to 'src/include/gpxe/dhcp.h')
-rw-r--r--src/include/gpxe/dhcp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h
index 1dbb290e..115ce2be 100644
--- a/src/include/gpxe/dhcp.h
+++ b/src/include/gpxe/dhcp.h
@@ -250,6 +250,7 @@ struct dhcp_option {
uint8_t byte;
uint16_t word;
uint32_t dword;
+ struct in_addr in;
uint8_t bytes[0];
} data;
} __attribute__ (( packed ));
@@ -429,6 +430,8 @@ struct dhcp_session {
};
extern unsigned long dhcp_num_option ( struct dhcp_option *option );
+extern void dhcp_ipv4_option ( struct dhcp_option *option,
+ struct in_addr *inp );
extern struct dhcp_option *
find_dhcp_option ( struct dhcp_option_block *options, unsigned int tag );
extern void register_dhcp_options ( struct dhcp_option_block *options );
@@ -444,6 +447,10 @@ extern struct dhcp_option * find_global_dhcp_option ( unsigned int tag );
extern unsigned long find_dhcp_num_option ( struct dhcp_option_block *options,
unsigned int tag );
extern unsigned long find_global_dhcp_num_option ( unsigned int tag );
+extern void find_dhcp_ipv4_option ( struct dhcp_option_block *options,
+ unsigned int tag, struct in_addr *inp );
+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 );