pre-2.3.4..
[davej-history.git] / include / linux / if_arp.h
blob39007c8bf55caa62a3113090bc06172c4985b8d4
1 /*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
6 * Global definitions for the ARP (RFC 826) protocol.
8 * Version: @(#)if_arp.h 1.0.1 04/16/93
10 * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
11 * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source.
12 * Ross Biro, <bir7@leland.Stanford.Edu>
13 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
14 * Florian La Roche,
15 * Jonathan Layes <layes@loran.com>
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version
20 * 2 of the License, or (at your option) any later version.
22 #ifndef _LINUX_IF_ARP_H
23 #define _LINUX_IF_ARP_H
25 #include <linux/netdevice.h>
27 /* ARP protocol HARDWARE identifiers. */
28 #define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */
29 #define ARPHRD_ETHER 1 /* Ethernet 10Mbps */
30 #define ARPHRD_EETHER 2 /* Experimental Ethernet */
31 #define ARPHRD_AX25 3 /* AX.25 Level 2 */
32 #define ARPHRD_PRONET 4 /* PROnet token ring */
33 #define ARPHRD_CHAOS 5 /* Chaosnet */
34 #define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */
35 #define ARPHRD_ARCNET 7 /* ARCnet */
36 #define ARPHRD_APPLETLK 8 /* APPLEtalk */
37 #define ARPHRD_DLCI 15 /* Frame Relay DLCI */
38 #define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */
40 /* Dummy types for non ARP hardware */
41 #define ARPHRD_SLIP 256
42 #define ARPHRD_CSLIP 257
43 #define ARPHRD_SLIP6 258
44 #define ARPHRD_CSLIP6 259
45 #define ARPHRD_RSRVD 260 /* Notional KISS type */
46 #define ARPHRD_ADAPT 264
47 #define ARPHRD_ROSE 270
48 #define ARPHRD_X25 271 /* CCITT X.25 */
49 #define ARPHRD_PPP 512
50 #define ARPHRD_HDLC 513 /* (Cisco) HDLC */
51 #define ARPHRD_LAPB 516 /* LAPB */
53 #define ARPHRD_TUNNEL 768 /* IPIP tunnel */
54 #define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel */
55 #define ARPHRD_FRAD 770 /* Frame Relay Access Device */
56 #define ARPHRD_SKIP 771 /* SKIP vif */
57 #define ARPHRD_LOOPBACK 772 /* Loopback device */
58 #define ARPHRD_LOCALTLK 773 /* Localtalk device */
59 #define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface */
60 #define ARPHRD_BIF 775 /* AP1000 BIF */
61 #define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */
62 #define ARPHRD_IPDDP 777 /* IP over DDP tunneller */
63 #define ARPHRD_IPGRE 778 /* GRE over IP */
64 #define ARPHRD_PIMREG 779 /* PIMSM register interface */
65 #define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */
66 #define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */
67 #define ARPHRD_ECONET 782 /* Acorn Econet */
68 #define ARPHRD_IRDA 783 /* Linux/IR */
69 /* ARP works differently on different FC media .. so */
70 #define ARPHRD_FCPP 784 /* Point to point fibrechanel */
71 #define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */
72 #define ARPHRD_FCPL 786 /* Fibrechannel public loop */
73 #define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */
74 /* 787->799 reserved for fibrechannel media types */
77 /* ARP protocol opcodes. */
78 #define ARPOP_REQUEST 1 /* ARP request */
79 #define ARPOP_REPLY 2 /* ARP reply */
80 #define ARPOP_RREQUEST 3 /* RARP request */
81 #define ARPOP_RREPLY 4 /* RARP reply */
84 /* ARP ioctl request. */
85 struct arpreq {
86 struct sockaddr arp_pa; /* protocol address */
87 struct sockaddr arp_ha; /* hardware address */
88 int arp_flags; /* flags */
89 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
90 char arp_dev[16];
93 struct arpreq_old {
94 struct sockaddr arp_pa; /* protocol address */
95 struct sockaddr arp_ha; /* hardware address */
96 int arp_flags; /* flags */
97 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
100 /* ARP Flag values. */
101 #define ATF_COM 0x02 /* completed entry (ha valid) */
102 #define ATF_PERM 0x04 /* permanent entry */
103 #define ATF_PUBL 0x08 /* publish entry */
104 #define ATF_USETRAILERS 0x10 /* has requested trailers */
105 #define ATF_NETMASK 0x20 /* want to use a netmask (only
106 for proxy entries) */
107 #define ATF_DONTPUB 0x40 /* don't answer this addresses */
110 * This structure defines an ethernet arp header.
113 struct arphdr
115 unsigned short ar_hrd; /* format of hardware address */
116 unsigned short ar_pro; /* format of protocol address */
117 unsigned char ar_hln; /* length of hardware address */
118 unsigned char ar_pln; /* length of protocol address */
119 unsigned short ar_op; /* ARP opcode (command) */
121 #if 0
123 * Ethernet looks like this : This bit is variable sized however...
125 unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
126 unsigned char ar_sip[4]; /* sender IP address */
127 unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
128 unsigned char ar_tip[4]; /* target IP address */
129 #endif
133 #endif /* _LINUX_IF_ARP_H */