From 3d9f094022854ca06d02f34c688896abde9e1b20 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 4 Jul 2016 13:15:05 +0100 Subject: [dhcp] Allow for variable encapsulation of architecture-specific options DHCPv4 and DHCPv6 share some values in common for the architecture- specific options (such as the client system architecture type), but use different encapsulations: DHCPv4 has a single byte for the option length while DHCPv6 has a 16-bit field for the option length. Move the containing DHCP_OPTION() and related wrappers from the individual dhcp_arch.h files to dhcp.c, thus allowing for the architecture-specific values to be reused in dhcpv6.c. Signed-off-by: Michael Brown --- src/arch/arm32/include/efi/ipxe/dhcp_arch.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/arch/arm32/include') diff --git a/src/arch/arm32/include/efi/ipxe/dhcp_arch.h b/src/arch/arm32/include/efi/ipxe/dhcp_arch.h index f9baab4fa..e971955ba 100644 --- a/src/arch/arm32/include/efi/ipxe/dhcp_arch.h +++ b/src/arch/arm32/include/efi/ipxe/dhcp_arch.h @@ -33,14 +33,13 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include -#define DHCP_ARCH_VENDOR_CLASS_ID \ - DHCP_STRING ( '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_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_WORD ( DHCP_CLIENT_ARCHITECTURE_ARM32 ) +#define DHCP_ARCH_CLIENT_ARCHITECTURE DHCP_CLIENT_ARCHITECTURE_ARM32 -#define DHCP_ARCH_CLIENT_NDI DHCP_OPTION ( 1 /* UNDI */ , 3, 10 /* v3.10 */ ) +#define DHCP_ARCH_CLIENT_NDI 1 /* UNDI */ , 3, 10 /* v3.10 */ #endif -- cgit v1.2.3-55-g7522