FTAM/9000 Programmer's Guide

Chapter 10 403
Example Programs
Common Code Example
/*
** Set up the invoke ids.
*/
(*input_dcb)-called_ae_invoke_id = NO_VALUE;
(*input_dcb)-called_ap_invoke_id = NO_VALUE;
/*
** Set up the retry counters and timer.
*/
(*input_dcb)-number_of_retry = 0;
(*input_dcb)-delay_between_retry = 0;
(*input_dcb)-connection_resource_wait_timer = 0;
/*
** Set up the context_name for FTAM.
*/
(*input_dcb)-context_name.element = (Sint32 *)malloc(5*sizeof(Sint32));
(*input_dcb)-context_name.length = 5;
(*input_dcb)-context_name.element[0] = 1;
(*input_dcb)-context_name.element[1] = 0;
(*input_dcb)-context_name.element[2] = 8571;
(*input_dcb)-context_name.element[3] = 1;
(*input_dcb)-context_name.element[4] = 1;
/*
** Set up the service_class, functional_units, and attribute_groups.
*/
(*input_dcb)-connect_in_info.service_class = FT_SC_UNCONSTRAINED
| FT_SC_MANAGEMENT | FT_SC_TRANSFER
| FT_SC_TRANSFER_AND_MGMT | FT_SC_ACCESS;
(*input_dcb)-connect_in_info.functional_units = FT_FU_READ | FT_FU_WRITE
| FT_FU_FILE_ACCESS | FT_FU_LTD_MGMT
| FT_FU_ENH_MGMT | FT_FU_GROUPING;
/* (*input_dcb)-connect_in_info.attribute_groups = FT_AG_STORAGE
| FT_AG_SECURITY | FT_AG_PRIVATE; */
(*input_dcb)-connect_in_info.attribute_groups = FT_AG_STORAGE
| FT_AG_PRIVATE;
/*
** Set up the quality of service.
*/
(*input_dcb)-connect_in_info.quality_of_service = FT_NO_RECOVERY;
/*
** Set up the contents_type_list for FTAM-3 document type.
*/
(*input_dcb)-connect_in_info.contents_type_list =
(struct Ft_contents_type_element *)malloc
(sizeof(struct Ft_contents_type_element));
(*input_dcb)-connect_in_info.contents_type_list-next_element = NULL;
ftam_3( & ((*input_dcb)-connect_in_info.
contents_type_list-contents_type) );
/*
** Set up the initiator_id, account, and file_store_pw.
*/
(*input_dcb)-connect_in_info.initiator_identity = DEST_ID;
(*input_dcb)-connect_in_info.file_store_pw.length = DEST_PW_LEN;
(*input_dcb)-connect_in_info.file_store_pw.pointer = (Octet *)DEST_PW;
(*input_dcb)-connect_in_info.account = DEST_ACCOUNT;