Remove !_KERNEL parts.
[dragonfly.git] / sys / netproto / atm / atm_sap.h
1 /*
2  *
3  * ===================================
4  * HARP  |  Host ATM Research Platform
5  * ===================================
6  *
7  *
8  * This Host ATM Research Platform ("HARP") file (the "Software") is
9  * made available by Network Computing Services, Inc. ("NetworkCS")
10  * "AS IS".  NetworkCS does not provide maintenance, improvements or
11  * support of any kind.
12  *
13  * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14  * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15  * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16  * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17  * In no event shall NetworkCS be responsible for any damages, including
18  * but not limited to consequential damages, arising from or relating to
19  * any use of the Software or related support.
20  *
21  * Copyright 1994-1998 Network Computing Services, Inc.
22  *
23  * Copies of this Software may be made, however, the above copyright
24  * notice must be reproduced on all copies.
25  *
26  *      @(#) $FreeBSD: src/sys/netatm/atm_sap.h,v 1.2 1999/08/28 00:48:37 peter Exp $
27  *      @(#) $DragonFly: src/sys/netproto/atm/atm_sap.h,v 1.2 2003/06/17 04:28:49 dillon Exp $
28  *
29  */
30
31 /*
32  * Core ATM Services
33  * -----------------
34  *
35  * ATM Services definitions
36  *
37  */
38
39 #ifndef _NETATM_ATM_SAP_H
40 #define _NETATM_ATM_SAP_H
41
42 /*
43  * Service Access Point (SAP)
44  *
45  * A SAP specifies the definition of an interface used between two adjacent
46  * layers.  The SAP is named for the services the lower layer provides to 
47  * the upper layer.
48  *
49  * The types of SAPs used are:
50  *      Stack - defines the interfaces between stack service entities.
51  *              These are further divided into:
52  *
53  *              Stack class SAP - which identifies the type of interface
54  *                      used.  All SAPs of a particular class will provide
55  *                      the same interface services to the higher layer.
56  *                      All stack command codes are constructed using class
57  *                      SAP values.
58  *
59  *              Stack instance SAP - which identifies the specific identity
60  *                      of the layer providing the class interface.
61  */
62 typedef u_short Sap_t;
63
64 #define SAP_TYPE_MASK   0xc000
65 #define SAP_TYPE_STACK  0x8000
66 #define SAP_CLASS_MASK  0xff80
67
68 #define SAP_STACK(c, i)         (SAP_TYPE_STACK | ((c) << 7) | (i))
69
70 /* Stack SAPs */
71 #define SAP_ATM                 SAP_STACK(1, 0)         /* ATM cell */
72 #define SAP_SAR                 SAP_STACK(2, 0)         /* AAL SAR */
73 #define SAP_SAR_AAL3_4          SAP_STACK(2, 3)         /* AAL3/4 SAR */
74 #define SAP_SAR_AAL5            SAP_STACK(2, 5)         /* AAL5 SAR */
75 #define SAP_CPCS                SAP_STACK(3, 0)         /* AAL CPCS */
76 #define SAP_CPCS_AAL3_4         SAP_STACK(3, 3)         /* AAL3/4 CPCS */
77 #define SAP_CPCS_AAL5           SAP_STACK(3, 5)         /* AAL5 CPCS */
78 #define SAP_SSCOP               SAP_STACK(4, 0)         /* ITU Q.2110 */
79 #define SAP_SSCF_UNI            SAP_STACK(5, 0)         /* ITU Q.2130 */
80 #define SAP_SSCF_NNI            SAP_STACK(6, 0)         /* ITU Q.2140 */
81
82 #endif  /* _NETATM_ATM_SAP_H */