Dr Andrew Scott G7VAV

My photo
 
May 2024
Mo Tu We Th Fr Sa Su
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2
3 4 5 6 7 8 9


if_arp.h
001: /*
002:  * INET         An implementation of the TCP/IP protocol suite for the LINUX
003:  *              operating system.  INET is implemented using the  BSD Socket
004:  *              interface as the means of communication with the user level.
005:  *
006:  *              Global definitions for the ARP (RFC 826) protocol.
007:  *
008:  * Version:     @(#)if_arp.h    1.0.1   04/16/93
009:  *
010:  * Authors:     Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
011:  *              Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source.
012:  *              Ross Biro
013:  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
014:  *              Florian La Roche,
015:  *              Jonathan Layes <layes@loran.com>
016:  *              Arnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25
017:  *
018:  *              This program is free software; you can redistribute it and/or
019:  *              modify it under the terms of the GNU General Public License
020:  *              as published by the Free Software Foundation; either version
021:  *              2 of the License, or (at your option) any later version.
022:  */
023: #ifndef _LINUX_IF_ARP_H
024: #define _LINUX_IF_ARP_H
025: 
026: #include <linux/netdevice.h>
027: 
028: /* ARP protocol HARDWARE identifiers. */
029: #define ARPHRD_NETROM   0               /* from KA9Q: NET/ROM pseudo    */
030: #define ARPHRD_ETHER    1               /* Ethernet 10Mbps              */
031: #define ARPHRD_EETHER   2               /* Experimental Ethernet        */
032: #define ARPHRD_AX25     3               /* AX.25 Level 2                */
033: #define ARPHRD_PRONET   4               /* PROnet token ring            */
034: #define ARPHRD_CHAOS    5               /* Chaosnet                     */
035: #define ARPHRD_IEEE802  6               /* IEEE 802.2 Ethernet/TR/TB    */
036: #define ARPHRD_ARCNET   7               /* ARCnet                       */
037: #define ARPHRD_APPLETLK 8               /* APPLEtalk                    */
038: #define ARPHRD_DLCI     15              /* Frame Relay DLCI             */
039: #define ARPHRD_ATM      19              /* ATM                          */
040: #define ARPHRD_METRICOM 23              /* Metricom STRIP (new IANA id) */
041: #define ARPHRD_IEEE1394 24              /* IEEE 1394 IPv4 - RFC 2734    */
042: #define ARPHRD_EUI64    27              /* EUI-64                       */
043: #define ARPHRD_INFINIBAND 32            /* InfiniBand                   */
044: 
045: /* Dummy types for non ARP hardware */
046: #define ARPHRD_SLIP     256
047: #define ARPHRD_CSLIP    257
048: #define ARPHRD_SLIP6    258
049: #define ARPHRD_CSLIP6   259
050: #define ARPHRD_RSRVD    260             /* Notional KISS type           */
051: #define ARPHRD_ADAPT    264
052: #define ARPHRD_ROSE     270
053: #define ARPHRD_X25      271             /* CCITT X.25                   */
054: #define ARPHRD_HWX25    272             /* Boards with X.25 in firmware */
055: #define ARPHRD_CAN      280             /* Controller Area Network      */
056: #define ARPHRD_PPP      512
057: #define ARPHRD_CISCO    513             /* Cisco HDLC                   */
058: #define ARPHRD_HDLC     ARPHRD_CISCO
059: #define ARPHRD_LAPB     516             /* LAPB                         */
060: #define ARPHRD_DDCMP    517             /* Digital's DDCMP protocol     */
061: #define ARPHRD_RAWHDLC  518             /* Raw HDLC                     */
062: 
063: #define ARPHRD_TUNNEL   768             /* IPIP tunnel                  */
064: #define ARPHRD_TUNNEL6  769             /* IP6IP6 tunnel                */
065: #define ARPHRD_FRAD     770             /* Frame Relay Access Device    */
066: #define ARPHRD_SKIP     771             /* SKIP vif                     */
067: #define ARPHRD_LOOPBACK 772             /* Loopback device              */
068: #define ARPHRD_LOCALTLK 773             /* Localtalk device             */
069: #define ARPHRD_FDDI     774             /* Fiber Distributed Data Interface */
070: #define ARPHRD_BIF      775             /* AP1000 BIF                   */
071: #define ARPHRD_SIT      776             /* sit0 device - IPv6-in-IPv4   */
072: #define ARPHRD_IPDDP    777             /* IP over DDP tunneller        */
073: #define ARPHRD_IPGRE    778             /* GRE over IP                  */
074: #define ARPHRD_PIMREG   779             /* PIMSM register interface     */
075: #define ARPHRD_HIPPI    780             /* High Performance Parallel Interface */
076: #define ARPHRD_ASH      781             /* Nexus 64Mbps Ash             */
077: #define ARPHRD_ECONET   782             /* Acorn Econet                 */
078: #define ARPHRD_IRDA     783             /* Linux-IrDA                   */
079: /* ARP works differently on different FC media .. so  */
080: #define ARPHRD_FCPP     784             /* Point to point fibrechannel  */
081: #define ARPHRD_FCAL     785             /* Fibrechannel arbitrated loop */
082: #define ARPHRD_FCPL     786             /* Fibrechannel public loop     */
083: #define ARPHRD_FCFABRIC 787             /* Fibrechannel fabric          */
084:         /* 787->799 reserved for fibrechannel media types */
085: #define ARPHRD_IEEE802_TR 800           /* Magic type ident for TR      */
086: #define ARPHRD_IEEE80211 801            /* IEEE 802.11                  */
087: #define ARPHRD_IEEE80211_PRISM 802      /* IEEE 802.11 + Prism2 header  */
088: #define ARPHRD_IEEE80211_RADIOTAP 803   /* IEEE 802.11 + radiotap header */
089: #define ARPHRD_IEEE802154         804
090: 
091: #define ARPHRD_PHONET   820             /* PhoNet media type            */
092: #define ARPHRD_PHONET_PIPE 821          /* PhoNet pipe header           */
093: #define ARPHRD_CAIF     822             /* CAIF media type              */
094: 
095: #define ARPHRD_VOID       0xFFFF        /* Void type, nothing is known */
096: #define ARPHRD_NONE       0xFFFE        /* zero header length */
097: 
098: /* ARP protocol opcodes. */
099: #define ARPOP_REQUEST   1               /* ARP request                  */
100: #define ARPOP_REPLY     2               /* ARP reply                    */
101: #define ARPOP_RREQUEST  3               /* RARP request                 */
102: #define ARPOP_RREPLY    4               /* RARP reply                   */
103: #define ARPOP_InREQUEST 8               /* InARP request                */
104: #define ARPOP_InREPLY   9               /* InARP reply                  */
105: #define ARPOP_NAK       10              /* (ATM)ARP NAK                 */
106: 
107: 
108: /* ARP ioctl request. */
109: struct arpreq {
110:   struct sockaddr       arp_pa;         /* protocol address             */
111:   struct sockaddr       arp_ha;         /* hardware address             */
112:   int                   arp_flags;      /* flags                        */
113:   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
114:   char                  arp_dev[16];
115: };
116: 
117: struct arpreq_old {
118:   struct sockaddr       arp_pa;         /* protocol address             */
119:   struct sockaddr       arp_ha;         /* hardware address             */
120:   int                   arp_flags;      /* flags                        */
121:   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
122: };
123: 
124: /* ARP Flag values. */
125: #define ATF_COM         0x02            /* completed entry (ha valid)   */
126: #define ATF_PERM        0x04            /* permanent entry              */
127: #define ATF_PUBL        0x08            /* publish entry                */
128: #define ATF_USETRAILERS 0x10            /* has requested trailers       */
129: #define ATF_NETMASK     0x20            /* want to use a netmask (only
130:                                            for proxy entries) */
131: #define ATF_DONTPUB     0x40            /* don't answer this addresses  */
132: 
133: /*
134:  *      This structure defines an ethernet arp header.
135:  */
136: 
137: struct arphdr {
138:         __be16          ar_hrd;         /* format of hardware address   */
139:         __be16          ar_pro;         /* format of protocol address   */
140:         unsigned char   ar_hln;         /* length of hardware address   */
141:         unsigned char   ar_pln;         /* length of protocol address   */
142:         __be16          ar_op;          /* ARP opcode (command)         */
143: 
144: #if 0
145:          /*
146:           *      Ethernet looks like this : This bit is variable sized however...
147:           */
148:         unsigned char           ar_sha[ETH_ALEN];       /* sender hardware address      */
149:         unsigned char           ar_sip[4];              /* sender IP address            */
150:         unsigned char           ar_tha[ETH_ALEN];       /* target hardware address      */
151:         unsigned char           ar_tip[4];              /* target IP address            */
152: #endif
153: 
154: };
155: 
156: 
157: #endif  /* _LINUX_IF_ARP_H */
158: 


for client 3.128.94.171
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/