#  -*- 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: ee16432b43a7420128f4f8e85c6ee9f772bfd4c1 $
#
#  Test vectors for DHCPv6 protocol
#
#  Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-domain-list.pcap
#

proto dhcpv6
proto-dictionary dhcpv6
fuzzer-out dhcpv6

#
#  1.
#
# [ DHCPv6 Reply Message ]
#   msgtype   = REPLY
#   trid      = 0xaa56ce
# [ DHCP6 Client Identifier Option ]
#    optcode   = CLIENTID
#    optlen    = 14
#    \duid      \
#     |[ DUID - Link-layer address plus time ]
#     |  type      = Link-layer address plus time
#     |  hwtype    = Ethernet (10Mb)
#     |  timeval   = Thu, 04 Apr 2013 09:58:23 -0300 (1365069503)
#     |  lladdr    = 00:0c:29:38:f3:68
# [ DHCP6 Server Identifier Option ]
#     optcode   = SERVERID
#     optlen    = 14
#     \duid      \
#      |[ DUID - Link-layer address plus time ]
#      |  type      = Link-layer address plus time
#      |  hwtype    = Ethernet (10Mb)
#      |  timeval   = Thu, 04 Apr 2013 01:34:19 -0300 (1365039259)
#      |  lladdr    = 00:0c:29:9b:a1:53
# [ DHCP6 Option - Domain Search List option ]
#      optcode   = Domain Search List option
#      optlen    = 49
#      dnsdomains= ['example.com.', 'sales.example.com.', 'eng.example.com.']
#
decode-proto 07 aa 56 ce 00 01 00 0e 00 01 00 01 18 f0 0b 3f 00 0c 29 38 f3 68 00 02 00 0e 00 01 00 01 18 ef 95 1b 00 0c 29 9b a1 53 00 18 00 31 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 05 73 61 6c 65 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 65 6e 67 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
match Packet-Type = ::Reply, Transaction-ID = 0xaa56ce, Client-ID = { DUID = ::LLT, DUID.LLT = { Hardware-Type = ::Ethernet, Time = "2013-04-04T09:58:23Z", Hardware-Type.Ethernet = { Address = 00:0c:29:38:f3:68 } } }, Server-ID = { DUID = ::LLT, DUID.LLT = { Hardware-Type = ::Ethernet, Time = "2013-04-04T01:34:19Z", Hardware-Type.Ethernet = { Address = 00:0c:29:9b:a1:53 } } }, Domain-List = "example.com", Domain-List = "sales.example.com", Domain-List = "eng.example.com"

encode-proto -
match 07 aa 56 ce 00 01 00 0e 00 01 00 01 18 f0 0b 3f 00 0c 29 38 f3 68 00 02 00 0e 00 01 00 01 18 ef 95 1b 00 0c 29 9b a1 53 00 18 00 31 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 05 73 61 6c 65 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 65 6e 67 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00

count
match 7
