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