FTAM/9000 Programmer's Guide
402 Chapter 10
Example Programs
Common Code Example
void
con_parm_in(return_event_name, called_ae_name, input_dcb, inout_dcb,
connection_id)
Local_event_name *return_event_name;
Ae_dir_name *called_ae_name;
struct Ft_connect_in_dcb **input_dcb;
struct Ft_connect_out_dcb **inout_dcb;
Connection_id *connection_id;
{
Return_code res;
Api_rc outcome;
struct Ft_diagnostic *diag = NULL;
/*
** Initialize the parameters with valid values.
*/
*return_event_name = SYNCHRONOUS;
/*
** Initialize the called_ae_name as the DDN identifying the
** responder.
*/
convert_ddn(called_ae_name, REMOTE_RESP);
/*
** Initialize the input_dcb.
*/
res = ft_didcb(FTiConnect, 0, (Octet **)input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
/*
** Set up the presentation address.
**
** Note: Only the called_ae_dirname OR the called_presentation_address
** is needed. Both are set up for example purposes only.
*/
/* convert_paddr( & ((*input_dcb)-called_presentation_address),
“0102.0102.0102.490003080009011E20FE00” ); */
/*
** Set up the called_ae_title.
*/
/* 6-5-91 MCK:
* Changed to supply AP-title.
*/
(*input_dcb)-called_ae_title_option = User_object_id_option;
(*input_dcb)-called_ae_title = (struct Object_id *)malloc
(sizeof(struct Object_id));
(*input_dcb)-called_ae_title-ae_object_id.length = 5;
(*input_dcb)-called_ae_title-ae_object_id.element = (Sint32 *)malloc
(5*sizeof(Sint32));
(*input_dcb)-called_ae_title-ae_object_id.element[0] = 1;
(*input_dcb)-called_ae_title-ae_object_id.element[1] = 3;
(*input_dcb)-called_ae_title-ae_object_id.element[2] = 9999;
(*input_dcb)-called_ae_title-ae_object_id.element[3] = 1;
(*input_dcb)-called_ae_title-ae_object_id.element[4] = 7;