]> arthur.barton.de Git - netatalk.git/blob - sys/netatalk/aarp.h
Initial revision
[netatalk.git] / sys / netatalk / aarp.h
1 /*
2  * Copyright (c) 1990,1991 Regents of The University of Michigan.
3  * All Rights Reserved.
4  */
5
6 /*
7  * This structure is used for both phase 1 and 2. Under phase 1
8  * the net is not filled in. It is in phase 2. In both cases, the
9  * hardware address length is (for some unknown reason) 4. If
10  * anyone at Apple could program their way out of paper bag, it
11  * would be 1 and 3 respectively for phase 1 and 2.
12  */
13 union aapa {
14     u_char              ap_pa[4];
15     struct ap_node {
16         u_char          an_zero;
17         u_char          an_net[2];
18         u_char          an_node;
19     } ap_node;
20 };
21
22 struct ether_aarp {
23     struct arphdr       eaa_hdr;
24     u_char              aarp_sha[6];
25     union aapa          aarp_spu;
26     u_char              aarp_tha[6];
27     union aapa          aarp_tpu;
28 };
29 #define aarp_hrd        eaa_hdr.ar_hrd
30 #define aarp_pro        eaa_hdr.ar_pro
31 #define aarp_hln        eaa_hdr.ar_hln
32 #define aarp_pln        eaa_hdr.ar_pln
33 #define aarp_op         eaa_hdr.ar_op
34 #define aarp_spa        aarp_spu.ap_node.an_node
35 #define aarp_tpa        aarp_tpu.ap_node.an_node
36 #define aarp_spnet      aarp_spu.ap_node.an_net
37 #define aarp_tpnet      aarp_tpu.ap_node.an_net
38 #define aarp_spnode     aarp_spu.ap_node.an_node
39 #define aarp_tpnode     aarp_tpu.ap_node.an_node
40
41 struct aarptab {
42     struct at_addr      aat_ataddr;
43     u_char              aat_enaddr[ 6 ];
44     u_char              aat_timer;
45     u_char              aat_flags;
46     struct mbuf         *aat_hold;
47 };
48
49 #define AARPHRD_ETHER   0x0001
50
51 #define AARPOP_REQUEST  0x01
52 #define AARPOP_RESPONSE 0x02
53 #define AARPOP_PROBE    0x03
54
55 #ifdef KERNEL
56 struct aarptab          *aarptnew();
57 int                     aarpprobe();
58 #endif