Hitachi

JP1 Version 12 for UNIX Systems JP1/File Transmission Server/FTP Description, Reference and Operator's Guide


fts_ftp_syn_request_ex() - register transmission requests (synchronous)

Organization of this page

Format

#include <apihead.h>
 
int fts_ftp_syn_request_ex( int sock,
                    char *cardname,
                    FTS_FTP_API_DATA_EX *data,
                    FTS_FTP_API_RETDATA_EX *retdata )

Function

This function registers a transmission request to JP1/FTP and returns the termination result when the transmission is terminated. You can specify the details for the transmission request by specifying a transmission information structure or the name of a registered transmission card. The termination result is returned to the transmission-end information structure. You can determine whether the transmission was successful by checking the trans_status member of the transmission-end information structure.

Arguments

sock

Specifies the return value of fts_ftp_open_ex().

cardname

Specifies the name of a registered transmission card. The file transmission request is registered in accordance with the information on the transmission card.

data

Specifies the address of a transmission information structure.

If NULL is specified in cardname, the file transmission request is registered according to the information specified in data.

If the name of a registered transmission card is specified in cardname, the file transmission request is registered according to the information on the transmission card. The registered transmission information is stored in the transmission information structure. You can use this transmission information structure again when you register another file transmission request.

retdata

Specifies the address of a transmission-end information structure. It returns the termination result of transmission.

Notes

Return values

TRUE

Normal

FALSE

Abnormal.

Registration of the transmission request or acquisition of the transmission termination result failed.

A value indicating an error is set in fts_errno. The table below lists and describes the return values for error information. In the case of an error other than one listed below, the system function's error number is set. For details, see the displayed error number for the system function.

Return value of extended error information (decimal)

Description

Can be retried?

FTS_API_ERROR_DISCONNECT

(805306116)

A connection with the JP1/FTP daemon was released. To register the transmission request again, you must issue fts_ftp_close() and start the process over from fts_ftp_open_ex().

No

FTS_API_ERROR_NOTREADCARD

(805306117)

The specified card name cannot be referenced. The card might not have been registered correctly.

No

FTS_API_ERROR_MAXPALTRANS

(805306119)

The maximum number of transmissions that can be executed concurrently (maximum number of concurrent transmissions) has been reached. Register the transmission request after another transmission is finished. For details about the maximum number of concurrent transmissions, see ftsutil - changes and displays environment information in 6. Commands.

Yes

FTS_API_ERROR_MEMORY

(805306122)

Memory allocation failed.

No

FTS_API_ERROR_NOTSOCK

(805306124)

The return value of fts_ftp_open_ex() might not have been set in the first argument.

No

FTS_API_ERROR_FTSMISS

(805306125)

An error occurred in the JP1/FTP daemon.

No

FTS_API_ERROR_FORCEEND

(805306127)

The JP1/FTP daemon was terminated forcibly.

No

FTS_API_ERROR_LOGIC

(805306128)

A logical conflict error occurred in API.

No

FTS_API_ERROR_MAXGROUPS

(805306129)

The maximum number of secondary groups has been reached.

No