xref: /linux/include/uapi/linux/atalk.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells #ifndef _UAPI__LINUX_ATALK_H__
3607ca46eSDavid Howells #define _UAPI__LINUX_ATALK_H__
4607ca46eSDavid Howells 
5607ca46eSDavid Howells #include <linux/types.h>
6607ca46eSDavid Howells #include <asm/byteorder.h>
7607ca46eSDavid Howells #include <linux/socket.h>
8607ca46eSDavid Howells 
9607ca46eSDavid Howells /*
10607ca46eSDavid Howells  * AppleTalk networking structures
11607ca46eSDavid Howells  *
12607ca46eSDavid Howells  * The following are directly referenced from the University Of Michigan
13607ca46eSDavid Howells  * netatalk for compatibility reasons.
14607ca46eSDavid Howells  */
15607ca46eSDavid Howells #define ATPORT_FIRST	1
16607ca46eSDavid Howells #define ATPORT_RESERVED	128
17607ca46eSDavid Howells #define ATPORT_LAST	254		/* 254 is only legal on localtalk */
18607ca46eSDavid Howells #define ATADDR_ANYNET	(__u16)0
19607ca46eSDavid Howells #define ATADDR_ANYNODE	(__u8)0
20607ca46eSDavid Howells #define ATADDR_ANYPORT  (__u8)0
21607ca46eSDavid Howells #define ATADDR_BCAST	(__u8)255
22607ca46eSDavid Howells #define DDP_MAXSZ	587
23607ca46eSDavid Howells #define DDP_MAXHOPS     15		/* 4 bits of hop counter */
24607ca46eSDavid Howells 
25607ca46eSDavid Howells #define SIOCATALKDIFADDR       (SIOCPROTOPRIVATE + 0)
26607ca46eSDavid Howells 
27607ca46eSDavid Howells struct atalk_addr {
28607ca46eSDavid Howells 	__be16	s_net;
29607ca46eSDavid Howells 	__u8	s_node;
30607ca46eSDavid Howells };
31607ca46eSDavid Howells 
32607ca46eSDavid Howells struct sockaddr_at {
33607ca46eSDavid Howells 	__kernel_sa_family_t sat_family;
34607ca46eSDavid Howells 	__u8		  sat_port;
35607ca46eSDavid Howells 	struct atalk_addr sat_addr;
36607ca46eSDavid Howells 	char		  sat_zero[8];
37607ca46eSDavid Howells };
38607ca46eSDavid Howells 
39607ca46eSDavid Howells struct atalk_netrange {
40607ca46eSDavid Howells 	__u8	nr_phase;
41607ca46eSDavid Howells 	__be16	nr_firstnet;
42607ca46eSDavid Howells 	__be16	nr_lastnet;
43607ca46eSDavid Howells };
44607ca46eSDavid Howells 
45607ca46eSDavid Howells #endif /* _UAPI__LINUX_ATALK_H__ */
46