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