xref: /illumos-gate/usr/src/lib/libnsl/nsl/_data2.c (revision 2983dda76a6d296fdb560c88114fe41caad1b84f)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22 /*	  All Rights Reserved  	*/
23 
24 
25 /*
26  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
27  * Use is subject to license terms.
28  */
29 
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.1.1.1 */
32 
33 #include "mt.h"
34 #include <xti.h>
35 #include <sys/types.h>
36 #include <stropts.h>
37 #include "tx.h"
38 
39 /*
40  * State transition table for TLI/XTI user level states.
41  */
42 
43 #define	ers	T_BADSTATE	/* error state */
44 
45 char tiusr_statetbl[T_NOEVENTS][T_NOSTATES] = {
46 
47 /*
48  *                                S    T    A    T    E    S
49  *                                =    =    =    =    =    =
50  *  E
51  *  =                                              T		  T
52  *  V                                              _		  _
53  *  =                     T              T         D    T	  B
54  *  E                     _    T         _    T    A    _    T    A
55  *  =                     U    _    T    O    _    T    O    _    D
56  *  N                     N    U    _    U    I    A    U    I    S
57  *  =                     I    N    I    T    N    X    T    N    T
58  *  T                     N    B    D    C    C    F    R    R    A
59  *  =                     I    N    L    O    O    E    E    E    T
60  *  S                     T    D    E    N    N    R    L    L    E
61  *  =							        (err)
62  *                       (0)  (1)  (2)  (3)  (4)  (5)  (6)  (7)  (8)
63  */
64 /* BEGIN CSTYLED */
65 /* T_OPEN (0)        */ {  1, ers, ers, ers, ers, ers, ers, ers, ers},
66 /* T_BIND (1)        */ {ers,   2, ers, ers, ers, ers, ers, ers, ers},
67 /* T_OPTMGMT (2)     */ {ers,   1,   2,   3,   4,   5,   6,   7, ers},
68 /* T_UNBIND (3)      */ {ers, ers,   1, ers, ers, ers, ers, ers, ers},
69 /* T_CLOSE (4)       */ {ers,   0, ers, ers, ers, ers, ers, ers, ers},
70 /* T_SNDUDATA (5)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
71 /* T_RCVUDATA (6)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
72 /* T_RCVUDERR (7)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
73 /* T_CONNECT1 (8)    */ {ers, ers,   5, ers, ers, ers, ers, ers, ers},
74 /* T_CONNECT2 (9)    */ {ers, ers,   3, ers, ers, ers, ers, ers, ers},
75 /* T_RCVCONNECT (10) */ {ers, ers, ers,   5, ers, ers, ers, ers, ers},
76 /* T_LISTN (11)      */ {ers, ers,   4, ers,   4, ers, ers, ers, ers},
77 /* T_ACCEPT1 (12)    */ {ers, ers, ers, ers,   5, ers, ers, ers, ers},
78 /* T_ACCEPT2 (13)    */ {ers, ers, ers, ers,   2, ers, ers, ers, ers},
79 /* T_ACCEPT3 (14)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
80 /* T_SND (15)        */ {ers, ers, ers, ers, ers,   5, ers,   7, ers},
81 /* T_RCV (16)        */ {ers, ers, ers, ers, ers,   5,   6, ers, ers},
82 /* T_SNDDIS1 (17)    */ {ers, ers, ers,   2,   2,   2,   2,   2, ers},
83 /* T_SNDDIS2 (18)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
84 /* T_RCVDIS1 (19)    */ {ers, ers, ers,   2, ers,   2,   2,   2, ers},
85 /* T_RCVDIS2 (20)    */ {ers, ers, ers, ers,   2, ers, ers, ers, ers},
86 /* T_RCVDIS3 (21)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
87 /* T_SNDREL (22)     */ {ers, ers, ers, ers, ers,   6, ers,   2, ers},
88 /* T_RCVREL (23)     */ {ers, ers, ers, ers, ers,   7,   2, ers, ers},
89 /* T_PASSCON (24)    */ {ers,   5,   5, ers, ers, ers, ers, ers, ers},
90 
91 /*
92  * Following state transitions are as in printed specs but wrong
93  * so only in comments for reference
94  * - The incorrect T_OPTMGMT state is what TLI historically implied
95  * - The incorrect T_PASSCON state is from the XTI spec.
96  *
97  * T_OPTMGMT (2)        {ers, ers,   2, ers, ers, ers, ers, ers,  ers},
98  * T_PASSCON (24)       {ers, ers,   5, ers, ers, ers, ers, ers,  ers},
99  */
100 
101 /* END CSTYLED */
102 };
103