]>
git.saurik.com Git - apple/network_cmds.git/blob - tcpdump.tproj/llc.h
4432514d57d4dd995a72f7e0254a6d450385fc5e
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 * Copyright (c) 1993, 1994
26 * The Regents of the University of California. All rights reserved.
28 * Redistribution and use in source and binary forms, with or without
29 * modification, are permitted provided that: (1) source code distributions
30 * retain the above copyright notice and this paragraph in its entirety, (2)
31 * distributions including binary code include the above copyright notice and
32 * this paragraph in its entirety in the documentation or other materials
33 * provided with the distribution, and (3) all advertising materials mentioning
34 * features or use of this software display the following acknowledgement:
35 * ``This product includes software developed by the University of California,
36 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
37 * the University nor the names of its contributors may be used to endorse
38 * or promote products derived from this software without specific prior
40 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
41 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
42 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
44 * @(#) $Header: /cvs/Darwin/Commands/NeXT/network_cmds/tcpdump.tproj/llc.h,v 1.1.1.1 1999/05/02 03:58:32 wsanchez Exp $ (LBL)
48 * This stuff should come from a system header file, but there's no
49 * obviously portable way to do that and it's not really going
50 * to change from system to system.
54 * A somewhat abstracted view of the LLC header
69 u_char snap_orgcode
[3];
70 u_char snap_ethertype
[2];
75 #define llcui ctl.snap.snap_ui
76 #define llcpi ctl.snap.snap_pi
77 #define orgcode ctl.snap_ether.snap_orgcode
78 #define ethertype ctl.snap_ether.snap_ethertype
79 #define llcis ctl.is_ctl
80 #define llcu ctl.u_ctl
86 #define LLC_U_POLL 0x10
87 #define LLC_IS_POLL 0x0001
88 #define LLC_XID_FI 0x81
90 #define LLC_U_CMD(u) ((u) & 0xef)
95 #define LLC_SABME 0x6f
100 #define LLC_S_CMD(is) (((is) >> 10) & 0x03)
101 #define LLC_RR 0x0100
102 #define LLC_RNR 0x0500
103 #define LLC_REJ 0x0900
105 #define LLC_IS_NR(is) (((is) >> 9) & 0x7f)
106 #define LLC_I_NS(is) (((is) >> 1) & 0x7f)
109 #define LLCSAP_NULL 0x00
111 #ifndef LLCSAP_GLOBAL
112 #define LLCSAP_GLOBAL 0xff
115 #define LLCSAP_8021B_I 0x02
118 #define LLCSAP_8021B_G 0x03
121 #define LLCSAP_IP 0x06
123 #ifndef LLCSAP_PROWAYNM
124 #define LLCSAP_PROWAYNM 0x0e
127 #define LLCSAP_8021D 0x42
130 #define LLCSAP_RS511 0x4e
132 #ifndef LLCSAP_ISO8208
133 #define LLCSAP_ISO8208 0x7e
135 #ifndef LLCSAP_PROWAY
136 #define LLCSAP_PROWAY 0x8e
139 #define LLCSAP_SNAP 0xaa
142 #define LLCSAP_ISONS 0xfe