![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 0002 /* 0003 * INET An implementation of the TCP/IP protocol suite for the LINUX 0004 * operating system. INET is implemented using the BSD Socket 0005 * interface as the means of communication with the user level. 0006 * 0007 * Global definitions for the ARP (RFC 826) protocol. 0008 * 0009 * Version: @(#)if_arp.h 1.0.1 04/16/93 0010 * 0011 * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 0012 * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. 0013 * Ross Biro 0014 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 0015 * Florian La Roche, 0016 * Jonathan Layes <layes@loran.com> 0017 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25 0018 * 0019 * This program is free software; you can redistribute it and/or 0020 * modify it under the terms of the GNU General Public License 0021 * as published by the Free Software Foundation; either version 0022 * 2 of the License, or (at your option) any later version. 0023 */ 0024 #ifndef _UAPI_LINUX_IF_ARP_H 0025 #define _UAPI_LINUX_IF_ARP_H 0026 0027 #include <linux/netdevice.h> 0028 0029 /* ARP protocol HARDWARE identifiers. */ 0030 #define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */ 0031 #define ARPHRD_ETHER 1 /* Ethernet 10Mbps */ 0032 #define ARPHRD_EETHER 2 /* Experimental Ethernet */ 0033 #define ARPHRD_AX25 3 /* AX.25 Level 2 */ 0034 #define ARPHRD_PRONET 4 /* PROnet token ring */ 0035 #define ARPHRD_CHAOS 5 /* Chaosnet */ 0036 #define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */ 0037 #define ARPHRD_ARCNET 7 /* ARCnet */ 0038 #define ARPHRD_APPLETLK 8 /* APPLEtalk */ 0039 #define ARPHRD_DLCI 15 /* Frame Relay DLCI */ 0040 #define ARPHRD_ATM 19 /* ATM */ 0041 #define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */ 0042 #define ARPHRD_IEEE1394 24 /* IEEE 1394 IPv4 - RFC 2734 */ 0043 #define ARPHRD_EUI64 27 /* EUI-64 */ 0044 #define ARPHRD_INFINIBAND 32 /* InfiniBand */ 0045 0046 /* Dummy types for non ARP hardware */ 0047 #define ARPHRD_SLIP 256 0048 #define ARPHRD_CSLIP 257 0049 #define ARPHRD_SLIP6 258 0050 #define ARPHRD_CSLIP6 259 0051 #define ARPHRD_RSRVD 260 /* Notional KISS type */ 0052 #define ARPHRD_ADAPT 264 0053 #define ARPHRD_ROSE 270 0054 #define ARPHRD_X25 271 /* CCITT X.25 */ 0055 #define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */ 0056 #define ARPHRD_CAN 280 /* Controller Area Network */ 0057 #define ARPHRD_MCTP 290 0058 #define ARPHRD_PPP 512 0059 #define ARPHRD_CISCO 513 /* Cisco HDLC */ 0060 #define ARPHRD_HDLC ARPHRD_CISCO 0061 #define ARPHRD_LAPB 516 /* LAPB */ 0062 #define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ 0063 #define ARPHRD_RAWHDLC 518 /* Raw HDLC */ 0064 #define ARPHRD_RAWIP 519 /* Raw IP */ 0065 0066 #define ARPHRD_TUNNEL 768 /* IPIP tunnel */ 0067 #define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */ 0068 #define ARPHRD_FRAD 770 /* Frame Relay Access Device */ 0069 #define ARPHRD_SKIP 771 /* SKIP vif */ 0070 #define ARPHRD_LOOPBACK 772 /* Loopback device */ 0071 #define ARPHRD_LOCALTLK 773 /* Localtalk device */ 0072 #define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface */ 0073 #define ARPHRD_BIF 775 /* AP1000 BIF */ 0074 #define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */ 0075 #define ARPHRD_IPDDP 777 /* IP over DDP tunneller */ 0076 #define ARPHRD_IPGRE 778 /* GRE over IP */ 0077 #define ARPHRD_PIMREG 779 /* PIMSM register interface */ 0078 #define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */ 0079 #define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */ 0080 #define ARPHRD_ECONET 782 /* Acorn Econet */ 0081 #define ARPHRD_IRDA 783 /* Linux-IrDA */ 0082 /* ARP works differently on different FC media .. so */ 0083 #define ARPHRD_FCPP 784 /* Point to point fibrechannel */ 0084 #define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */ 0085 #define ARPHRD_FCPL 786 /* Fibrechannel public loop */ 0086 #define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */ 0087 /* 787->799 reserved for fibrechannel media types */ 0088 #define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */ 0089 #define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ 0090 #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ 0091 #define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ 0092 #define ARPHRD_IEEE802154 804 0093 #define ARPHRD_IEEE802154_MONITOR 805 /* IEEE 802.15.4 network monitor */ 0094 0095 #define ARPHRD_PHONET 820 /* PhoNet media type */ 0096 #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ 0097 #define ARPHRD_CAIF 822 /* CAIF media type */ 0098 #define ARPHRD_IP6GRE 823 /* GRE over IPv6 */ 0099 #define ARPHRD_NETLINK 824 /* Netlink header */ 0100 #define ARPHRD_6LOWPAN 825 /* IPv6 over LoWPAN */ 0101 #define ARPHRD_VSOCKMON 826 /* Vsock monitor header */ 0102 0103 #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ 0104 #define ARPHRD_NONE 0xFFFE /* zero header length */ 0105 0106 /* ARP protocol opcodes. */ 0107 #define ARPOP_REQUEST 1 /* ARP request */ 0108 #define ARPOP_REPLY 2 /* ARP reply */ 0109 #define ARPOP_RREQUEST 3 /* RARP request */ 0110 #define ARPOP_RREPLY 4 /* RARP reply */ 0111 #define ARPOP_InREQUEST 8 /* InARP request */ 0112 #define ARPOP_InREPLY 9 /* InARP reply */ 0113 #define ARPOP_NAK 10 /* (ATM)ARP NAK */ 0114 0115 0116 /* ARP ioctl request. */ 0117 struct arpreq { 0118 struct sockaddr arp_pa; /* protocol address */ 0119 struct sockaddr arp_ha; /* hardware address */ 0120 int arp_flags; /* flags */ 0121 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ 0122 char arp_dev[IFNAMSIZ]; 0123 }; 0124 0125 struct arpreq_old { 0126 struct sockaddr arp_pa; /* protocol address */ 0127 struct sockaddr arp_ha; /* hardware address */ 0128 int arp_flags; /* flags */ 0129 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ 0130 }; 0131 0132 /* ARP Flag values. */ 0133 #define ATF_COM 0x02 /* completed entry (ha valid) */ 0134 #define ATF_PERM 0x04 /* permanent entry */ 0135 #define ATF_PUBL 0x08 /* publish entry */ 0136 #define ATF_USETRAILERS 0x10 /* has requested trailers */ 0137 #define ATF_NETMASK 0x20 /* want to use a netmask (only 0138 for proxy entries) */ 0139 #define ATF_DONTPUB 0x40 /* don't answer this addresses */ 0140 0141 /* 0142 * This structure defines an ethernet arp header. 0143 */ 0144 0145 struct arphdr { 0146 __be16 ar_hrd; /* format of hardware address */ 0147 __be16 ar_pro; /* format of protocol address */ 0148 unsigned char ar_hln; /* length of hardware address */ 0149 unsigned char ar_pln; /* length of protocol address */ 0150 __be16 ar_op; /* ARP opcode (command) */ 0151 0152 #if 0 0153 /* 0154 * Ethernet looks like this : This bit is variable sized however... 0155 */ 0156 unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */ 0157 unsigned char ar_sip[4]; /* sender IP address */ 0158 unsigned char ar_tha[ETH_ALEN]; /* target hardware address */ 0159 unsigned char ar_tip[4]; /* target IP address */ 0160 #endif 0161 0162 }; 0163 0164 0165 #endif /* _UAPI_LINUX_IF_ARP_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |