#  -*- 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: c6fa4d18a11fcad508b12a8cc621727f99681a69 $
#
#  Test vectors for ARP protocol
#
#

proto arp
proto-dictionary arp

encode-proto arp.hardware-format = Ethernet, arp.protocol-format = IPv4, arp.hardware-address-length = 6, arp.protocol-address-length = 4, arp.packet-type = Request, arp.sender-hardware-address = 00:01:02:03:04:05, arp.sender-protocol-address = 192.0.2.1, arp.target-hardware-address = 00:aa:bb:cc:dd:ee, arp.target-protocol-address = 192.0.2.128
#     ----- ----- -- -- ----- ----------------- __________  ----------------- ___________
match 00 01 08 00 06 04 00 01 00 01 02 03 04 05 c0 00 02 01 00 aa bb cc dd ee c0 00 02 80

decode-proto -
match arp = { hardware-format = ::Ethernet, protocol-format = ::IPv4, hardware-address-length = 6, protocol-address-length = 4, packet-type = ::Request, sender-hardware-address = 00:01:02:03:04:05, sender-protocol-address = 192.0.2.1, target-hardware-address = 00:aa:bb:cc:dd:ee, target-protocol-address = 192.0.2.128 }

#
#  and with missing fields that we don't care about.  this results in the same hex string as above.
#
encode-proto arp.packet-type = Request, arp.sender-hardware-address = 00:01:02:03:04:05, arp.sender-protocol-address = 192.0.2.1, arp.target-hardware-address = 00:aa:bb:cc:dd:ee, arp.target-protocol-address = 192.0.2.128
#     ----- ----- -- -- ----- ----------------- __________  ----------------- ___________
match 00 01 08 00 06 04 00 01 00 01 02 03 04 05 c0 00 02 01 00 aa bb cc dd ee c0 00 02 80

decode-proto -
match arp = { hardware-format = ::Ethernet, protocol-format = ::IPv4, hardware-address-length = 6, protocol-address-length = 4, packet-type = ::Request, sender-hardware-address = 00:01:02:03:04:05, sender-protocol-address = 192.0.2.1, target-hardware-address = 00:aa:bb:cc:dd:ee, target-protocol-address = 192.0.2.128 }

count
match 10
