summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/xti_osi.h
blob: 184f3ef277a90a61f6d1338a2e418c3b48680628 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*	Copyright (c) 1996-1998 Sun Microsystems, Inc.	*/
/*	  All Rights Reserved  	*/


#ifndef _SYS_XTI_OSI_H
#define	_SYS_XTI_OSI_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#include <sys/types.h>

#ifdef	__cplusplus
extern "C" {
#endif

#if !defined(_XPG5)

/*
 * SPECIFIC ISO OPTION AND MANAGEMENT PARAMETERS
 *
 * Note:
 * Unfortunately, XTI specification test assertions require exposing in
 * headers options that are not implemented. They also require exposing
 * Internet and OSI related options as part of inclusion of <xti.h>
 *
 */


/*
 * Definitions of ISO transport classes
 */

#define	T_CLASS0	0
#define	T_CLASS1	1
#define	T_CLASS2	2
#define	T_CLASS3	3
#define	T_CLASS4	4


/*
 * Definition of the priorities
 */

#define	T_PRITOP	0
#define	T_PRIHIGH	1
#define	T_PRIMID	2
#define	T_PRILOW	3
#define	T_PRIDFLT	4

/*
 * Definitions of the protection levels
 */

#define	T_NOPROTECT		1
#define	T_PASSIVEPROTECT	2
#define	T_ACTIVEPROTECT		4

/*
 * Default values for the length of TPDUs
 * Note: Sigh ! This obsolete constant required according to XTI test
 *	 assertions.
 */

#define	T_LTPDUDFLT	128	/* define obsolete in XPG4 */

/*
 * rate structure
 */

struct rate {
	t_scalar_t	targetvalue;	/* target value */
	t_scalar_t	minacceptvalue;	/* value of minimum */
					/* acceptable quality */
};

/*
 * reqvalue structure
 */

struct reqvalue {
	struct rate called;	/* called rate */
	struct rate calling;	/* calling rate */
};

/*
 * thrpt structure
 */

struct thrpt {
	struct reqvalue maxthrpt; /* maximum throughput */
	struct reqvalue avgthrpt; /* average throughput */
};

/*
 * transdel structure
 */

struct transdel {
	struct reqvalue maxdel;	/* maximum transit delay */
	struct reqvalue avgdel;	/* average throughput */
};

/*
 * Protocol Levels
 */

#define	ISO_TP	0x0100

/*
 * Options for Quality of Service and Expedited Data (ISO 8072:1986)
 */

#define	TCO_THROUGHPUT		0x0001
#define	TCO_TRANSDEL		0x0002
#define	TCO_RESERRORRATE	0x0003
#define	TCO_TRANSFFAILPROB	0x0004
#define	TCO_ESTFAILPROB		0x0005
#define	TCO_RELFAILPROB		0x0006
#define	TCO_ESTDELAY		0x0007
#define	TCO_RELDELAY		0x0008
#define	TCO_CONNRESIL		0x0009
#define	TCO_PROTECTION		0x000a
#define	TCO_PRIORITY		0x000b
#define	TCO_EXPD		0x000c

#define	TCL_TRANSDEL		0x000d
#define	TCL_RESERRORRATE	TCO_RESERRORRATE
#define	TCL_PROTECTION		TCO_PROTECTION
#define	TCL_PRIORITY		TCO_PRIORITY


/*
 * Management Options
 */

#define	TCO_LTPDU		0x0100
#define	TCO_ACKTIME		0x0200
#define	TCO_REASTIME		0x0300
#define	TCO_EXTFORM		0x0400
#define	TCO_FLOWCTRL		0x0500
#define	TCO_CHECKSUM		0x0600
#define	TCO_NETEXP		0x0700
#define	TCO_NETRECPTCF		0x0800
#define	TCO_PREFCLASS		0x0900
#define	TCO_ALTCLASS1		0x0a00
#define	TCO_ALTCLASS2		0x0b00
#define	TCO_ALTCLASS3		0x0c00
#define	TCO_ALTCLASS4		0x0d00

#define	TCL_CHECKSUM		TCO_CHECKSUM

#endif /* !defined(_XPG5) */

#ifdef	__cplusplus
}
#endif

#endif	/* _SYS_XTI_OSI_H */