1 #ifndef _GPXE_DHCPOPTS_H 2 #define _GPXE_DHCPOPTS_H 3 4 /** @file 5 * 6 * DHCP options 7 * 8 */ 9 10 FILE_LICENCE ( GPL2_OR_LATER ); 11 12 #include <stdint.h> 13 14 /** A DHCP options block */ 15 struct dhcp_options { 16 /** Option block raw data */ 17 void *data; 18 /** Option block length */ 19 size_t len; 20 /** Option block maximum length */ 21 size_t max_len; 22 }; 23 24 extern int dhcpopt_store ( struct dhcp_options *options, unsigned int tag, 25 const void *data, size_t len ); 26 extern int dhcpopt_extensible_store ( struct dhcp_options *options, 27 unsigned int tag, 28 const void *data, size_t len ); 29 extern int dhcpopt_fetch ( struct dhcp_options *options, unsigned int tag, 30 void *data, size_t len ); 31 extern void dhcpopt_init ( struct dhcp_options *options, 32 void *data, size_t max_len ); 33 34 #endif /* _GPXE_DHCPOPTS_H */ 35