]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/Include/netatalk/at.h
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / StdLib / Include / netatalk / at.h
CommitLineData
d7ce7006 1/*\r
2 * Copyright (c) 1990,1991 Regents of The University of Michigan.\r
3 * All Rights Reserved.\r
4 *\r
5 * Permission to use, copy, modify, and distribute this software and\r
6 * its documentation for any purpose and without fee is hereby granted,\r
7 * provided that the above copyright notice appears in all copies and\r
8 * that both that copyright notice and this permission notice appear\r
9 * in supporting documentation, and that the name of The University\r
10 * of Michigan not be used in advertising or publicity pertaining to\r
11 * distribution of the software without specific, written prior\r
12 * permission. This software is supplied as is without expressed or\r
13 * implied warranties of any kind.\r
14 *\r
15 * Research Systems Unix Group\r
16 * The University of Michigan\r
17 * c/o Mike Clark\r
18 * 535 W. William Street\r
19 * Ann Arbor, Michigan\r
20 * +1-313-763-0525\r
21 * netatalk@itd.umich.edu\r
22 */\r
23\r
24#ifndef __AT_HEADER__\r
25#define __AT_HEADER__\r
26/*\r
27 * Supported protocols\r
28 */\r
29#define ATPROTO_DDP 0\r
30#define ATPROTO_AARP 254\r
31\r
32/*\r
33 * Ethernet types, for DIX.\r
34 * These should really be in some global header file, but we can't\r
35 * count on them being there, and it's annoying to patch system files.\r
36 */\r
37#define ETHERTYPE_AT 0x809B /* AppleTalk protocol */\r
38#define ETHERTYPE_AARP 0x80F3 /* AppleTalk ARP */\r
39\r
40#define DDP_MAXSZ 587\r
41\r
42/*\r
43 * If ATPORT_FIRST <= Port < ATPORT_RESERVED,\r
44 * Port was created by a privileged process.\r
45 * If ATPORT_RESERVED <= Port < ATPORT_LAST,\r
46 * Port was not necessarily created by a\r
47 * privileged process.\r
48 */\r
49#define ATPORT_FIRST 1\r
50#define ATPORT_RESERVED 128\r
51#define ATPORT_LAST 255\r
52\r
53/*\r
54 * AppleTalk address.\r
55 */\r
56struct at_addr {\r
57 u_short s_net;\r
58 u_char s_node;\r
59};\r
60\r
61#define ATADDR_ANYNET (u_short)0x0000\r
62#define ATADDR_ANYNODE (u_char)0x00\r
63#define ATADDR_ANYPORT (u_char)0x00\r
64#define ATADDR_BCAST (u_char)0xff /* There is no BCAST for NET */\r
65\r
66struct netrange {\r
67 u_char nr_phase;\r
68 u_short nr_firstnet;\r
69 u_short nr_lastnet;\r
70};\r
71\r
72/*\r
73 * Socket address, AppleTalk style. We keep magic information in the \r
74 * zero bytes. There are three types, NONE, CONFIG which has the phase\r
75 * and a net range, and IFACE which has the network address of an\r
76 * interface. IFACE may be filled in by the client, and is filled in\r
77 * by the kernel.\r
78 */\r
79struct sockaddr_at {\r
80 u_char sat_len;\r
81 u_char sat_family;\r
82 u_char sat_port;\r
83 struct at_addr sat_addr;\r
84 union {\r
85 struct netrange r_netrange;\r
86 char r_zero[ 8 ]; /* Hide a struct netrange in here */\r
87 } sat_range;\r
88};\r
89\r
90#define sat_zero sat_range.r_zero\r
91\r
92#endif /* !__AT_HEADER__ */\r