1 #ifndef _GPXE_FEATURES_H
2 #define _GPXE_FEATURES_H
5 #include <gpxe/tables.h>
15 * @defgroup dhcpfeatures DHCP feature option tags
17 * DHCP feature option tags are Etherboot encapsulated options in the
23 /** PXE API extensions */
24 #define DHCP_EB_FEATURE_PXE_EXT 0x10
27 #define DHCP_EB_FEATURE_ISCSI 0x11
30 #define DHCP_EB_FEATURE_AOE 0x12
33 #define DHCP_EB_FEATURE_HTTP 0x13
36 #define DHCP_EB_FEATURE_HTTPS 0x14
40 /** Declare a feature code for DHCP */
41 #define __dhcp_feature __table ( uint8_t, dhcp_features, 01 )
43 /** Construct a DHCP feature table entry */
44 #define DHCP_FEATURE( feature_opt, version ) \
45 _DHCP_FEATURE ( OBJECT, feature_opt, version )
46 #define _DHCP_FEATURE( _name, feature_opt, version ) \
47 __DHCP_FEATURE ( _name, feature_opt, version )
48 #define __DHCP_FEATURE( _name, feature_opt, version ) \
49 uint8_t __dhcp_feature_ ## _name [] __dhcp_feature = { \
50 feature_opt, DHCP_BYTE ( version ) \
53 /** Declare a named feature */
54 #define __feature_name __table ( char *, features, 01 )
56 /** Construct a named feature */
57 #define FEATURE_NAME( text ) \
58 _FEATURE_NAME ( OBJECT, text )
59 #define _FEATURE_NAME( _name, text ) \
60 __FEATURE_NAME ( _name, text )
61 #define __FEATURE_NAME( _name, text ) \
62 char * __feature_ ## _name __feature_name = text;
64 /** Declare a feature */
65 #define FEATURE( text, feature_opt, version ) \
66 FEATURE_NAME ( text ); \
67 DHCP_FEATURE ( feature_opt, version );
69 #endif /* _GPXE_FEATURES_H */