diff --git a/src/include/gpxe/features.h b/src/include/gpxe/features.h index 20cce316..b8d2d604 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 */ diff --git a/src/net/aoe.c b/src/net/aoe.c index 5536ae8d..2e2199b3 100644 --- a/src/net/aoe.c +++ b/src/net/aoe.c @@ -40,7 +40,7 @@ * */ -FEATURE ( "AoE", DHCP_EB_FEATURE_AOE ); +FEATURE ( "AoE", DHCP_EB_FEATURE_AOE, 1 ); struct net_protocol aoe_protocol; diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index 727c0333..0aecc7b5 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -40,8 +40,11 @@ #include #include #include +#include #include +FEATURE ( "HTTP", DHCP_EB_FEATURE_HTTP, 1 ); + /** HTTP receive state */ enum http_rx_state { HTTP_RX_RESPONSE = 0, diff --git a/src/net/tcp/https.c b/src/net/tcp/https.c index 148e4bf0..a59e94dc 100644 --- a/src/net/tcp/https.c +++ b/src/net/tcp/https.c @@ -27,6 +27,9 @@ #include #include #include +#include + +FEATURE ( "HTTPS", DHCP_EB_FEATURE_HTTPS, 1 ); /** * Initiate an HTTPS connection diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c index 5d8639e7..a96331a6 100644 --- a/src/net/tcp/iscsi.c +++ b/src/net/tcp/iscsi.c @@ -41,7 +41,7 @@ * */ -FEATURE ( "iSCSI", DHCP_EB_FEATURE_ISCSI ); +FEATURE ( "iSCSI", DHCP_EB_FEATURE_ISCSI, 1 ); /** iSCSI initiator name (explicitly specified) */ static char *iscsi_explicit_initiator_iqn;