4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
/* See RFC 826 for protocol description. ARP packets are variable
21
in size; the arphdr structure defines the fixed-length portion.
22
Protocol type values are the same as those for 10 Mb/s Ethernet.
23
It is followed by the variable-sized fields ar_sha, arp_spa,
24
arp_tha and arp_tpa in that order, according to the lengths
25
specified. Field names used correspond to RFC 826. */
29
unsigned short int ar_hrd; /* Format of hardware address. */
30
unsigned short int ar_pro; /* Format of protocol address. */
31
unsigned char ar_hln; /* Length of hardware address. */
32
unsigned char ar_pln; /* Length of protocol address. */
33
unsigned short int ar_op; /* ARP opcode (command). */
35
unsigned char __ar_sha[ETHER_ADDR_LEN]; /* Sender hardware address. */
36
unsigned char __ar_sip[4]; /* Sender IP address. */
37
unsigned char __ar_tha[ETHER_ADDR_LEN]; /* Target hardware address. */
38
unsigned char __ar_tip[4]; /* Target IP address. */
40
/* ARP protocol opcodes. */
41
#define ARPOP_REQUEST 1 /* ARP request. */
42
#define ARPOP_REPLY 2 /* ARP reply. */
43
#define ARPOP_RREQUEST 3 /* RARP request. */
44
#define ARPOP_RREPLY 4 /* RARP reply. */
45
#define ARPOP_InREQUEST 8 /* InARP request. */
46
#define ARPOP_InREPLY 9 /* InARP reply. */