summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/aoe.c3
-rw-r--r--src/net/tcp/iscsi.c3
-rw-r--r--src/net/udp/dhcp.c15
3 files changed, 21 insertions, 0 deletions
diff --git a/src/net/aoe.c b/src/net/aoe.c
index fd82665d1..5536ae8da 100644
--- a/src/net/aoe.c
+++ b/src/net/aoe.c
@@ -31,6 +31,7 @@
#include <gpxe/ata.h>
#include <gpxe/netdevice.h>
#include <gpxe/process.h>
+#include <gpxe/features.h>
#include <gpxe/aoe.h>
/** @file
@@ -39,6 +40,8 @@
*
*/
+FEATURE ( "AoE", DHCP_EB_FEATURE_AOE );
+
struct net_protocol aoe_protocol;
/** List of all AoE sessions */
diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c
index e64591713..5d8639e7d 100644
--- a/src/net/tcp/iscsi.c
+++ b/src/net/tcp/iscsi.c
@@ -32,6 +32,7 @@
#include <gpxe/uaccess.h>
#include <gpxe/tcpip.h>
#include <gpxe/dhcp.h>
+#include <gpxe/features.h>
#include <gpxe/iscsi.h>
/** @file
@@ -40,6 +41,8 @@
*
*/
+FEATURE ( "iSCSI", DHCP_EB_FEATURE_ISCSI );
+
/** iSCSI initiator name (explicitly specified) */
static char *iscsi_explicit_initiator_iqn;
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index f8f59e2e4..ed4556329 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -70,6 +70,10 @@ static uint8_t dhcp_request_options_data[] = {
DHCP_END
};
+/** DHCP feature codes */
+static uint8_t dhcp_features[0] __table_start ( uint8_t, dhcp_features );
+static uint8_t dhcp_features_end[0] __table_end ( uint8_t, dhcp_features );
+
/**
* Name a DHCP packet type
*
@@ -508,6 +512,7 @@ int create_dhcp_request ( struct net_device *netdev, int msgtype,
struct dhcp_packet *dhcppkt ) {
struct device_description *desc = &netdev->dev->desc;
struct dhcp_netdev_desc dhcp_desc;
+ size_t dhcp_features_len;
int rc;
/* Create DHCP packet */
@@ -544,6 +549,16 @@ int create_dhcp_request ( struct net_device *netdev, int msgtype,
}
}
+ /* Add options to identify the feature list */
+ dhcp_features_len = ( dhcp_features_end - dhcp_features );
+ if ( ( rc = set_dhcp_packet_option ( dhcppkt, DHCP_EB_ENCAP,
+ dhcp_features,
+ dhcp_features_len ) ) != 0 ) {
+ DBG ( "DHCP could not set features list option: %s\n",
+ strerror ( rc ) );
+ return rc;
+ }
+
/* Add options to identify the network device */
dhcp_desc.type = desc->bus_type;
dhcp_desc.vendor = htons ( desc->vendor );