summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2007-08-02 05:36:00 +0200
committerMichael Brown2007-08-02 05:36:00 +0200
commit67afe84292723e13da02308fc4cf08cf9ab5e0c0 (patch)
tree135630b8ed87ad92b7f316c8be4d7122491e06e4 /src/include
parentAdd FEATURE() macro, plus code to display features at startup time, (diff)
downloadipxe-67afe84292723e13da02308fc4cf08cf9ab5e0c0.tar.gz
ipxe-67afe84292723e13da02308fc4cf08cf9ab5e0c0.tar.xz
ipxe-67afe84292723e13da02308fc4cf08cf9ab5e0c0.zip
Use otherwise-useless byte in DHCP feature option as a version number
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/features.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/include/gpxe/features.h b/src/include/gpxe/features.h
index 20cce316d..b8d2d6044 100644
--- a/src/include/gpxe/features.h
+++ b/src/include/gpxe/features.h
@@ -29,19 +29,25 @@
/** AoE */
#define DHCP_EB_FEATURE_AOE 0x12
+/** HTTP */
+#define DHCP_EB_FEATURE_HTTP 0x13
+
+/** HTTPS */
+#define DHCP_EB_FEATURE_HTTPS 0x14
+
/** @} */
/** Declare a feature code for DHCP */
#define __dhcp_feature __table ( uint8_t, dhcp_features, 01 )
/** Construct a DHCP feature table entry */
-#define DHCP_FEATURE( feature_opt ) \
- _DHCP_FEATURE ( OBJECT, feature_opt )
-#define _DHCP_FEATURE( _name, feature_opt ) \
- __DHCP_FEATURE ( _name, feature_opt )
-#define __DHCP_FEATURE( _name, feature_opt ) \
+#define DHCP_FEATURE( feature_opt, version ) \
+ _DHCP_FEATURE ( OBJECT, feature_opt, version )
+#define _DHCP_FEATURE( _name, feature_opt, version ) \
+ __DHCP_FEATURE ( _name, feature_opt, version )
+#define __DHCP_FEATURE( _name, feature_opt, version ) \
uint8_t __dhcp_feature_ ## _name [] __dhcp_feature = { \
- feature_opt, DHCP_BYTE ( 1 ) \
+ feature_opt, DHCP_BYTE ( version ) \
};
/** Declare a named feature */
@@ -56,8 +62,8 @@
char * __feature_ ## _name __feature_name = text;
/** Declare a feature */
-#define FEATURE( text, feature_opt ) \
+#define FEATURE( text, feature_opt, version ) \
FEATURE_NAME ( text ); \
- DHCP_FEATURE ( feature_opt );
+ DHCP_FEATURE ( feature_opt, version );
#endif /* _GPXE_FEATURES_H */