|
|
1.1 root 1: /* rtsap.h - include file for reliable transfer users (RtS-USER) */
2:
3: /*
4: * $Header: /f/osi/h/RCS/rtsap.h,v 7.1 90/07/27 08:44:53 mrose Exp $
5: *
6: *
7: * $Log: rtsap.h,v $
8: * Revision 7.1 90/07/27 08:44:53 mrose
9: * update
10: *
11: * Revision 7.0 89/11/23 21:55:59 mrose
12: * Release 6.0
13: *
14: */
15:
16: /*
17: * NOTICE
18: *
19: * Acquisition, use, and distribution of this module and related
20: * materials are subject to the restrictions of a license agreement.
21: * Consult the Preface in the User's Manual for the full terms of
22: * this agreement.
23: *
24: */
25:
26:
27: #ifndef _RtSAP_
28: #define _RtSAP_
29:
30: #ifndef _MANIFEST_
31: #include "manifest.h"
32: #endif
33: #ifndef _GENERAL_
34: #include "general.h"
35: #endif
36:
37: #ifndef _AcSAP_
38: #include "acsap.h" /* definitions for AcS-USERs */
39: #endif
40:
41: /* */
42:
43: struct RtSAPaddr { /* RtSAP address (old-style) */
44: struct SSAPaddr rta_addr;
45:
46: u_short rta_port;
47: };
48: #define NULLRtA ((struct RtSAPaddr *) 0)
49:
50: /* */
51:
52: struct RtSAPstart { /* RT-OPEN.INDICATION */
53: int rts_sd; /* RTS descriptor */
54:
55: struct RtSAPaddr rts_initiator;/* address */
56:
57: int rts_mode; /* dialogue mode */
58: #define RTS_MONOLOGUE 0 /* monologue */
59: #define RTS_TWA 1 /* two-way alternate */
60:
61: int rts_turn; /* initial turn */
62: #define RTS_INITIATOR 0 /* the initiator */
63: #define RTS_RESPONDER 1 /* the responder */
64:
65: u_short rts_port; /* application number */
66:
67: PE rts_data; /* initial DATA from peer */
68:
69: struct AcSAPstart rts_start;/* info from A-ASSOCIATE.INDICATION */
70: };
71: #define RTSFREE(rts) \
72: { \
73: if ((rts) -> rts_data) \
74: pe_free ((rts) -> rts_data), (rts) -> rts_data = NULLPE; \
75: ACSFREE (&((rts) -> rts_start)); \
76: }
77:
78:
79: struct RtSAPconnect { /* RT-OPEN.CONFIRMATION */
80: int rtc_sd; /* RTS descriptor */
81:
82: int rtc_result; /* disposition */
83: #define RTS_ACCEPT (-1)
84:
85: /* RT-OPEN.REQUEST */
86: #define RTS_BUSY 0 /* Busy */
87: #define RTS_RECOVER 1 /* Cannot recover */
88: #define RTS_VALIDATE 2 /* Validation failure */
89: #define RTS_MODE 3 /* Unacceptable dialogue mode */
90: #define RTS_REJECT 4 /* Rejected by responder */
91:
92: PE rtc_data; /* initial DATA from peer */
93:
94: struct AcSAPconnect rtc_connect;/* info from A-ASSOCIATE.CONFIRMATION */
95: };
96: #define RTCFREE(rtc) \
97: { \
98: if ((rtc) -> rtc_data) \
99: pe_free ((rtc) -> rtc_data), (rtc) -> rtc_data = NULLPE; \
100: ACCFREE (&((rtc) -> rtc_connect)); \
101: }
102:
103:
104: struct RtSAPturn { /* RT-TURN-{GIVE,PLEASE}.INDICATION */
105: int rtu_please; /* T = RT-TURN-PLEASE.INDICATION
106: NIL = RT-TURN-GIVE.INDICATION */
107:
108: int rtu_priority; /* priority, iff rtu_please == T */
109: };
110:
111:
112: struct RtSAPtransfer { /* RT-TRANSFER.INDICATION */
113: PE rtt_data;
114: };
115: #define RTTFREE(rtt) \
116: { \
117: if ((rtt) -> rtt_data) \
118: pe_free ((rtt) -> rtt_data), (rtt) -> rtt_data = NULLPE; \
119: }
120:
121:
122: struct RtSAPabort { /* RT-{U,P}-ABORT.INDICATION */
123: int rta_peer; /* T = RT-U-ABORT.INDICATION
124: NIL = RT-P-ABORT.INDICATION */
125:
126: int rta_reason; /* reason */
127: /* begin UNOFFICIAL */
128: #define RTS_ADDRESS 5 /* Address unknown */
129: #define RTS_REFUSED 6 /* Connect request refused on this network
130: connection */
131: #define RTS_SESSION 7 /* Session disconnect */
132: #define RTS_PROTOCOL 8 /* Protocol error */
133: #define RTS_CONGEST 9 /* Congestion at RtSAP */
134: #define RTS_REMOTE 10 /* Remote system problem */
135: #define RTS_PRESENTATION 11 /* Presentation disconnect */
136: #define RTS_ACS 12 /* ACS disconnect */
137: #define RTS_ABORTED 13 /* Peer aborted association */
138: #define RTS_PARAMETER 14 /* Invalid parameter */
139: #define RTS_OPERATION 15 /* Invalid operation */
140: #define RTS_TIMER 16 /* Timer expired */
141: #define RTS_WAITING 17 /* Indications waiting */
142: #define RTS_TRANSFER 18 /* Transfer failure (not really unofficial) */
143: /* end UNOFFICIAL */
144:
145: #define RTS_FATAL(r) ((r) < RTS_PARAMETER)
146: #define RTS_OFFICIAL(r) ((r) < RTS_ADDRESS)
147:
148: PE rta_udata; /* failure data from user */
149:
150: /* additional failure data from provider */
151: #define RTA_SIZE 512
152: int rta_cc; /* length */
153: char rta_data[RTA_SIZE]; /* data */
154: };
155: #define RTAFREE(rta) \
156: { \
157: if ((rta) -> rta_udata) \
158: pe_free ((rta) -> rta_udata), (rta) -> rta_udata = NULLPE; \
159: }
160:
161:
162: struct RtSAPclose { /* RT-CLOSE.INDICATION */
163: int rtc_dummy;
164: };
165:
166:
167: struct RtSAPindication {
168: int rti_type; /* the union element present */
169: #define RTI_TURN 0x00
170: #define RTI_TRANSFER 0x01
171: #define RTI_ABORT 0x02
172: #define RTI_CLOSE 0x03
173: #define RTI_FINISH 0x04
174:
175: union {
176: struct RtSAPturn rti_un_turn;
177: struct RtSAPtransfer rti_un_transfer;
178: struct RtSAPabort rti_un_abort;
179: struct RtSAPclose rti_un_close;
180: struct AcSAPfinish rti_un_finish;
181: } rti_un;
182: #define rti_turn rti_un.rti_un_turn
183: #define rti_transfer rti_un.rti_un_transfer
184: #define rti_abort rti_un.rti_un_abort
185: #define rti_close rti_un.rti_un_close
186: #define rti_finish rti_un.rti_un_finish
187: };
188:
189: /* */
190:
191: extern char *rtsapversion;
192:
193: /* RTSE primitives */
194: int RtInit_Aux (); /* RT-OPEN.INDICATION */
195: #define RtInit(vecp,vec,rts,rti) \
196: RtInit_Aux((vecp),(vec),(rts),(rti),NULLOID)
197: int RtOpenResponse (); /* RT-OPEN.RESPONSE */
198: #define RtOpenRequest(mode,turn,ctx,ct1,ct2,ca1,ca2,ctxl,defc,data,qos,rtc,rti)\
199: RtOpenRequest2((mode),(turn),(ctx),(ct1),(ct2),(ca1),(ca2),\
200: (ctxl),(defc),(data),NULLOID,(qos), (rtc), (rti))
201: int RtOpenRequest2 (); /* RT-OPEN.REQUEST */
202: int RtCloseRequest (); /* RT-CLOSE.REQUEST */
203: int RtCloseResponse (); /* RT-CLOSE.RESPONSE */
204: int RtUAbortRequest (); /* RT-U-ABORT.REQUEST */
205:
206: /* X.410 primitives */
207: int RtExec (); /* SERVER only */
208: int RtBInit (); /* RT-BEGIN.INDICATION (X.410 OPEN.INDICATION) */
209: int RtBeginResponse (); /* RT-BEGIN.RESPONSE (X.410 OPEN.RESPONSE) */
210: int RtBeginRequest2 (); /* RT-BEGIN.REQUEST (X.410 OPEN.REQUEST) */
211: #define RtBeginRequest(called, mode, turn, data, rtc, rti) \
212: RtBeginRequest2((called), NULLRtA, (mode), (turn), (data), (rtc), (rti))
213: int RtEndRequest (); /* RT-END.REQUEST (X.410 CLOSE.REQUEST) */
214: int RtEndResponse (); /* RT-END.RESPONSE (X.410 CLOSE.RESPONSE) */
215:
216: int RtPTurnRequest (); /* RT-TURN-PLEASE.REQUEST */
217: int RtGTurnRequest (); /* RT-TURN-GIVE.REQUEST */
218: int RtTransferRequest (); /* RT-TRANSFER.REQUEST */
219: int RtWaitRequest (); /* RT-WAIT.REQUEST (pseudo) */
220:
221: int RtSetIndications (); /* define vectors for INDICATION events */
222: int RtSelectMask (); /* map reliable transfer descriptors for
223: select() */
224:
225: int RtSetDownTrans (); /* set downtrans upcall */
226: int RtSetUpTrans (); /* set uptrans upcall */
227:
228: char *RtErrString (); /* return RtSAP error code in string form */
229: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.