Home | History | Annotate | Line # | Download | only in dist
      1 /*	$NetBSD: llc.h,v 1.2 2014/11/19 19:33:30 christos Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1993, 1994, 1997
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that: (1) source code distributions
      9  * retain the above copyright notice and this paragraph in its entirety, (2)
     10  * distributions including binary code include the above copyright notice and
     11  * this paragraph in its entirety in the documentation or other materials
     12  * provided with the distribution, and (3) all advertising materials mentioning
     13  * features or use of this software display the following acknowledgement:
     14  * ``This product includes software developed by the University of California,
     15  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
     16  * the University nor the names of its contributors may be used to endorse
     17  * or promote products derived from this software without specific prior
     18  * written permission.
     19  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
     20  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
     21  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     22  */
     23 
     24 /*
     25  * Definitions for information in the LLC header.
     26  */
     27 
     28 #define	LLC_U_FMT	3
     29 #define	LLC_GSAP	1
     30 #define	LLC_IG	        1 /* Individual / Group */
     31 #define LLC_S_FMT	1
     32 
     33 #define	LLC_U_POLL	0x10
     34 #define	LLC_IS_POLL	0x0100
     35 #define	LLC_XID_FI	0x81
     36 
     37 #define LLC_U_CMD_MASK	0xef
     38 #define	LLC_UI		0x03
     39 #define	LLC_UA		0x63
     40 #define	LLC_DISC	0x43
     41 #define	LLC_DM		0x0f
     42 #define	LLC_SABME	0x6f
     43 #define	LLC_TEST	0xe3
     44 #define	LLC_XID		0xaf
     45 #define	LLC_FRMR	0x87
     46 
     47 #define LLC_S_CMD_MASK	0x0f
     48 #define	LLC_RR		0x0001
     49 #define	LLC_RNR		0x0005
     50 #define	LLC_REJ		0x0009
     51 
     52 #define LLC_IS_NR(is)	(((is) >> 9) & 0x7f)
     53 #define LLC_I_NS(is)	(((is) >> 1) & 0x7f)
     54 
     55 /*
     56  * 802.2 LLC SAP values.
     57  */
     58 
     59 #ifndef LLCSAP_NULL
     60 #define	LLCSAP_NULL		0x00
     61 #endif
     62 #ifndef LLCSAP_GLOBAL
     63 #define	LLCSAP_GLOBAL		0xff
     64 #endif
     65 #ifndef LLCSAP_8021B_I
     66 #define	LLCSAP_8021B_I		0x02
     67 #endif
     68 #ifndef LLCSAP_8021B_G
     69 #define	LLCSAP_8021B_G		0x03
     70 #endif
     71 #ifndef LLCSAP_IP
     72 #define	LLCSAP_IP		0x06
     73 #endif
     74 #ifndef LLCSAP_PROWAYNM
     75 #define	LLCSAP_PROWAYNM		0x0e
     76 #endif
     77 #ifndef LLCSAP_8021D
     78 #define	LLCSAP_8021D		0x42
     79 #endif
     80 #ifndef LLCSAP_RS511
     81 #define	LLCSAP_RS511		0x4e
     82 #endif
     83 #ifndef LLCSAP_ISO8208
     84 #define	LLCSAP_ISO8208		0x7e
     85 #endif
     86 #ifndef LLCSAP_PROWAY
     87 #define	LLCSAP_PROWAY		0x8e
     88 #endif
     89 #ifndef LLCSAP_SNAP
     90 #define	LLCSAP_SNAP		0xaa
     91 #endif
     92 #ifndef LLCSAP_IPX
     93 #define LLCSAP_IPX		0xe0
     94 #endif
     95 #ifndef LLCSAP_NETBEUI
     96 #define LLCSAP_NETBEUI		0xf0
     97 #endif
     98 #ifndef LLCSAP_ISONS
     99 #define	LLCSAP_ISONS		0xfe
    100 #endif
    101