Job Management Partner 1/File Transmission Server/FTP Description, Reference and Operator's Guide

[Contents][Index][Back][Next]


fts_ftp_open() - establish connection with the JP1/FTP daemon

Format

#include <apihead.h>
int fts_ftp_open(char *hostname)

Function

This function establishes connection with the client's JP1/FTP daemon.

Arguments

hostname

Specifies the host name of the computer on which the client's JP1/FTP daemon is running. If you specify NULL, the local host name (host name returned by the OS's hostname command: physical host) is assumed.

If you have enabled specification of the FTP client's local IP address, the value specified in this argument becomes the FTP client's local IP address. If you specify NULL, the address of the physical host is assumed.

If you have disabled specification of the FTP client's local IP address, the FTP client's local IP address is assigned automatically by the OS. For details about how to enable specification of the FTP client's local IP address, see 3.15 Using JP1/FTP in a multiple IP address environment.

Notes

Return values

Socket handler Normal
INVALID_SOCKET Abnormal

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_UNDEFFTSHOST
(805306112)
The specified host name is not defined in the /etc/hosts file. No
FTS_API_ERROR_CONNREFUSED
(805306113)
A connection request was rejected. The JP1/FTP daemon might not have been started. No
FTS_API_ERROR_TIMEOUT
(805306114)
A connection request to the JP1/FTP daemon resulted in a timeout. The connection processing in the JP1/FTP daemon might be taking too long or the system on which the JP1/FTP daemon is supposed to be running might be down. Yes
FTS_API_ERROR_UNREACH
(805306115)
Routing to the system on which the JP1/FTP daemon is running might have failed. No
FTS_API_ERROR_DISCONNECT
(805306116)
A connection with the JP1/FTP daemon was released. If you want to register the transmission request again, you must start the processing over from ftp_ftp_open(). No
FTS_API_ERROR_MEMORY
(805306122)
Memory allocation failed. No
FTS_API_ERROR_UNDEFFTSSERV
(805306123)
The definition of Client (ftsc) for the JP1/FTP daemon is missing in the /etc/services file. No
FTS_API_ERROR_MAXCONNECT
(805306126)
The maximum number of APIs that can be connected concurrently (maximum number of concurrent transmissions established through issuance of the fts_ftp_open() function) has been reached. No more connections can be established until a connection is released by means of another API (through issuance of the fts_ftp_close() function). For details about the maximum number of concurrent transmissions, see ftsutil - changes and displays environment information in 6. Commands. Yes

[Contents][Back][Next]


[Trademarks]

All Rights Reserved. Copyright (C) 2010, Hitachi, Ltd.