While working on packet capture for a simple scan, just had a look at packet capture and want to know what does hardware size and protocol size means in a ARP header?
The hardware size is the size of the hardware address. For ethernet, this would be six octets (48 bits).
The protocol size is the size of the network protocol address. For IPv4, this would be four octets (32 bits).
If you really want to understand ARP, refer to RFC 826, An Ethernet Address Resolution Protocol. The RFC is fairly small and easy to understand.
The theory is that ARP could be used for hardware and network protocols that use other size addressing. To facilitate this, you must give the address sizes for the hardware and network protocol.
Also, remember that while IPv4 uses ARP, IPv6 does not, instead it uses NDP.