root/include/linux/if_arp.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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.
   5  *
   6  *              Global definitions for the ARP (RFC 826) protocol.
   7  *
   8  * Version:     @(#)if_arp.h    1.0.1   04/16/93
   9  *
  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  *
  16  *              This program is free software; you can redistribute it and/or
  17  *              modify it under the terms of the GNU General Public License
  18  *              as published by the Free Software Foundation; either version
  19  *              2 of the License, or (at your option) any later version.
  20  */
  21 #ifndef _LINUX_IF_ARP_H
  22 #define _LINUX_IF_ARP_H
  23 
  24 /* ARP protocol HARDWARE identifiers. */
  25 #define ARPHRD_NETROM   0               /* from KA9Q: NET/ROM pseudo    */
  26 #define ARPHRD_ETHER    1               /* Ethernet 10Mbps              */
  27 #define ARPHRD_EETHER   2               /* Experimental Ethernet        */
  28 #define ARPHRD_AX25     3               /* AX.25 Level 2                */
  29 #define ARPHRD_PRONET   4               /* PROnet token ring            */
  30 #define ARPHRD_CHAOS    5               /* Chaosnet                     */
  31 #define ARPHRD_IEEE802  6               /* IEEE 802.2 Ethernet/TR/TB    */
  32 #define ARPHRD_ARCNET   7               /* ARCnet                       */
  33 #define ARPHRD_APPLETLK 8               /* APPLEtalk                    */
  34 /* Dummy types for non ARP hardware */
  35 #define ARPHRD_SLIP     256
  36 #define ARPHRD_CSLIP    257
  37 #define ARPHRD_SLIP6    258
  38 #define ARPHRD_CSLIP6   259
  39 #define ARPHRD_RSRVD    260             /* Notional KISS type           */
  40 #define ARPHRD_ADAPT    264
  41 #define ARPHRD_PPP      512
  42 #define ARPHRD_TUNNEL   768             /* IPIP tunnel                  */
  43 #define ARPHRD_TUNNEL6  769             /* IPIP6 tunnel                 */
  44 #define ARPHRD_FRAD     770             /* Frame Relay                  */
  45 #define ARPHRD_SKIP     771             /* SKIP vif                     */
  46 #define ARPHRD_LOOPBACK 772             /* Loopback device              */
  47 #define ARPHRD_LOCALTLK 773             /* Localtalk device             */
  48 
  49 /* ARP protocol opcodes. */
  50 #define ARPOP_REQUEST   1               /* ARP request                  */
  51 #define ARPOP_REPLY     2               /* ARP reply                    */
  52 #define ARPOP_RREQUEST  3               /* RARP request                 */
  53 #define ARPOP_RREPLY    4               /* RARP reply                   */
  54 
  55 
  56 /* ARP ioctl request. */
  57 struct arpreq {
  58   struct sockaddr       arp_pa;         /* protocol address             */
  59   struct sockaddr       arp_ha;         /* hardware address             */
  60   int                   arp_flags;      /* flags                        */
  61   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
  62   char                  arp_dev[16];
  63 };
  64 
  65 struct arpreq_old {
  66   struct sockaddr       arp_pa;         /* protocol address             */
  67   struct sockaddr       arp_ha;         /* hardware address             */
  68   int                   arp_flags;      /* flags                        */
  69   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
  70 };
  71 
  72 /* ARP Flag values. */
  73 #define ATF_COM         0x02            /* completed entry (ha valid)   */
  74 #define ATF_PERM        0x04            /* permanent entry              */
  75 #define ATF_PUBL        0x08            /* publish entry                */
  76 #define ATF_USETRAILERS 0x10            /* has requested trailers       */
  77 #define ATF_NETMASK     0x20            /* want to use a netmask (only
  78                                            for proxy entries) */
  79 
  80 /*
  81  *      This structure defines an ethernet arp header.
  82  */
  83 
  84 struct arphdr
  85 {
  86         unsigned short  ar_hrd;         /* format of hardware address   */
  87         unsigned short  ar_pro;         /* format of protocol address   */
  88         unsigned char   ar_hln;         /* length of hardware address   */
  89         unsigned char   ar_pln;         /* length of protocol address   */
  90         unsigned short  ar_op;          /* ARP opcode (command)         */
  91 
  92 #if 0
  93          /*
  94           *      Ethernet looks like this : This bit is variable sized however...
  95           */
  96         unsigned char           ar_sha[ETH_ALEN];       /* sender hardware address      */
  97         unsigned char           ar_sip[4];              /* sender IP address            */
  98         unsigned char           ar_tha[ETH_ALEN];       /* target hardware address      */
  99         unsigned char           ar_tip[4];              /* target IP address            */
 100 #endif
 101 
 102 };
 103 
 104 #endif  /* _LINUX_IF_ARP_H */

/* [previous][next][first][last][top][bottom][index][help] */