Search code examples
javaarpjpcap

Using jpcap to forge ARPRequest


when i use JPCap to forge ARP Request , i notice that jpcap is adding a trailer of 18 byte zeros to the tail of the ARP also i am not interested in sending this data. Is there a way to prevent this padding.


Solution

  • The zeros you're seeing are actually padding for the Ethernet frame. Ethernet packets have a minimum payload size of 42 bytes (the reasons have to do with the sender needing to transmit for a certain amount of time to detect collisions). As far as I know there's no way to prevent this, and doing so would be against the Ethernet specification.

    Also see question at https://serverfault.com/questions/496324/arp-packet-received-larger-than-packet-sent-why