Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 Networking: HP FTAM/9000 Programmer's Guide > Chapter 8 Transferring HP FTAM/9000 Data

Ending Data Transfer

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Use ft_edata() and ft_etransfer() to terminate data transfers in an orderly manner. Use ft_cancel() to prematurely terminate a data transfer after issuing an ft_read() or ft_write() request, and use ft_rcancel() to respond to a cancel indication.

ft_edata()

#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_edata (connection_id, return_event_name, input_dcb,
inout_dcb)
Connection_id connection_id;
Local_event_name return_event_name;
char *input_dcb;
struct Ft_edata_out_dcb **inout_dcb;

After issuing the necessary number of ft_sdata() functions, call ft_edata() to signal the responder you are no longer sending data (i.e., you completed sending the data unit).

You must call ft_edata() before calling ft_etransfer(); after calling ft_edata(), you can no longer call ft_sdata() until you call ft_etransfer() followed by ft_write().

  • Invoke ft_edata() in the Data Transfer regime; you do not move to another regime.

Ft_edata_in_dcb

struct  Ft_edata_in_dcb {
enum Ft_action_result action_result;
struct Ft_diagnostic *diagnostic;
};

Ft_edata_out_dcb

struct  Ft_edata_out_dcb {
Uint32 size;
struct Api_rc result;
enum Ft_action_result action_result;
struct Ft_diagnostic *diagnostic;
};

ft_edata() Parameters

ft_edata() Parameter

Type

Description

connection_id

Mandatory Input

Uniquely identifies a specific connection to the filestore

return_event_name

Mandatory Input

If the call is asynchronous, uniquely identifies the function call; if the call is synchronous, the value is zero

input_dcb- >action_result

Mandatory Input

Specifies that all data was sent

input_dcb->diagnostic

Optional Input

ISO-specific error information; HP-UX responders accept, but ignore this value

inout_dcb->size

Mandatory input if using inout_dcb

Size (in Octets) of the inout_dcb structure and data

inout_dcb->result

Output

Pointer to the struct Api_rc containing the outcome of the operation: result_code and vendor_code (HP-UX—specific error)

inout_dcb-> action_result

Output

Specifies the overall success or failure of the request

inout_dcb->diagnostic

Output

Provides ISO-specific error information

ft_etransfer()

#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_etransfer (connection_id, return_event_name, input_dcb,
inout_dcb)
Connection_id connection_id;
Local_event_name return_event_name;
char *input_dcb;
struct Ft_etransfer_out_dcb **inout_dcb;

Use ft_etransfer() to end the transferring of data (ft_read() or ft_write()). Use ft_etransfer() in one of the following sequences.

ft_read() ft_rdata() ft_etransfer()

ft_write() ft_sdata() ft_edata() ft_etransfer()

  • Invoking ft_etransfer() in the Data Transfer regime moves you back to the File Open regime.

  • The ft_etransfer() input_dcb parameter does not contain information; therefore, pass a NULL pointer for the input_dcb parameter.

Ft_etransfer_out_dcb

struct  Ft_etransfer_out_dcb {
Uint32 size;
struct Api_rc result;
enum Ft_action_result action_result;
struct Ft_diagnostic *diagnostic;
};

ft_etransfer() Parameters

ft_etransfer() Parameter

Type

Description

connection_id

Mandatory Input

Uniquely identifies a specific connection to the filestore

return_event_name

Mandatory Input

If the call is asynchronous, uniquely identifies the function call; if the call is synchronous, the value is zero

input_dcb

Optional Input

Contains no information; pass a NULL pointer

inout_dcb->size

Mandatory input if using inout_dcb

Size (in Octets) of the inout_dcb structure and data

inout_dcb->result

Output

Pointer to the struct Api_rc containing the outcome of the operation: result_code and vendor_code (HP-UX—specific error)

inout_dcb- >action_result

Output

Specifies the overall success or failure of the request

inout_dcb->diagnostic

Output

Provides ISO-specific error information

ft_cancel()

#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_cancel (connection_id, return_event_name, input_dcb,
inout_dcb)
Connection_id connection_id;
Local_event_name return_event_name;
struct Ft_cancel_in_dcb *input_dcb;
struct Ft_cancel_out_dcb **inout_dcb;

Use ft_cancel() to prematurely terminate the transferring of data. Using ft_cancel() does not abort the entire connection (as does ft_abort()). An example of using ft_cancel() could be when you are reading data from one FTAM file and writing to another, and you encounter an error when writing the data. You may want to cancel reading data from the FTAM file.

Call ft_cancel() after ft_read() or ft_write(), rather than calling ft_etransfer().

  • If you are reading a file, you will not lose data. If you are writing to a file, you may or may not lose the data you wrote.

  • Invoking ft_cancel() in the Data Transfer regime moves you back to the File Open regime.

Ft_cancel_in_dcb

struct  Ft_cancel_in_dcb {
enum Ft_action_result action_result;
struct Ft_diagnostic *diagnostic;
};

Ft_cancel_out_dcb

struct  Ft_cancel_out_dcb {
Uint32 size;
struct Api_rc result;
enum Ft_action_result action_result;
struct Ft_diagnostic *diagnostic;
};

ft_cancel() Parameters

ft_cancel() Parameter

Type

Description

connection_id

Mandatory Input

Uniquely identifies a specific connection to the filestore

return_event_name

Mandatory Input

If the call is asynchronous, uniquely identifies the function call; if the call is synchronous, the value is 0 (zero)

input_dcb- >action_result

Mandatory Input

Indicates failure of the data transfer; must be set to FT_AR_PERMANENT_ERROR

input_dcb->diagnostic

Optional Input

ISO-specific error information; HP-UX responders accept, but ignore, this value

inout_dcb->size

Mandatory input if using inout_dcb

Size (in Octets) of the inout_dcb structure and data

inout_dcb->result

Output

Pointer to the struct Api_rc containing the outcome of the operation: result_code and vendor_code (HP-UX—specific error)

inout_dcb- >action_result

Output

Specifies the overall success or failure of the request

inout_dcb->diagnostic

Output

Provides ISO-specific error information

ft_rcancel()

#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_rcancel (connection_id, return_event_name, input_dcb,
inout_dcb)
Connection_id connection_id;
Local_event_name return_event_name;
struct Ft_rcancel_in_dcb *input_dcb;
struct Ft_rcancel_out_dcb **inout_dcb;

If an error occurs during a data transfer, the responder sends you a ­cancel indication. To acknowledge you received this indication, call ft_rcancel(). A cancel indication returns either as an

  • inout_dcb->result.return_code of FTE175_FCANCEL_IN_RECEIVED on ft_sdata() or

  • as an inout_dcb->data_unit.structure_id of FT_CANCEL_IND on ft_rdata().

If you do not send ft_rcancel(), you receive a protocol error which results in an abort.

  • Invoking ft_rcancel() in the Data Transfer regime moves you back to the File Open regime.

Ft_rcancel_in_dcb

struct  Ft_rcancel_in_dcb {
enum Ft_action_result action_result;
struct Ft_diagnostic *diagnostic;
};

Ft_rcancel_out_dcb

struct  Ft_rcancel_out_dcb {
Uint32 size;
struct Api_rc result;
};

ft_rcancel() Parameters

ft_rcancel() Parameter

Type

Description

connection_id

Mandatory Input

Uniquely identifies a specific connection to the filestore

return_event_name

Mandatory Input

If the call is asynchronous, uniquely identifies the function call; if the call is synchronous, the value is zero

input_dcb-> action_result

Mandatory Input

Indicates failure of the data transfer; set to the action_result received from the cancel indication

input_dcb->diagnostic

Optional Input

ISO-specific error information; set to the diagnostic received from the cancel indication

inout_dcb->size

Mandatory input if using inout_dcb

Size (in Octets) of the inout_dcb structure and data

inout_dcb->result

Output

Pointer to the struct Api_rc containing the outcome of the operation: result_code and vendor_code (HP-UX—specific error)

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.