xref: /illumos-gate/usr/src/uts/common/sys/xti_osi.h (revision b4203d75)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
227c478bd9Sstevel@tonic-gate /*	Copyright (c) 1996-1998 Sun Microsystems, Inc.	*/
23*b4203d75SMarcel Telka /*	  All Rights Reserved	*/
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef _SYS_XTI_OSI_H
277c478bd9Sstevel@tonic-gate #define	_SYS_XTI_OSI_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #include <sys/types.h>
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
327c478bd9Sstevel@tonic-gate extern "C" {
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #if !defined(_XPG5)
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate /*
387c478bd9Sstevel@tonic-gate  * SPECIFIC ISO OPTION AND MANAGEMENT PARAMETERS
397c478bd9Sstevel@tonic-gate  *
407c478bd9Sstevel@tonic-gate  * Note:
417c478bd9Sstevel@tonic-gate  * Unfortunately, XTI specification test assertions require exposing in
427c478bd9Sstevel@tonic-gate  * headers options that are not implemented. They also require exposing
437c478bd9Sstevel@tonic-gate  * Internet and OSI related options as part of inclusion of <xti.h>
447c478bd9Sstevel@tonic-gate  *
457c478bd9Sstevel@tonic-gate  */
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate /*
497c478bd9Sstevel@tonic-gate  * Definitions of ISO transport classes
507c478bd9Sstevel@tonic-gate  */
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate #define	T_CLASS0	0
537c478bd9Sstevel@tonic-gate #define	T_CLASS1	1
547c478bd9Sstevel@tonic-gate #define	T_CLASS2	2
557c478bd9Sstevel@tonic-gate #define	T_CLASS3	3
567c478bd9Sstevel@tonic-gate #define	T_CLASS4	4
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate /*
607c478bd9Sstevel@tonic-gate  * Definition of the priorities
617c478bd9Sstevel@tonic-gate  */
627c478bd9Sstevel@tonic-gate 
637c478bd9Sstevel@tonic-gate #define	T_PRITOP	0
647c478bd9Sstevel@tonic-gate #define	T_PRIHIGH	1
657c478bd9Sstevel@tonic-gate #define	T_PRIMID	2
667c478bd9Sstevel@tonic-gate #define	T_PRILOW	3
677c478bd9Sstevel@tonic-gate #define	T_PRIDFLT	4
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate /*
707c478bd9Sstevel@tonic-gate  * Definitions of the protection levels
717c478bd9Sstevel@tonic-gate  */
727c478bd9Sstevel@tonic-gate 
737c478bd9Sstevel@tonic-gate #define	T_NOPROTECT		1
747c478bd9Sstevel@tonic-gate #define	T_PASSIVEPROTECT	2
757c478bd9Sstevel@tonic-gate #define	T_ACTIVEPROTECT		4
767c478bd9Sstevel@tonic-gate 
777c478bd9Sstevel@tonic-gate /*
787c478bd9Sstevel@tonic-gate  * Default values for the length of TPDUs
797c478bd9Sstevel@tonic-gate  * Note: Sigh ! This obsolete constant required according to XTI test
807c478bd9Sstevel@tonic-gate  *	 assertions.
817c478bd9Sstevel@tonic-gate  */
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate #define	T_LTPDUDFLT	128	/* define obsolete in XPG4 */
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate /*
867c478bd9Sstevel@tonic-gate  * rate structure
877c478bd9Sstevel@tonic-gate  */
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate struct rate {
907c478bd9Sstevel@tonic-gate 	t_scalar_t	targetvalue;	/* target value */
917c478bd9Sstevel@tonic-gate 	t_scalar_t	minacceptvalue;	/* value of minimum */
927c478bd9Sstevel@tonic-gate 					/* acceptable quality */
937c478bd9Sstevel@tonic-gate };
947c478bd9Sstevel@tonic-gate 
957c478bd9Sstevel@tonic-gate /*
967c478bd9Sstevel@tonic-gate  * reqvalue structure
977c478bd9Sstevel@tonic-gate  */
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate struct reqvalue {
1007c478bd9Sstevel@tonic-gate 	struct rate called;	/* called rate */
1017c478bd9Sstevel@tonic-gate 	struct rate calling;	/* calling rate */
1027c478bd9Sstevel@tonic-gate };
1037c478bd9Sstevel@tonic-gate 
1047c478bd9Sstevel@tonic-gate /*
1057c478bd9Sstevel@tonic-gate  * thrpt structure
1067c478bd9Sstevel@tonic-gate  */
1077c478bd9Sstevel@tonic-gate 
1087c478bd9Sstevel@tonic-gate struct thrpt {
1097c478bd9Sstevel@tonic-gate 	struct reqvalue maxthrpt; /* maximum throughput */
1107c478bd9Sstevel@tonic-gate 	struct reqvalue avgthrpt; /* average throughput */
1117c478bd9Sstevel@tonic-gate };
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate /*
1147c478bd9Sstevel@tonic-gate  * transdel structure
1157c478bd9Sstevel@tonic-gate  */
1167c478bd9Sstevel@tonic-gate 
1177c478bd9Sstevel@tonic-gate struct transdel {
1187c478bd9Sstevel@tonic-gate 	struct reqvalue maxdel;	/* maximum transit delay */
1197c478bd9Sstevel@tonic-gate 	struct reqvalue avgdel;	/* average throughput */
1207c478bd9Sstevel@tonic-gate };
1217c478bd9Sstevel@tonic-gate 
1227c478bd9Sstevel@tonic-gate /*
1237c478bd9Sstevel@tonic-gate  * Protocol Levels
1247c478bd9Sstevel@tonic-gate  */
1257c478bd9Sstevel@tonic-gate 
1267c478bd9Sstevel@tonic-gate #define	ISO_TP	0x0100
1277c478bd9Sstevel@tonic-gate 
1287c478bd9Sstevel@tonic-gate /*
1297c478bd9Sstevel@tonic-gate  * Options for Quality of Service and Expedited Data (ISO 8072:1986)
1307c478bd9Sstevel@tonic-gate  */
1317c478bd9Sstevel@tonic-gate 
1327c478bd9Sstevel@tonic-gate #define	TCO_THROUGHPUT		0x0001
1337c478bd9Sstevel@tonic-gate #define	TCO_TRANSDEL		0x0002
1347c478bd9Sstevel@tonic-gate #define	TCO_RESERRORRATE	0x0003
1357c478bd9Sstevel@tonic-gate #define	TCO_TRANSFFAILPROB	0x0004
1367c478bd9Sstevel@tonic-gate #define	TCO_ESTFAILPROB		0x0005
1377c478bd9Sstevel@tonic-gate #define	TCO_RELFAILPROB		0x0006
1387c478bd9Sstevel@tonic-gate #define	TCO_ESTDELAY		0x0007
1397c478bd9Sstevel@tonic-gate #define	TCO_RELDELAY		0x0008
1407c478bd9Sstevel@tonic-gate #define	TCO_CONNRESIL		0x0009
1417c478bd9Sstevel@tonic-gate #define	TCO_PROTECTION		0x000a
1427c478bd9Sstevel@tonic-gate #define	TCO_PRIORITY		0x000b
1437c478bd9Sstevel@tonic-gate #define	TCO_EXPD		0x000c
1447c478bd9Sstevel@tonic-gate 
1457c478bd9Sstevel@tonic-gate #define	TCL_TRANSDEL		0x000d
1467c478bd9Sstevel@tonic-gate #define	TCL_RESERRORRATE	TCO_RESERRORRATE
1477c478bd9Sstevel@tonic-gate #define	TCL_PROTECTION		TCO_PROTECTION
1487c478bd9Sstevel@tonic-gate #define	TCL_PRIORITY		TCO_PRIORITY
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate 
1517c478bd9Sstevel@tonic-gate /*
1527c478bd9Sstevel@tonic-gate  * Management Options
1537c478bd9Sstevel@tonic-gate  */
1547c478bd9Sstevel@tonic-gate 
1557c478bd9Sstevel@tonic-gate #define	TCO_LTPDU		0x0100
1567c478bd9Sstevel@tonic-gate #define	TCO_ACKTIME		0x0200
1577c478bd9Sstevel@tonic-gate #define	TCO_REASTIME		0x0300
1587c478bd9Sstevel@tonic-gate #define	TCO_EXTFORM		0x0400
1597c478bd9Sstevel@tonic-gate #define	TCO_FLOWCTRL		0x0500
1607c478bd9Sstevel@tonic-gate #define	TCO_CHECKSUM		0x0600
1617c478bd9Sstevel@tonic-gate #define	TCO_NETEXP		0x0700
1627c478bd9Sstevel@tonic-gate #define	TCO_NETRECPTCF		0x0800
1637c478bd9Sstevel@tonic-gate #define	TCO_PREFCLASS		0x0900
1647c478bd9Sstevel@tonic-gate #define	TCO_ALTCLASS1		0x0a00
1657c478bd9Sstevel@tonic-gate #define	TCO_ALTCLASS2		0x0b00
1667c478bd9Sstevel@tonic-gate #define	TCO_ALTCLASS3		0x0c00
1677c478bd9Sstevel@tonic-gate #define	TCO_ALTCLASS4		0x0d00
1687c478bd9Sstevel@tonic-gate 
1697c478bd9Sstevel@tonic-gate #define	TCL_CHECKSUM		TCO_CHECKSUM
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate #endif /* !defined(_XPG5) */
1727c478bd9Sstevel@tonic-gate 
1737c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1747c478bd9Sstevel@tonic-gate }
1757c478bd9Sstevel@tonic-gate #endif
1767c478bd9Sstevel@tonic-gate 
1777c478bd9Sstevel@tonic-gate #endif	/* _SYS_XTI_OSI_H */
178