|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 3090 (0xc12)
Types: TextFile
Names: »rosapapdu.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/rosap/rosapapdu.c«
/* rosapapdu.c - ROPM: interpret APDU */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rosap/RCS/rosapapdu.c,v 6.0 89/03/18 23:42:22 mrose Rel $";
#endif
/*
* $Header: /f/osi/rosap/RCS/rosapapdu.c,v 6.0 89/03/18 23:42:22 mrose Rel $
*
* Based on an TCP-based implementation by George Michaelson of University
* College London.
*
*
* $Log: rosapapdu.c,v $
* Revision 6.0 89/03/18 23:42:22 mrose
* Release 5.0
*
*/
/*
* NOTICE
*
* 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 agreement.
*
*/
/* LINTLIBRARY */
#include <stdio.h>
#include <signal.h>
#include "ropkt.h"
#ifdef DEBUG
#include "tailor.h"
#endif
/* \f
*/
int acb2osdu (acb, invokeID, pe, roi)
register struct assocblk *acb;
int *invokeID;
register PE pe;
register struct RoSAPindication *roi;
{
int sd;
register PE p;
rosap_type = APDU_UNKNOWN, rosap_null = 0, rosap_data = NULLPE;
rosap_lnull = 1;
if (((acb -> acb_flags & ACB_ACS)
? parse_ROS_ROSEapdus (pe, 1, NULLIP, NULLVP, NULLCP)
: parse_ROS_OPDU (pe, 1, NULLIP, NULLVP, NULLCP))
== NOTOK) {
(void) rosapreject (acb, roi, rosap_type != APDU_UNKNOWN
? ROS_GP_MISTYPED : ROS_GP_UNRECOG, NULLCP, "%s",
PY_pepy);
pe_free (pe);
return NOTOK;
}
#ifdef DEBUG
if (rosap_log -> ll_events & LLOG_PDUS)
if (acb -> acb_flags & ACB_ACS)
vpdu (rosap_log, print_ROS_ROSEapdus, pe, "ROSEapdus", 1)
else
vpdu (rosap_log, print_ROS_OPDU, pe, "OPDU", 1);
#endif
p = pe_expunge (pe, rosap_data);
switch (rosap_type) {
case APDU_INVOKE:
roi -> roi_type = ROI_INVOKE;
{
register struct RoSAPinvoke *rox = &roi -> roi_invoke;
rox -> rox_id = rosap_id;
if (!(rox -> rox_nolinked = rosap_lnull))
rox -> rox_linkid = rosap_linked;
rox -> rox_op = rosap_operation;
rox -> rox_args = p;
}
break;
case APDU_RESULT:
roi -> roi_type = ROI_RESULT;
{
register struct RoSAPresult *ror = &roi -> roi_result;
ror -> ror_id = rosap_id;
ror -> ror_op = rosap_operation;
ror -> ror_result = p;
}
break;
case APDU_ERROR:
roi -> roi_type = ROI_ERROR;
{
register struct RoSAPerror *roe = &roi -> roi_error;
roe -> roe_id = rosap_id;
roe -> roe_error = rosap_error;
roe -> roe_param = p;
}
break;
case APDU_REJECT:
roi -> roi_type = ROI_UREJECT;
{
register struct RoSAPureject *rou = &roi -> roi_ureject;
if (rosap_null)
rou -> rou_noid = 1;
else
rou -> rou_id = rosap_id, rou -> rou_noid = 0;
rou -> rou_reason = rosap_reason;
}
break;
}
if (invokeID
&& (rosap_type == APDU_INVOKE
|| rosap_null
|| *invokeID != rosap_id)
&& acb -> acb_rosindication) {
(*acb -> acb_rosindication) (sd = acb -> acb_fd, roi);
if (findacblk (sd) != acb)/* still not perfect! */
return rosaplose (roi, ROS_DONE, NULLCP, NULLCP);
return OK;
}
return DONE;
}