]> git.saurik.com Git - apple/xnu.git/blame - bsd/netat/at_pat.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / bsd / netat / at_pat.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
37839358
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 *
37839358
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,
37839358
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 * Copyright (c) 1988, 1989 Apple Computer, Inc.
25 */
26
27#ifndef _NETAT_AT_PAT_H_
28#define _NETAT_AT_PAT_H_
9bccf70c 29#include <sys/appleapiopts.h>
1c79356b 30
91447636
A
31#ifdef __APPLE_API_OBSOLETE
32
1c79356b
A
33/* This is header for the PAT module. This contains a table of pointers that
34 * should get initialized with the BNET stuff and the ethernet driver. The
35 * number of interfaces supported should be communicated. Should include
36 * mbuf.h, if.h, socket.h
37 *
38 * Author: R. C. Venkatraman
39 * Date : 2/29/88
40 */
41
42typedef struct {
43 unsigned char dst[6];
44 unsigned char src[6];
45 unsigned short len;
46} enet_header_t;
47
48typedef struct {
49 unsigned char dst_sap;
50 unsigned char src_sap;
51 unsigned char control;
52 unsigned char protocol[5];
53} llc_header_t;
54
55#define ENET_LLC_SIZE (sizeof(enet_header_t)+sizeof(llc_header_t))
56#define SNAP_UI 0x03 /* bits 11000000 reversed!! */
57#define SNAP_AT_SAP 0xaa
58#define SNAP_PROTO_AT {0x08, 0x00, 0x07, 0x80, 0x9B}
59#define SNAP_PROTO_AARP {0x00, 0x00, 0x00, 0x80, 0xF3}
60#define SNAP_HDR_AT {SNAP_AT_SAP, SNAP_AT_SAP, SNAP_UI, SNAP_PROTO_AT}
61#define SNAP_HDR_AARP {SNAP_AT_SAP, SNAP_AT_SAP, SNAP_UI, SNAP_PROTO_AARP}
62
63#define LLC_PROTO_EQUAL(a1, a2) \
64 ((*((unsigned long *)(a1)) == *((unsigned long *)(a2))) && \
65 (a1[4] == a2[4]) \
66 )
91447636 67#endif /* __APPLE_API_OBSOLETE */
1c79356b 68#endif /* _NETAT_AT_PAT_H_ */