1 /* $Id: socksys.h,v 1.2 1998/03/26 08:46:07 jj Exp $
2 * socksys.h: Definitions for STREAMS modules emulation code.
4 * Copyright (C) 1998 Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)
31 #define TNOTSUPPORT 18
36 #define T_DISCON_REQ 2
38 #define T_EXDATA_REQ 4
41 #define T_UNBIND_REQ 7
42 #define T_UNITDATA_REQ 8
43 #define T_OPTMGMT_REQ 9
44 #define T_ORDREL_REQ 10
48 #define T_DISCON_IND 13
50 #define T_EXDATA_IND 15
53 #define T_ERROR_ACK 18
55 #define T_UNITDATA_IND 20
56 #define T_UDERROR_IND 21
57 #define T_OPTMGMT_ACK 22
58 #define T_ORDREL_IND 23
60 #define T_NEGOTIATE 0x0004
61 #define T_FAILURE 0x0040
63 #define TS_UNBND 0 /* unbound */
64 #define TS_WACK_BREQ 1 /* waiting for T_BIND_REQ ack */
65 #define TS_WACK_UREQ 2 /* waiting for T_UNBIND_REQ ack */
66 #define TS_IDLE 3 /* idle */
67 #define TS_WACK_OPTREQ 4 /* waiting for T_OPTMGMT_REQ ack */
68 #define TS_WACK_CREQ 5 /* waiting for T_CONN_REQ ack */
69 #define TS_WCON_CREQ 6 /* waiting for T_CONN_REQ confirmation */
70 #define TS_WRES_CIND 7 /* waiting for T_CONN_IND */
71 #define TS_WACK_CRES 8 /* waiting for T_CONN_RES ack */
72 #define TS_DATA_XFER 9 /* data transfer */
73 #define TS_WIND_ORDREL 10 /* releasing read but not write */
74 #define TS_WREQ_ORDREL 11 /* wait to release write but not read */
75 #define TS_WACK_DREQ6 12 /* waiting for T_DISCON_REQ ack */
76 #define TS_WACK_DREQ7 13 /* waiting for T_DISCON_REQ ack */
77 #define TS_WACK_DREQ9 14 /* waiting for T_DISCON_REQ ack */
78 #define TS_WACK_DREQ10 15 /* waiting for T_DISCON_REQ ack */
79 #define TS_WACK_DREQ11 16 /* waiting for T_DISCON_REQ ack */
80 #define TS_NOSTATES 17
97 struct T_unitdata_req
{
105 struct T_optmgmt_req
{
148 struct T_discon_ind
{
154 struct T_unitdata_ind
{
162 struct T_optmgmt_ack
{
177 struct T_primsg
*next
;
190 /* Constants used by STREAMS modules emulation code */
192 typedef char sol_module
;
194 #define MAX_NR_STREAM_MODULES 16
196 /* Private data structure assigned to sockets. */
198 struct sol_socket_struct
{
201 sol_module module
[MAX_NR_STREAM_MODULES
];
204 struct T_primsg
*pfirst
, *plast
;
207 #define SOLARIS_SOCKET_MAGIC 0xADDED