summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/arm32/include/efi/ipxe/dhcp_arch.h5
-rw-r--r--src/arch/arm64/include/efi/ipxe/dhcp_arch.h5
-rw-r--r--src/arch/i386/include/efi/ipxe/dhcp_arch.h5
-rw-r--r--src/arch/i386/include/pcbios/ipxe/dhcp_arch.h5
-rw-r--r--src/arch/x86_64/include/efi/ipxe/dhcp_arch.h5
-rw-r--r--src/arch/x86_64/include/pcbios/ipxe/dhcp_arch.h5
-rw-r--r--src/include/ipxe/dhcp.h23
-rw-r--r--src/net/udp/dhcp.c4
-rw-r--r--src/net/udp/dhcpv6.c4
9 files changed, 29 insertions, 32 deletions
diff --git a/src/arch/arm32/include/efi/ipxe/dhcp_arch.h b/src/arch/arm32/include/efi/ipxe/dhcp_arch.h
index e971955b..29a23594 100644
--- a/src/arch/arm32/include/efi/ipxe/dhcp_arch.h
+++ b/src/arch/arm32/include/efi/ipxe/dhcp_arch.h
@@ -33,11 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/dhcp.h>
-#define DHCP_ARCH_VENDOR_CLASS_ID \
- 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
- 'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '7', ':', \
- 'U', 'N', 'D', 'I', ':', '0', '0', '3', '0', '1', '0'
-
#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_ARM32
#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 3, 10 /* v3.10 */
diff --git a/src/arch/arm64/include/efi/ipxe/dhcp_arch.h b/src/arch/arm64/include/efi/ipxe/dhcp_arch.h
index 4ffea7f4..bb26aae4 100644
--- a/src/arch/arm64/include/efi/ipxe/dhcp_arch.h
+++ b/src/arch/arm64/include/efi/ipxe/dhcp_arch.h
@@ -33,11 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/dhcp.h>
-#define DHCP_ARCH_VENDOR_CLASS_ID \
- 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
- 'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '7', ':', \
- 'U', 'N', 'D', 'I', ':', '0', '0', '3', '0', '1', '0'
-
#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_ARM64
#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 3, 10 /* v3.10 */
diff --git a/src/arch/i386/include/efi/ipxe/dhcp_arch.h b/src/arch/i386/include/efi/ipxe/dhcp_arch.h
index 74027928..cf3dbe49 100644
--- a/src/arch/i386/include/efi/ipxe/dhcp_arch.h
+++ b/src/arch/i386/include/efi/ipxe/dhcp_arch.h
@@ -33,11 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/dhcp.h>
-#define DHCP_ARCH_VENDOR_CLASS_ID \
- 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
- 'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '6', ':', \
- 'U', 'N', 'D', 'I', ':', '0', '0', '3', '0', '1', '0'
-
#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_IA32
#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 3, 10 /* v3.10 */
diff --git a/src/arch/i386/include/pcbios/ipxe/dhcp_arch.h b/src/arch/i386/include/pcbios/ipxe/dhcp_arch.h
index 0a7a2f7c..e22f50b3 100644
--- a/src/arch/i386/include/pcbios/ipxe/dhcp_arch.h
+++ b/src/arch/i386/include/pcbios/ipxe/dhcp_arch.h
@@ -33,11 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/dhcp.h>
-#define DHCP_ARCH_VENDOR_CLASS_ID \
- 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
- 'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '0', ':', \
- 'U', 'N', 'D', 'I', ':', '0', '0', '2', '0', '0', '1'
-
#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_X86
#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 2, 1 /* v2.1 */
diff --git a/src/arch/x86_64/include/efi/ipxe/dhcp_arch.h b/src/arch/x86_64/include/efi/ipxe/dhcp_arch.h
index b35818ef..fb85b440 100644
--- a/src/arch/x86_64/include/efi/ipxe/dhcp_arch.h
+++ b/src/arch/x86_64/include/efi/ipxe/dhcp_arch.h
@@ -33,11 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/dhcp.h>
-#define DHCP_ARCH_VENDOR_CLASS_ID \
- 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
- 'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '9', ':', \
- 'U', 'N', 'D', 'I', ':', '0', '0', '3', '0', '1', '0'
-
#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_X86_64
#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 3, 10 /* v3.10 */
diff --git a/src/arch/x86_64/include/pcbios/ipxe/dhcp_arch.h b/src/arch/x86_64/include/pcbios/ipxe/dhcp_arch.h
index 0a7a2f7c..e22f50b3 100644
--- a/src/arch/x86_64/include/pcbios/ipxe/dhcp_arch.h
+++ b/src/arch/x86_64/include/pcbios/ipxe/dhcp_arch.h
@@ -33,11 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/dhcp.h>
-#define DHCP_ARCH_VENDOR_CLASS_ID \
- 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
- 'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '0', ':', \
- 'U', 'N', 'D', 'I', ':', '0', '0', '2', '0', '0', '1'
-
#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_X86
#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 2, 1 /* v2.1 */
diff --git a/src/include/ipxe/dhcp.h b/src/include/ipxe/dhcp.h
index 693aa7e7..b699b31f 100644
--- a/src/include/ipxe/dhcp.h
+++ b/src/include/ipxe/dhcp.h
@@ -210,6 +210,29 @@ struct dhcp_pxe_boot_menu_item {
/** Vendor class identifier */
#define DHCP_VENDOR_CLASS_ID 60
+/** Vendor class identifier for PXE clients */
+#define DHCP_VENDOR_PXECLIENT( arch, ndi ) \
+ 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':', \
+ 'A', 'r', 'c', 'h', ':', DHCP_VENDOR_PXECLIENT_ARCH ( arch ), \
+ ':', 'U', 'N', 'D', 'I', ':', DHCP_VENDOR_PXECLIENT_UNDI ( ndi )
+
+/** Vendor class identifier architecture for PXE clients */
+#define DHCP_VENDOR_PXECLIENT_ARCH( arch ) \
+ ( '0' + ( ( (arch) / 10000 ) % 10 ) ), \
+ ( '0' + ( ( (arch) / 1000 ) % 10 ) ), \
+ ( '0' + ( ( (arch) / 100 ) % 10 ) ), \
+ ( '0' + ( ( (arch) / 10 ) % 10 ) ), \
+ ( '0' + ( ( (arch) / 1 ) % 10 ) )
+
+/** Vendor class identifier UNDI version for PXE clients */
+#define DHCP_VENDOR_PXECLIENT_UNDI( type, major, minor ) \
+ DHCP_VENDOR_PXECLIENT_UNDI_VERSION ( major ), \
+ DHCP_VENDOR_PXECLIENT_UNDI_VERSION ( minor )
+#define DHCP_VENDOR_PXECLIENT_UNDI_VERSION( version ) \
+ ( '0' + ( ( (version) / 100 ) % 10 ) ), \
+ ( '0' + ( ( (version) / 10 ) % 10 ) ), \
+ ( '0' + ( ( (version) / 1 ) % 10 ) )
+
/** Client identifier */
#define DHCP_CLIENT_ID 61
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 0c6cea0f..b9c1fd90 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -84,7 +84,9 @@ static uint8_t dhcp_request_options_data[] = {
DHCP_WORD ( ETH_MAX_MTU - 20 /* IP header */ - 8 /* UDP header */ ),
DHCP_CLIENT_ARCHITECTURE, DHCP_WORD ( DHCP_ARCH_CLIENT_ARCHITECTURE ),
DHCP_CLIENT_NDI, DHCP_OPTION ( DHCP_ARCH_CLIENT_NDI ),
- DHCP_VENDOR_CLASS_ID, DHCP_STRING ( DHCP_ARCH_VENDOR_CLASS_ID ),
+ DHCP_VENDOR_CLASS_ID,
+ DHCP_STRING ( DHCP_VENDOR_PXECLIENT ( DHCP_ARCH_CLIENT_ARCHITECTURE,
+ DHCP_ARCH_CLIENT_NDI ) ),
DHCP_USER_CLASS_ID, DHCP_STRING ( 'i', 'P', 'X', 'E' ),
DHCP_PARAMETER_REQUEST_LIST,
DHCP_OPTION ( DHCP_SUBNET_MASK, DHCP_ROUTERS, DHCP_DNS_SERVERS,
diff --git a/src/net/udp/dhcpv6.c b/src/net/udp/dhcpv6.c
index ef07f54e..be1ed4ec 100644
--- a/src/net/udp/dhcpv6.c
+++ b/src/net/udp/dhcpv6.c
@@ -374,7 +374,9 @@ static uint8_t dhcpv6_request_options_data[] = {
DHCPV6_CODE ( DHCPV6_BOOTFILE_PARAM ) ),
DHCPV6_CODE ( DHCPV6_VENDOR_CLASS ),
DHCPV6_OPTION ( DHCPV6_DWORD_VALUE ( DHCPV6_VENDOR_CLASS_PXE ),
- DHCPV6_STRING ( DHCP_ARCH_VENDOR_CLASS_ID ) ),
+ DHCPV6_STRING (
+ DHCP_VENDOR_PXECLIENT ( DHCP_ARCH_CLIENT_ARCHITECTURE,
+ DHCP_ARCH_CLIENT_NDI ) ) ),
DHCPV6_CODE ( DHCPV6_CLIENT_ARCHITECTURE ),
DHCPV6_WORD ( DHCP_ARCH_CLIENT_ARCHITECTURE ),
DHCPV6_CODE ( DHCPV6_CLIENT_NDI ),