1139827Simp/*- 215885Sjulian * Copyright (c) 1990,1991 Regents of The University of Michigan. 315885Sjulian * All Rights Reserved. 455205Speter * 5139827Simp * Permission to use, copy, modify, and distribute this software and 6139827Simp * its documentation for any purpose and without fee is hereby granted, 7139827Simp * provided that the above copyright notice appears in all copies and 8139827Simp * that both that copyright notice and this permission notice appear 9139827Simp * in supporting documentation, and that the name of The University 10139827Simp * of Michigan not be used in advertising or publicity pertaining to 11139827Simp * distribution of the software without specific, written prior 12139827Simp * permission. This software is supplied as is without expressed or 13139827Simp * implied warranties of any kind. 14139827Simp * 15139827Simp * This product includes software developed by the University of 16139827Simp * California, Berkeley and its contributors. 17139827Simp * 18139827Simp * Research Systems Unix Group 19139827Simp * The University of Michigan 20139827Simp * c/o Wesley Craig 21139827Simp * 535 W. William Street 22139827Simp * Ann Arbor, Michigan 23139827Simp * +1-313-764-2278 24139827Simp * netatalk@umich.edu 25139827Simp * 2655205Speter * $FreeBSD$ 2715885Sjulian */ 2815885Sjulian 2915885Sjulian#ifndef _NETATALK_AARP_H_ 30165971Srwatson#define _NETATALK_AARP_H_ 31165971Srwatson 3215885Sjulian/* 3315885Sjulian * This structure is used for both phase 1 and 2. Under phase 1 3415885Sjulian * the net is not filled in. It is in phase 2. In both cases, the 3515885Sjulian * hardware address length is (for some unknown reason) 4. If 3615885Sjulian * anyone at Apple could program their way out of paper bag, it 3715885Sjulian * would be 1 and 3 respectively for phase 1 and 2. 3815885Sjulian */ 3915885Sjulianunion aapa { 40165971Srwatson u_char ap_pa[4]; 41165971Srwatson struct ap_node { 42165971Srwatson u_char an_zero; 43165971Srwatson u_char an_net[2]; 44165971Srwatson u_char an_node; 45171078Srwatson } __packed ap_node; 4615885Sjulian}; 4715885Sjulian 4815885Sjulianstruct ether_aarp { 49165971Srwatson struct arphdr eaa_hdr; 50165971Srwatson u_char aarp_sha[6]; 51165971Srwatson union aapa aarp_spu; 52165971Srwatson u_char aarp_tha[6]; 53165971Srwatson union aapa aarp_tpu; 54171078Srwatson} __packed; 55171078Srwatson 56165971Srwatson#define aarp_hrd eaa_hdr.ar_hrd 57165971Srwatson#define aarp_pro eaa_hdr.ar_pro 58165971Srwatson#define aarp_hln eaa_hdr.ar_hln 59165971Srwatson#define aarp_pln eaa_hdr.ar_pln 60165971Srwatson#define aarp_op eaa_hdr.ar_op 61165971Srwatson#define aarp_spa aarp_spu.ap_node.an_node 62165971Srwatson#define aarp_tpa aarp_tpu.ap_node.an_node 63165971Srwatson#define aarp_spnet aarp_spu.ap_node.an_net 64165971Srwatson#define aarp_tpnet aarp_tpu.ap_node.an_net 65165971Srwatson#define aarp_spnode aarp_spu.ap_node.an_node 66165971Srwatson#define aarp_tpnode aarp_tpu.ap_node.an_node 6715885Sjulian 6815885Sjulianstruct aarptab { 69165971Srwatson struct at_addr aat_ataddr; 70165971Srwatson u_char aat_enaddr[6]; 71165971Srwatson u_char aat_timer; 72165971Srwatson u_char aat_flags; 73165971Srwatson struct mbuf *aat_hold; 7415885Sjulian}; 7515885Sjulian 76165971Srwatson#define AARPHRD_ETHER 0x0001 7715885Sjulian 78165971Srwatson#define AARPOP_REQUEST 0x01 79165971Srwatson#define AARPOP_RESPONSE 0x02 80165971Srwatson#define AARPOP_PROBE 0x03 8115885Sjulian 8255205Speter#ifdef _KERNEL 8315885Sjulianstruct aarptab *aarptnew(struct at_addr *); 8415885Sjulian#endif 8517254Sjulian 8615885Sjulian#endif /* _NETATALK_AARP_H_ */ 87