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

proto dhcpv6
proto-dictionary dhcpv6
fuzzer-out dhcpv6

#
#  1.
#
# [ DHCPv6 Reply Message ]
#   msgtype   = REPLY
#   trid      = 0x6890d8
# [ 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 - SIP Servers Domain Name List ]
#      optcode   = SIP Servers Domain Name List
#      optlen    = 62
#      sipdomains= ['sip1.my-domain.net.', 'sip2.example.com.', 'sip3.sub.my-domain.org.']
#
decode-proto 07 68 90 d8 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 15 00 3e 04 73 69 70 31 09 6d 79 2d 64 6f 6d 61 69 6e 03 6e 65 74 00 04 73 69 70 32 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 04 73 69 70 33 03 73 75 62 09 6d 79 2d 64 6f 6d 61 69 6e 03 6f 72 67 00
match Packet-Type = ::Reply, Transaction-ID = 0x6890d8, 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 } } }, SIP-Server-Domain-Name-List = "sip1.my-domain.net", SIP-Server-Domain-Name-List = "sip2.example.com", SIP-Server-Domain-Name-List = "sip3.sub.my-domain.org"

encode-proto -
match 07 68 90 d8 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 15 00 3e 04 73 69 70 31 09 6d 79 2d 64 6f 6d 61 69 6e 03 6e 65 74 00 04 73 69 70 32 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 04 73 69 70 33 03 73 75 62 09 6d 79 2d 64 6f 6d 61 69 6e 03 6f 72 67 00

count
match 7
