|
@@ -51,17 +51,16 @@
|
51
|
51
|
/** @} */
|
52
|
52
|
|
53
|
53
|
/** Declare a feature code for DHCP */
|
54
|
|
-#define __dhcp_feature( category ) \
|
55
|
|
- __table ( uint8_t, dhcp_features, category )
|
|
54
|
+#define __dhcp_feature __table ( uint8_t, dhcp_features, 01 )
|
56
|
55
|
|
57
|
56
|
/** Construct a DHCP feature table entry */
|
58
|
|
-#define DHCP_FEATURE( category, feature_opt, version ) \
|
59
|
|
- _DHCP_FEATURE ( category, OBJECT, feature_opt, version )
|
60
|
|
-#define _DHCP_FEATURE( category, _name, feature_opt, version ) \
|
61
|
|
- __DHCP_FEATURE ( category, _name, feature_opt, version )
|
62
|
|
-#define __DHCP_FEATURE( category, _name, feature_opt, version ) \
|
63
|
|
- uint8_t __dhcp_feature_ ## _name [] __dhcp_feature ( category ) = { \
|
64
|
|
- feature_opt, DHCP_BYTE ( version ) \
|
|
57
|
+#define DHCP_FEATURE( feature_opt, ... ) \
|
|
58
|
+ _DHCP_FEATURE ( OBJECT, feature_opt, __VA_ARGS__ )
|
|
59
|
+#define _DHCP_FEATURE( _name, feature_opt, ... ) \
|
|
60
|
+ __DHCP_FEATURE ( _name, feature_opt, __VA_ARGS__ )
|
|
61
|
+#define __DHCP_FEATURE( _name, feature_opt, ... ) \
|
|
62
|
+ uint8_t __dhcp_feature_ ## _name [] __dhcp_feature = { \
|
|
63
|
+ feature_opt, DHCP_OPTION ( __VA_ARGS__ ) \
|
65
|
64
|
};
|
66
|
65
|
|
67
|
66
|
/** A named feature */
|
|
@@ -87,6 +86,10 @@ struct feature {
|
87
|
86
|
/** Declare a feature */
|
88
|
87
|
#define FEATURE( category, text, feature_opt, version ) \
|
89
|
88
|
FEATURE_NAME ( category, text ); \
|
90
|
|
- DHCP_FEATURE ( category, feature_opt, version );
|
|
89
|
+ DHCP_FEATURE ( feature_opt, version );
|
|
90
|
+
|
|
91
|
+/** Declare the version number feature */
|
|
92
|
+#define FEATURE_VERSION( ... ) \
|
|
93
|
+ DHCP_FEATURE ( DHCP_ENCAPSULATED ( DHCP_EB_VERSION ), __VA_ARGS__ )
|
91
|
94
|
|
92
|
95
|
#endif /* _GPXE_FEATURES_H */
|