NAME
arp_dissect - an address resolution protocol dissect function
SYNOPSIS
data,offset=arp_dissect(pkt,offset)
DESCRIPTION
dissect address resolution protocol
ARP HeaderADDITIONAL
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HW Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HW ADDR Len | Proto Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OP Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ Sender HW Address /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ Sender IP Address /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ Target HW Address /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ Target IP Address /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
reference RFC 826, 1293
funtion accepts two arguments:
pkt is a packet reference containing the whole packet to be dissect
offset is the position inside packet to start dissectionfuntion return two values:
data is a 9 long tuple:
harware type
protocol
hardware address length
protocol length
operation code
sender hardware address
sender ip address
target hardware address
target ip addressoffset is the original offset plus arp_header_lenght
sender IP address and target IP address are returned in the form of stringHOME
to convert to dot quotation use addr42dot(address)
same way to convert sender hardware address and target hardware address
use haddr2dot(address )