FTAM/9000 Programmer's Guide
Chapter 10 357
Example Programs
Managing FTAM Connections Example
Managing FTAM Connections Example
This example uses the ft_aeactivation(), ft_connect(), ft_rrequest(),
ft_aedeactivation(), and ft_dfdcb() functions. Refer to the following
sections for associated routines: “Setting Ae_dir_dn and P_address
Utility Example,” “Checking for Errors Example,” and “Common Code
Example.”
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
#include “ftm_globs.h”
#include %<stdio.h>
main()
/*
** ftm_connect
**
** DESCRIPTION:
** This example program illustrates how to establish
** a connection with an active “ftam_init” synchronously.
** This program also releases the connection and deactivates
** “ftam_init”.
**
**
*/
{
Ae_label ae_label;
Connection_id connection_id;
Ae_dir_name my_ae_name;
Ae_dir_name called_ae_name;
Local_event_name return_event_name;
struct Ft_aeactivate_in_dcb *aea_input_dcb;
struct Ft_connect_in_dcb *con_input_dcb;
struct Ft_relreq_in_dcb *rre_input_dcb;
struct Ft_output *aea_inout_dcb;
struct Ft_connect_out_dcb *con_inout_dcb;
struct Ft_relreq_out_dcb *rre_inout_dcb;
struct Ft_output *aed_inout_dcb;
Return_code res;
Api_rc outcome;
struct Ft_diagnostic *diag = NULL;
(void)printf(“ftm_connect: starting\n”);