Hitachi

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


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:

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.

Table 3‒21: Local IP address used for file transmission depending on whether the 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.

[Figure]

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.

[Figure]

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.

  1. Immediately after control connection is established:

    220 host-name FTP server (JP1/File Transmission Server/FTP VV-RR-SS month date year) ready.
  2. 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:

Example

This example returns a response message using the host name of the address that accepted the connection.

[Figure]

(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:

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:

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.

Table 3‒22: Destination to which the JP1 events indicating the termination of file transmission are to be sent, as determined on the basis of the definition specification values

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.

[Figure]