xref: /titanic_52/usr/src/lib/libnsl/nsl/_data2.c (revision d362b7492b8bcb5ed70f92aa0a6a39bc93b059de)
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
5*d362b749Svk199839  * Common Development and Distribution License (the "License").
6*d362b749Svk199839  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
227c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*
26*d362b749Svk199839  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
277c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
287c478bd9Sstevel@tonic-gate  */
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.1.1.1 */
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #include "mt.h"
347c478bd9Sstevel@tonic-gate #include <xti.h>
357c478bd9Sstevel@tonic-gate #include <sys/types.h>
367c478bd9Sstevel@tonic-gate #include <stropts.h>
377c478bd9Sstevel@tonic-gate #include "tx.h"
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate /*
407c478bd9Sstevel@tonic-gate  * State transition table for TLI/XTI user level states.
417c478bd9Sstevel@tonic-gate  */
427c478bd9Sstevel@tonic-gate 
43*d362b749Svk199839 #define	ers	T_BADSTATE	/* error state */
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate char tiusr_statetbl[T_NOEVENTS][T_NOSTATES] = {
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate /*
487c478bd9Sstevel@tonic-gate  *                                S    T    A    T    E    S
497c478bd9Sstevel@tonic-gate  *                                =    =    =    =    =    =
507c478bd9Sstevel@tonic-gate  *  E
517c478bd9Sstevel@tonic-gate  *  =                                              T		  T
527c478bd9Sstevel@tonic-gate  *  V                                              _		  _
537c478bd9Sstevel@tonic-gate  *  =                     T              T         D    T	  B
547c478bd9Sstevel@tonic-gate  *  E                     _    T         _    T    A    _    T    A
557c478bd9Sstevel@tonic-gate  *  =                     U    _    T    O    _    T    O    _    D
567c478bd9Sstevel@tonic-gate  *  N                     N    U    _    U    I    A    U    I    S
577c478bd9Sstevel@tonic-gate  *  =                     I    N    I    T    N    X    T    N    T
587c478bd9Sstevel@tonic-gate  *  T                     N    B    D    C    C    F    R    R    A
597c478bd9Sstevel@tonic-gate  *  =                     I    N    L    O    O    E    E    E    T
607c478bd9Sstevel@tonic-gate  *  S                     T    D    E    N    N    R    L    L    E
617c478bd9Sstevel@tonic-gate  *  =							        (err)
627c478bd9Sstevel@tonic-gate  *                       (0)  (1)  (2)  (3)  (4)  (5)  (6)  (7)  (8)
637c478bd9Sstevel@tonic-gate  */
647c478bd9Sstevel@tonic-gate /* BEGIN CSTYLED */
65*d362b749Svk199839 /* T_OPEN (0)        */ {  1, ers, ers, ers, ers, ers, ers, ers, ers},
66*d362b749Svk199839 /* T_BIND (1)        */ {ers,   2, ers, ers, ers, ers, ers, ers, ers},
67*d362b749Svk199839 /* T_OPTMGMT (2)     */ {ers,   1,   2,   3,   4,   5,   6,   7, ers},
68*d362b749Svk199839 /* T_UNBIND (3)      */ {ers, ers,   1, ers, ers, ers, ers, ers, ers},
69*d362b749Svk199839 /* T_CLOSE (4)       */ {ers,   0, ers, ers, ers, ers, ers, ers, ers},
70*d362b749Svk199839 /* T_SNDUDATA (5)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
71*d362b749Svk199839 /* T_RCVUDATA (6)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
72*d362b749Svk199839 /* T_RCVUDERR (7)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
73*d362b749Svk199839 /* T_CONNECT1 (8)    */ {ers, ers,   5, ers, ers, ers, ers, ers, ers},
74*d362b749Svk199839 /* T_CONNECT2 (9)    */ {ers, ers,   3, ers, ers, ers, ers, ers, ers},
75*d362b749Svk199839 /* T_RCVCONNECT (10) */ {ers, ers, ers,   5, ers, ers, ers, ers, ers},
76*d362b749Svk199839 /* T_LISTN (11)      */ {ers, ers,   4, ers,   4, ers, ers, ers, ers},
77*d362b749Svk199839 /* T_ACCEPT1 (12)    */ {ers, ers, ers, ers,   5, ers, ers, ers, ers},
78*d362b749Svk199839 /* T_ACCEPT2 (13)    */ {ers, ers, ers, ers,   2, ers, ers, ers, ers},
79*d362b749Svk199839 /* T_ACCEPT3 (14)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
80*d362b749Svk199839 /* T_SND (15)        */ {ers, ers, ers, ers, ers,   5, ers,   7, ers},
81*d362b749Svk199839 /* T_RCV (16)        */ {ers, ers, ers, ers, ers,   5,   6, ers, ers},
82*d362b749Svk199839 /* T_SNDDIS1 (17)    */ {ers, ers, ers,   2,   2,   2,   2,   2, ers},
83*d362b749Svk199839 /* T_SNDDIS2 (18)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
84*d362b749Svk199839 /* T_RCVDIS1 (19)    */ {ers, ers, ers,   2, ers,   2,   2,   2, ers},
85*d362b749Svk199839 /* T_RCVDIS2 (20)    */ {ers, ers, ers, ers,   2, ers, ers, ers, ers},
86*d362b749Svk199839 /* T_RCVDIS3 (21)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
87*d362b749Svk199839 /* T_SNDREL (22)     */ {ers, ers, ers, ers, ers,   6, ers,   2, ers},
88*d362b749Svk199839 /* T_RCVREL (23)     */ {ers, ers, ers, ers, ers,   7,   2, ers, ers},
89*d362b749Svk199839 /* T_PASSCON (24)    */ {ers,   5,   5, ers, ers, ers, ers, ers, ers},
907c478bd9Sstevel@tonic-gate 
917c478bd9Sstevel@tonic-gate /*
927c478bd9Sstevel@tonic-gate  * Following state transitions are as in printed specs but wrong
937c478bd9Sstevel@tonic-gate  * so only in comments for reference
947c478bd9Sstevel@tonic-gate  * - The incorrect T_OPTMGMT state is what TLI historically implied
957c478bd9Sstevel@tonic-gate  * - The incorrect T_PASSCON state is from the XTI spec.
967c478bd9Sstevel@tonic-gate  *
97*d362b749Svk199839  * T_OPTMGMT (2)        {ers, ers,   2, ers, ers, ers, ers, ers,  ers},
98*d362b749Svk199839  * T_PASSCON (24)       {ers, ers,   5, ers, ers, ers, ers, ers,  ers},
997c478bd9Sstevel@tonic-gate  */
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate /* END CSTYLED */
1027c478bd9Sstevel@tonic-gate };
103