root/netatalk/aarp.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


    1 /*      $OpenBSD: aarp.h,v 1.1 1997/07/23 03:39:51 denny Exp $  */
    2 
    3 /*
    4  * Copyright (c) 1990,1991 Regents of The University of Michigan.
    5  * All Rights Reserved.
    6  */
    7 
    8 /*
    9  * The following is the contents of the COPYRIGHT file from the
   10  * netatalk-1.4a2 distribution, from which this file is derived.
   11  */
   12 /*
   13  * Copyright (c) 1990,1996 Regents of The University of Michigan.
   14  *
   15  * All Rights Reserved.
   16  *
   17  *    Permission to use, copy, modify, and distribute this software and
   18  *    its documentation for any purpose and without fee is hereby granted,
   19  *    provided that the above copyright notice appears in all copies and
   20  *    that both that copyright notice and this permission notice appear
   21  *    in supporting documentation, and that the name of The University
   22  *    of Michigan not be used in advertising or publicity pertaining to
   23  *    distribution of the software without specific, written prior
   24  *    permission. This software is supplied as is without expressed or
   25  *    implied warranties of any kind.
   26  *
   27  * This product includes software developed by the University of
   28  * California, Berkeley and its contributors.
   29  *
   30  * Solaris code is encumbered by the following:
   31  *
   32  *     Copyright (C) 1996 by Sun Microsystems Computer Co.
   33  *
   34  *     Permission to use, copy, modify, and distribute this software and
   35  *     its documentation for any purpose and without fee is hereby
   36  *     granted, provided that the above copyright notice appear in all
   37  *     copies and that both that copyright notice and this permission
   38  *     notice appear in supporting documentation.  This software is
   39  *     provided "as is" without express or implied warranty.
   40  *
   41  * Research Systems Unix Group
   42  * The University of Michigan
   43  * c/o Wesley Craig
   44  * 535 W. William Street
   45  * Ann Arbor, Michigan
   46  * +1-313-764-2278
   47  * netatalk@umich.edu
   48  */
   49 /*
   50  * None of the Solaris code mentioned is included in OpenBSD.
   51  * This code also relies heavily on previous effort in FreeBSD and NetBSD.
   52  */
   53 
   54 #ifndef _NETATALK_AARP_H_
   55 #define _NETATALK_AARP_H_
   56 
   57 /*
   58  * This structure is used for both phase 1 and 2. Under phase 1
   59  * the net is not filled in. It is in phase 2. In both cases, the
   60  * hardware address length is (for some unknown reason) 4. If
   61  * anyone at Apple could program their way out of paper bag, it
   62  * would be 1 and 3 respectively for phase 1 and 2.
   63  */
   64 union aapa {
   65     u_int8_t            ap_pa[4];
   66     struct ap_node {
   67         u_int8_t        an_zero;
   68         u_int8_t        an_net[2];
   69         u_int8_t        an_node;
   70     } ap_node;
   71 };
   72 
   73 struct ether_aarp {
   74     struct arphdr       eaa_hdr;
   75     u_int8_t            aarp_sha[ 6 ];
   76     union aapa          aarp_spu;
   77     u_int8_t            aarp_tha[ 6 ];
   78     union aapa          aarp_tpu;
   79 };
   80 #define aarp_hrd        eaa_hdr.ar_hrd
   81 #define aarp_pro        eaa_hdr.ar_pro
   82 #define aarp_hln        eaa_hdr.ar_hln
   83 #define aarp_pln        eaa_hdr.ar_pln
   84 #define aarp_op         eaa_hdr.ar_op
   85 #define aarp_spa        aarp_spu.ap_node.an_node
   86 #define aarp_tpa        aarp_tpu.ap_node.an_node
   87 #define aarp_spnet      aarp_spu.ap_node.an_net
   88 #define aarp_tpnet      aarp_tpu.ap_node.an_net
   89 #define aarp_spnode     aarp_spu.ap_node.an_node
   90 #define aarp_tpnode     aarp_tpu.ap_node.an_node
   91 
   92 struct aarptab {
   93     struct at_addr      aat_ataddr;
   94     u_int8_t            aat_enaddr[ 6 ];
   95     u_int8_t            aat_timer;
   96     u_int8_t            aat_flags;
   97     struct mbuf         *aat_hold;
   98 };
   99 
  100 #define AARPHRD_ETHER   0x0001
  101 
  102 #define AARPOP_REQUEST  0x01
  103 #define AARPOP_RESPONSE 0x02
  104 #define AARPOP_PROBE    0x03
  105 
  106 #endif /* _NETATALK_AARP_H_ */

/* [<][>][^][v][top][bottom][index][help] */