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