Browse Source

[dhcp] Add symbolic definitions for DHCP client architecture values

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
9cf2f9dc2b

+ 2
- 1
src/arch/i386/include/efi/ipxe/dhcp_arch.h View File

@@ -33,7 +33,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
33 33
 		      'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '6', ':', \
34 34
 		      'U', 'N', 'D', 'I', ':', '0', '0', '3', '0', '1', '0' )
35 35
 
36
-#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_WORD ( 6 )
36
+#define DHCP_ARCH_CLIENT_ARCHITECTURE \
37
+	DHCP_WORD ( DHCP_CLIENT_ARCHITECTURE_IA32 )
37 38
 
38 39
 #define DHCP_ARCH_CLIENT_NDI DHCP_OPTION ( 1 /* UNDI */ , 3, 10 /* v3.10 */ )
39 40
 

+ 2
- 1
src/arch/i386/include/pcbios/ipxe/dhcp_arch.h View File

@@ -33,7 +33,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
33 33
 		      'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '0', ':', \
34 34
 		      'U', 'N', 'D', 'I', ':', '0', '0', '2', '0', '0', '1' )
35 35
 
36
-#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_WORD ( 0 )
36
+#define DHCP_ARCH_CLIENT_ARCHITECTURE \
37
+	DHCP_WORD ( DHCP_CLIENT_ARCHITECTURE_X86 )
37 38
 
38 39
 #define DHCP_ARCH_CLIENT_NDI DHCP_OPTION ( 1 /* UNDI */ , 2, 1 /* v2.1 */ )
39 40
 

+ 3
- 2
src/arch/x86_64/include/efi/ipxe/dhcp_arch.h View File

@@ -30,10 +30,11 @@ FILE_LICENCE ( GPL2_OR_LATER );
30 30
 
31 31
 #define DHCP_ARCH_VENDOR_CLASS_ID \
32 32
 	DHCP_STRING ( 'P', 'X', 'E', 'C', 'l', 'i', 'e', 'n', 't', ':',      \
33
-		      'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '7', ':', \
33
+		      'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '9', ':', \
34 34
 		      'U', 'N', 'D', 'I', ':', '0', '0', '3', '0', '1', '0' )
35 35
 
36
-#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_WORD ( 7 )
36
+#define DHCP_ARCH_CLIENT_ARCHITECTURE \
37
+	DHCP_WORD ( DHCP_CLIENT_ARCHITECTURE_X86_64 )
37 38
 
38 39
 #define DHCP_ARCH_CLIENT_NDI DHCP_OPTION ( 1 /* UNDI */ , 3, 10 /* v3.10 */ )
39 40
 

+ 33
- 0
src/include/ipxe/dhcp.h View File

@@ -240,6 +240,39 @@ struct dhcp_client_id {
240 240
 /** Client system architecture */
241 241
 #define DHCP_CLIENT_ARCHITECTURE 93
242 242
 
243
+/** DHCP client architecture */
244
+struct dhcp_client_architecture {
245
+	uint16_t arch;
246
+} __attribute__ (( packed ));
247
+
248
+/** DHCP client architecture values
249
+ *
250
+ * These are defined by the PXE specification and redefined by
251
+ * RFC4578.
252
+ */
253
+enum dhcp_client_architecture_values {
254
+	/** Intel x86 PC */
255
+	DHCP_CLIENT_ARCHITECTURE_X86 = 0x0000,
256
+	/** NEC/PC98 */
257
+	DHCP_CLIENT_ARCHITECTURE_PC98 = 0x0001,
258
+	/** EFI Itanium */
259
+	DHCP_CLIENT_ARCHITECTURE_IA64 = 0x0002,
260
+	/** DEC Alpha */
261
+	DHCP_CLIENT_ARCHITECTURE_ALPHA = 0x0003,
262
+	/** Arc x86 */
263
+	DHCP_CLIENT_ARCHITECTURE_ARCX86 = 0x0004,
264
+	/** Intel Lean Client */
265
+	DHCP_CLIENT_ARCHITECTURE_LC = 0x0005,
266
+	/** EFI IA32 */
267
+	DHCP_CLIENT_ARCHITECTURE_IA32 = 0x0006,
268
+	/** EFI BC */
269
+	DHCP_CLIENT_ARCHITECTURE_EFI = 0x0007,
270
+	/** EFI Xscale */
271
+	DHCP_CLIENT_ARCHITECTURE_XSCALE = 0x0008,
272
+	/** EFI x86-64 */
273
+	DHCP_CLIENT_ARCHITECTURE_X86_64 = 0x0009,
274
+};
275
+
243 276
 /** Client network device interface */
244 277
 #define DHCP_CLIENT_NDI 94
245 278
 

Loading…
Cancel
Save