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