/* ronotbind2.c - RONOT: ABSTRACT-BIND mapping onto A-ASSOCIATE.RESPONSE */
static char *rcsid
= "$Header: /f/osi/ronot/RCS/ronotbind2.c,v 7.2 91/02/22 09:50:31 mrose Interim $";
* $Header: /f/osi/ronot/RCS/ronotbind2.c,v 7.2 91/02/22 09:50:31 mrose Interim $
* Revision 7.2 91/02/22 09:50:31 mrose
* Revision 7.1 90/07/26 14:33:57 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
/* \f RO-BIND.INDICATION */
int RoBindInit (vecp
, vec
, acs
, rni
)
struct RoNOTindication
* rni
;
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
result
= AcInit (vecp
, vec
, acs
, aci
);
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindInit: RO-BIND.INDICATION: failed"));
/* Have an AcSAPindication, need to return RoNOTindication */
(void) acs2ronotlose (rni
, "RO-BIND.INDICATION", aca
);
struct RoSAPindication roi_s
;
if (RoSetService (acs
->acs_sd
, RoPService
, &(roi_s
)) == NOTOK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindInit: RoSetService failed"));
return (ronotlose (rni
, RBI_SET_ROSE_PRES
, NULLCP
, NULLCP
));
if (ParseRoBindArgument (acs
, rni
) != OK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindInit: ParseRoBindArgument failed"));
int ParseRoBindArgument (acs
, rni
)
struct RoNOTindication
* rni
;
return (ronotlose (rni
, RBI_DEC_NINFO
, NULLCP
, NULLCP
));
if (acs
->acs_info
[0] == NULLPE
)
return (ronotlose (rni
, RBI_DEC_NINFO
, NULLCP
, NULLCP
));
acs
->acs_info
[0] = NULLPE
;
if (decode_RONOT_BindArgumentValue (pe
, 1, NULLIP
, NULLVP
, &acs
->acs_info
[0]) != OK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("ParseRoBindArgument: decode_RONOT_BindArgumentValue failed"));
(void) RoBindReject (acs
, ACS_TRANSIENT
, ACS_USER_NOREASON
, rni
);
return (ronotlose (rni
, RBI_DEC_BIND_ARG
, NULLCP
, NULLCP
));
int RoBindResult (sd
, context
, respondtitle
, respondaddr
, ctxlist
,
defctxresult
, prequirements
, srequirements
, isn
, settings
,
struct PSAPaddr
* respondaddr
;
struct PSAPctxlist
* ctxlist
;
struct RoNOTindication
* rni
;
PE
* user_data_p
= &(user_data
);
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
/* Wrap the user data with the remote operations BIND RESULT tag */
if (encode_RONOT_BindResultValue (user_data_p
, 1, 0, NULLCP
, bindrespe
) == NOTOK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindResult: encode_RONOT_BindResultValue failed"));
return (ronotlose (rni
, RBI_ENC_BIND_RES
, NULLCP
, NULLCP
));
(*user_data_p
)->pe_context
= bindrespe
->pe_context
;
result
= AcAssocResponse (sd
, ACS_ACCEPT
, ACS_USER_NULL
, context
,
respondtitle
, respondaddr
, ctxlist
, defctxresult
,
prequirements
, srequirements
, isn
, settings
, ref
,
user_data_p
, ndata
, aci
);
if ((*user_data_p
) != NULLPE
)
pe_free ((*user_data_p
));
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindResult: AcAssocResponse failed"));
/* Have an AcSAPindication, need to return RoNOTindication */
(void) acs2ronotlose (rni
, "RO-BIND.RESULT", aca
);
int RoBindError (sd
, context
, respondtitle
,
respondaddr
, ctxlist
, defctxresult
, prequirements
,
srequirements
, isn
, settings
, ref
, binderrpe
, rni
)
struct PSAPaddr
* respondaddr
;
struct PSAPctxlist
* ctxlist
;
struct RoNOTindication
* rni
;
PE
* user_data_p
= &(user_data
);
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
/* Wrap the user data with the remote operations BIND ARGUMENT tag */
if (encode_RONOT_BindErrorValue (user_data_p
, 1, 0, NULLCP
, binderrpe
) == NOTOK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindError: encode_RONOT_BindErrorValue failed"));
return (ronotlose (rni
, RBI_ENC_BIND_ERR
, NULLCP
, NULLCP
));
(*user_data_p
)->pe_context
= binderrpe
->pe_context
;
result
= AcAssocResponse (sd
, ACS_PERMANENT
, ACS_USER_NOREASON
,
context
, respondtitle
, respondaddr
, ctxlist
, defctxresult
,
prequirements
, srequirements
, isn
, settings
, ref
,
user_data_p
, ndata
, aci
);
if ((*user_data_p
) != NULLPE
)
pe_free ((*user_data_p
));
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindError: AcAssocResponse failed"));
/* Have an AcSAPindication, need to return RoNOTindication */
(void) acs2ronotlose (rni
, "RO-BIND.ERROR", aca
);
int RoBindReject (acs
, status
, reason
, rni
)
struct RoNOTindication
* rni
;
struct PSAPstart
* ps
= &(acs
->acs_start
);
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RO-BIND.REJECT called on %d", acs
->acs_sd
));
if (AcAssocResponse (acs
->acs_sd
, status
,
reason
, acs
->acs_context
, NULLAEI
,
NULLPA
, &(ps
->ps_ctxlist
), ps
->ps_defctxresult
,
PR_MYREQUIRE
, ps
->ps_srequirements
, SERIAL_NONE
,
ps
->ps_settings
, &(ps
->ps_connect
), NULLPEP
, 0,
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindReject OK"));
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoBindReject NOTOK"));
return (acs2ronotlose (rni
, "RO-BIND.REJECT", aca
));