#  -*- text -*-
#  Copyright (C) 2019 Network RADIUS SARL (legal@networkradius.com)
#  This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0
#
#  Version $Id: 7f56e621aa8c52a9ecb332d5e5266f694a633d4b $
#

#
#  Test vectors for DHCPv6 / Client Link-Layer Address Option
#
proto dhcpv6
proto-dictionary dhcpv6
fuzzer-out dhcpv6

#
#  4.  DHCPv6 Client Link-Layer Address Option
#
#  The format of the DHCPv6 Client Link-Layer Address option is shown
#  below.
#
#   0                   1                   2                   3
#   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
#  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
#  | OPTION_CLIENT_LINKLAYER_ADDR  |           option-length       |
#  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
#  |   link-layer type (16 bits)   |                               |
#  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
#  |               link-layer address (variable length)            |
#  |                                                               |
#  |                                                               |
#  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
#
#  option-code:        OPTION_CLIENT_LINKLAYER_ADDR (79)
#  option-length:      2 + length of link-layer address
#  link-layer type:    Client link-layer address type.  The link-layer
#                      type MUST be a valid hardware type assigned
#                      by the IANA, as described in [RFC0826]
#  link-layer address: Client link-layer address
#

# type: Ethernet
encode-pair Client-Link-Layer.Type = Ethernet, Client-Link-Layer.Type.Ethernet.Address = c0:ff:ee:c0:ff:ee
match 00 4f 00 08 00 01 c0 ff ee c0 ff ee

decode-pair 00 4f 00 08 00 01 c0 ff ee c0 ff ee
match Client-Link-Layer = { Type = ::Ethernet, Type.Ethernet = { Address = c0:ff:ee:c0:ff:ee } }

# type: Lanstar
encode-pair Client-Link-Layer.Type = Lanstar, Client-Link-Layer.Type.Lanstar.Address = 0xc0ffeec0ffee
match 00 4f 00 08 00 09 c0 ff ee c0 ff ee

decode-pair -
match Client-Link-Layer = { Type = ::Lanstar, Type.Lanstar = { Address = 0xc0ffeec0ffee } }

count
match 11
