3.15.2 Definitions for each function
- Organization of this subsection
(1) Enabling specification of the FTP client's local IP address
This function enables you to specify the FTP client's local IP address when you transmit files from the client.
To set whether an FTP client's local IP address can be used, specify specify client localhost in the definition file (ftshostenv.conf). The following values can be specified:
-
YES: Enables the local IP address to be specified.
-
NO: Disables specification of the local IP address.
Enabling specification of the local IP address means that you can specify the local IP address for the FTP client.
If you disable specification of the local IP address, the FTP client's local IP address will be assigned automatically by the OS.
When you have enabled specification of the local IP address and you omit the host name, the physical address (host name returned by the OS's hostname command) is used.
The following table shows the local IP address that is used for file transmission depending on whether this function is enabled or disabled and the specification of the FTP client's local IP address.
Command or API |
Host name specification |
Function is enabled |
Function is disabled |
---|---|---|---|
ftstran command |
Host name is specified |
Address of the host whose name is specified |
Address is assigned automatically by the OS |
Host name is omitted |
Physical address |
Address is assigned automatically by the OS |
|
fts_ftp_open_ex() function |
Host name is specified |
Address of the host whose name is specified |
Address is assigned automatically by the OS |
NULL is specified |
Physical address |
Address is assigned automatically by the OS |
To use the host name for the local IP address specification, specify the name of the host on which the user program that calls the ftstran command or the fts_ftp_open_ex() function runs.
- Example
-
This example enables specification of the FTP client's local IP address.
In this case, you would specify the FTP client's local IP address as follows:
- When using the ftstran command
-
In the -H option, specify the host name for the address that is to be used as the FTP client's local IP address. For details about the ftstran command, see ftstran - executes transmission in 6. Commands.
Example: This example executes file transmission that is defined on transmission card card01 from the FTP client localhostname.
- When using API
-
The host name (hostname) of the JP1/FTP daemon that is specified in the fts_ftp_open_ex(char* hostname) function becomes the FTP client's local IP address. For details about fts_ftp_open_ex, see fts_ftp_open_ex() - establish connection with the JP1/FTP daemon in 7. API Library.
(2) Setting the FTP server host name in a response message sent by the FTP server to the host or address that accepted the connection
You can set the local host name in a response message sent by the FTP server to the address that accepted the connection. The following shows the response message that is set by the FTP server.
-
Immediately after control connection is established:
220 host-name FTP server (JP1/File Transmission Server/FTP VV-RR-SS month date year) ready.
-
After the STAT command is received:
211 host-name FTP server status:
In these messages, host-name is replaced with the address that accepted the connection.
To set whether the FTP server host name is to be set in a response message to the host or address that accepted the connection, you must define response hostname reverse lookup in the definition file (ftshostenv.conf). The following values can be specified:
-
YES: Enables the function. The function searches for the host name from the IP address (reverse host name lookup) and then returns the host name of the address that accepted the connection to the response message.
-
NO: Enables the function. The IP address that accepted the connection is set in the response message, and no host name search (reverse host name lookup) is performed.
-
Omitted: Disables the function. The host name at the physical address (that is returned by the OS's hostname command) is returned to the response message.
- Example
-
This example returns a response message using the host name of the address that accepted the connection.
(3) Specifying the destination of JP1 events
You can specify the destination of JP1 events. We recommend that you specify a destination for JP1 events that indicate the start and termination of daemons (JP1/FTP daemon, log daemon, and Operations-Manager Agent). The target event IDs are from 00010D20 to 00010D28.
To enable specification of the destination of JP1 events, define jp1event host in the definition file (ftshostenv.conf). The following values can be specified:
-
host-name|IP-address: The JP1 events indicating the start and termination of daemons are sent to the specified host.
-
omitted: All JP1 events indicating the start and termination of daemons are sent to the physical address (host name returned by the OS's hostname command).
If the destination for JP1 events is specified, the default destination for the JP1 events indicating the termination of file transmission is the local host that executed the transmission. The target event IDs are 00010D0B-00010D0D.
To set the destination for the JP1 events indicating the termination of file transmission to the host specified at the JP1 event destination, define jp1event trans is same in the definition file (ftshostenv.conf). The following values can be specified:
-
YES: Specifies that the destination specified in jp1event host is to be the destination to which the JP1 events indicating the termination of file transmission are to be sent.
-
NO: Specifies that the host that executed the transmission is to be the destination to which the JP1 events indicating the termination of file transmission are to be sent.
The following table shows the relationship between the definition specification values and the destination to which the JP1 events indicating the termination of file transmission are to be sent.
jp1event host |
jp1event trans is same |
Destination to which the JP1 events indicating the termination of file transmission are to be sent |
---|---|---|
Specified |
YES |
Host specified in jp1event host |
NO |
Host that executed the transmission |
|
Not specified |
YES |
Physical host |
NO |
Physical host |
- Example
-
The example below specifies jp1eventhost as the host to which the JP1 events indicating the start and termination of daemons and the termination of file transmission are to be sent.