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