1 /* $NetBSD: at.h,v 1.8 2014/12/02 19:33:44 christos Exp $ */
4 * Copyright (c) 1990,1991 Regents of The University of Michigan.
7 * Permission to use, copy, modify, and distribute this software and
8 * its documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appears in all copies and
10 * that both that copyright notice and this permission notice appear
11 * in supporting documentation, and that the name of The University
12 * of Michigan not be used in advertising or publicity pertaining to
13 * distribution of the software without specific, written prior
14 * permission. This software is supplied as is without expressed or
15 * implied warranties of any kind.
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
20 * Research Systems Unix Group
21 * The University of Michigan
23 * 535 W. William Street
29 #ifndef _NETATALK_AT_H_
30 #define _NETATALK_AT_H_
35 typedef __sa_family_t sa_family_t
;
36 #define sa_family_t __sa_family_t
43 #define ATPROTO_AARP 254
48 * If ATPORT_FIRST <= Port < ATPORT_RESERVED,
49 * Port was created by a privileged process.
50 * If ATPORT_RESERVED <= Port < ATPORT_LAST,
51 * Port was not necessarily created by a
54 #define ATPORT_FIRST 1
55 #define ATPORT_RESERVED 128
56 #define ATPORT_LAST 255
66 #define ATADDR_ANYNET (uint16_t)0x0000
67 #define ATADDR_ANYNODE (uint8_t)0x00
68 #define ATADDR_ANYPORT (uint8_t)0x00
69 #define ATADDR_BCAST (uint8_t)0xff /* There is no BCAST for NET */
78 * Socket address, AppleTalk style. We keep magic information in the
79 * zero bytes. There are three types, NONE, CONFIG which has the phase
80 * and a net range, and IFACE which has the network address of an
81 * interface. IFACE may be filled in by the client, and is filled in
86 sa_family_t sat_family
;
88 struct at_addr sat_addr
;
90 struct netrange r_netrange
;
91 char r_zero
[8]; /* Hide a struct netrange in
96 #define sat_zero sat_range.r_zero
99 #include <sys/protosw.h>
101 extern struct domain atalkdomain
;
102 extern const struct protosw atalksw
[];
105 #if defined(_KERNEL) || defined(_TEST)
106 #define ATALK_ADDRSTRLEN 10
108 extern struct domain atalkdomain
;
109 int at_print(char *, size_t, const struct at_addr
*);
110 int sat_print(char *, size_t, const void *);
113 #endif /* !_NETATALK_AT_H_ */