#  -*- text -*-
#
#  Based on dhcp-auth.pcap from Wireshark
#
#  $ wget https://wiki.wireshark.org/uploads/__moin_import__/attachments/SampleCaptures/dhcp-auth.pcap
#  $ ./scripts//util/pcap2decode-proto.py  -f dhcp-auth.pcap -p dhcpv4 > src/tests/unit/protocols/dhcpv4/dhcp-auth.txt
#

proto dhcpv4
proto-dictionary dhcpv4

#
#  1.
#
# [ BOOTP ]
#   op        = BOOTREPLY
#   htype     = Ethernet (10Mb)
#   hlen      = 6
#   hops      = 1
#   xid       = 0x7771cf85
#   secs      = 10
#   flags     =
#   ciaddr    = 0.0.0.0
#   yiaddr    = 10.10.8.235
#   siaddr    = 172.22.178.234
#   giaddr    = 10.10.8.240
#   chaddr    = 00:0e:86:11:c0:75 (+ 10 nul pad)
#   sname     = ''
#   file      = ''
#   options   = b'c\x82Sc' (DHCP magic)
# [ DHCP options ]
#    options   = [message-type=offer subnet_mask=255.255.255.0 server_id=172.22.178.234 lease_time=43200 router=10.10.8.254 name_server=143.209.4.1,143.209.5.1 tftp_server_name=b'172.22.178.234' 120=b'\x01\xac\x16\xb2\xea' client_id='\x00nathan1clientid' 90=b'\x01\x01\x00\xc8x\xc4RV@ \x811234\x8f\xe0\xcc\xe2\xee\x85\x96\xab\xb2X\x17\xc4\x80\xb2\xfd0' relay_agent_information=b'\x01\x14 PON 1/1/07/01:1.0.1' end]
#
decode-proto 02 01 06 01 77 71 cf 85 00 0a 00 00 00 00 00 00 0a 0a 08 eb ac 16 b2 ea 0a 0a 08 f0 00 0e 86 11 c0 75 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 02 01 04 ff ff ff 00 36 04 ac 16 b2 ea 33 04 00 00 a8 c0 03 04 0a 0a 08 fe 06 08 8f d1 04 01 8f d1 05 01 42 0e 31 37 32 2e 32 32 2e 31 37 38 2e 32 33 34 78 05 01 ac 16 b2 ea 3d 10 00 6e 61 74 68 61 6e 31 63 6c 69 65 6e 74 69 64 5a 1f 01 01 00 c8 78 c4 52 56 40 20 81 31 32 33 34 8f e0 cc e2 ee 85 96 ab b2 58 17 c4 80 b2 fd 30 52 16 01 14 20 50 4f 4e 20 31 2f 31 2f 30 37 2f 30 31 3a 31 2e 30 2e 31 ff
match Opcode = ::Server-Message, Hardware-Type = ::Ethernet, Hardware-Address-Length = 6, Hop-Count = 1, Transaction-Id = 2003947397, Number-of-Seconds = 10, Flags = 0, Client-IP-Address = 0.0.0.0, Your-IP-Address = 10.10.8.235, Server-IP-Address = 172.22.178.234, Gateway-IP-Address = 10.10.8.240, Client-Hardware-Address = 00:0e:86:11:c0:75, Message-Type = ::Offer, Subnet-Mask = 255.255.255.0, Server-Identifier = 172.22.178.234, IP-Address-Lease-Time = 43200, Router-Address = 10.10.8.254, Domain-Name-Server = 143.209.4.1, Domain-Name-Server = 143.209.5.1, TFTP-Server-Name = "172.22.178.234", raw.SIP-Servers-Option = 0x01ac16b2ea, Client-Identifier = 0x006e617468616e31636c69656e746964, Authentication = { protocol = ::delayed-authentication, algorithm = ::HMAC-SHA1-keyed-hash, RDM = 0, replay-detection = 14445511662704271489, raw.algorithm.HMAC-SHA1-keyed-hash = 0x313233348fe0cce2ee8596abb25817c480b2fd30 }, Relay-Agent-Information = { Circuit-Id = 0x20504f4e20312f312f30372f30313a312e302e31 }, Network-Subnet = 10.10.8.240/32

count
match 4

