2 * Appletalk networking structures
4 * The following are directly referenced from the University Of Michigan
5 * netatalk for compatibility reasons.
8 #ifndef __LINUX_ATALK_H__
9 #define __LINUX_ATALK_H__
11 #define ATPORT_FIRST 1
12 #define ATPORT_RESERVED 128
13 #define ATPORT_LAST 255
14 #define ATADDR_ANYNET (__u16)0
15 #define ATADDR_ANYNODE (__u8)0
16 #define ATADDR_ANYPORT (__u8)0
17 #define ATADDR_BCAST (__u8)255
28 sa_family_t sat_family
;
30 struct at_addr sat_addr
;
44 struct at_addr target
;
45 struct at_addr gateway
;
47 struct atalk_route
*next
;
53 struct at_addr address
; /* Our address */
54 int status
; /* What are we doing ?? */
55 #define ATIF_PROBE 1 /* Probing for an address */
56 #define ATIF_PROBE_FAIL 2 /* Probe collided */
57 struct netrange nets
; /* Associated direct netrange */
58 struct atalk_iface
*next
;
63 unsigned short dest_net
;
64 unsigned short src_net
;
65 unsigned char dest_node
;
66 unsigned char src_node
;
67 unsigned char dest_port
;
68 unsigned char src_port
;
71 #define DDP_MAXHOPS 15 /* 4 bits of hop counter */
75 #include <asm/byteorder.h>
79 #ifdef __LITTLE_ENDIAN_BITFIELD
80 __u16 deh_len
:10, deh_hops
:4, deh_pad
:2;
82 __u16 deh_pad
:2, deh_hops
:4, deh_len
:10;
91 /* And netatalk apps expect to stick the type in themselves */
100 #ifdef __LITTLE_ENDIAN_BITFIELD
101 __u16 dsh_len
:10, dsh_pad
:6;
103 __u16 dsh_pad
:6, dsh_len
:10;
107 /* And netatalk apps expect to stick the type in themselves */
110 /* Appletalk AARP headers */
115 #define AARP_HW_TYPE_ETHERNET 1
116 #define AARP_HW_TYPE_TOKENRING 2
120 #define AARP_PA_ALEN 4
122 #define AARP_REQUEST 1
125 __u8 hw_src
[ETH_ALEN
] __attribute__ ((packed
));
126 __u8 pa_src_zero
__attribute__ ((packed
));
127 __u16 pa_src_net
__attribute__ ((packed
));
128 __u8 pa_src_node
__attribute__ ((packed
));
129 __u8 hw_dst
[ETH_ALEN
] __attribute__ ((packed
));
130 __u8 pa_dst_zero
__attribute__ ((packed
));
131 __u16 pa_dst_net
__attribute__ ((packed
));
132 __u8 pa_dst_node
__attribute__ ((packed
));
135 #define AARP_EXPIRY_TIME (5*60*HZ) /* Not specified - how long till we drop a resolved entry */
136 #define AARP_HASH_SIZE 16 /* Size of hash table */
137 #define AARP_TICK_TIME (HZ/5) /* Fast retransmission timer when resolving */
138 #define AARP_RETRANSMIT_LIMIT 10 /* Send 10 requests then give up (2 seconds) */
139 #define AARP_RESOLVE_TIME (10*HZ) /* Some value bigger than total retransmit time + a bit for last reply to appear and to stop continual requests */
141 extern struct datalink_proto
*ddp_dl
, *aarp_dl
;
142 extern void aarp_proto_init(void);
143 /* Inter module exports */
146 * Give a device find its atif control structure
149 extern __inline__
struct atalk_iface
*atalk_find_dev(struct device
*dev
)
151 return dev
->atalk_ptr
;
154 extern struct at_addr
*atalk_find_dev_addr(struct device
*dev
);
155 extern int aarp_send_ddp(struct device
*dev
,struct sk_buff
*skb
, struct at_addr
*sa
, void *hwaddr
);
156 extern void aarp_send_probe(struct device
*dev
, struct at_addr
*addr
);
158 extern void aarp_cleanup_module(void);