[dhcp] Allow for variable encapsulation of architecture-specific options
authorMichael Brown <mcb30@ipxe.org>
Mon, 4 Jul 2016 12:15:05 +0000 (13:15 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 4 Jul 2016 12:15:05 +0000 (13:15 +0100)
commit3d9f094022854ca06d02f34c688896abde9e1b20
tree3905fa7145b191aaa733fceea7f11f2a24b2f0dc
parent3bb61c33c2d77ac9a1a512d809576f3444b6b1ed
[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 <mcb30@ipxe.org>
src/arch/arm32/include/efi/ipxe/dhcp_arch.h
src/arch/arm64/include/efi/ipxe/dhcp_arch.h
src/arch/i386/include/efi/ipxe/dhcp_arch.h
src/arch/i386/include/pcbios/ipxe/dhcp_arch.h
src/arch/x86_64/include/efi/ipxe/dhcp_arch.h
src/arch/x86_64/include/pcbios/ipxe/dhcp_arch.h
src/net/udp/dhcp.c