]> git.saurik.com Git - apple/xnu.git/blob - bsd/netat/zip.h
xnu-344.49.tar.gz
[apple/xnu.git] / bsd / netat / zip.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 *
27 * ORIGINS: 82
28 *
29 * (C) COPYRIGHT Apple Computer, Inc. 1992-1996
30 * All Rights Reserved
31 *
32 */
33
34 #ifndef _NETAT_ZIP_H_
35 #define _NETAT_ZIP_H_
36 #include <sys/appleapiopts.h>
37
38 /* Definitions for ZIP, per AppleTalk Zone Information Protocol
39 * documentation from `Inside AppleTalk', July 14, 1986.
40 */
41
42 /* ZIP packet types */
43
44 #define ZIP_QUERY 1 /* ZIP zone query packet */
45 #define ZIP_REPLY 2 /* ZIP query reply packet */
46 #define ZIP_TAKEDOWN 3 /* ZIP takedown packet */
47 #define ZIP_BRINGUP 4 /* ZIP bringup packet */
48 #define ZIP_GETNETINFO 5 /* ZIP DDP get net info packet */
49 #define ZIP_NETINFO_REPLY 6 /* ZIP GetNetInfo Reply */
50 #define ZIP_NOTIFY 7 /* Notification of zone name change */
51 #define ZIP_EXTENDED_REPLY 8 /* ZIP extended query reply packet */
52
53 #define ZIP_GETMYZONE 7 /* ZIP ATP get my zone packet */
54 #define ZIP_GETZONELIST 8 /* ZIP ATP get zone list packet */
55 #define ZIP_GETLOCALZONES 9 /* ZIP ATP get cable list packet*/
56
57 #define ZIP_HDR_SIZE 2
58 #define ZIP_DATA_SIZE 584
59
60
61 #define ZIP_MAX_ZONE_LENGTH 32 /* Max length for a Zone Name */
62
63 typedef struct at_zip {
64 u_char command;
65 u_char flags;
66 char data[ZIP_DATA_SIZE];
67 } at_zip_t;
68
69 #define ZIP_ZIP(c) ((at_zip_t *)(&((at_ddp_t *)(c))->data[0]))
70
71 typedef struct {
72 char command;
73 char flags;
74 at_net cable_range_start;
75 at_net cable_range_end;
76 u_char data[1];
77 } at_x_zip_t;
78
79 #define ZIP_X_HDR_SIZE 6
80
81 /* flags for ZipNetInfoReply packet */
82 #define ZIP_ZONENAME_INVALID 0x80
83 #define ZIP_USE_BROADCAST 0x40
84 #define ZIP_ONE_ZONE 0x20
85
86 #define ZIP_NETINFO_RETRIES 3
87 #define ZIP_TIMER_INT HZ /* HZ defined in param.h */
88
89 /* ZIP control codes */
90 #define ZIP_ONLINE 1
91 #define ZIP_LATE_ROUTER 2
92 #define ZIP_NO_ROUTER 3
93
94 #define ZIP_RE_AARP -1
95
96 #endif /* _NETAT_ZIP_H_ */