mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-18 21:43:14 +00:00
Use otherwise-useless byte in DHCP feature option as a version number
This commit is contained in:
parent
0acb016840
commit
67afe84292
@ -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 */
|
||||
|
@ -40,7 +40,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
FEATURE ( "AoE", DHCP_EB_FEATURE_AOE );
|
||||
FEATURE ( "AoE", DHCP_EB_FEATURE_AOE, 1 );
|
||||
|
||||
struct net_protocol aoe_protocol;
|
||||
|
||||
|
@ -40,8 +40,11 @@
|
||||
#include <gpxe/tcpip.h>
|
||||
#include <gpxe/process.h>
|
||||
#include <gpxe/linebuf.h>
|
||||
#include <gpxe/features.h>
|
||||
#include <gpxe/http.h>
|
||||
|
||||
FEATURE ( "HTTP", DHCP_EB_FEATURE_HTTP, 1 );
|
||||
|
||||
/** HTTP receive state */
|
||||
enum http_rx_state {
|
||||
HTTP_RX_RESPONSE = 0,
|
||||
|
@ -27,6 +27,9 @@
|
||||
#include <gpxe/open.h>
|
||||
#include <gpxe/tls.h>
|
||||
#include <gpxe/http.h>
|
||||
#include <gpxe/features.h>
|
||||
|
||||
FEATURE ( "HTTPS", DHCP_EB_FEATURE_HTTPS, 1 );
|
||||
|
||||
/**
|
||||
* Initiate an HTTPS connection
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user