xref: /illumos-gate/usr/src/lib/libnsl/nsl/_data2.c (revision 86d949f9497332fe19be6b5d711d265eb957439f)
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 #include "mt.h"
31 #include <xti.h>
32 #include <sys/types.h>
33 #include <stropts.h>
34 #include "tx.h"
35 
36 /*
37  * State transition table for TLI/XTI user level states.
38  */
39 
40 #define	ers	T_BADSTATE	/* error state */
41 
42 char tiusr_statetbl[T_NOEVENTS][T_NOSTATES] = {
43 
44 /*
45  *                                S    T    A    T    E    S
46  *                                =    =    =    =    =    =
47  *  E
48  *  =                                              T		  T
49  *  V                                              _		  _
50  *  =                     T              T         D    T	  B
51  *  E                     _    T         _    T    A    _    T    A
52  *  =                     U    _    T    O    _    T    O    _    D
53  *  N                     N    U    _    U    I    A    U    I    S
54  *  =                     I    N    I    T    N    X    T    N    T
55  *  T                     N    B    D    C    C    F    R    R    A
56  *  =                     I    N    L    O    O    E    E    E    T
57  *  S                     T    D    E    N    N    R    L    L    E
58  *  =							        (err)
59  *                       (0)  (1)  (2)  (3)  (4)  (5)  (6)  (7)  (8)
60  */
61 /* BEGIN CSTYLED */
62 /* T_OPEN (0)        */ {  1, ers, ers, ers, ers, ers, ers, ers, ers},
63 /* T_BIND (1)        */ {ers,   2, ers, ers, ers, ers, ers, ers, ers},
64 /* T_OPTMGMT (2)     */ {ers,   1,   2,   3,   4,   5,   6,   7, ers},
65 /* T_UNBIND (3)      */ {ers, ers,   1, ers, ers, ers, ers, ers, ers},
66 /* T_CLOSE (4)       */ {ers,   0, ers, ers, ers, ers, ers, ers, ers},
67 /* T_SNDUDATA (5)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
68 /* T_RCVUDATA (6)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
69 /* T_RCVUDERR (7)    */ {ers, ers,   2, ers, ers, ers, ers, ers, ers},
70 /* T_CONNECT1 (8)    */ {ers, ers,   5, ers, ers, ers, ers, ers, ers},
71 /* T_CONNECT2 (9)    */ {ers, ers,   3, ers, ers, ers, ers, ers, ers},
72 /* T_RCVCONNECT (10) */ {ers, ers, ers,   5, ers, ers, ers, ers, ers},
73 /* T_LISTN (11)      */ {ers, ers,   4, ers,   4, ers, ers, ers, ers},
74 /* T_ACCEPT1 (12)    */ {ers, ers, ers, ers,   5, ers, ers, ers, ers},
75 /* T_ACCEPT2 (13)    */ {ers, ers, ers, ers,   2, ers, ers, ers, ers},
76 /* T_ACCEPT3 (14)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
77 /* T_SND (15)        */ {ers, ers, ers, ers, ers,   5, ers,   7, ers},
78 /* T_RCV (16)        */ {ers, ers, ers, ers, ers,   5,   6, ers, ers},
79 /* T_SNDDIS1 (17)    */ {ers, ers, ers,   2,   2,   2,   2,   2, ers},
80 /* T_SNDDIS2 (18)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
81 /* T_RCVDIS1 (19)    */ {ers, ers, ers,   2, ers,   2,   2,   2, ers},
82 /* T_RCVDIS2 (20)    */ {ers, ers, ers, ers,   2, ers, ers, ers, ers},
83 /* T_RCVDIS3 (21)    */ {ers, ers, ers, ers,   4, ers, ers, ers, ers},
84 /* T_SNDREL (22)     */ {ers, ers, ers, ers, ers,   6, ers,   2, ers},
85 /* T_RCVREL (23)     */ {ers, ers, ers, ers, ers,   7,   2, ers, ers},
86 /* T_PASSCON (24)    */ {ers,   5,   5, ers, ers, ers, ers, ers, ers},
87 
88 /*
89  * Following state transitions are as in printed specs but wrong
90  * so only in comments for reference
91  * - The incorrect T_OPTMGMT state is what TLI historically implied
92  * - The incorrect T_PASSCON state is from the XTI spec.
93  *
94  * T_OPTMGMT (2)        {ers, ers,   2, ers, ers, ers, ers, ers,  ers},
95  * T_PASSCON (24)       {ers, ers,   5, ers, ers, ers, ers, ers,  ers},
96  */
97 
98 /* END CSTYLED */
99 };
100