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

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


fts_ftp_open() - establish connection with JP1/FTP

Format

#include <apihead.h>
#include <winsock.h>
 
SOCKET  fts_ftp_open(const char *hostname)

Function

This function establishes connection with the JP1/File Transmission Server/FTP Client service.

Arguments

hostname

Specifies the host name of the host on which the JP1/File Transmission Server/FTP Client service 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 physical address of the FTP client 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 the definition for enabling specification of the FTP client's local IP address, see 3.11 Using JP1/FTP in a multiple IP address environment.

Notes

Return values

Socket handler Normal
INVALID_SOCKET Abnormal

To obtain extended error information, call the WSAGetLastError function. The table below lists and describes the return values for the extended error information. For details about other errors, see the winsock documentation.

Return value of extended error information
(hexadecimal, decimal)
Description Can be retried?
FTS_API_ERROR_NOTSTARTUP
(0x2FFFFF00, 805306112)
WSAStartup() has not been called. No
FTS_API_ERROR_UNDEFFTSHOST
(0x2FFFFF01, 805306113)
The specified host name is not defined in the HOSTS file. No
FTS_API_ERROR_CONNREFUSED
(0x2FFFFF02, 805306114)
A connection request was rejected. The JP1/File Transmission Server/FTP Client service might not have been started. No
FTS_API_ERROR_TIMEOUT
(0x2FFFFF03, 805306115)
A connection request to the JP1/File Transmission Server/FTP Client service resulted in a timeout. Connection processing in the JP1/File Transmission Server/FTP Client service might be taking too long or the system on which the JP1/File Transmission Server/FTP Client service is supposed to be running might be down. Yes
FTS_API_ERROR_UNREACH
(0x2FFFFF04, 805306116)
Routing to the host on which the JP1/File Transmission Server/FTP Client service is running might have failed. No
FTS_API_ERROR_DISCONNECT
(0x2FFFFF05, 805306117)
A connection with the JP1/File Transmission Server/FTP Client service was released. If you want to register the transmission request again, you must start the process over from ftp_ftp_open(). No
FTS_API_ERROR_MEMORY
(0x2FFFFF0B, 805306123)
Memory allocation failed. No
FTS_API_ERROR_UNDEFFTSSERV
(0x2FFFFF0C, 805306124)
The definition of the JP1/File Transmission Server/FTP Client (ftsc) is missing in the SERVICES file. No
FTS_API_ERROR_MAXCONNECT
(0x2FFFFF0F, 805306127)
The permitted maximum number (64) of concurrent connections (issuances of fts_ftp_open()) has been reached. No more connections can be established until another API releases connection (issues fts_ftp_close()). Yes
FTS_API_ERROR_NOT_ADMIN
(0x2FFFFF13, 805306131)
The user program was not executed by the administrator (applicable to Windows Server 2008). No

[Contents][Back][Next]


[Trademarks]

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