diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-07-04 13:18:49 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-07-04 13:18:49 +0100 |
commit | fda8916c83f320de3f12c9880d177d0f9fa40904 (patch) | |
tree | fb315cb5ebc167ae5a9a585395c4823abcc20a81 /src/include/ipxe/dhcpv6.h | |
parent | 3d9f094022854ca06d02f34c688896abde9e1b20 (diff) | |
download | ipxe-fda8916c83f320de3f12c9880d177d0f9fa40904.zip ipxe-fda8916c83f320de3f12c9880d177d0f9fa40904.tar.gz ipxe-fda8916c83f320de3f12c9880d177d0f9fa40904.tar.bz2 |
[dhcpv6] Include RFC5970 client architecture options in DHCPv6 requests
RFC5970 defines DHCPv6 options 61 (client system architecture type)
and 62 (client network interface identifier), with contents equivalent
to DHCPv4 options 93 and 94 respectively.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/dhcpv6.h')
-rw-r--r-- | src/include/ipxe/dhcpv6.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/ipxe/dhcpv6.h b/src/include/ipxe/dhcpv6.h index 9307b6c..48cb763 100644 --- a/src/include/ipxe/dhcpv6.h +++ b/src/include/ipxe/dhcpv6.h @@ -157,6 +157,12 @@ struct dhcpv6_user_class_option { /** DHCPv6 bootfile parameters option */ #define DHCPV6_BOOTFILE_PARAM 60 +/** DHCPv6 client system architecture option */ +#define DHCPV6_CLIENT_ARCHITECTURE 61 + +/** DHCPv6 client network interface identifier option */ +#define DHCPV6_CLIENT_NDI 62 + /** DHCPv6 syslog server option * * This option code has not yet been assigned by IANA. Please update @@ -164,6 +170,33 @@ struct dhcpv6_user_class_option { */ #define DHCPV6_LOG_SERVERS 0xffffffffUL +/** Construct a DHCPv6 option code */ +#define DHCPV6_CODE( code ) \ + ( ( (code) >> 8 ) & 0xff ), ( ( (code) >> 0 ) & 0xff ) + +/** Construct a DHCPv6 option length */ +#define DHCPV6_LEN( len ) \ + ( ( (len) >> 8 ) & 0xff ), ( ( (len) >> 0 ) & 0xff ) + +/** Construct a DHCPv6 option from a list of bytes */ +#define DHCPV6_OPTION( ... ) \ + DHCPV6_LEN ( VA_ARG_COUNT ( __VA_ARGS__ ) ), __VA_ARGS__ + +/** Construct a DHCPv6 option from a list of characters */ +#define DHCPV6_STRING( ... ) DHCPV6_OPTION ( __VA_ARGS__ ) + +/** Construct a byte-valued DHCPv6 option */ +#define DHCPV6_BYTE( value ) DHCPV6_OPTION ( value ) + +/** Construct a word-valued DHCPv6 option */ +#define DHCPV6_WORD( value ) DHCPV6_OPTION ( ( ( (value) >> 8 ) & 0xff ), \ + ( ( (value) >> 0 ) & 0xff ) ) +/** Construct a dword-valued DHCPv6 option */ +#define DHCPV6_DWORD( value ) DHCPV6_OPTION ( ( ( (value) >> 24 ) & 0xff ), \ + ( ( (value) >> 16 ) & 0xff ), \ + ( ( (value) >> 8 ) & 0xff ), \ + ( ( (value) >> 0 ) & 0xff ) ) + /** * Any DHCPv6 option * |