DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ F T

⟦62411c022⟧ TextFile

    Length: 111864 (0x1b4f8)
    Types: TextFile
    Names: »FTP_HELP«

Derivation

└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS 
    └─ ⟦91c658230⟧ »DATA« 
        └─⟦f6fec0485⟧ 
            └─⟦this⟧ 
└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦f95d63c89⟧ 
            └─⟦this⟧ 

TextFile


  @node !Tools.Networking.File_Transfer

  Package File_Transfer provides a programmatic interface for
  carrying out file transfers using the File Transfer Protocol (FTP).
  This package manages the state associated with the connection and
  carries out the transfer of files and other information.  The user
  acquires resources by opening a connection that is identified by
  the handle.  This handle is used in subsequent commands to identify
  the connection and its resources.

  To use FTP, the user first opens a command connection between
  the local machine and an FTP server on some remote machine.  This
  connection is used to communicate requests and status between the
  two machines.  Requests are sent across the command connection to
  the remote server.  These requests consist of commands followed
  by optional arguments.  The remote server reads these commands,
  processes them, and then sends back a response informing the
  host machine of the outcome of the command.  The remote server
  could have successfully processed the command, unsuccessfully
  processed it, or not supported the command or some of its options.
  In general, the communication is in the form of a negotiation
  in which the local client makes a request and the remote server
  responds as to whether it has accepted or rejected the request.

  Each response sent back contains a three-digit number and some
  text.  The number is used by the local client to determine the
  outcome of the latest request.  The text is intended for the
  user.  The user can use the Read_Response procedure to read these
  responses.

  Both the remote and the local machines maintain information about
  the various FTP options.  When the user wants to change one of
  these options, a negotiation takes place.  If both machines support
  the option, then the new value takes effect.  If one or both of
  the machines does not support the requested option, the old value
  remains unchanged.

  For the transfer of files, a second connection is used.  This
  connection is formed between the two machines when each file
  transfer is invoked.  The connection is formed by the remote server
  and requires no special commands from the user.  The protocol is
  that the local client selects a connection and listens on it,
  waiting for the remote server to connect.  A transfer command, such
  as Ftp.Store, is sent to the remote server, telling it the file
  to transfer and that a connection is waiting.  The remote server
  connects to the local client and the file transfer occurs.  The
  specification for FTP defines the location of this data connection
  relative to the command connection so that the remote server knows
  where the host server will be listening.  There is also a command
  that can be sent to identify this connection.  This command allows
  the local client to clarify the identity of the connection; in
  some cases, the local client can use a connection other than the
  specified standard connection.

  Several options control the transfer of data between the machines.
  These options include Mode, which specifies how the bits of data
  are to be transmitted, and Structure and Type, which define the
  way in which the file is to be represented.  The user can select
  these options by using the Set_Mode, Set_Structure, and Set_Type
  commands.  There are multiple values for each of these options.

  The reading and writing of the local files is carried out by using
  one of two nonbyte-aligned input/output packages.  If the user
  has set the transfer type to Binary or Local_Binary, the local
  client assumes that the file contains nonbyte-aligned data and
  uses package !Io.Polymorphic_Io when manipulating the file.  If
  the user has set the transfer type to Ascii, Ebcdic, Image, or any
  of the other types, then the file is manipulated using package
  !Io.Device_Independent_Io.

  Each implementation of FTP need not support all FTP options.  The
  local client itself supports only a subset of the options.  When a
  user selects a value for one of these options, the local client
  first determines whether it can support that option.  If the
  local client does not support the new value, a status code of
  No_Local_Support is returned and the setting is left at its old
  value.  If the local client does support the requested value, it
  then sends a command to the remote server requesting that it update
  its setting for that option to the new value.  If the remote server
  supports the option, it updates its setting and returns a response
  indicating that it has done so.  If it does not support the new
  value, it returns a response indicating that the value has not been
  changed.  The local client processes the response and, if it was a
  positive response, updates its local copy of the option to the new
  value.  If a negative response is received, the local copy remains
  at its old setting.  The status code for the command indicates the
  outcome of each of these transactions.

  Once the options have been agreed upon, the file transfer can
  occur.  When the user invokes a transfer command, the local
  client prepares the second connection over which the file will
  be transferred.  The request is then sent to the remote machine
  either to receive a file, writing it to the specified location, or
  to send a copy of the specified file back to the local host.  In
  either case, the remote server initiates the connection for the
  data connection and the file is transferred.

  In addition to the file transfer commands, other FTP commands give
  the user the ability to query the remote machine for status or
  help information, get directory listings, or manipulate files on
  the remote machines.  Again, some of these commands are optional
  for server implementations, and the user may receive a response
  indicating that the command is not implemented.
  @node !Tools.Networking.File_Transfer.Close

  procedure Close (Connection : Connect_Id);

  Closes the given connection.

  The underlying resources associated with the connection are
  released and made available for use by other connections.

  If the given connection is connected, it is disconnected.  If the
  given connection is already closed or has never been opened, this
  procedure does nothing.
  @node !Tools.Networking.File_Transfer.Command_Is_Active

  function Command_Is_Active (Connection : Connect_Id) return Boolean;

  Indicates whether a command is currently being processed on the
  given connection.

  A command starts with the sending of the request to the remote
  machine; it is complete when the completion response is received
  from the remote machine.

  If the connection is not open or is not connected, false is
  returned.
  @node !Tools.Networking.File_Transfer.Command_Status

  procedure Command_Status (Connection :     Connect_Id;
                           Status     : out Ftp_Defs.Status_Code);

  Returns the final status of the last operation performed.

  If the connection is closed, or has never been opened, a status of
  Ftp_Defs.Status_Code.Invalid_Use is returned.  If the connection
  is no longer connected to a remote machine, or was never connected,
  then a status of Ftp_Defs.Status_Code.Network_Error is returned.
  If the command is still in progress, this command blocks until the
  command completes.  Also, all remaining responses are ignored.
  @node !Tools.Networking.File_Transfer.Connect

  procedure Connect (Connection     : Connect_Id;
                    To_Remote_Host : Transport_Defs.Host_Id;
                    Remote_Socket  : Transport_Defs.Socket_Id :=
                                                      Default_Ftp_Socket);

  Connects to an FTP server on some remote machine.

  The user first must have executed the Open procedure to allocate
  local resources.  If the connection has not been opened, the
  Connect procedure fails and the Command_Status procedure returns
  Ftp_Defs.Status_Code.Invalid_Use.
  @node !Tools.Networking.File_Transfer.Connect_Id

  type Connect_Id is private;

  Specifies the resources in this machine associated with the FTP
  connection.
  @node !Tools.Networking.File_Transfer.Current_Mode

  function Current_Mode (Connection : Connect_Id) return Ftp_Defs.Mode_Code;

  Returns the current transfer mode setting for the given connection.

  If the connection is not open, the default mode
  (Ftp_Defs.Default_Mode) is returned.
  @node !Tools.Networking.File_Transfer.Current_Structure

  function Current_Structure (Connection : Connect_Id)
                                           return Ftp_Defs.Structure_Code;

  Returns the current transfer structure setting for the given
  connection.

  If the connection is not open or is not connected, the default
  structure (Ftp_Defs.Default_Structure) is returned.
  @node !Tools.Networking.File_Transfer.Current_Type

  function Current_Type (Connection : Connect_Id) return Ftp_Defs.Type_Code;

  Returns the current transfer type setting for the given connection.

  If the connection is not open or is not connected, the default type
  (Ftp_Defs.Default_Type) is returned.
  @node !Tools.Networking.File_Transfer.Data_Host_Id

  function Data_Host_Id (Connection : Connect_Id)
                                            return Transport_Defs.Host_Id;

  Returns the local Host_Id for the transport connection that is used
  to transfer the file data.

  The value is the host identifier for the host machine.
  @node !Tools.Networking.File_Transfer.Data_Socket_Id

  function Data_Socket_Id (Connection : Connect_Id)
                                          return Transport_Defs.Socket_Id;

  Returns the local Socket_Id for the transport connection that is
  used for the transfer of file data.
  @node !Tools.Networking.File_Transfer.Default_Ftp_Socket

  Default_Ftp_Socket : constant Transport_Defs.Socket_Id :=
                                                 (1 => 0, 2 => Socket_21);

  Defines a constant for the Socket_Id for FTP servers.
  @node !Tools.Networking.File_Transfer.Dio_File_Of

  function Dio_File_Of (Connection : Connect_Id) return Ftp_Defs.Dio_Pointer;

  Returns access to the file handle used internally by the FTP
  transfer service when reading or writing files.

  When carrying out nonbinary transfers, the local file transfer
  server uses a specific file handle when reading from or writing
  into a local file.  These operations are done using package
  !Io.Device_Independent_Io.

  In some cases, a user may want to share access to this file handle.
  An example could be that the user wants to have a program generate
  data into a local file and then transfer that file across the
  network.  One way would be to write the data into a named file and
  then request a file transfer to transfer the file given its name.

  Another method would be to open this local file using the file
  handle from package File_Transfer, write the information into the
  file, and then reset the file for reading.  File transfer is then
  requested to transfer with no local filename given that informs
  it that the file handle is already open.  If the form expressing a
  local filename is used, an error occurs because the local server
  tries to open the named file using the handle that the user already
  has in use.
  @node !Tools.Networking.File_Transfer.Disconnect

  procedure Disconnect (Connection : Connect_Id);

  Disconnects the current command connection to the remote host.

  If no connection exists, nothing happens.
  @node !Tools.Networking.File_Transfer.End_Of_Line

  function End_Of_Line (Connection : Connect_Id) return Boolean;

  Returns true when the end of line of a response on the command
  connection has been reached.

  If no command is active and the function is called, then true is
  returned.
  @node !Tools.Networking.File_Transfer.End_Of_Response

  function End_Of_Response (Connection : Connect_Id) return Boolean;

  Returns true when there are no further responses to the current
  command.

  If no command is active, true is returned.
  @node !Tools.Networking.File_Transfer.File_Transfer_Status

  procedure File_Transfer_Status (Connection :     Connect_Id;
                                 Status     : out Ftp_Defs.Transfer_Status);

  Returns the current status of the most recent data transfer
  request.

  If the trans-
  fer is active, the status Ftp_Defs.Transfer_Status.In_Progress
  is returned.  If the transfer is complete, the final outcome of the
  transfer is returned.
  @node !Tools.Networking.File_Transfer.Get_Owner

  procedure Get_Owner (Connection :     Connect_Id;
                      Owner      : out Machine.Job_Id);

  Returns the owner of the connection.
  @node !Tools.Networking.File_Transfer.Is_Connected

  function Is_Connected (Connection : Connect_Id) return Boolean;

  Determines whether the specified connection is connected to a
  remote machine.
  @node !Tools.Networking.File_Transfer.Is_Logged_In

  function Is_Logged_In (Connection : Connect_Id) return Boolean;

  Returns, for the given connection, that the user has been
  successfully logged into the remote host.
  @node !Tools.Networking.File_Transfer.Is_Open

  function Is_Open (Connection : Connect_Id) return Boolean;

  Checks whether the specified connection is currently open.

  If the connection is closed or has never been opened, false is
  returned.
  @node !Tools.Networking.File_Transfer.Last_Transfer_Length

  function Last_Transfer_Length (Connection : Connect_Id) return Natural;

  Returns a count of the number of bytes sent or received during the
  last file transfer.
  @node !Tools.Networking.File_Transfer.Last_Transfer_Time

  function Last_Transfer_Time (Connection : Connect_Id) return Duration;

  Returns the time taken to complete the last file transfer.
  @node !Tools.Networking.File_Transfer.Most_Recent_Command

  function Most_Recent_Command (Connection : Connect_Id)
                                             return Ftp_Defs.Ftp_Commands;

  Indicates which command was last executed.

  This can be an active command or the last-finished command.
  @node !Tools.Networking.File_Transfer.Most_Recent_Command_Status

  function Most_Recent_Command_Status (Connection : Connect_Id)
                                              return Ftp_Defs.Status_Code;

  Returns the status value for the command most recently processed.

  If the command is currently active, the status
  Ftp_Defs.Status_Code.Command_In_Progress is returned.
  @node !Tools.Networking.File_Transfer.Most_Recent_Response_Code

  function Most_Recent_Response_Code (Connection : Connect_Id)
                                                           return Natural;

  Returns the response code from the most recent response.

  FTP responses from the remote host have a three-digit code number
  at the beginning intended for use by a program to determine the
  next processing step.  This function makes those values visible to
  the user.
  @node !Tools.Networking.File_Transfer.Most_Recent_Transfer_Status

  function Most_Recent_Transfer_Status (Connection : Connect_Id)
                                           return Ftp_Defs.Transfer_Status;

  Returns the current status of the most recent file transfer.

  If the transfer is still active, the value
  Ftp_Defs.Transfer_Status.In_Progress is returned.
  @node !Tools.Networking.File_Transfer.Null_Connect_Id

  Null_Connect_Id : constant Connect_Id;

  Defines a constant representing the value for the socket number on
  which the FTP server waits for a command connection.
  @node !Tools.Networking.File_Transfer.Open

  procedure Open (Connection : out Connect_Id;
                 Status     : out Transport_Defs.Status_Code);

  Allocates the resources required to form a connection.

  Once opened, the connection can be connected and disconnected
  many times.  It continues to be associated with the same local
  resources.
  @node !Tools.Networking.File_Transfer.Pasv_Data_Host

  function Pasv_Data_Host (Connection : Connect_Id)
                                            return Transport_Defs.Host_Id;

  Returns the Host_Id associated with the data connection the remote
  user is waiting on after the Send_Pasv procedure has successfully
  executed.

  This function is used for third-party transfers (transfer of a file
  between two remote machines, directed by the user's local machine).
  @node !Tools.Networking.File_Transfer.Pasv_Data_Socket

  function Pasv_Data_Socket (Connection : Connect_Id)
                                          return Transport_Defs.Socket_Id;

  Returns the Socket_Id associated with the data link being listened
  to by the remote machine after the Send_Pasv procedure has
  successfully executed.
  @node !Tools.Networking.File_Transfer.Pio_File_Of

  function Pio_File_Of (Connection : Connect_Id) return Ftp_Defs.Pio_Pointer;

  Returns access to the file handle used internally by the FTP
  transfer service when reading or writing binary files.

  This function gives the user visibility to this handle so that a
  user program can open and manipulate the file used by the transfer
  service.

  When transferring files, the transfer service uses a specific file
  handle for access to the file being transferred.  This function
  allows a user program to share access to this handle.  In this way,
  a user can retrieve data into a local file and still have control
  over the file.

  It is important that the user not manipulate the file handle while
  the file transfer is in progress.  Also, once the transfer has
  completed, the user must close the file handle.  If the user has
  this handle still open, the server is unable to open the new file.
  @node !Tools.Networking.File_Transfer.Read_Response

  procedure Read_Response (Connection :     Connect_Id;
                          Message    : out String;
                          Count      : out Natural);

  Returns the text messages received from the FTP server on the
  remote host.

  The messages still contain the code values found at the start of
  the messages.  The messages are line-oriented.
  @node !Tools.Networking.File_Transfer.Remote_Host_Id

  function Remote_Host_Id (Connection : Connect_Id)
                                            return Transport_Defs.Host_Id;

  Returns the Host_Id for the remote server to which the connection
  is currently connected.
  @node !Tools.Networking.File_Transfer.Send_Account

  procedure Send_Account (Connection : Connect_Id;
                         Account    : String);

  Transmits account information to the remote host that may be
  required for login or file access.
  @node !Tools.Networking.File_Transfer.Send_Cwd

  procedure Send_Cwd (Connection      : Connect_Id;
                     Remote_Pathname : String);

  Sends a request for the remote server to change the default
  directory to that specified by the Remote_Pathname parameter.
  @node !Tools.Networking.File_Transfer.Send_Data_Port

  procedure Send_Data_Port (Connection : Connect_Id;
                           Host       : Transport_Defs.Host_Id;
                           Socket     : Transport_Defs.Socket_Id);

  Transmits the identity of the local data link to the remote server.

  In normal use, the user supplies the host and socket information
  through the Data_Host_Id and Data_Socket_Id functions.  There are
  cases, however, in which a user may be using the local server as
  an intermediary for communications between two remote servers.  In
  this case, the data port sent is for one of the remote machines.
  @node !Tools.Networking.File_Transfer.Send_Delete

  procedure Send_Delete (Connection      : Connect_Id;
                        Remote_Filename : String);

  Sends a request for the remote server to delete the specified file.
  @node !Tools.Networking.File_Transfer.Send_Help_Request

  procedure Send_Help_Request (Connection : Connect_Id;
                              Help_On    : String     := "");

  Requests the server to send helpful information regarding its
  implementation status over the command connection.

  The response to the command is read using the Read_Response
  procedure.
  @node !Tools.Networking.File_Transfer.Send_Password

  procedure Send_Password (Connection : Connect_Id;
                          Password   : String);

  Sends the password associated with the username previously sent.

  This procedure must immediately follow the Send_Username procedure
  when sent.  A command status of Ftp_Defs.Status_Code.Need_Password
  following Send_Username indicates that the password is needed.
  @node !Tools.Networking.File_Transfer.Send_Pasv

  procedure Send_Pasv (Connection : Connect_Id);

  Requests the remote server to go into passive mode on its data
  port.

  This procedure is used in third-party transfers to put one of
  the servers into the passive mode.  The returned port identity is
  sent to the partner server to complete the connection using the
  Send_Data_Port procedure call.  The remote returns the identity of
  this port and the local server attempts to read this information.
  If successful, the Pasv_Data_Host and Pasv_Data_Socket functions
  return the Internet address for the remote data port.  A command
  status of Local_Pasv_Error indicates that the remote server acted
  on the request but encountered problems trying to interpret the
  response.

  For a discussion of third-party transfers, see the ARPA RFC-765
  documentation for the File Transfer Protocol Specification.
  @node !Tools.Networking.File_Transfer.Send_Quit

  procedure Send_Quit (Connection : Connect_Id);

  Sends a request to log out the session from the remote server.

  If the remote server accepts and processes this command, it
  disconnects the command connection from its side after sending
  the response.  After reading the responses, the user should use the
  Is_Connected function to determine that the line was successfully
  disconnected.
  @node !Tools.Networking.File_Transfer.Send_Site_Command

  procedure Send_Site_Command (Connection : Connect_Id;
                              Argument   : String);

  Sends a site-specific request to the remote server.

  Extensions and site-specific operations are performed using the
  FTP protocol "SITE" command.
  @node !Tools.Networking.File_Transfer.Send_Status_Request

  procedure Send_Status_Request (Connection : Connect_Id;
                                Status_On  : String     := "");

  Sends a request for the status of the remote server process.
  @node !Tools.Networking.File_Transfer.Send_Username

  procedure Send_Username (Connection : Connect_Id;
                          Username   : String);

  Sends username information to the remote FTP server.

  This is the first command to be sent after a successful connection
  has been made.
  @node !Tools.Networking.File_Transfer.Send_Verbatim

  procedure Send_Verbatim (Connection : Connect_Id;
                          Command    : String);

  Sends an arbitrary FTP protocol command.

  The Command parameter is sent across the command connection
  unchanged.  This command must be a simple command that has no
  side effects, such as causing the server to try to transfer a file.
  The local client does not act on the responses but merely passes
  them to the user.
  @node !Tools.Networking.File_Transfer.Set_Allocation

  procedure Set_Allocation (Connection : Connect_Id;
                           Pages      : Natural;
                           Records    : Natural);

  Reserves storage space for the next file to be stored.

  This command may be required by some servers to reserve sufficient
  storage to accommodate the new file to be transferred.  The
  argument specifies the number of bytes to be reserved.  This
  command is not needed for Rational machines.
  @node !Tools.Networking.File_Transfer.Set_Mode

  procedure Set_Mode (Connection : Connect_Id;
                     New_Mode   : Ftp_Defs.Mode_Code);

  Sends a request for the transfer mode setting to be changed to a
  specified value.

  The local server first checks to see that it supports the mode; if
  it does, the request is sent to the remote server.  If a positive
  response is received, the local setting is updated.  If either
  server does not support the new option, the current value is left
  unchanged.

  A command status of Ftp_Defs.Status_Code.No_Local_Support
  indicates that the local server does not support the option.
  A status of Command_Not_Implemented or Param_Not_Implemented
  indicates that the remote server does not support the option.
  @node !Tools.Networking.File_Transfer.Set_Owner

  procedure Set_Owner (Connection : in Connect_Id;
                      Owner      :    Machine.Job_Id);

  Sets the owner of a connection.

  Each connection is owned by some job.  When a job terminates, all
  connections owned by it are closed automatically.

  By default, a connection is owned by the job that owned it.
  @node !Tools.Networking.File_Transfer.Set_Structure

  procedure Set_Structure (Connection    : Connect_Id;
                          New_Structure : Ftp_Defs.Structure_Code);

  Sends a request for the transfer structure setting to be changed to
  a specified value.

  The local server first checks to see that it supports the mode; if
  it does, the request is sent to the remote server.  If a positive
  response is received, the local setting is updated.  If either
  server does not support the new option, the current value is left
  unchanged.

  A command status of Ftp_Defs.Status_Code.No_Local_Support
  indicates that the local server does not support the option.
  A status of Command_Not_Implemented or Param_Not_Implemented
  indicates that the remote server does not support the option.
  @node !Tools.Networking.File_Transfer.Set_Type

  procedure Set_Type (Connection : Connect_Id;
                     New_Type   : Ftp_Defs.Type_Code);

  Sends a request for the transfer type setting to be changed to a
  specified value.

  The local server first checks to see that it supports the mode; if
  it does, the request is sent to the remote server.  If a positive
  response is received, the local setting is updated.  If either
  server does not support the new option, the current value is left
  unchanged.

  A command status of Ftp_Defs.Status_Code.No_Local_Support
  indicates that the local server does not support the option.
  A status of Command_Not_Implemented or Param_Not_Implemented
  indicates that the remote server does not support the option.
  @node !Tools.Networking.File_Transfer.Socket_21

  Socket_21 : constant := 21;

  Defines a constant representing the value for the socket number on
  which the FTP server waits for a command connection.
  @node !Tools.Networking.File_Transfer.Start_Directory_List

  procedure Start_Directory_List (Connection      : Connect_Id;
                                 Remote_Pathname : String;
                                 Verbose         : Boolean    := False);
  procedure Start_Directory_List (Connection      : Connect_Id;
                                 Local_Filename  : String;
                                 Remote_Pathname : String;
                                 Verbose         : Boolean    := False);

  Sends a request for the remote server to transfer a copy of the
  directory listing associated with the Remote_Pathname parameter as
  a file transfer.

  The first form assumes that the user has already opened the file
  handle with a call to !Io.Device_Independent_Io.Open, using
  Dio_File_Of(Connection).All to denote the file handle.

  The second form opens the file and writes the contents of the
  transfer into the file named by the Local_Filename parameter.

  In both cases, the local server copies the data transferred into
  the local file.
  @node !Tools.Networking.File_Transfer.Start_Retrieve

  procedure Start_Retrieve (Connection      : Connect_Id;
                           Remote_Filename : String);
  procedure Start_Retrieve (Connection      : Connect_Id;
                           Local_Filename  : String;
                           Remote_Filename : String;
                           Append          : Boolean    := False);

  Sends a request for the remote server to transfer a copy of the
  file specified by the Remote_Filename parameter to the local
  server.

  The first form assumes that the user has opened the file handle
  for output using the appropriate open (Binary and Local_Binary
  transfers use package !Io.Polymorphic_Io; the remainder use
  package !Io.Device_Independent_Io).

  In the second form, the local server stores the data in the file
  specified by Local_Filename.

  In both cases, the local server copies the data transferred into
  the local file.

  For multiple retrieves, the user should use the Send_Data_Port
  command with the parameter values Null_Host_Id and Null_Socket_Id.
  This will assign new sockets for the transfer.
  @node !Tools.Networking.File_Transfer.Start_Store

  procedure Start_Store (Connection      : Connect_Id;
                        Remote_Filename : String;
                        Append          : Boolean    := False);
  procedure Start_Store (Connection      : Connect_Id;
                        Local_Filename  : String;
                        Remote_Filename : String;
                        Append          : Boolean    := False);

  Sends a request for the remote server to accept a copy of the file
  specified by the Remote_Filename parameter transferred from the
  local server.

  The first form assumes that the user has opened the file handle
  for input using the appropriate open (Binary and Local_Binary
  transfers use package !Io.Polymorphic_Io; the remainder use
  package !Io.Device_Independent_Io).

  In the second form, the local server reads the contents of the
  file specified by the Local_Filename parameter for transfer to the
  remote server.

  For multiple stores, the user should use the Send_Data_Port command
  with the parameter values Null_Host_Id and Null_Socket_Id.  This
  will assign new sockets for the transfer.
  @node !Tools.Networking.File_Transfer.Transfer_Is_Active

  function Transfer_Is_Active (Connection : Connect_Id) return Boolean;

  Returns true if a file transfer is currently active.
  @node !Commands.Ftp

  Package Ftp provides commands for carrying out file transfer to
  and from remote machines, using the U.S. Department of Defense File
  Transfer Protocol (FTP).

  FTP is an interactive, session-oriented transfer protocol.
  The user carries out a file transfer by first establishing a
  connection to the remote machine over which requests are sent
  and responses returned.  Once this connection has been formed, the
  remote server usually requires that the user supply username and
  password information, much as if the user were logging onto the
  machine itself.  Some machines may require additional information
  associating the user with a given account on the remote machine.

  When the user has gained access to the remote machine, file
  transfers can then take place.  These transfers occur over a second
  connection formed between the two machines when each file transfer
  is invoked.

  Several options control the transfer of data between the machines.
  These options include Mode, which specifies how the bits of the
  data are to be transmitted, and Structure and Type, which are used
  to define the way in which the file is to be represented.  The

  user can select these options as parameters to various commands
  or by using the specific Use_Mode, Use_Structure, and Use_Type
  commands.  There are multiple values for each of these options.
  Each implementation of FTP need not support all of the choices.
  The R1000 implementation, for example, supports only a subset of
  the options.  When a user selects a value for one of these options,
  the client software first determines whether it can support that
  option.  If the client software does not support the new value,
  the user is informed and the setting is left at its old value.  If
  the local client software does support the requested value, it
  sends a command to the remote server requesting that it update its
  setting for that option to the new value.  If the remote server
  supports the option, it updates its setting and returns a response
  indicating that it has done so.  If it does not support the new
  value, it returns a response indicating that the value has not been
  changed.  The local client processes the response and, if it was a
  positive response, updates its local copy of the option to the new
  value.  If a negative response is received, the local copy remains
  at its old setting.  The user receives log information indicating
  the outcome of each of these transactions.

  Once the options have been agreed upon, the file transfer can
  occur.  When the user invokes a transfer command, the server
  prepares the second connection, over which the file will be
  transferred.  The request is then sent to the remote machine either
  to receive a file, writing it into the specified location, or
  to send a copy of the specified file back to the local host.  In
  either case, the remote server connects the data connection and the
  file is transferred.

  In addition to the file transfer commands, other commands
  in package Ftp query the remote machine for status or help
  information, get directory listings, or manipulate files on
  the remote machine.  Again, some of these commands are optional
  for server implementations, and the user may receive a response
  indicating that the command is not implemented.

  Some commands (Get, Get_List, Get_Set, Put, Put_Set) bundle
  several operations into one command.  These commands go through
  the complete cycle of connecting to the remote machine, logging
  in, transferring files, and finally disconnecting from the remote
  server.  These commands allow the user to carry out all the steps
  for a file transfer in one command.

  Some of the transfer commands can move many files at a time
  (Get_List, Get_Set, Put_Set, Retrieve_List, Retrieve_Set, and
  Store_Set).  The _Set commands accept a source filename with
  wildcards, resolve that name on the source machine, and move all
  the files to which the wildcard expands.  The _List commands read a
  list of remote filenames from a local file and transfer all of the
  named files.
  @node !Commands.Ftp.Abandon

  procedure Abandon (Response : Profile.Response_Profile := Profile.Get);

  Causes the connection to the remote host to be broken and local
  resources freed.

  This procedure is used when the remote server has become
  unresponsive.
  @node !Commands.Ftp.Aos

  Aos : constant Ftp_Name_Map.Machine_Type := Ftp_Name_Map.Aos;

  Defines a constant for a Unix machine that imports the Machine_Type
  value of Aos from Ftp_Name_Map.

  This constant is used to indicate that the transfer is to/from a
  Data General computer using the AOS operating system.
  @node !Commands.Ftp.Ascii

  Ascii : constant Ftp_Defs.Type_Code := Ftp_Defs.Ascii;

  Defines a constant that imports the Type_Code value of Ascii from
  Ftp_Defs.

  This constant is used to indicate that the file being transferred
  is an ASCII text file.
  @node !Commands.Ftp.Ascii_Cc

  Ascii_Cc : constant Ftp_Defs.Type_Code := Ftp_Defs.Ascii_Cc;

  Defines a constant that imports the Type_Code value of Ascii_Cc
  from Ftp_Defs.

  This constant is used to indicate that the file being transferred
  is an ASCII text file with ASA (FORTRAN) vertical format control.
  @node !Commands.Ftp.Ascii_Telnet

  Ascii_Telnet : constant Ftp_Defs.Type_Code := Ftp_Defs.Ascii_Telnet;

  Defines a constant that imports the Type_Code value of Ascii_Telnet
  from Ftp_Defs.

  This constant is used to indicate that the file being transferred
  is an ASCII text file with Telnet vertical format control.
  @node !Commands.Ftp.Binary

  Binary : constant Ftp_Defs.Type_Code := Ftp_Defs.Binary;

  Defines a constant that imports the Type_Code value of Binary from
  Ftp_Defs.

  This constant is used to indicate that the file being transferred
  is binary data that are not byte-aligned.
  @node !Commands.Ftp.Block

  Block : constant Ftp_Defs.Mode_Code := Ftp_Defs.Block;

  Defines a constant that imports the Mode_Code value of Block from
  Ftp_Defs.

  This constant is used to indicate that the file is transmitted as a
  series of data blocks preceded by one or more header bytes.
  @node !Commands.Ftp.Change_Working_Directory

  procedure Change_Working_Directory
  (Remote_Directory : String                  :=
                                              Ftp_Profile.Remote_Directory;
   Response         : Profile.Response_Profile := Profile.Get;
   Account          : String                  := Ftp_Profile.Account);

  Sets the user's working context on the remote machine.
  @node !Commands.Ftp.Compressed

  Compressed : constant Ftp_Defs.Mode_Code := Ftp_Defs.Compressed;

  Defines a constant that imports the Mode_Code value of Compressed
  from Ftp_Defs.

  This constant is used to indicate that the file is compressed.
  It sends replication of bytes and filler as control information
  describing the number of repetitions of a given byte or filler.
  @node !Commands.Ftp.Connect

  procedure Connect
  (To_Machine         : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Auto_Login         : Boolean                  := Ftp_Profile.Auto_Login;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Roof        : String                   := Ftp_Profile.Remote_Roof;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Transfer_Type      : Ftp_Defs.Type.Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Forms a connection to a remote machine for an FTP file transfer
  session.

  If the user has specified automatic login, the username, password,
  and account information are used to log onto the remote server.
  If the user specifies that automatic login is not to occur, only
  the connection is formed, and the user must supply the login
  information later.
  @node !Commands.Ftp.Current_Connection

  function Current_Connection return File_Transfer.Connect_Id;

  Returns the connection identification number for the current
  connection.
  @node !Commands.Ftp.Current_Remote_Roof

  function Current_Remote_Roof return String
                                    renames Ftp_Profile.Current_Remote_Roof;

  Returns the current roof value for the remote host.

  This value is used when moving multiple files to or from the remote
  host to indicate the outermost point in the directory structure.
  @node !Commands.Ftp.Current_Remote_Type

  function Current_Remote_Type return Ftp_Name_Map.Machine_Type
                                    renames Ftp_Profile.Current_Remote_Type;

  Returns a value indicating the type of machine currently specified
  for the remote host.

  This information is used during automatic generation of remote
  filenames to determine any translations needed for pathname
  characters marking directory structure information.
  @node !Commands.Ftp.Cwd

  procedure Cwd
  (Remote_Directory : String                  :=
                                              Ftp_Profile.Remote_Directory;
   Response         : Profile.Response_Profile := Profile.Get;
   Account          : String                  := Ftp_Profile.Account)
                                      renames Ftp.Change_Working_Directory;

  Sets the user's working context on the remote machine to be that
  specified by the Remote_Directory parameter.
  @node !Commands.Ftp.Delete

  procedure Delete
             (Remote_File : String;
             Response    : Profile.Response_Profile := Profile.Get;
             Account     : String                  := Ftp_Profile.Account);

  Sends a request for the remote host to delete a file.
  @node !Commands.Ftp.Disconnect

  procedure Disconnect (Response : Profile.Response_Profile := Profile.Get);

  Disconnects the current session from the remote machine.

  This procedure sends the FTP protocol "QUIT" command and then
  disconnects the network connection, freeing local resources.

  If the user is not connected, nothing is done and an error message
  is written into the log file.
  @node !Commands.Ftp.Ebcdic

  Ebcdic : constant Ftp_Defs.Type_Code := Ftp_Defs.Ebcdic;

  Defines a constant that imports the Type_Code value of Ebcdic from
  Ftp_Defs.

  This constant indicates that the file being transferred uses the
  eight-bit EBCDIC character representation.
  @node !Commands.Ftp.Ebcdic_Cc

  Ebcdic_Cc : constant Ftp_Defs.Type_Code := Ftp_Defs.Ebcdic_Cc;

  Defines a constant that imports the Type_Code value of
  Ebcdic_Telnet from Ftp_Defs.

  This constant indicates that the file being transferred uses the
  eight-bit EBCDIC character representation with ASA (FORTRAN)
  vertical control.
  @node !Commands.Ftp.Ebcdic_Telnet

  Ebcdic_Telnet : constant Ftp_Defs.Type_Code := Ftp_Defs.Ebcdic_Telnet

  Defines a constant that imports the Type_Code value of
  Ebcdic_Telnet from Ftp_Defs.

  This constant indicates that the file being transferred uses the
  eight-bit EBCDIC character representation with Telnet vertical
  control.
  @node !Commands.Ftp.File

  File : constant Ftp_Defs.Structure_Code := Ftp_Defs.File;

  Defines a constant that imports the Structure_Code value of File
  from Ftp_Defs.

  This constant indicates that the file being transmitted is a
  continuous sequence of data bytes.
  @node !Commands.Ftp.Get

  procedure Get
  (From_Remote_File   : String                   := "";
   To_Local_File      : String                   := "";
   Remote_Machine     : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Append_To_File     : Boolean                  := False;
   Transfer_Type      : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Ftp.Profile_Get);

  Retrieves a file from a remote host.

  This procedure is used as a one-step operation to retrieve a file
  from a remote host.  It forms a connection that logs in the user
  and retrieves the file.  At the end of the transfer, the connection
  is disconnected.
  @node !Commands.Ftp.Get_List

  procedure Get_List
  (Remote_File_List   : String                   := "";
   Local_Roof         : String                   := "$";
   Remote_Roof        : String                   := Ftp_Profile.Remote_Roof;
   Remote_Machine     : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Append_To_File     : Boolean                  := False;
   Transfer_Type      : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Retrieves multiple files from a remote host.

  This procedure is used as a one-step operation to retrieve multiple
  files from a remote host.  A connection is formed to the specified
  machine.  The connection is logged in using the user information
  supplied.  Files specified in the Remote_File_List parameter
  are retrieved.  At the end of the transfer, the connection is
  disconnected.

  The names of the local files are generated algorithmically from the
  names of the remote files, using the Ftp_Name_Map.Remote_To_Local
  function.  The Local_Roof, Remote_Roof, and Remote_Type parameters
  are used in this conversion.
  @node !Commands.Ftp.Get_Set

  procedure Get_Set
  (From_Remote_File_Set : String                   := "";
   Local_Roof           : String                   := "$";
   Remote_Roof          : String                   :=
                                                   Ftp_Profile.Remote_Roof;
   Remote_Machine       : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username            : String                   := Ftp_Profile.Username;
   Password            : String                   := Ftp_Profile.Password;
   Account             : String                   := Ftp_Profile.Account;
   Remote_Directory     : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type          : Ftp_Name_Map.Machine_Type :=
                                                   Ftp_Profile.Remote_Type;
   Append_To_File       : Boolean                  := False;
   Transfer_Type        : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode        : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure   : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port           : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response            : Profile.Response_Profile  := Profile.Get);

  Retrieves multiple files from a remote host.

  This procedure is used as a one-step operation to retrieve multiple
  files from a remote host.  A connection is formed to the specified
  machine.  The connection is logged in using the user information
  supplied.  Files matching the template From_Remote_File_Set are
  retrieved and placed in the context indicated by the Local_Roof
  parameter.  At the end of the transfer, the connection is
  disconnected.

  The names of the local files are generated algorithmically from the
  names of the remote files, using the Ftp_Name_Map.Remote_To_Local
  function.  The Local_Roof, Remote_Roof, and Remote_Type parameters
  are used in this conversion.
  @node !Commands.Ftp.Image

  Image : constant Ftp_Defs.Type_Code := Ftp_Defs.Image;

  Defines a constant that imports the Type_Code value of Image from
  Ftp_Defs.

  This constant indicates that binary data are transferred as
  contiguous bits of eight-bit transfer bytes.
  @node !Commands.Ftp.List

  procedure List
         (Remote_Pathname : String                  := "";
          Verbose         : Boolean                 := True;
          To_Local_File   : String                  := "";
          Response        : Profile.Response_Profile := Profile.Get;
          Account         : String                  := Ftp_Profile.Account);

  Produces a directory listing from the remote host.
  @node !Commands.Ftp.Local_Binary

  Local_Binary : constant Ftp_Defs.Type_Code := Ftp_Defs.Local_Binary;

  Defines a constant that imports the Type_Code value of Local_Binary
  from Ftp_Defs.

  This constant indicates that the data transferred are not byte-
  aligned or are from a server that does not support binary mode.
  @node !Commands.Ftp.Local_Byte

  Local_Byte : constant Ftp_Defs.Type_Code := Ftp_Defs.Local_Byte;

  Defines a constant that imports the Type_Code value of Local_Byte
  from Ftp_Defs.

  This constant indicates that the data are transferred in logical
  bytes of the size specified with the type.
  @node !Commands.Ftp.Login

  procedure Login
  (Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Roof        : String                   := Ftp_Profile.Remote_Roof;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Transfer_Type      : Ftp_Defs.Type.Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Performs login procedures for the current connection.

  This command is used when the Auto_Login feature of the Connect
  procedure is not used.
  @node !Commands.Ftp.Mv

  Mv : constant Ftp_Name_Map.Machine_Type := Aos;

  Defines a constant that imports a Machine_Type value of Aos from
  Ftp_Name_Map.

  This constant is used to indicate that the transfer is to/from a
  Data General computer using the AOS operating system.
  @node !Commands.Ftp.Mvs

  Mvs : constant Ftp_Name_Map.Machine_Type := Ftp_Name_Map.Mvs;

  Defines a constant that imports the Machine_Type value of Mvs from
  Ftp_Name_Map.

  This constant is used to indicate that the transfer is to/from an
  IBM computer using the MVS operating system.  It is not supported.
  @node !Commands.Ftp.Page

  Page : constant Ftp_Defs.Structure_Code := Ftp_Defs.Page;

  Defines a constant that imports the Structure_Code value of Page
  from Ftp_Defs.

  This constant is used to indicate that the file consists of
  independent, indexed pages.
  @node !Commands.Ftp.Profile_Get

  function Profile_Get return Profile.Response_Profile renames Profile.Get;

  Returns the current response profile for the current job.

  This function is used as a parameter to commands in the Environment
  to supply the current response profile to those commands.  The
  function returns the response profile for the current job.  If
  a profile for the job has not been defined, the session default
  profile is returned.
  @node !Commands.Ftp.Put

  procedure Put
  (From_Local_File    : String                   := "<IMAGE>";
   To_Remote_File     : String                   := "";
   Remote_Machine     : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Append_To_File     : Boolean                  := False;
   Transfer_Type      : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Stores a file onto a remote host.

  This procedure is used as a one-step operation to store a file onto
  a remote host.  A connection is formed to the specified machine.
  The connection is logged in using the user information supplied.
  The local file is transferred to the remote machine and placed in
  the remote file.  At the end of the transfer, the connection is
  disconnected.
  @node !Commands.Ftp.Put_Set

  procedure Put_Set
  (From_Local_File_Set : String                   := "<IMAGE>";
   Local_Roof          : String                   := "$";
   Remote_Roof         : String                   :=
                                                   Ftp_Profile.Remote_Roof;
   Remote_Machine      : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account            : String                   := Ftp_Profile.Account;
   Remote_Directory    : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type         : Ftp_Name_Map.Machine_Type :=
                                                   Ftp_Profile.Remote_Type;
   Append_To_File      : Boolean                  := False;
   Transfer_Type       : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode       : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure  : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port           : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Stores multiple files onto a remote host.

  This procedure is used as a one-step operation to store multiple
  files onto a remote host.  A connection is formed to the specified
  machine.  The connection is logged in using the user information
  supplied.  Files matching the template for the From_Local_File_Set
  parameter are stored in the context indicated by the Remote_Roof
  parameter.  At the end of the transfer, the connection is
  disconnected.
  @node !Commands.Ftp.Rational

  Rational : constant Ftp_Name_Map.Machine_Type := Ftp_Name_Map.Rational;

  Defines a constant that imports the Machine_Type value of Rational
  from Ftp_Name_Map.

  This constant is used to denote a machine running the Rational
  Environment.
  @node !Commands.Ftp.R1000

  R1000 : constant Ftp_Name_Map.Machine_Type := Ftp_Name_Map.Rational;

  Defines a constant that imports the Machine_Type value of R1000
  from Ftp_Name_Map.

  This constant is used to denote a machine running the Rational
  Environment.
  @node !Commands.Ftp.Recrd

  Recrd : constant Ftp_Defs.Structure_Code := Ftp_Defs.Recrd;

  Defines a constant that imports the Structure_Code value of Recrd
  from Ftp_Defs.

  This constant is used to indicate that the file consists of
  sequential records.
  @node !Commands.Ftp.Remote_Help

  procedure Remote_Help
               (Argument : String                  := "";
                Response : Profile.Response_Profile := Profile.Get;
                Account  : String                  := Ftp_Profile.Account);

  Requests help information from the remote server for commands.
  @node !Commands.Ftp.Remote_Status

  procedure Remote_Status
               (Argument : String                  := "";
                Response : Profile.Response_Profile := Profile.Get;
                Account  : String                  := Ftp_Profile.Account);

  Requests status information from the remote server.

  The information returned varies from machine to machine.  If an
  argument is supplied, directory/file information is returned for
  the file(s) specified by the argument.
  @node !Commands.Ftp.Retrieve

  procedure Retrieve
    (From_Remote_File : String                   := "";
     To_Local_File    : String                   := "";
     Append_To_File   : Boolean                  := False;
     Response         : Profile.Response_Profile  := Profile.Get;
     Remote_Type      : Ftp_Name_Map.Machine_Type := Ftp.Current_Remote_Type;
     Account          : String                   := Ftp_Profile.Account);

  Retrieves a copy of a file from a remote machine.

  The user session must already be connected and logged into the
  remote machine.
  @node !Commands.Ftp.Retrieve_List

  procedure Retrieve_List
    (Remote_File_List : String                   := "";
     Local_Roof       : String                   := "$";
     Remote_Roof      : String                   := Ftp.Current_Remote_Roof;
     Remote_Type      : Ftp_Name_Map.Machine_Type := Ftp.Current_Remote_Type;
     Append_To_File   : Boolean                  := False;
     Response         : Profile.Response_Profile  := Profile.Get;
     Account          : String                   := Ftp_Profile.Account);

  Retrieves multiple files from a remote machine, using a list of
  remote filenames stored in a file on the local machine.

  The files are stored on the local machine with names mapped
  from the remote filenames.  The names of the local files are
  generated algorithmically from the names of the remote files,
  using the Ftp_Name_Map.Remote_To_Local function.  The Local_Roof,
  Remote_Roof, and Remote_Type parameters are used in this
  conversion.
  @node !Commands.Ftp.Retrieve_Set

  procedure Retrieve_Set
  (From_Remote_File_Set : String                   := "";
   Local_Roof           : String                   := "$";
   Remote_Roof          : String                   :=
                                                   Ftp.Current_Remote_Roof;
   Remote_Type          : Ftp_Name_Map.Machine_Type :=
                                                   Ftp.Current_Remote_Type;
   Append_To_File       : Boolean                  := False;
   Response            : Profile.Response_Profile  := Profile.Get;
   Account             : String                   := Ftp_Profile.Account);

  Retrieves multiple files from a remote machine.

  The names of the local files are generated algorithmically from the
  names of the remote files, using the Ftp_Name_Map.Remote_To_Local
  function.  The Local_Roof, Remote_Roof, and Remote_Type parameters
  are used in this conversion.
  @node !Commands.Ftp.Send_Port

  procedure Send_Port
       (Enabled  : Boolean                 := Ftp_Profile.Send_Port_Enabled;
        Response : Profile.Response_Profile := Profile.Get);

  Enables or disables the sending of port information to the remote
  server.

  To ensure that both the local and the remote server are consistent,
  the FTP protocol supports an option to send the identity of the
  data connection it will use during a file transfer.  This command
  allows the user to specify whether this option should be active.
  If Send_Port is enabled, the host identifier and socket number
  of the local data connection is sent to the remote server before
  each transfer.  The parameter should be set to true for transfer of
  multiple files.
  @node !Commands.Ftp.Show_Profile

  procedure Show_Profile (Response : Profile.Response_Profile := Profile.Get)
                                                  renames Ftp_Profile.Show;

  Displays the various package Ftp parameters in the session switch
  file.
  @node !Commands.Ftp.Status

  procedure Status (Argument : String                  := "";
                   Response : Profile.Response_Profile := Profile.Get);

  Displays local status such as the condition of the connection and
  whether any command is active.
  @node !Commands.Ftp.Status_All

  procedure Status_All (Argument : String                  := "";
                       Response : Profile.Response_Profile := Profile.Get);

  Displays information for all package Ftp connections originating
  from this machine.
  @node !Commands.Ftp.Store

  procedure Store
         (From_Local_File : String                  := "<IMAGE>";
          To_Remote_File  : String                  := "";
          Append_To_File  : Boolean                 := False;
          Response        : Profile.Response_Profile := Profile.Get;
          Account         : String                  := Ftp_Profile.Account);

  Stores a copy of the local file onto the remote machine to which
  the session is currently connected.

  The transfer is conducted in accordance with all other separately
  specified parameters (Text, Image, Block, and so on).  The user
  session must already be connected and logged into the remote
  machine.
  @node !Commands.Ftp.Store_Set

  procedure Store_Set
  (From_Local_File_Set : String                   := "<IMAGE>";
   Local_Roof          : String                   := "$";
   Remote_Roof         : String                   :=
                                                   Ftp.Current_Remote_Roof;
   Remote_Type         : Ftp_Name_Map.Machine_Type :=
                                                   Ftp.Current_Remote_Type;
   Append_To_File      : Boolean                  := False;
   Response           : Profile.Response_Profile  := Profile.Get;
   Account            : String                   := Ftp_Profile.Account);

  Stores multiple files from the local machine onto the currently
  connected remote machine.

  The transfer is conducted in accordance with all other separately
  specified parameters (Text, Image, Block, and so on).
  @node !Commands.Ftp.Stream

  Stream : constant Ftp_Defs.Mode_Code := Ftp_Defs.Stream;

  Defines a constant that imports the Mode_Code value of Stream from
  Ftp_Defs.

  This constant is used to indicate that the data are transmitted as
  a stream of bytes.
  @node !Commands.Ftp.Unix

  Unix : constant Ftp_Name_Map.Machine_Type := Ftp_Name_Map.Unix;

  Defines a constant that imports the Machine_Type value of Unix from
  Ftp_Name_Map.

  This constant is used to denote a machine running under the UNIX
  operating system.
  @node !Commands.Ftp.Use_Account

  procedure Use_Account
                (Account  : String                  := Ftp_Profile.Account;
                 Response : Profile.Response_Profile := Profile.Get);

  Sends a request for the account setting to be changed to the
  specified value.
  @node !Commands.Ftp.Use_Mode

  procedure Use_Mode
           (Value    : Ftp_Defs.Mode_Code       := Ftp_Profile.Transfer_Mode;
            Response : Profile.Response_Profile := Profile.Get;
            Account  : String                  := Ftp_Profile.Account);

  Sends a request for the transfer mode setting to be changed to the
  specified value.

  The client first determines whether it supports the transfer
  mode; if it does, the request is sent to the remote server.  If
  a positive response is received, the local setting is updated.
  @node !Commands.Ftp.Use_Remote_Roof

  procedure Use_Remote_Roof
             (Value    : String                  := Ftp_Profile.Remote_Roof;
             Response : Profile.Response_Profile := Profile.Get);

  Specifies the roof value to be used for the remote machine.
  @node !Commands.Ftp.Use_Remote_Type

  procedure Use_Remote_Type
            (Value    : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
             Response : Profile.Response_Profile  := Profile.Get);

  Specifies the machine type for the current connection.

  This information is used when resolving differences in the
  directory-naming conventions.  When a connection is formed to a
  remote machine, the service has no knowledge of the type of machine
  to which it is connected.  Therefore, the type must be specified
  either through this command or as a parameter to the transfer
  commands.
  @node !Commands.Ftp.Use_Structure

  procedure Use_Structure
      (Value    : Ftp_Defs.Structure_Code  := Ftp_Profile.Transfer_Structure;
       Response : Profile.Response_Profile := Profile.Get;
       Account  : String                  := Ftp_Profile.Account);

  Sends a request for the transfer structure setting to be changed to
  the specified value.

  The client first determines whether it supports the structure; if
  it does, the request is sent to the remote server.  If a positive
  response is received, the local setting is updated.
  @node !Commands.Ftp.Use_Type

  procedure Use_Type
           (Value    : Ftp_Defs.Type_Code       := Ftp_Profile.Transfer_Type;
            Response : Profile.Response_Profile := Profile.Get;
            Account  : String                  := Ftp_Profile.Account);

  Sends a request for the transfer type setting to be changed to the
  specified value.

  The client first determines whether it supports the structure; if
  it does, the request is sent to the remote server.  If a positive
  response is received, the local setting is updated.
  @node !Commands.Ftp.Vax

  Vax : constant Ftp_Name_Map.Machine_Type := Vms;

  Defines a constant that imports a Machine_Type value of Vms from
  Ftp_Name_Map.

  This constant is used to denote a DEC machine using the VMS
  operating system.
  @node !Commands.Ftp.Vms

  Vms : constant Ftp_Name_Map.Machine_Type := Ftp_Name_Map.Vms;

  Defines a constant that imports a Machine_Type value of Vms from
  Ftp_Name_Map.

  This constant is used to denote a DEC machine using the VMS
  operating system.
  @node !Tools.Networking.Ftp_Defs

  Package Ftp_Defs provides types that are used by packages Ftp and
  File_Transfer and other networking software.
  @node !Tools.Networking.Ftp_Defs.Default_Mode

  Default_Mode : Mode_Code := Stream;

  Specifies the default transfer mode used by the FTP protocol.
  @node !Tools.Networking.Ftp_Defs.Default_Structure

  Default_Structure : Structure_Code := File;

  Specifies the default transfer structure used by the FTP protocol.
  @node !Tools.Networking.Ftp_Defs.Default_Type

  Default_Type : Type_Code := Ascii;

  Specifies the default transfer type used by the FTP protocol.
  @node !Tools.Networking.Ftp_Defs.Dio_Pointer

  type Dio_Pointer is access Device_Independent_Io.File_Type;

  Defines access to the type of file used during package Ftp transfer
  operations.

  This command allows the user to share access to the transfer file
  with the package Ftp programmatic interface.  In carrying out
  nonbinary transfers, the local file transfer server uses a specific
  file handle when reading from or writing into a local file.  These
  operations are done using package !Io.Device_Independent_Io.  In
  some cases, a user may want to share access to this file handle.
  For example, a user may want to have a program generate data into
  a local file and then transfer that file across the network.  One
  way would be to write the data into a named file and then request
  file transfer to transfer the file given its name.  Another method
  would be to open this local file using the file handle from package
  File_Transfer, write the information into the file, and then reset
  the file for reading.  File transfer is then requested to transfer
  the file.
  @node !Tools.Networking.Ftp_Defs.Ftp_Commands

  type Ftp_Commands is (Login, Set_User, Set_Pass, Set_Account, Set_Type,
                       Set_Stru, Set_Mode, Set_Allocation, Send_File,
                       Send_File_Append, Retr_File, List_Directory,
                       Nlst_Directory, Do_Cwd, Do_Delete, Do_Help, Do_Stat,
                       Do_Port, Do_Pasv, Do_Site, Verbatim, Do_Quit, Noop);

  Specifies the various operations performed by the FTP service.

  Of interest when working with the programmatic interface, these
  operations give the user the ability to check the current command
  status.
  Do_Cwd

  Changes remote current working directory.

  Do_Delete

  Deletes file at remote host.
  Do_Help

  Gets help from remote.

  Do_Pasv

  Requests passive data operation.

  Do_Port

  Sends data port information.

  Do_Quit

  Logs off.

  Do_Site

  Sends FTP protocol "SITE" command.

  Do_Stat

  Gets status from remote.
  List_Directory

  Gets verbose directory listing.

  Login

  Forms the initial connection.
  Nlst_Directory

  Gets name list of directory.

  Noop

  Has no effect.
  Retr_File

  Retrieves file from remote.
  Send_File

  Sends file to remote.
  Send_File_Append

  Sends file and appends to remote file.

  Set_Account

  Sets account information.
  Set_Allocation

  Sets space allocation.

  Set_Mode

  Sets transfer mode information.
  Set_Pass

  Sets password information.

  Set_Stru

  Sets transfer structure information.
  Set_Type

  Sets transfer type information.

  Set_User

  Sets user information.
  Verbatim

  Sends an arbitrary FTP protocol command.
  @node !Tools.Networking.Ftp_Defs.Ftp_Product_Is_Installed

  function Ftp_Product_Is_Installed return Boolean;

  Determines whether the FTP utility is installed on the user's
  system.
  @node !Tools.Networking.Ftp_Defs.Mode_Code

  type Mode_Code is (Stream, Block, Compressed);

  Defines the transmission modes for the transfer of data over the
  FTP data connection.
  Block

  Transmits a file as a series of data blocks preceded by one or
  more header bytes.  The header bytes contain a count field and a
  descriptor code.  The count field indicates the total length of the
  data block in bytes.  The descriptor code indicates structure items
  such as End_Of_File and End_Of_Record.
  Compressed

  Compresses and sends replications of bytes and filler as control
  information describing the number of repetitions of a given byte or
  filler.

  Stream

  Transmits data as a stream of bytes.  There is no restriction on
  the representation type used.
  @node !Tools.Networking.Ftp_Defs.Pio_Handle

  type Pio_Handle is
      record
          File_Handle : Polymorphic_Io.Handle;
          Position    : Polymorphic_Io.File_Position;
      end record;

  Defines the components of the file handle used when dealing with
  binary transfers of data.

  This command is used in the transfer of nonbyte-aligned data.
  @node !Tools.Networking.Ftp_Defs.Pio_Pointer

  type Pio_Pointer is access Pio_Handle;

  Defines access to the type of file used during a binary transfer
  operation.

  This type allows the user to share access to the transfer file with
  the package Ftp programmatic interface.
  @node !Tools.Networking.Ftp_Defs.Status_Code

  type Status_Code is (Command_In_Progress, Successful, Need_Password,
                      Need_Account, Not_Used, Transfer_Started,
                      Transfer_Complete, Transfer_Failed, Not_Logged_In,
                      Syntax_Error, Bad_Sequence, No_Local_Support,
                      Command_Not_Implemented, Param_Not_Implemented,
                      Local_Pasv_Error, Remote_Directory_Error, Timed_Out,
                      Network_Error, Invalid_Use, Unknown_Error);

  Specifies the status of the current FTP operation.

  Bad_Sequence

  Indicates that sequenced commands (that is, username followed by
  password) were done out of sequence.

  Command_In_Progress

  Indicates that the command is active pending a response.

  Command_Not_Implemented

  Indicates that the remote server does not implement the requested
  command.
  Invalid_Use

  Indicates that the connection is not open or the caller is not a
  valid user of the connection.
  Local_Pasv_Error

  Indicates that a Send_Pasv request got a successful response from
  the remote server but the local server could not interpret the
  returned port information.

  Need_Account

  Indicates that account information is needed to proceed.

  Need_Password

  Indicates that the command has completed successfully and the
  password is needed next.

  Network_Error

  Indicates that some problem has occurred on the network.  The
  connection may have been lost.

  No_Local_Support

  Indicates that the local transfer worker has no local support for
  the requested option.

  Not_Logged_In

  Indicates that the command failed because the user login procedure
  failed or the user never logged in.

  Not_Used

  Indicates that the command is not needed at the remote server (that
  is, no account is needed).
  Param_Not_Implemented

  Indicates that the remote server does not support the specified
  option for the command (that is, the page structure transfer may
  not be supported).

  Remote_Directory_Error

  Indicates a file or directory access error.

  Successful

  Indicates that the command has completed successfully.

  Syntax_Error

  Indicates a command syntax error (that is, the line is too long).

  Timed_Out

  Indicates that no response was received by the local server from
  the last request sent.

  Transfer_Complete

  Indicates that the transfer has completed successfully.

  Transfer_Failed

  Indicates that the transfer failed.  Refer to Transfer_Status type
  to determine the reason for the failure.
  Transfer_Started

  Indicates that the transfer of data is currently being performed.

  Unknown_Error

  Indicates that an error response that could not be classified was
  received.
  @node !Tools.Networking.Ftp_Defs.Structure_Code

  type Structure_Code is  (File, Recrd, Page);

  Defines the various representations for the structure of the file
  during the transfer.

  File

  Indicates that the file is a continuous sequence of data bytes.

  Page

  Indicates that the file is made up of independent, indexed pages.

  Recrd

  Indicates that the file is made up of sequential records.
  @node !Tools.Networking.Ftp_Defs.Transfer_Status

  type Transfer_Status is (In_Progress, Ok, Local_Error, File_Error,
                          Line_Error, Open_Failed, Transfer_Abort,
                          Remote_File_Unavailable, Remote_File_Error,
                          Storage_Error, Unknown_Page_Type, Filename_Bad,
                          Comm_Line_Error, Unknown_Error);

  Defines the various status codes associated with data transfers.

  These status values are meaningful only after a data transfer has
  been performed.

  Comm_Line_Error

  Indicates that the command link was lost during the data transfer,
  which means that the outcome of the data transfer could not be
  determined.
  File_Error

  Indicates that a transfer failed because of a local file error.
  Filename_Bad

  Indicates that the filename specified for the remote machine was
  not allowed.
  In_Progress

  Indicates that a transfer is currently active.

  Line_Error

  Indicates a problem with the data line; the transfer could not be
  completed.

  Local_Error

  Indicates that the transfer failed because of a local error in
  processing.

  Ok

  Indicates that a transfer has successfully completed.

  Open_Failed

  Indicates that a data connection could not be opened to start the
  transfer.
  Remote_File_Error

  Indicates that a file error occurred at the remote machine.
  Remote_File_Unavailable

  Indicates that the file was unavailable at the remote site.
  Storage_Error

  Indicates that the transfer failed because of storage limitations
  at the remote machine.
  Transfer_Abort

  Indicates that the file transfer has been aborted.
  Unknown_Error

  Indicates that an error response that could not be classified was
  received for the last transfer.
  Unknown_Page_Type

  Indicates that the remote machine did not recognize the page
  structure used for data transfer.
  @node !Tools.Networking.Ftp_Defs.Type_Code

  type Type_Code is (Ascii, Ebcdic, Image, Binary, Local_Binary, Local_Byte,
                    Ascii_Cc, Ebcdic_Cc, Ascii_Telnet, Ebcdic_Telnet);

  Defines the data representation for information transfer over the
  data connection during FTP file transfers.

  Ascii

  Transfers text files.  This is the default type for data transfer
  and is intended for the transfer of text files.  The data are
  transmitted using the standard eight-bit NVT-ASCII representation
  for the characters.
  Ascii_Cc

  Transfers ASCII type with ASA (FORTRAN) vertical format control.
  Currently not supported by the Rational implementation.

  Ascii_Telnet

  Transfers ASCII type with Telnet vertical format control.
  Currently not supported by the Rational implementation.

  Binary

  Transmits binary data that are not byte-aligned.  This type is
  similar to Image, but it is intended for true binary transfer
  of data.  This type is supported only by Rational FTP protocol
  implementation.  Binary data are sent with the final bits padded to
  a byte boundary.  An additional final byte specifies the number of
  bits of padding added.  The receiving server uses this information
  to remove the padded bits and to store only the bits from the
  original file.

  Ebcdic

  Transmits text files using eight-bit EBCDIC character
  representation.

  Ebcdic_Cc

  Transfers EBCDIC type with ASA (FORTRAN) vertical format control.
  Currently not supported by the Rational implementation.

  Ebcdic_Telnet

  Transfers EBCDIC type with Telnet vertical format control.
  Currently not supported by the Rational implementation.

  Image

  Transmits binary data as contiguous bits of eight-bit transfer
  bytes.  The receiving site stores the data as contiguous bytes.  It
  should be noted that the transfer is in bytes.

  Local_Binary

  Transmits binary data that are not byte-aligned to or from a
  server that does not support the Binary mode.  Data are sent with
  the final byte padded and the padding information added.  The
  receiving server does not remove them but instead stores all the
  bytes sent.  If a file with this padding information is retrieved
  using Local_Binary, the padding information is removed and only the
  binary image is stored in the local file.  This mode allows storing
  of binary files on non-Rational systems to be processed there or
  later retrieved.

  Local_Byte

  Transfers data in logical bytes of the size specified with the
  type.  Currently not supported by the Rational implementation.
  @node !Tools.Networking.Ftp_Name_Map

  Package Ftp_Name_Map defines mappings between Rational object
  names and filenames on other machines.  When package Ftp is used
  to transfer a set of files between machines, the package uses
  these mappings to convert filenames.  The mappings are intended to
  preserve the information in filenames and to produce legal names on
  the target machine.  Directory names are mapped to directory names,
  and filenames are mapped to filenames.  Punctuation characters are
  mapped to legal values.

  The mapping functions are built around the idea of a roof.
  Basically, a roof is an ancestor directory of the file being
  transferred; that is, it contains the file or it contains a
  directory that contains the file, and so on.  For each set of
  transferred files, the user specifies a Local_Roof (an ancestor
  directory on the local machine) and a Remote_Roof (an ancestor
  directory on the remote machine).  Filenames are mapped on the
  assumption that the directory subtrees under the two roofs are
  isomorphic; that is, each directory under the local roof has a
  correspondingly named directory under the remote roof.  This is
  intended to help the user maintain copies of the same objects on
  two machines.

  If the source file is immediately within the directory named by
  the source roof, the target filename is immediately within the
  directory named by the target roof.  If there are directory levels
  between the source roof and the source filename, the corresponding
  directory levels are interposed between the target roof and the
  target filename.  If a source name is outside the source roof (that
  is, the source roof does not identify a parent directory of the
  source file), the target filename is immediately under the target
  roof, with a simple name derived from the simple filename of the
  source file.

  To flatten a file set (that is, to transfer files from many
  directories on the source machine into a single directory on the
  target machine), the user specifies a null source roof ("").
  This causes the mapping functions to map all filenames into the
  directory identified by the target roof, with simple names mapped
  from their source simple names.

  The mappings are not invertible; mapping to a remote filename and
  then mapping back does not always result in the same filename.

  The mappings differ for various types of remote machines.  The
  differences primarily concern punctuation and restrictions on
  names.

  For Rational objects other than files, the mapping functions try
  to put information about the type of the file in the filename.
  For example, an Ada unit named My_Program will be mapped to the
  filename My_Program.Ada or My_Program_Ada.  This is useful because
  Ada units are transferred as text.  When a transferred unit arrives
  at its destination, it will be Ada source, even though it may have
  been a compiled program originally.
  @node !Tools.Networking.Ftp_Name_Map.Local_To_Remote

  function Local_To_Remote (File_Name   : String;
                           Local_Roof  : String;
                           Remote_Roof : String;
                           Remote_Type : Machine_Type) return String;

  Maps the name of a local object to its remote form.

  This function converts the filename on the local machine to a legal
  filename on the target host.  Directory names are converted to
  legal directory names on the target host.  Punctuation characters
  in the host filenames and directories are converted to legal values
  on the target host.

  The function attempts to resolve the file and directory names
  in their context.  If it cannot resolve the names, the function
  returns the best resolution possible.

  This function can be used to ascertain the mappings before the file
  is sent to the target host.
  @node !Tools.Networking.Ftp_Name_Map.Machine_Type

  type Machine_Type is new String;
  Rational : constant Machine_Type := "Rational";
  Unix     : constant Machine_Type := "Unix";
  Aos      : constant Machine_Type := "Aos";
  Vms      : constant Machine_Type := "Vms";
  Mvs      : constant Machine_Type := "Mvs";

  Specifies the types of remote machines supported by the mapping
  functions.

  Name mappings differ for various types of remote machines.  The
  differences primarily concern punctuation and restrictions on
  names.

  "Rational" denotes a machine running the Rational Environment.
  Rational pathnames use the exclamation mark (!)  to denote the root
  and the period (.)  to separate the simple names of directories.
  Simple names are Ada simple names.

  "Unix" denotes a machine running the UNIX operating system.  UNIX
  pathnames use the slash (/) to denote the root and to separate
  the simple names of directories.  The period (.)  is commonly used
  within a simple name to separate the object name and object class.

  "Aos" denotes a machine running the Data General AOS operating
  system.  AOS pathnames use the colon (:)  to denote the root and
  to separate the simple names of directories.  The period (.)  is
  commonly used within a simple name to separate the object name and
  object class.

  "Vms" denotes a machine running the DEC VMS operating system.
  VMS pathnames use brackets ([]) to enclose directory pathnames.
  Within the brackets, a period (.)  separates the simple names of
  directories.  The period is also used within a simple filename to
  separate the object name and object class.

  "Mvs" denotes a machine running the IBM MVS operating system.
  "Mvs" is not currently supported.
  @node !Tools.Networking.Ftp_Name_Map.Remote_To_Local

  function Remote_To_Local (File_Name   : String;
                           Local_Roof  : String;
                           Remote_Roof : String;
                           Remote_Type : Machine_Type) return String;

  Maps the name of a remote file to its local form.

  This function converts the filename on the remote machine to a
  legal filename on the local host.  Directory names are converted to
  legal directory names on the local host.  Punctuation characters in
  the host filenames and directories are converted to legal values on
  the local host.

  The function attempts to resolve the file and directory names
  in their context.  If it cannot resolve the names, the function
  returns the best resolution possible.

  This function can be used to ascertain the mappings before the file
  is sent to the local host.
  @node !Tools.Networking.Ftp_Product

  Package Ftp_Product provides a way to check whether the FTP product
  has been installed on your machine.
  @node !Tools.Networking.Ftp_Product.Is_Installed

  function Is_Installed return Boolean;

  Returns true if the FTP product has been installed on your machine.
  @node !Tools.Networking.Ftp_Product.Is_Not_Installed

  Is_Not_Installed : exception;

  Defines an exception that is raised when an FTP subprogram is
  called if the FTP product is not installed on your machine.
  @node !Tools.Networking.Ftp_Profile

  The main purpose of this package is to provide default values for
  the FTP user interface (package Ftp).

  Many parameter values are virtually constant for a given user.  For
  common applications, it is much easier to have the values of these
  parameters automatically set to the commonly used values rather
  than to specify parameter values each time the command is used.
  The Rational Environment supplies two types of switches to do this:

  o The session switches set parameter values at login.  FTP uses
    these session values for the duration of the login session.

  o The library switches set parameter values for a given library.
    For transfers done from a Command window inside a given library,
    FTP uses the switch values associated with that library.

  Switches are stored in files.  The user can edit the switch values
  in these files by means of the switch file object editor.  The
  !Commands.Switches.Edit command edits library switch files.
  The !Commands.Switches.Edit_Session_Attributes command edits
  session switch files.  Refer to the Session and Job Management
  (SJM) and Library Management (LM) books of the Rational Environment
  Reference Manual for further information on switches.

  There is a switch to provide a value for most FTP parameters.  If
  the user does not give the file transfer command a parameter value
  in the FTP Command window:

  1. FTP tries to get a value from the appropriate library switch
     file.

  2. If no value has been explicitly set for the library switch, FTP
     tries to take the parameter value from the user's session switch
     file.

  3. If no value has been set for the session switch, FTP tries to
     take the parameter value from one of the following files:

     o Remote password file for username or password

     o Remote session file for account name

  4. If no value has been set in the remote files, FTP takes the
     standard default.

  By keeping this search sequence in mind, the user can set a
  combination of library, session, and standard values for FTP's
  parameter values.  These values are available through package
  Ftp_Profile.

  The Rational Environment supports the following switches for FTP:

      Account                          Auto_Login
      Password                        Prompt_For_Account
      Prompt_For_Password            Remote_Directory
      Remote_Machine                  Remote_Roof
      Remote_Type                     Send_Port_Enabled
      Transfer_Mode                   Transfer_Structure
      Transfer_Type                   Username
  @node !Tools.Networking.Ftp_Profile.Account

  function Account return String;

  Specifies the account information from the current switch files.

  This information is supplied to the remote host when it requires
  account information for login or file access.  The default value is
  the null string.
  @node !Tools.Networking.Ftp_Profile.Auto_Login

  function Auto_Login return Boolean;

  Specifies the current setting from the current switch files,
  indicating whether automatic login should occur when the user
  connects to a remote machine.

  The default value is false.
  @node !Tools.Networking.Ftp_Profile.Current_Remote_Roof

  function Current_Remote_Roof return String;

  Returns the current roof value for the remote host.

  This value is used when moving multiple files to or from the remote
  host to indicate the outermost point in the directory structure.
  @node !Tools.Networking.Ftp_Profile.Current_Remote_Type

  function Current_Remote_Type return Ftp_Name_Map.Machine_Type;

  Returns a value indicating the type of machine currently specified
  for the remote host.

  This information is used during automatic generation of remote
  filenames to determine any translations needed for pathname
  characters marking directory structure information.
  @node !Tools.Networking.Ftp_Profile.Password

  function Password return String;

  Specifies the password information from the current switch files.

  This information is supplied to the remote host when required for
  login.  The default value is the null string.
  @node !Tools.Networking.Ftp_Profile.Prompt_For_Account

  function Prompt_For_Account return Boolean;

  Prompts for account information.

  If the user has not already supplied account information and if
  Prompt_For_Account is set to true, FTP will request that an account
  be supplied.  FTP will not echo the account string.
  @node !Tools.Networking.Ftp_Profile.Prompt_For_Password

  function Prompt_For_Password return Boolean;

  Prompts for a password.

  If the user has not already supplied a password and if
  Prompt_For_Password is set to true, FTP will request that a
  password be supplied.  FTP will not echo the password.
  @node !Tools.Networking.Ftp_Profile.Remote_Directory

  function Remote_Directory return String;

  Specifies the directory pathname from the current switch files to
  be used when setting the context on the remote machine.

  The default value is the null string.
  @node !Tools.Networking.Ftp_Profile.Remote_Machine

  function Remote_Machine return String;

  Specifies the current machine name from the current switch files,
  indicating to which machine an FTP connection should occur.

  The default value is the null string.
  @node !Tools.Networking.Ftp_Profile.Remote_Roof

  function Remote_Roof return String;

  Sets the remote roof directory to be used when transferring to or
  from the remote machine.

  The default value is the null string, which usually indicates the
  current working directory.
  @node !Tools.Networking.Ftp_Profile.Remote_Type

  function Remote_Type return Ftp_Name_Map.Machine_Type;

  Specifies the machine type for the remote machine.

  The default value is Ftp_Name_Map.Rational.
  @node !Tools.Networking.Ftp_Profile.Send_Port_Enabled

  function Send_Port_Enabled return Boolean;

  Specifies the current setting from the current switch files,
  indicating whether the data port identifier command should be
  sent before each transfer.

  The default value is true.
  @node !Tools.Networking.Ftp_Profile.Transfer_Mode

  function Transfer_Mode return Ftp_Defs.Mode_Code;

  Specifies the current setting from the current switch files,
  indicating the mode of transfer to be used during file transfers.

  The default value is Ftp_Defs.Default_Mode.
  @node !Tools.Networking.Ftp_Profile.Transfer_Structure

  function Transfer_Structure return Ftp_Defs.Structure_Code;

  Specifies the current setting from the current switch files,
  indicating the structure of transfer to be used during file
  transfers.

  The default value is Ftp_Defs.Default_Structure.
  @node !Tools.Networking.Ftp_Profile.Transfer_Type

  function Transfer_Type return Ftp_Defs.Type_Code;

  Specifies the current setting from the current switch files,
  indicating the type of transfer to be used during file transfers.

  The default value is Ftp_Defs.Default_Type.
  @node !Tools.Networking.Ftp_Profile.Username

  function Username return String;

  Specifies the current value for the current switch files,
  indicating the username to be used for login to a remote FTP
  server.

  The default value is the username of the current session.
  @node !Tools.Networking.Transfer_Generic

  Package Transfer_Generic, a generic version of package Ftp, is used
  with remote machines whose naming conventions are not supported by
  package Ftp_Name_Map.  Users can supply their own customized name-
  mapping functions (as generic parameters) to replace the standard
  name mappings provided by package Ftp_Name_Map.
  with Ftp_Name_Map; ...
  generic
      with function Local_To_Remote (File_Name : String;
                                    Local_Roof : String;
                                    Remote_Roof : String;
                                    Remote_Type : Ftp_Name_Map.Machine_Type)
                        return String;
      with function Remote_To_Local (File_Name : String;
                                    Local_Roof : String;
                                    Remote_Roof : String;
                                    Remote_Type : Ftp_Name_Map.Machine_Type)
                        return String;
  package Transfer_Generic is
      procedure Put (From_Local_File : String := ""; ...);
      procedure Get (From_Remote_File : String := ""; ...);
      procedure Store (From_Local_File : String := ""; ... );
      procedure Retrieve (From_Remote_File : String := ""; ...);
      procedure Put_Set (From_Local_File_Set : String := ""; ... );
      procedure Get_Set (From_Remote_File_Set : String := ""; ... );
      procedure Get_List (Remote_File_List : String := ""; ... );
      procedure Store_Set (From_Local_File_Set : String := ""; ... );
      procedure Retrieve_Set (From_Remote_File_Set : String := ""; ... );
      procedure Retrieve_List (Remote_File_List : String := ""; ... );
  end Transfer_Generic;

  The behavior of the Transfer_Generic procedures is like that of
  the correspondingly named procedures in package Ftp, except that
  filenames are mapped using the generic formals.  In fact, the
  Ftp procedures are implemented as calls to an instantiation of
  Transfer_Generic on the standard Ftp_Name_Map functions.

  Ftp commands that do not map filenames do not have corresponding
  commands in package Transfer_Generic.
  @node !Tools.Networking.Transfer_Generic.Get

  procedure Get
  (From_Remote_File   : String                   := "";
   To_Local_File      : String                   := "";
   Remote_Machine     : String                   :=
                                               Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                             Ftp_Profile.Remote_Directory;
   Remote_Type        : Ftp_Name_Map.Machine_Type :=
                                                  Ftp_Profile.Remote_Type;
   Append_To_File     : Boolean                  := False;
   Transfer_Type      : Ftp_Defs.Type_Code        :=
                                                Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                           Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                            Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Retrieves a file from a remote host.

  This procedure is used as a one-step operation to retrieve a file
  from a remote host.  It forms a connection that logs in the user
  and retrieves the file.  At the end of the transfer, the connection
  is disconnected.
  @node !Tools.Networking.Transfer_Generic.Get_List

  procedure Get_List
  (Remote_File_List   : String                   := "";
   Local_Roof         : String                   := "$";
   Remote_Roof        : String                   := Ftp_Profile.Remote_Roof;
   Remote_Machine     : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Append_To_File     : Boolean                  := False;
   Transfer_Type      : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Retrieves multiple files from a remote host.

  This procedure is used as a one-step operation to retrieve multiple
  files from a remote host.  A connection is formed to the specified
  machine.  The connection is logged in using the user information
  supplied.  Files specified in the Remote_File_List parameter
  are retrieved.  At the end of the transfer, the connection is
  disconnected.

  The names of the local files are generated algorithmically from the
  names of the remote files, using the Remote_To_Local function.  The
  Local_Roof, Remote_Roof, and Remote_Type parameters are used in
  this conversion.
  @node !Tools.Networking.Transfer_Generic.Get_Set

  procedure Get_Set
  (From_Remote_File_Set : String                   := "";
   Local_Roof           : String                   := "$";
   Remote_Roof          : String                   :=
                                                  Ftp_Profile.Remote_Roof;
   Remote_Machine       : String                   :=
                                               Ftp_Profile.Remote_Machine;
   Username            : String                   := Ftp_Profile.Username;
   Password            : String                   := Ftp_Profile.Password;
   Account             : String                   := Ftp_Profile.Account;
   Remote_Directory     : String                   :=
                                             Ftp_Profile.Remote_Directory;
   Remote_Type          : Ftp_Name_Map.Machine_Type :=
                                                 Ftp_Profile.Remote_Type;
   Append_To_File       : Boolean                  := False;
   Transfer_Type        : Ftp_Defs.Type_Code        :=
                                                Ftp_Profile.Transfer_Type;
   Transfer_Mode        : Ftp_Defs.Mode_Code        :=
                                                Ftp_Profile.Transfer_Mode;
   Transfer_Structure   : Ftp_Defs.Structure_Code   :=
                                           Ftp_Profile.Transfer_Structure;
   Send_Port           : Boolean                  :=
                                            Ftp_Profile.Send_Port_Enabled;
   Response            : Profile.Response_Profile  := Profile.Get);

  Retrieves multiple files from a remote host.

  This procedure is used as a one-step operation to retrieve multiple
  files from a remote host.  A connection is formed to the specified
  machine.  The connection is logged in using the user information
  supplied.  Files specified by the From_Remote_File_Set parameter
  are retrieved and placed in the context indicated by Local_Roof.
  At the end of the transfer, the connection is disconnected.

  The names of the local files are generated algorithmically from the
  names of the remote files, using the Remote_To_Local function.  The
  Local_Roof, Remote_Roof, and Remote_Type parameters are used in
  this conversion.
  @node !Tools.Networking.Transfer_Generic.Local_To_Remote

  with function Local_To_Remote (File_Name   : String;
                                Local_Roof  : String;
                                Remote_Roof : String;
                                Remote_Type : Ftp_Name_Map.Machine_Type)
                                                           return String;

  Returns the remote filename corresponding to the given local
  filename.

  It is recommended that this function call the
  Ftp_Name_Map.Local_To_Remote function for any Remote_Type value
  it does not support.  In this way, the instantiation of Trans-
  fer_Generic will be upwardly compatible with package Ftp.
  @node !Tools.Networking.Transfer_Generic.Put

  procedure Put
  (From_Local_File    : String                   := "<IMAGE>";
   To_Remote_File     : String                   := "";
   Remote_Machine     : String                   :=
                                                Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account           : String                   := Ftp_Profile.Account;
   Remote_Directory   : String                   :=
                                              Ftp_Profile.Remote_Directory;
   Remote_Type        : Ftp_Name_Map.Machine_Type := Ftp_Profile.Remote_Type;
   Append_To_File     : Boolean                  := False;
   Transfer_Type      : Ftp_Defs.Type_Code        :=
                                                 Ftp_Profile.Transfer_Type;
   Transfer_Mode      : Ftp_Defs.Mode_Code        :=
                                                 Ftp_Profile.Transfer_Mode;
   Transfer_Structure : Ftp_Defs.Structure_Code   :=
                                            Ftp_Profile.Transfer_Structure;
   Send_Port          : Boolean                  :=
                                             Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Stores a file onto a remote host.

  This procedure is used as a one-step operation to store a file onto
  a remote host.  A connection is formed to the specified machine.
  The connection is logged in using the user information supplied.
  The local file is transferred to the remote machine and placed in
  the remote file.  At the end of the transfer, the connection is
  disconnected.
  @node !Tools.Networking.Transfer_Generic.Put_Set

  procedure Put_Set
  (From_Local_File_Set : String                   := "<IMAGE>";
   Local_Roof          : String                   := "$";
   Remote_Roof         : String                   :=
                                                  Ftp_Profile.Remote_Roof;
   Remote_Machine      : String                   :=
                                               Ftp_Profile.Remote_Machine;
   Username           : String                   := Ftp_Profile.Username;
   Password           : String                   := Ftp_Profile.Password;
   Account            : String                   := Ftp_Profile.Account;
   Remote_Directory    : String                   :=
                                             Ftp_Profile.Remote_Directory;
   Remote_Type         : Ftp_Name_Map.Machine_Type :=
                                                  Ftp_Profile.Remote_Type;
   Append_To_File      : Boolean                  := False;
   Transfer_Type       : Ftp_Defs.Type_Code        :=
                                                Ftp_Profile.Transfer_Type;
   Transfer_Mode       : Ftp_Defs.Mode_Code        :=
                                                Ftp_Profile.Transfer_Mode;
   Transfer_Structure  : Ftp_Defs.Structure_Code   :=
                                           Ftp_Profile.Transfer_Structure;
   Send_Port           : Boolean                  :=
                                            Ftp_Profile.Send_Port_Enabled;
   Response           : Profile.Response_Profile  := Profile.Get);

  Stores multiple files onto a remote host.

  This procedure is used as a one-step operation to store multiple
  files onto a remote host.  A connection is formed to the specified
  machine.  The connection is logged in using the user information
  supplied.  Files specified by the From_Local_File_Set parameter
  are stored in the context indicated by the Remote_Roof parameter.
  At the end of the transfer, the connection is disconnected.
  @node !Tools.Networking.Transfer_Generic.Remote_To_Local

  with function Remote_To_Local (File_Name   : String;
                                Local_Roof  : String;
                                Remote_Roof : String;
                                Remote_Type : Ftp_Name_Map.Machine_Type)
                                                           return String;

  Returns the local filename corresponding to the given remote
  filename.

  It is recommended that this function call the
  Ftp_Name_Map.Remote_To_Local function for any Remote_Type value
  it does not support.  In this way, the instantiation of Trans-
  fer_Generic will be upwardly compatible with package Ftp.
  @node !Tools.Networking.Transfer_Generic.Retrieve

  procedure Retrieve
  (From_Remote_File : String                   := "";
   To_Local_File    : String                   := "";
   Remote_Type      : Ftp_Name_Map.Machine_Type :=
                                           Ftp_Profile.Current_Remote_Type;
   Append_To_File   : Boolean                  := False;
   Response         : Profile.Response_Profile  := Profile.Get;
   Account          : String                   := Ftp_Profile.Account);

  Retrieves a copy of a file from a remote machine.

  The user session must already be connected and logged into the
  remote machine.
  @node !Tools.Networking.Transfer_Generic.Retrieve_List

  procedure Retrieve_List
  (Remote_File_List : String                   := "";
   Local_Roof       : String                   := "$";
   Remote_Roof      : String                   :=
                                           Ftp_Profile.Current_Remote_Roof;
   Remote_Type      : Ftp_Name_Map.Machine_Type :=
                                           Ftp_Profile.Current_Remote_Type;
   Append_To_File   : Boolean                  := False;
   Response         : Profile.Response_Profile  := Profile.Get;
   Account          : String                   := Ftp_Profile.Account);

  Retrieves multiple files from a remote machine, using a list of
  remote filenames stored in a file on this machine.

  The files are stored on the local machine with names mapped from
  the remote filenames.  The names of the local files are generated
  algorithmically from the names of the remote files, using the
  Remote_To_Local function.  The Local_Roof, Remote_Roof, and
  Remote_Type parameters are used in this conversion.
  @node !Tools.Networking.Transfer_Generic.Retrieve_Set

  procedure Retrieve_Set
  (From_Remote_File_Set : String                   := "";
   Local_Roof           : String                   := "$";
   Remote_Roof          : String                   :=
                                           Ftp_Profile.Current_Remote_Roof;
   Remote_Type          : Ftp_Name_Map.Machine_Type :=
                                           Ftp_Profile.Current_Remote_Type;
   Append_To_File       : Boolean                  := False;
   Response            : Profile.Response_Profile  := Profile.Get;
   Account             : String                   := Ftp_Profile.Account);

  Retrieves multiple files from a remote machine.

  The names of the local files are generated algorithmically from the
  names of the remote files, using the Remote_To_Local function.  The
  Local_Roof, Remote_Roof, and Remote_Type parameters are used in
  this conversion.
  @node !Tools.Networking.Transfer_Generic.Store

  procedure Store
  (From_Local_File : String                    := "<IMAGE>";
   To_Remote_File  : String                    := "";
   Remote_Type     : Ftp_Name_Map.Machine_Type  :=
                                           Ftp_Profile.Current_Remote_Type;
   Append_To_File  : Boolean                   := False;
   Response        : Profile.Response_Profile   := Profile.Get;
   Account         : String                    := Ftp_Profile.Account);

  Stores a copy of the local file onto the remote machine to which
  the session is currently connected.

  The transfer is conducted in accordance with all other separately
  specified parameters (Text, Image, Block, and so on).

  The user session must already be connected and logged into the
  remote machine.
  @node !Tools.Networking.Transfer_Generic.Store_Set

  procedure Store_Set
  (From_Local_File_Set : String                   := "<IMAGE>";
   Local_Roof          : String                   := "$";
   Remote_Roof         : String                   :=
                                           Ftp_Profile.Current_Remote_Roof;
   Remote_Type         : Ftp_Name_Map.Machine_Type :=
                                           Ftp_Profile.Current_Remote_Type;
   Append_To_File      : Boolean                  := False;
   Response           : Profile.Response_Profile  := Profile.Get;
   Account            : String                   := Ftp_Profile.Account);

  Stores multiple files from the local machine onto the currently
  connected remote machine.

  The transfer is conducted in accordance with all other separately
  specified parameters (Text, Image, Block, and so on).