#  -*- 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: af81aa8bd39cea942014c622a86da474a0372c6f $
#

proto dhcpv6
proto-dictionary dhcpv6
fuzzer-out dhcpv6

#
#  Date. Like a 32bit unix timestamp but starts from 1st Jan 2000 instead of 1st Jan 2000
#
encode-pair Failover-Expiration-Time = 0
match 00 78 00 04 00 00 00 00

decode-pair -
match Failover-Expiration-Time = "2000-01-01T00:00:00Z"

#
#  Anything before Jan 1, 2000 gets mashed to "0".
#
encode-pair Failover-Expiration-Time = "Jan  1 1999 00:00:00 UTC"
match 00 78 00 04 00 00 00 00

# Still less than 946080000 (30 years), so still 0 (we can't represent dates earlier than 1st Jan 2000)
encode-pair Failover-Expiration-Time = 500
match 00 78 00 04 00 00 00 00

decode-pair -
match Failover-Expiration-Time = "2000-01-01T00:00:00Z"

encode-pair Failover-Expiration-Time = 946684800
match 00 78 00 04 00 00 00 00

decode-pair -
match Failover-Expiration-Time = "2000-01-01T00:00:00Z"

# 1st second of 1st Jan 2000
encode-pair Failover-Expiration-Time = 946684801
match 00 78 00 04 00 00 00 01

decode-pair -
match Failover-Expiration-Time = "2000-01-01T00:00:01Z"

count
match 21
