1 /* 2 * Copyright (c) 1988 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)if_llc.h 7.1 (Berkeley) 09/04/89 18 */ 19 20 /* 21 * IEEE 802.2 Link Level Control headers, for use in conjunction with 22 * 802.{3,4,5} media access control methods. 23 * 24 * Headers here do not use bit fields due to shortcommings in many 25 * compilers. 26 */ 27 28 struct llc { 29 u_char llc_dsap; 30 u_char llc_ssap; 31 union { 32 struct { 33 u_char control; 34 u_char format_id; 35 u_char class; 36 u_char window_x2; 37 } type_u; 38 struct { 39 u_char num_snd_x2; 40 u_char num_rcv_x2; 41 } type_i; 42 struct { 43 u_char control; 44 u_char num_rcv_x2; 45 } type_s; 46 struct { 47 u_char control; 48 u_char org_code[3]; 49 u_short ether_type; 50 } type_snap; 51 } llc_un; 52 }; 53 #define llc_control llc_un.type_u.control 54 #define llc_fid llc_un.type_u.format_id 55 #define llc_class llc_un.type_u.class 56 #define llc_window llc_un.type_u.window_x2 57 58 #define LLC_UI 0x3 59 #define LLC_UI_P 0x13 60 #define LLC_XID 0xaf 61 #define LLC_XID_P 0xbf 62 #define LLC_TEST 0xe3 63 #define LLC_TEST_P 0xf3 64 65 #define LLC_ISO_LSAP 0xfe 66 #define LLC_SNAP_LSAP 0xaa 67