]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
ff6e181a 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. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
1c79356b | 12 | * |
ff6e181a A |
13 | * The Original Code and all software distributed under the License are |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
ff6e181a A |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
1c79356b A |
20 | * |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | ||
24 | /* | |
25 | * Copyright (c) 1988, 1989 Apple Computer, Inc. | |
26 | */ | |
27 | ||
28 | #ifndef _NETAT_AT_PAT_H_ | |
29 | #define _NETAT_AT_PAT_H_ | |
9bccf70c | 30 | #include <sys/appleapiopts.h> |
1c79356b | 31 | |
91447636 A |
32 | #ifdef __APPLE_API_OBSOLETE |
33 | ||
1c79356b A |
34 | /* This is header for the PAT module. This contains a table of pointers that |
35 | * should get initialized with the BNET stuff and the ethernet driver. The | |
36 | * number of interfaces supported should be communicated. Should include | |
37 | * mbuf.h, if.h, socket.h | |
38 | * | |
39 | * Author: R. C. Venkatraman | |
40 | * Date : 2/29/88 | |
41 | */ | |
42 | ||
43 | typedef struct { | |
44 | unsigned char dst[6]; | |
45 | unsigned char src[6]; | |
46 | unsigned short len; | |
47 | } enet_header_t; | |
48 | ||
49 | typedef struct { | |
50 | unsigned char dst_sap; | |
51 | unsigned char src_sap; | |
52 | unsigned char control; | |
53 | unsigned char protocol[5]; | |
54 | } llc_header_t; | |
55 | ||
56 | #define ENET_LLC_SIZE (sizeof(enet_header_t)+sizeof(llc_header_t)) | |
57 | #define SNAP_UI 0x03 /* bits 11000000 reversed!! */ | |
58 | #define SNAP_AT_SAP 0xaa | |
59 | #define SNAP_PROTO_AT {0x08, 0x00, 0x07, 0x80, 0x9B} | |
60 | #define SNAP_PROTO_AARP {0x00, 0x00, 0x00, 0x80, 0xF3} | |
61 | #define SNAP_HDR_AT {SNAP_AT_SAP, SNAP_AT_SAP, SNAP_UI, SNAP_PROTO_AT} | |
62 | #define SNAP_HDR_AARP {SNAP_AT_SAP, SNAP_AT_SAP, SNAP_UI, SNAP_PROTO_AARP} | |
63 | ||
64 | #define LLC_PROTO_EQUAL(a1, a2) \ | |
65 | ((*((unsigned long *)(a1)) == *((unsigned long *)(a2))) && \ | |
66 | (a1[4] == a2[4]) \ | |
67 | ) | |
91447636 | 68 | #endif /* __APPLE_API_OBSOLETE */ |
1c79356b | 69 | #endif /* _NETAT_AT_PAT_H_ */ |