/* actions5.c - VTPM: FSM sector 5 actions */
static char *rcsid
= "$Header: /f/osi/vt/RCS/actions5.c,v 7.1 91/02/22 09:47:54 mrose Interim $";
* $Header: /f/osi/vt/RCS/actions5.c,v 7.1 91/02/22 09:47:54 mrose Interim $
* Revision 7.1 91/02/22 09:47:54 mrose
* Revision 7.0 89/11/23 22:31:27 mrose
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
/************************************************************************/
/* This file contains the functions that are executed when the */
/* VT Protocol machine is in a Sector 5 state and a protocol */
/* event occurs. The state transition matrix is specified in */
/* Table 32 of ISO 9041 (July 1987 version). The actions which */
/* this collection of functions perform are specified in Table 40 */
/************************************************************************/
extern int sd
; /*Global Session Descriptor (ISODE) */
/* xx1x xxxx = awaiting ack from peer i.e., 420 */
/* xxxx xx1x = awaiting ack from user */
/* T = got token, N = no got token */
ce_104(pe
) /* common event 104 */
if(pe
!= NULLPE
) vdatind(SEQUENCED
,pe
);
ce_105() /* common event 105 */
/* if (vns > 0) for(... */
(void)p_data(p_ondq
); /* send NDQ */
a5_0(pe
) /*VDATreq-sqtr in states 400B or 402B */
/* V data request addressing sequenced trigger co */
a5_1(pe
) /*VDATreq-n in states 400B, 402B or 40T */
/* V data request addressing sequenced trigger co */
return(ce_105()); /*Autonomous Event to Ship it*/
a5_2(pe
) /*NDQ-tr in states 400B, 420B */
a5_3(pe
) /*NDQ-ntr in states 400B, 420B */
return(ce_104(pe
)); /*Autonomous Event to Deliver to User*/
vtok
= 0; /* giving the token away */
/* vtkp was set in vbrkreq so it could be coded in to the pe */
(void)p_resync_req(pe
,SYNC_RESTART
); /* send break request */
a5_6(pe
) /* VBRKrsp in state 62 */
(void)p_resync_resp(pe
); /* send out break response */
a5_9(pe
) /*VDELreq in states 400B, 402B */
if (dcno
) /* no delivery control */
advise(LLOG_DEBUG
,NULLCP
,"a5_9: dcno hasn't been set");
/* this will be replace by the new-fangled pepy schtuff;
will use this now for compatability */
state
= (vra
) ? state
+ 2 : state
; /* pretty neeto eh? */
a5_11(pe
) /*HDQ request in 400B*/
a5_17(pe
) /*VRELreq in states 400B */
state
= S1_51Q
; /*Must change state first because
vt_disconnect gets RLR & calls
vt_disconnect(); /*May be only TEMP*/
/*Need call to ISODE to request token*/
a5_28(pe
) /*UDQ request in 400B*/
a5_31(pe
) /* BKR in 61 */
if (vsmd
&& vtok
) state
= S5_40T
;
else if (vsmd
) state
= S5_40N
;
a5_32(pe
) /* BKQ could occur in any state except 62 */
vbrkind clears queues etc.
and then map the break character to user
(we should have received the token)
a5_34(pe
) /*UDQ in 400B*/
if(pe
!= NULLPE
) vudatind(pe
);
a5_35(pe
) /* DEL in states 400B, 420B */
if ((vra
= prim2flag(pe
)) == NOTOK
)
adios("a5_35: bogus PDU (%s)", pe_error (pe
-> pe_errno
));
state
= (vra
) ? state
+ 2 : state
;
a5_38(pe
) /* RLQ in states 400B */
if(pe
!= NULLPE
) vhdatind(pe
);