xref: /illumos-gate/usr/src/uts/common/sys/xti_osi.h (revision e616c49c963c6536f26b6d8888bc4bbb54716901)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1996-1998 Sun Microsystems, Inc.	*/
23 /*	  All Rights Reserved	*/
24 
25 
26 #ifndef _SYS_XTI_OSI_H
27 #define	_SYS_XTI_OSI_H
28 
29 #include <sys/types.h>
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 #if !defined(_XPG5)
36 
37 /*
38  * SPECIFIC ISO OPTION AND MANAGEMENT PARAMETERS
39  *
40  * Note:
41  * Unfortunately, XTI specification test assertions require exposing in
42  * headers options that are not implemented. They also require exposing
43  * Internet and OSI related options as part of inclusion of <xti.h>
44  *
45  */
46 
47 
48 /*
49  * Definitions of ISO transport classes
50  */
51 
52 #define	T_CLASS0	0
53 #define	T_CLASS1	1
54 #define	T_CLASS2	2
55 #define	T_CLASS3	3
56 #define	T_CLASS4	4
57 
58 
59 /*
60  * Definition of the priorities
61  */
62 
63 #define	T_PRITOP	0
64 #define	T_PRIHIGH	1
65 #define	T_PRIMID	2
66 #define	T_PRILOW	3
67 #define	T_PRIDFLT	4
68 
69 /*
70  * Definitions of the protection levels
71  */
72 
73 #define	T_NOPROTECT		1
74 #define	T_PASSIVEPROTECT	2
75 #define	T_ACTIVEPROTECT		4
76 
77 /*
78  * Default values for the length of TPDUs
79  * Note: Sigh ! This obsolete constant required according to XTI test
80  *	 assertions.
81  */
82 
83 #define	T_LTPDUDFLT	128	/* define obsolete in XPG4 */
84 
85 /*
86  * rate structure
87  */
88 
89 struct rate {
90 	t_scalar_t	targetvalue;	/* target value */
91 	t_scalar_t	minacceptvalue;	/* value of minimum */
92 					/* acceptable quality */
93 };
94 
95 /*
96  * reqvalue structure
97  */
98 
99 struct reqvalue {
100 	struct rate called;	/* called rate */
101 	struct rate calling;	/* calling rate */
102 };
103 
104 /*
105  * thrpt structure
106  */
107 
108 struct thrpt {
109 	struct reqvalue maxthrpt; /* maximum throughput */
110 	struct reqvalue avgthrpt; /* average throughput */
111 };
112 
113 /*
114  * transdel structure
115  */
116 
117 struct transdel {
118 	struct reqvalue maxdel;	/* maximum transit delay */
119 	struct reqvalue avgdel;	/* average throughput */
120 };
121 
122 /*
123  * Protocol Levels
124  */
125 
126 #define	ISO_TP	0x0100
127 
128 /*
129  * Options for Quality of Service and Expedited Data (ISO 8072:1986)
130  */
131 
132 #define	TCO_THROUGHPUT		0x0001
133 #define	TCO_TRANSDEL		0x0002
134 #define	TCO_RESERRORRATE	0x0003
135 #define	TCO_TRANSFFAILPROB	0x0004
136 #define	TCO_ESTFAILPROB		0x0005
137 #define	TCO_RELFAILPROB		0x0006
138 #define	TCO_ESTDELAY		0x0007
139 #define	TCO_RELDELAY		0x0008
140 #define	TCO_CONNRESIL		0x0009
141 #define	TCO_PROTECTION		0x000a
142 #define	TCO_PRIORITY		0x000b
143 #define	TCO_EXPD		0x000c
144 
145 #define	TCL_TRANSDEL		0x000d
146 #define	TCL_RESERRORRATE	TCO_RESERRORRATE
147 #define	TCL_PROTECTION		TCO_PROTECTION
148 #define	TCL_PRIORITY		TCO_PRIORITY
149 
150 
151 /*
152  * Management Options
153  */
154 
155 #define	TCO_LTPDU		0x0100
156 #define	TCO_ACKTIME		0x0200
157 #define	TCO_REASTIME		0x0300
158 #define	TCO_EXTFORM		0x0400
159 #define	TCO_FLOWCTRL		0x0500
160 #define	TCO_CHECKSUM		0x0600
161 #define	TCO_NETEXP		0x0700
162 #define	TCO_NETRECPTCF		0x0800
163 #define	TCO_PREFCLASS		0x0900
164 #define	TCO_ALTCLASS1		0x0a00
165 #define	TCO_ALTCLASS2		0x0b00
166 #define	TCO_ALTCLASS3		0x0c00
167 #define	TCO_ALTCLASS4		0x0d00
168 
169 #define	TCL_CHECKSUM		TCO_CHECKSUM
170 
171 #endif /* !defined(_XPG5) */
172 
173 #ifdef	__cplusplus
174 }
175 #endif
176 
177 #endif	/* _SYS_XTI_OSI_H */
178