Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

if_arp.h

Go to the documentation of this file.
00001 /*
00002  * INET         An implementation of the TCP/IP protocol suite for the LINUX
00003  *              operating system.  INET is implemented using the  BSD Socket
00004  *              interface as the means of communication with the user level.
00005  *
00006  *              Global definitions for the ARP (RFC 826) protocol.
00007  *
00008  * Version:     @(#)if_arp.h    1.0.1   04/16/93
00009  *
00010  * Authors:     Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
00011  *              Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source.
00012  *              Ross Biro, <bir7@leland.Stanford.Edu>
00013  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
00014  *              Florian La Roche,
00015  *              Jonathan Layes <layes@loran.com>
00016  *              Arnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25
00017  *
00018  *              This program is free software; you can redistribute it and/or
00019  *              modify it under the terms of the GNU General Public License
00020  *              as published by the Free Software Foundation; either version
00021  *              2 of the License, or (at your option) any later version.
00022  */
00023 #ifndef _LINUX_IF_ARP_H
00024 #define _LINUX_IF_ARP_H
00025 
00026 // #include <linux/netdevice.h>
00027 
00028 /* ARP protocol HARDWARE identifiers. */
00029 #define ARPHRD_NETROM   0               /* from KA9Q: NET/ROM pseudo    */
00030 #define ARPHRD_ETHER    1               /* Ethernet 10Mbps              */
00031 #define ARPHRD_EETHER   2               /* Experimental Ethernet        */
00032 #define ARPHRD_AX25     3               /* AX.25 Level 2                */
00033 #define ARPHRD_PRONET   4               /* PROnet token ring            */
00034 #define ARPHRD_CHAOS    5               /* Chaosnet                     */
00035 #define ARPHRD_IEEE802  6               /* IEEE 802.2 Ethernet/TR/TB    */
00036 #define ARPHRD_ARCNET   7               /* ARCnet                       */
00037 #define ARPHRD_APPLETLK 8               /* APPLEtalk                    */
00038 #define ARPHRD_DLCI     15              /* Frame Relay DLCI             */
00039 #define ARPHRD_ATM      19              /* ATM                          */
00040 #define ARPHRD_METRICOM 23              /* Metricom STRIP (new IANA id) */
00041 #define ARPHRD_IEEE1394 24              /* IEEE 1394 IPv4 - RFC 2734    */
00042 #define ARPHRD_EUI64    27              /* EUI-64                       */
00043 
00044 /* Dummy types for non ARP hardware */
00045 #define ARPHRD_SLIP     256
00046 #define ARPHRD_CSLIP    257
00047 #define ARPHRD_SLIP6    258
00048 #define ARPHRD_CSLIP6   259
00049 #define ARPHRD_RSRVD    260             /* Notional KISS type           */
00050 #define ARPHRD_ADAPT    264
00051 #define ARPHRD_ROSE     270
00052 #define ARPHRD_X25      271             /* CCITT X.25                   */
00053 #define ARPHRD_HWX25    272             /* Boards with X.25 in firmware */
00054 #define ARPHRD_PPP      512
00055 #define ARPHRD_CISCO    513             /* Cisco HDLC                   */
00056 #define ARPHRD_HDLC     ARPHRD_CISCO
00057 #define ARPHRD_LAPB     516             /* LAPB                         */
00058 #define ARPHRD_DDCMP    517             /* Digital's DDCMP protocol     */
00059 #define ARPHRD_RAWHDLC  518             /* Raw HDLC                     */
00060 
00061 #define ARPHRD_TUNNEL   768             /* IPIP tunnel                  */
00062 #define ARPHRD_TUNNEL6  769             /* IPIP6 tunnel                 */
00063 #define ARPHRD_FRAD     770             /* Frame Relay Access Device    */
00064 #define ARPHRD_SKIP     771             /* SKIP vif                     */
00065 #define ARPHRD_LOOPBACK 772             /* Loopback device              */
00066 #define ARPHRD_LOCALTLK 773             /* Localtalk device             */
00067 #define ARPHRD_FDDI     774             /* Fiber Distributed Data Interface */
00068 #define ARPHRD_BIF      775             /* AP1000 BIF                   */
00069 #define ARPHRD_SIT      776             /* sit0 device - IPv6-in-IPv4   */
00070 #define ARPHRD_IPDDP    777             /* IP over DDP tunneller        */
00071 #define ARPHRD_IPGRE    778             /* GRE over IP                  */
00072 #define ARPHRD_PIMREG   779             /* PIMSM register interface     */
00073 #define ARPHRD_HIPPI    780             /* High Performance Parallel Interface */
00074 #define ARPHRD_ASH      781             /* Nexus 64Mbps Ash             */
00075 #define ARPHRD_ECONET   782             /* Acorn Econet                 */
00076 #define ARPHRD_IRDA     783             /* Linux-IrDA                   */
00077 /* ARP works differently on different FC media .. so  */
00078 #define ARPHRD_FCPP     784             /* Point to point fibrechannel  */
00079 #define ARPHRD_FCAL     785             /* Fibrechannel arbitrated loop */
00080 #define ARPHRD_FCPL     786             /* Fibrechannel public loop     */
00081 #define ARPHRD_FCFABRIC 787             /* Fibrechannel fabric          */
00082         /* 787->799 reserved for fibrechannel media types */
00083 #define ARPHRD_IEEE802_TR 800           /* Magic type ident for TR      */
00084 #define ARPHRD_IEEE80211 801            /* IEEE 802.11                  */
00085 #define ARPHRD_IEEE80211_PRISM 802      /* IEEE 802.11 + Prism2 header  */
00086 
00087 #define ARPHRD_VOID       0xFFFF        /* Void type, nothing is known */
00088 
00089 /* ARP protocol opcodes. */
00090 #define ARPOP_REQUEST   1               /* ARP request                  */
00091 #define ARPOP_REPLY     2               /* ARP reply                    */
00092 #define ARPOP_RREQUEST  3               /* RARP request                 */
00093 #define ARPOP_RREPLY    4               /* RARP reply                   */
00094 #define ARPOP_InREQUEST 8               /* InARP request                */
00095 #define ARPOP_InREPLY   9               /* InARP reply                  */
00096 #define ARPOP_NAK       10              /* (ATM)ARP NAK                 */
00097 
00098 
00099 /* ARP ioctl request. */
00100 #if 0
00101 struct arpreq {
00102   struct sockaddr       arp_pa;         /* protocol address             */
00103   struct sockaddr       arp_ha;         /* hardware address             */
00104   int                   arp_flags;      /* flags                        */
00105   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
00106   char                  arp_dev[16];
00107 };
00108 #endif
00109 
00110 struct arpreq_old {
00111   struct sockaddr       arp_pa;         /* protocol address             */
00112   struct sockaddr       arp_ha;         /* hardware address             */
00113   int                   arp_flags;      /* flags                        */
00114   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
00115 };
00116 
00117 /* ARP Flag values. */
00118 #define ATF_COM         0x02            /* completed entry (ha valid)   */
00119 #define ATF_PERM        0x04            /* permanent entry              */
00120 #define ATF_PUBL        0x08            /* publish entry                */
00121 #define ATF_USETRAILERS 0x10            /* has requested trailers       */
00122 #define ATF_NETMASK     0x20            /* want to use a netmask (only
00123                                            for proxy entries) */
00124 #define ATF_DONTPUB     0x40            /* don't answer this addresses  */
00125 
00126 /*
00127  *      This structure defines an ethernet arp header.
00128  */
00129 
00130 #if 0
00131 struct arphdr
00132 {
00133         unsigned short  ar_hrd;         /* format of hardware address   */
00134         unsigned short  ar_pro;         /* format of protocol address   */
00135         unsigned char   ar_hln;         /* length of hardware address   */
00136         unsigned char   ar_pln;         /* length of protocol address   */
00137         unsigned short  ar_op;          /* ARP opcode (command)         */
00138 #endif
00139 
00140 #if 0
00141          /*
00142           *      Ethernet looks like this : This bit is variable sized however...
00143           */
00144         unsigned char           ar_sha[ETH_ALEN];       /* sender hardware address      */
00145         unsigned char           ar_sip[4];              /* sender IP address            */
00146         unsigned char           ar_tha[ETH_ALEN];       /* target hardware address      */
00147         unsigned char           ar_tip[4];              /* target IP address            */
00148 
00149 };
00150 #endif
00151 
00152 #endif  /* _LINUX_IF_ARP_H */

Generated on Sat Mar 13 14:55:16 2004 for WvStreams by doxygen 1.3.6-20040222