2005-01-07 02:35:34 +00:00
|
|
|
/*-
|
1996-05-24 01:35:45 +00:00
|
|
|
* Copyright (c) 1990,1991 Regents of The University of Michigan.
|
|
|
|
* All Rights Reserved.
|
1999-12-29 04:46:21 +00:00
|
|
|
*
|
2005-01-07 02:35:34 +00:00
|
|
|
* Permission to use, copy, modify, and distribute this software and
|
|
|
|
* its documentation for any purpose and without fee is hereby granted,
|
|
|
|
* provided that the above copyright notice appears in all copies and
|
|
|
|
* that both that copyright notice and this permission notice appear
|
|
|
|
* in supporting documentation, and that the name of The University
|
|
|
|
* of Michigan not be used in advertising or publicity pertaining to
|
|
|
|
* distribution of the software without specific, written prior
|
|
|
|
* permission. This software is supplied as is without expressed or
|
|
|
|
* implied warranties of any kind.
|
|
|
|
*
|
|
|
|
* This product includes software developed by the University of
|
|
|
|
* California, Berkeley and its contributors.
|
|
|
|
*
|
|
|
|
* Research Systems Unix Group
|
|
|
|
* The University of Michigan
|
|
|
|
* c/o Wesley Craig
|
|
|
|
* 535 W. William Street
|
|
|
|
* Ann Arbor, Michigan
|
|
|
|
* +1-313-764-2278
|
|
|
|
* netatalk@umich.edu
|
|
|
|
*
|
1999-12-29 04:46:21 +00:00
|
|
|
* $FreeBSD$
|
1996-05-24 01:35:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETATALK_AARP_H_
|
2007-01-12 12:25:12 +00:00
|
|
|
#define _NETATALK_AARP_H_
|
|
|
|
|
1996-05-24 01:35:45 +00:00
|
|
|
/*
|
|
|
|
* This structure is used for both phase 1 and 2. Under phase 1
|
|
|
|
* the net is not filled in. It is in phase 2. In both cases, the
|
|
|
|
* hardware address length is (for some unknown reason) 4. If
|
|
|
|
* anyone at Apple could program their way out of paper bag, it
|
|
|
|
* would be 1 and 3 respectively for phase 1 and 2.
|
|
|
|
*/
|
|
|
|
union aapa {
|
2007-01-12 12:25:12 +00:00
|
|
|
u_char ap_pa[4];
|
|
|
|
struct ap_node {
|
|
|
|
u_char an_zero;
|
|
|
|
u_char an_net[2];
|
|
|
|
u_char an_node;
|
2007-06-28 12:54:58 +00:00
|
|
|
} __packed ap_node;
|
1996-05-24 01:35:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ether_aarp {
|
2007-01-12 12:25:12 +00:00
|
|
|
struct arphdr eaa_hdr;
|
|
|
|
u_char aarp_sha[6];
|
|
|
|
union aapa aarp_spu;
|
|
|
|
u_char aarp_tha[6];
|
|
|
|
union aapa aarp_tpu;
|
2007-06-28 12:54:58 +00:00
|
|
|
} __packed;
|
|
|
|
|
2007-01-12 12:25:12 +00:00
|
|
|
#define aarp_hrd eaa_hdr.ar_hrd
|
|
|
|
#define aarp_pro eaa_hdr.ar_pro
|
|
|
|
#define aarp_hln eaa_hdr.ar_hln
|
|
|
|
#define aarp_pln eaa_hdr.ar_pln
|
|
|
|
#define aarp_op eaa_hdr.ar_op
|
|
|
|
#define aarp_spa aarp_spu.ap_node.an_node
|
|
|
|
#define aarp_tpa aarp_tpu.ap_node.an_node
|
|
|
|
#define aarp_spnet aarp_spu.ap_node.an_net
|
|
|
|
#define aarp_tpnet aarp_tpu.ap_node.an_net
|
|
|
|
#define aarp_spnode aarp_spu.ap_node.an_node
|
|
|
|
#define aarp_tpnode aarp_tpu.ap_node.an_node
|
1996-05-24 01:35:45 +00:00
|
|
|
|
|
|
|
struct aarptab {
|
2007-01-12 12:25:12 +00:00
|
|
|
struct at_addr aat_ataddr;
|
|
|
|
u_char aat_enaddr[6];
|
|
|
|
u_char aat_timer;
|
|
|
|
u_char aat_flags;
|
|
|
|
struct mbuf *aat_hold;
|
1996-05-24 01:35:45 +00:00
|
|
|
};
|
|
|
|
|
2007-01-12 12:25:12 +00:00
|
|
|
#define AARPHRD_ETHER 0x0001
|
1996-05-24 01:35:45 +00:00
|
|
|
|
2007-01-12 12:25:12 +00:00
|
|
|
#define AARPOP_REQUEST 0x01
|
|
|
|
#define AARPOP_RESPONSE 0x02
|
|
|
|
#define AARPOP_PROBE 0x03
|
1996-05-24 01:35:45 +00:00
|
|
|
|
1999-12-29 04:46:21 +00:00
|
|
|
#ifdef _KERNEL
|
2013-04-26 12:50:32 +00:00
|
|
|
struct aarptab *aarptnew(const struct at_addr *);
|
1996-05-24 01:35:45 +00:00
|
|
|
#endif
|
1996-07-23 01:18:47 +00:00
|
|
|
|
1996-05-24 01:35:45 +00:00
|
|
|
#endif /* _NETATALK_AARP_H_ */
|