NAME
globus_ftp_control_abort
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_abort
handle
script
DESCRIPTION
This command is used to send the ABORT message to the FTP server. The ABORT message is sent out-of-band, and terminates any current data transfer in progress.
As a result of the ABORT, the data channels used by this control channel will be closed. The data command callback will be issued with either a completion reply, or a transfer aborted reply. The ABORT callback will also be invoked, with the server's response to the abort command.
Any attempts to register buffers for read or write after an ABORT has been sent will fail with a "no transfer in progress" error.
PARAMETERS
handle - A pointer to a GSIFTP control handle. The ABORT command is issued to the server over the control channel associated with this handle.
script - TCL script to be invoked once the authentication process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_abort returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_abort $handle { response_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_auth_info_compare
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_auth_info_compare
auth_info_1
auth_info_2
DESCRIPTION
This command is used to compare two authentication information structures and return zero if the two structures are deemed equal and a non-zero value otherwise.
PARAMETERS
auth_info_1 - The first authentication structure.
auth_info_2 - The second authentication structure.
RETURN VALUE
On success globus_ftp_control_auth_info_compare returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_auth_info_compare $auth_info_1 $auth_info_2 ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_auth_info_init
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_auth_info_init
credential_handle
encrypt
user
password
account
subject
DESCRIPTION
This command is used to initialize a authentication information structure with the values contained in the first to fourth arguments, which may be GLOBUS_NULL. No memory is allocated in this function.
PARAMETERS
credential_handle - The credential to use for authentication. This may be GSS_C_NO_CREDENTIAL to use the user's default credential.
encrypt - Boolean whether or not to encrypt the control channel for this handle.
user - The user name.
password - The password for the user name.
account - The account for the user name/password.
subject - The GSSAPI subject name
RETURN VALUE
On success globus_ftp_control_auth_info_init returns 0 and the authentication structure. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_auth_info_init $gss_c_no_credential $GLOBUS_TRUE ":globus-mapping:" NULL "/DC=org/DC=doegrids/OU=Services/CN=tclproxy.ligo.caltech.edu" ] result auth_info
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_authenticate
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_authenticate
handle
auth_info
use_auth
script
DESCRIPTION
This command is used to perform the authentication handshake with the FTP server. Depending on which parameters are non-NULL, the authentication may involve GSSAPI credentials, a username, a password, and an account name.
PARAMETERS
handle - A unauthenticated GSIFTP control handle. In the case of GSS authentication the GSS security context is stored in this handle.
auth_info - This structure is used to pass the following information:
use_auth - If set to GLOBUS_TRUE the above argument indicates that GSS authentication should be used, otherwise cleartext user/password authentication is used.
script - TCL script to be invoked once the authentication process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_authenticate returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_authenticate $handle $auth_info $GLOBUS_TRUE { auth_response_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_command_copy
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_command_copy
dest_command
src_command
DESCRIPTION
This command is used to create a copy of a command structure.
PARAMETERS
dest_command - This parameter specifies the target response structure.
src_command - The command structure to be copied.
RETURN VALUE
On success globus_ftp_control_command_copy returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_command_copy $dest_command $src_command ] result
BUGS
None
TODO
None
SEE ALSO
globus_ftp_control_command_init, globus_ftp_control_command_destroy.
NAME
globus_ftp_control_command_destroy
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_command_destroy
command
DESCRIPTION
This command is used to free up the memory allocated to the command argument.
PARAMETERS
command - The command structure whose associated memory is to be freed.
RETURN VALUE
On success globus_ftp_control_command_destroy returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_command_destroy $command ] result
BUGS
None
TODO
None
SEE ALSO
globus_ftp_control_command_init, globus_ftp_control_command_copy.
NAME
globus_ftp_control_command_init
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_command_init
command
raw_command
auth_info
DESCRIPTION
This command is used to initialize a command structure based on a null terminated string representing one line of input from the client. The command structure is used as a convience to determine what command the client issued. This function parses a command string sent by a client and populates the command argument appropriatly. In the GSSAPI case it will also decode and unwrap the command before parsing it.
PARAMETERS
command - A pointer to the command structure to be initialized.
raw_command - A null terminated line of client input. Should contain one command.
auth_info - Authentication information needed for unwrapping a command.
RETURN VALUE
On success globus_ftp_control_command_init returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_command_init $command $raw_command $auth_info ] result
BUGS
None
TODO
None
SEE ALSO
globus_ftp_control_command_destroy, globus_ftp_control_command_copy.
NAME
globus_ftp_control_connect
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_connect
handle
host
port
script
DESCRIPTION
This command is used to initiate an FTP control connection. It creates the socket to the FTP server. When the connection is made to the server, and the server's identification string is received, the script will be invoked.
PARAMETERS
handle - FTP control handle for all subsequent FTP control operations.
host - The hostname of the FTP server.
port - The TCP port number of the FTP server.
script - TCL script to be invoked once the connection to the server is established, and a response has been read. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_connect returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_connect $handle $host $port { connect_response_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_create_data_info
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_create_data_info
handle
buffer
length
offset
eof
script
DESCRIPTION
This command is used to create a globus_ftp_control_data_write_info_t structure.
This command populates a globus_ftp_control_data_callback_t structure with valid information. This structure provides the user a way to register several data writes with a single callback. This is quite useful to the writter of enqueue functions. It allows a single call to globus_ftp_control_data_write to be broken up into many writes, potentially on different stripes, and for a single callback to be called when all are finished.
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
buffer - The pointer to the user buffer that will be passed to the callback argument when there are zero references to data_info. This is intended to be the start of all the data the user intends to write using globus_ftp_control_data_write_stripe(), but it does not have to be.
length - The length of the memory segment pointed to by the argument buffer.
offset - The file offset of the data segment specified.
eof - This should be set to true if the user plans on registering EOF on the data_info structure.
script - TCL script to be invoked when all references to data_info are released. This occurs after all data registered for write from globus_ftp_control_data_write_stripe have occured and the user calls globus_ftp_control_release_data_info(). The callback is passed all of the arguments passed to this function with the exception of data_info. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_create_data_info returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_create_data_info $handle $buffer $length $offset $eof { create_data_info_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_add_channels
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_add_channels
handle
num_channels
stripe_ndx
DESCRIPTION
This command is used to open additional data channels (connections) to the host identified by the stripe parameter.
PARAMETERS
handle - A pointer to a FTP control handle. This handle is used to determine the host corresponding to the stripe number and to store information about any channels added by this command.
num_channels - The number of additional channels to add.
stripe_ndx - An integer identifying the stripe to add channels to. In the case of non-striped transfer this parameter will be ignored.
RETURN VALUE
On success globus_ftp_control_data_add_channels returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_data_add_channels $handle $num_channels $stripe_ndx ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_connect_read
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_connect_read
handle
script
DESCRIPTION
This command is used to create an incoming FTP data connection.
This command will register a globus_io_{accept, connect}. Further accepts/connects are done by registering a new accept/connect in the current accept/connect callback. A call to either globus_ftp_control_local_pasv() or globus_ftp_control_local_port() needs to precede this calling this command. This command may be followed by a globus_ftp_data_read.
PARAMETERS
handle - A pointer to a FTP control handle which is configured to create an incoming data connection.
script - TCL script to be invoked once the connection process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_connect_read returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_connect_read $handle { connect_read_data_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_data_connect_write
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_connect_write
handle
script
DESCRIPTION
This command is used to create an outgoing FTP data connection.
This command will register a globus_io_{accept, connect}. Further accepts/connects are done by registering a new accept/connect in the current accept/connect callback. A call to either globus_ftp_control_local_pasv() or globus_ftp_control_local_port() needs to precede this calling this command. This command may be followed by a globus_ftp_data_read.
PARAMETERS
handle - A pointer to a FTP control handle which is configured to create an outgoing data connection.
script - TCL script to be invoked once the connection process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_connect_write returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_connect_write $handle { connect_write_data_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_data_force_close
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_force_close
handle
script
DESCRIPTION
This command is used to force an imediate close of all data connections.
PARAMETERS
handle - The FTP control handle that is have its data connections closed.
script - TCL script to be invoked once the data connections are close or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_force_close returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_force_close $handle { close_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_get_remote_hosts
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_get_remote_hosts
handle
address
DESCRIPTION
This command is used to query the number of remote hosts.
PARAMETERS
handle - The FTP control handle to be queried.
address - The name of the remote address.
RETURN VALUE
On success globus_ftp_control_data_get_remote_hosts returns 0 and the number of remote address. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_data_get_remote_hosts $handle $address ] result addr_count
BUGS
None
TODO
None
NAME
globus_ftp_control_data_get_total_data_channels
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_get_total_data_channels
handle
stripe_ndx
DESCRIPTION
This command is used to return the total number of data channels used so far in the current transfer on the given stripe.
PARAMETERS
handle - A pointer to a FTP control handle. This handle is used to determine the host corresponding to the stripe number and to store information about any channels added by this command.
stripe_ndx - An integer identifying the stripe to return the number of channels. In the case of non-striped transfer this parameter will be ignored.
RETURN VALUE
On success globus_ftp_control_data_get_total_data_channels returns 0 and the number of channels. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_data_get_total_data_channels $handle $stripe_ndx ] result num_channels
BUGS
None
TODO
None
NAME
globus_ftp_control_data_query_channels
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_query_channels
handle
stripe_ndx
DESCRIPTION
This command is used to return the number of currently open channels for the host identified by the stripe parameter.
This number may be less then the level of parallelism specified in local_parallelism, due to the possibility that some channels have not yet connected.
PARAMETERS
handle - A pointer to a FTP control handle. This handle is used to determine the host corresponding to the stripe number and to store information about any channels added by this command.
stripe_ndx - An integer identifying the stripe to return the number of channels. In the case of non-striped transfer this parameter will be ignored.
RETURN VALUE
On success globus_ftp_control_data_query_channels returns 0 and the number of channels. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_data_query_channels $handle $stripe_ndx ] result num_channels
BUGS
None
TODO
None
NAME
globus_ftp_control_data_read
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_read
handle
buffer_length
script
DESCRIPTION
This command is used to read data from data connection(s) and put them in the supplied buffer.
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
buffer_length - The maximum amount of data that can be stored into the buffer.
script - TCL script invoked once the data has been read. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_read returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_read $handle $buffer_length { data_read_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_read_all
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_read_all
handle
buffer_length
script
DESCRIPTION
This command is used to read data from data connection(s) and put them in the supplied buffer.
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
buffer_length - The maximum amount of data that can be stored into the buffer.
script - TCL script invoked once the data has been read. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_read_all returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_read_all $handle $buffer_length { data_read_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_remove_channels
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_remove_channels
handle
num_channels
stripe_ndx
DESCRIPTION
This command is used to remove data channels (connections) to the host identified by the stripe parameter.
PARAMETERS
handle - A pointer to a FTP control handle. This handle is used to determine the host corresponding to the stripe number and to store information about any channels added by this command.
num_channels - The number of additional channels to remove.
stripe_ndx - An integer identifying the stripe to remove channels from. In the case of non-striped transfer this parameter will be ignored.
RETURN VALUE
On success globus_ftp_control_data_remove_channels returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_data_remove_channels $handle $num_channels $stripe_ndx ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_send_eof
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_send_eof
handle
count
array_size
eof_message
script
DESCRIPTION
This command is used to send an EOF message to each stripe along an open data connection.
An EOF message must be sent to all receiving hosts in a transfer. The message contains the total number of data connections used by each stripe. Many stripes may be sending to a single receiver but only one eof message may be sent. The count parameter allows the user to pass in the total number of data connections used by all other hosts. The local values are added to the passed in values and then sent to the receiver.
PARAMETERS
handle - A FTP control handle containing the connection state.
count - This array of integers should contain an integer that will be added to the current parallel data connection count on each stripe. The order of the integers corresponds to each stripe in the same order as what was returned from local_port().
array_size - The number of elements in count.
script - TCL script to be invoked when the EOF message has been called. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_send_eof returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_send_eof $handle [ list 1 2 ] 2 { data_send_eof_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_set_interface
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_set_interface
handle
interface_addr
DESCRIPTION
This command is used to create an outgoing FTP data connection.
This command sets the interface that will be used to send and receive information along the data channel.
PARAMETERS
handle - A pointer to a FTP control handle which is configured to create an outgoing data connection.
interface_addr - The specified interface address, i.e., IP address.
RETURN VALUE
On success globus_ftp_control_data_set_interface returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_data_set_interface $handle "131.215.114.146" ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_write
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_write
handle
buffer
offset
eof
script
DESCRIPTION
This command is used to write data from the supplied buffer to data connection(s).
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
buffer - A user supplied buffer from which data will written to the data connection(s).
offset - The offset in the file at which the data in the buffer starts.
eof - Indicates that the buffer is that last part of a file. In the striped case this will cause a EOF block to be send to every data node involved in the transfer.
script - TCL script invoked once the data has been sent. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_write returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_connect $handle $buffer $offset $eof { data_write_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_data_write_stripe
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_data_write_stripe
handle
buffer
offset
eof
stripe_ndx
script
DESCRIPTION
This command is used to write FTP data to a particular stripe.
This command allows the user to write to a specified stripe. The stripe index relates to the order passsed into local_spor(). This command differs from globus_ftp_control_data_write in that no enqueue function is needed since the user specifies the stripe on which data is written. In order to use this command the user must have a valid pointer to a globus_ftp_control_data_write_info_t structure. The data_info structure can be obtained by a call to globus_ftp_control_create_data_info. Many calls to this command can be made, but only a single user callback occurs per creation of a globus_ftp_control_data_write_info_t structure.
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
buffer - A pointer to the data the user wishes to send along the FTP data channels.
offset - The offset into the file of the data.
eof - A boolean stating that this will be the last chuck of data registered on the given stripe. In order to properly send an EOF message the user must register an EOF on every stripe.
stripe_ndx - The index of the stripe on which the data will be sent. The index of each stripe is determined by the call to local_spas or local_spor.
script - TCL script to be invoked when all references to data_info are released. This occurs after all data registered for write from globus_ftp_control_data_write_stripe have occured and the user calls globus_ftp_control_release_data_info(). The callback is passed all of the arguments passed to this function with the exception of data_info. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_data_write_stripe returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_data_write_stripe $handle $buffer $offset $eof $stripe_ndx { data_write_stripe_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_force_close
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_force_close
handle
script
DESCRIPTION
This command is used to force a close of the control connection without waiting for outstanding commands to complete and without sending QUIT.
This command is used to close the control channel to the FTP server. Once the final response callback passed to this function is invoked, the control handle can no longer be used for any gsiftp control operations.
PARAMETERS
handle - A pointer to a GSIFTP control handle. The QUIT command is issued to the server over the control channel associated with this handle.
script - TCL script to be invoked once the authentication process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_force_close returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_force_close $handle { response_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_get_dcau
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_dcau
handle
DESCRIPTION
This command is used to query the FTP control handle with the data channel authentication information.
PARAMETERS
handle - The FTP control handle to be queried.
RETURN VALUE
On success globus_ftp_control_get_dcau returns 0 and the data channel authentication information. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_dcau $handle ] result dcau
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_get_mode
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_mode
handle
DESCRIPTION
This command is used to query the mode information from the FTP control handle.
PARAMETERS
handle - The FTP control handle to be queried.
RETURN VALUE
On success globus_ftp_control_get_mode returns 0 and mode. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_mode $handle ] result mode
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_get_parallelism
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_parallelism
handle
DESCRIPTION
This command is used to query the parallelism information in a FTP control handle.
PARAMETERS
handle - The FTP control handle for which the parallelism information is to be queried.
RETURN VALUE
On success globus_ftp_control_get_parallelism returns 0 and parallelism information. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_parallelism $handle ] result parallelism
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_get_pbsz
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_pbsz
handle
DESCRIPTION
This command is used to query the FTP control handle for the protection buffer size information.
This command queries the handle to determine the protection buffer size which is used by this handle. This value is used to determine how much data will be sent in each packet during a protected data transfer.
PARAMETERS
handle - The FTP control handle to be queried.
RETURN VALUE
On success globus_ftp_control_get_pbsz returns 0 and bufsize. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_pbsz $handle ] result bufsize
BUGS
None
TODO
None
NAME
globus_ftp_control_get_prot
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_prot
handle
DESCRIPTION
This command is used to query the FTP control handle with the protection information on the structure of the data being sent on the data channel.
PARAMETERS
handle - The FTP control handle to be queried.
RETURN VALUE
On success globus_ftp_control_get_prot returns 0 and protection. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_prot $handle ] result protection
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_get_spor
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_spor
handle
addresses
DESCRIPTION
This command is used to query the number of host/port addresses returned by a SPAS on the remote host into the local FTP control handle.
If there are any outstanding data connections at this point, they are closed.
PARAMETERS
handle - The FTP control handle into which to query the host/port addresses.
addresses - The host IP address and port numbers.
RETURN VALUE
On success globus_ftp_control_get_spor returns 0 and number of addresses. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_spor $handle $addresses ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_get_stripe_count
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_stripe_count
handle
DESCRIPTION
This command is used to query stripe counts.
PARAMETERS
handle - The FTP handle you wish to query for stripe counts.
RETURN VALUE
On success globus_ftp_control_get_stripe_count returns 0 and stripe_count. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_stripe_count $handle ] result stripe_count
BUGS
None
TODO
None
NAME
globus_ftp_control_get_type
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_get_type
handle
DESCRIPTION
This command is used to query the type information from the FTP control handle.
PARAMETERS
handle - The FTP control handle to be queried.
RETURN VALUE
On success globus_ftp_control_get_type returns 0 and type. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_get_type $handle ] result type
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_handle_destroy
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_handle_destroy
handle
DESCRIPTION
This command is used to free up all dynamicly allocated memory associated with a given Globus FTP handle. It will also remove the handle from a list used by the module activation/deactivation functions. This command should only be called after a call to either globus_ftp_control_force_close or globus_ftp_control_quit.
PARAMETERS
handle - The handle to destroy.
RETURN VALUE
On success globus_ftp_control_handle_destroy returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_handle_destroy $handle ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_handle_init
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_handle_init
handle
DESCRIPTION
This command is used to set up (i.e. intialize all mutexes and variables) a Globus FTP handle. It will also enter the handle in a list used by the module activation/deactivation functions.
PARAMETERS
handle - The handle to initialize.
RETURN VALUE
On success globus_ftp_control_handle_init returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_handle_init $handle ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_local_dcau
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_dcau
handle
dcau
delegated_credential_handle
DESCRIPTION
This command is used to update the FTP control handle with the given data channel authentication information.
If authentication is set to GLOBUS_FTP_CONTROL_DCAU_NONE, then protection will also be disabled for this control handle.
PARAMETERS
handle - The FTP control handle to be updated.
dcau - A parameter specifying the data channel authentication mode. Possible values are No Authentication, Self Authentication and Subject-name authentication.
delegated_credential_handle - A structure containing credential information.
RETURN VALUE
On success globus_ftp_control_local_dcau returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_dcau $handle $dcau $gss_c_no_credential ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_local_layout
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_layout
handle
layout
data_size
DESCRIPTION
This command is used to update the FTP control handle with the layout and the size of the data sent over the data channel.
PARAMETERS
handle - The FTP control handle to be updated.
layout - A variable containing the layout information.
data_size - The size of the data that is going to be sent. This may be needed to interpret the layout information.
RETURN VALUE
On success globus_ftp_control_local_layout returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
set layout [ new_globus_ftp_control_layout_t ]
lassign [ globus_ftp_control_local_layout $handle $layout 1028 ] result
delete_globus_ftp_control_layout_t $layout
BUGS
None
TODO
None
NAME
globus_ftp_control_local_mode
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_mode
handle
mode
DESCRIPTION
This command is used to update the FTP control handle with the given mode information.
PARAMETERS
handle - The FTP control handle to be updated.
mode - Specifies the mode of the data connection. Possible modes are STREAM, BLOCK, EXTENDED BLOCK and COMPRESSED. Out of these only STREAM and EXTENDED BLOCK are supported in this implementation. Also, EXTENDED BLOCK is only supported in combination with the IMAGE type.
RETURN VALUE
On success globus_ftp_control_local_mode returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_mode $handle $GLOBUS_FTP_CONTROL_MODE_STREAM ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_local_parallelism
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_parallelism
handle
parallelism
DESCRIPTION
This command is used to set the parallelism information in a FTP control handle.
PARAMETERS
handle - The FTP control handle for which the parallelism information is to be updated.
parallelism - A structure containing parallelism information.
RETURN VALUE
On success globus_ftp_control_local_parallelism returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_parallelism $handle $parallelism ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_local_pasv
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_pasv
handle
address
DESCRIPTION
This command is used to create a local listening socket, bind it and return the address the socket is listening to.
If there is a existing data connection it is closed.
PARAMETERS
handle - The FTP control handle to store the listening socket information.
address - The host IP address and port is returned through this parameter.
RETURN VALUE
On success globus_ftp_control_local_pasv returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_pasv $handle $address ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_pbsz
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_pbsz
handle
bufsize
DESCRIPTION
This command is used to update the FTP control handle with the given protection buffer size information.
This command sets protection buffer size to be used by this handle. This value is used to determine how much data will be sent in each packet during a protected data transfer.
PARAMETERS
handle - The FTP control handle to be updated.
bufsize - A parameter specifying the protection buffer size value.
RETURN VALUE
On success globus_ftp_control_local_pbsz returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_pbsz $handle 256 ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_port
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_port
handle
address
DESCRIPTION
This command is used to insert the host/port information returned by a PASV on the remote host into the local FTP control handle.
If there is a existing data connection it is closed.
PARAMETERS
handle - The FTP control handle into which to insert the host/port information.
address - The host IP address and port. |html| </ul>
RETURN VALUE
On success globus_ftp_control_local_port returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_port $handle $addr ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_prot
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_prot
handle
protection
DESCRIPTION
This command is used to update the FTP control handle with the protection information on the structure of the data being sent on the data channel.
PARAMETERS
handle - The FTP control handle to be updated.
protection - This parameter is used to pass the protection information.
RETURN VALUE
On success globus_ftp_control_local_prot returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_prot $handle $GLOBUS_FTP_CONTROL_PROTECTION_CLEAR ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_local_send_eof
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_send_eof
handle
send_eof
DESCRIPTION
This command is used to determine if the library will automatically send an EOF message in extended block mode, or if the user will have to explicitly do it by calling globus_ftp_control_data_send_eof.
PARAMETERS
handle - The FTP handle you wish to sent the send_eof attribute on.
send_eof - A boolean representing whether or not to automatically send an EOF message.
RETURN VALUE
On success globus_ftp_control_local_send_eof returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_send_eof $handle $GLOBUS_TRUE ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_spas
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_spas
handle
addresses
num_addresses
DESCRIPTION
This command is used to create local listening sockets, bind them and return the addresses the sockets are listening to.
If there is a existing data connection it is closed.
PARAMETERS
handle - The FTP control handle to store the listening socket information.
addresses - The host IP address and port is returned through this parameter. |html|
num_addresses - The number of listening sockets to create.
RETURN VALUE
On success globus_ftp_control_local_spas returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_spas $handle $num_addresses $addresses ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_spor
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_spor
handle
addresses
num_addresses
DESCRIPTION
This command is used to insert the host/port addresses returned by a SPAS on the remote host into the local FTP control handle.
If there are any outstanding data connections at this point, they are closed.
PARAMETERS
handle - The FTP control handle into which to insert the host/port addresses.
addresses - The host IP address and port numbers.
num_addresses - The number of addresses.
RETURN VALUE
On success globus_ftp_control_local_spor returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_spor $handle $num_addresses $addresses ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_local_stru
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_stru
handle
structure
DESCRIPTION
This command is used to update the FTP control handle with the information on the structure of the data being sent on the data channel.
This command updates the handle with the provided structure information. At this point the only structure type that is supported is the file type.
PARAMETERS
handle - The FTP control handle to be updated.
structure - This parameter is used to pass the structure information. Possible values are file, record and page. Only the file type is supported
RETURN VALUE
On success globus_ftp_control_local_stru returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_stru $handle $GLOBUS_FTP_CONTROL_STRUCTURE_FILE ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_tcp_buffer
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_tcp_buffer
handle
tcp_buffer
DESCRIPTION
This command is used to update the FTP control handle with the given socket buffer size information.
PARAMETERS
handle - The FTP control handle to be updated.
tcp_buffer - Specifies the size of the socket buffer in bytes.
RETURN VALUE
On success globus_ftp_control_local_tcp_buffer returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
set tcpbuffer [ new_globus_ftp_control_tcpbuffer_t ]
globus_ftp_control_tcpbuffer_t_mode_set $tcpbuffer $GLOBUS_FTP_CONTROL_TCPBUFFER_FIXED
lassign [ globus_ftp_control_local_tcp_buffer $handle $tcp_buffer ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_local_type
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_local_type
handle
type
form_code
DESCRIPTION
This command is used to update the FTP control handle with the given type information.
PARAMETERS
handle - The FTP control handle to be updated.
type - The type of the data connection. Possible values are: ASCII, EBCDIC, IMAGE and LOCAL. Currently only ASCII and IMAGE types are supported.
form_code - The logical byte size parameter for the LOCAL type.
RETURN VALUE
On success globus_ftp_control_local_type returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_local_type $handle $GLOBUS_FTP_CONTROL_TYPE_ASCII 1 ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_quit
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_quit
handle
script
DESCRIPTION
This command is used to send a QUIT message to the FTP server and register a response handler.
This command is used to close the control channel to the FTP server. There should be no transfer commands in progress when this is called. Once the final response callback passed to this function is invoked, the control handle can no longer be used for any gsiftp control operations.
PARAMETERS
handle - A pointer to a GSIFTP control handle. The QUIT command is issued to the server over the control channel associated with this handle.
script - TCL script to be invoked once the authentication process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_quit returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_quit $handle { response_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_read_commands
SYNOPSIS
package require globus_ftp_control_read_commands
globus_ftp_control_read_commands
handle
script
DESCRIPTION
This command is used to read GSIFTP commands on a given control connection.
PARAMETERS
handle - The control connection handle that commands will be read from. Prior to calling this the command globus_ftp_control_handle_t must be populated via a call to globus_ftp_control_accept.
script - TCL script to be invoked once commands are read. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_server_read_commands returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_server_read_commands $handle $auth_req { auth_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
globus_ftp_control_server_listen, globus_ftp_control_server_accept, globus_ftp_control_server_stop
NAME
globus_ftp_control_release_data_info
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_release_data_info
handle
data_info
DESCRIPTION
This command is used to release all memory and references created when a call to globus_ftp_control_create_data_info was made. For every call to globus_ftp_control_create_data_info a call to this command must be made.
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
data_info - The globus_ftp_control_data_write_info_t structure to be released.
RETURN VALUE
On success globus_ftp_control_release_data_info returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_release_data_info $handle $data_info ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_response_copy
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_response_copy
src_response
dest_response
DESCRIPTION
This command is used to copy one response structure to another.
PARAMETERS
src_response - This parameter indicates the response structure to copy.
dest_response - This parameter specifies the target response structure.
RETURN VALUE
On success globus_ftp_control_response_copy returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_response_copy $src_response $dest_response ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_response_destroy
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_response_destroy
response
DESCRIPTION
This command is used to free up the memory associated with a response structure.
PARAMETERS
response - The response structure to destroy.
RETURN VALUE
On success globus_ftp_control_response_destroy returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_response_destroy $response ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_send_command
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_send_command
handle
cmdspec
script
DESCRIPTION
This command is used to send an FTP command, and register a handler to receive the FTP reply (or replies, if an intermediate one is sent). When the control channel is GSS authenticated, the message and the reply will be automatically GSS wrapped/unwrapped.
PARAMETERS
handle - A pointer to a GSIFTP control handle. The command described by the cmdspec is issued to the server over the control channel associated with this handle.
cmdspec - A printf-style format string containing the text of the command to send to the server.
script - TCL script to be invoked once the authentication process is completed or when an error occurs. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_send_cmd returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_send_cmd $handle $cmdspec { send_cmd_response_cb NULL } ] result
BUGS
None
TODO
None
NAME
globus_ftp_control_send_response
SYNOPSIS
package require globus_ftp_control_send_response
globus_ftp_control_read_commands
handle
respspec
script
DESCRIPTION
This command is used to send a response to the GSIFTP client.
This command sends a GSIFTP formatted response to the client. When a command callback is received the user calls this command to respond to the clients request.
PARAMETERS
handle - The control connection to send the response across.
respspec - A formated string representing the users response.
script - TCL script to be invoked once the response has been sent. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_server_send_response returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_server_send_response $handle $respspec { send_resp_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_server_accept
SYNOPSIS
package require globus_ftp_control_server_accept
globus_ftp_control_server_accept
listener_handle
new_handle
script
DESCRIPTION
This command is used to accept a connection request from a client.
When the listen callback is called (see globus_ftp_control_server_listen) a client has requested a connection. This function must be called to accept that user connection request. Once the connection is established or if a error occurs, the callback function is called.
PARAMETERS
listener_handle - The server object that received the connection request.
new_handle - The control connection object. This structure will be populated and passed to the callback when the client is authorized. This structure represents the control connection between the server and client. It will be used to read commands from the client and send responses to the client.
script - TCL script to be invoked once the client connection has been accepted. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_server_accept returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_server_accept $listener_handle $new_handle { accept_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
globus_ftp_control_server_listen, globus_ftp_control_server_stop
NAME
globus_ftp_control_server_authenticate
SYNOPSIS
package require globus_ftp_control_server_authenticate
globus_ftp_control_server_authenticate
handle
auth_requirements
script
DESCRIPTION
This command is used to authenticate a connection from a client.
After a client connection has been accepted (using the globus_ftp_control_server_accept call), this command should be called to authenticate the client. The caller of this command may specify certain authentication requirements using the auth_requirements parameter.
PARAMETERS
handle - The control connection object. This structure will be populated and passed to the callback when the client is authorized. This structure represents the control connection between the server and client. It will be used to read commands from the client and send responses to the client.
auth_requirements - This structure represents the authentication requirements that the user has for a given connection. For example GSIFTP user name, password, and account.
script - TCL script to be invoked once the client authentication has been accepted or rejected. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_server_authenticate returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_server_authenticate $handle $auth_req { auth_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
globus_ftp_control_server_listen, globus_ftp_control_server_accept, globus_ftp_control_server_stop
NAME
globus_ftp_control_server_handle_destroy
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_server_handle_destroy
handle
DESCRIPTION
This command is used to free up all dynamicly allocated memory associated with a given Globus FTP server handle. It will also remove the handle from a list used by the module activation/deactivation functions. This command should only be called after a call to either globus_ftp_control_server_stop.
PARAMETERS
handle - The handle to destroy.
RETURN VALUE
On success globus_ftp_control_server_handle_destroy returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_server_handle_destroy $handle ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_server_handle_init
SYNOPSIS
package require globus_ftp_control
globus_ftp_control_server_handle_init
handle
DESCRIPTION
This command is used to set up (i.e. intialize all mutexes and variables) a Globus FTP server handle. It will also enter the handle in a list used by the module activation/deactivation functions.
PARAMETERS
handle - The handle to initialize.
RETURN VALUE
On success globus_ftp_control_server_handle_init returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_ftp_control_server_handle_init $handle ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_server_listen
SYNOPSIS
package require globus_ftp_control_server_listen
globus_ftp_control_server_listen
server_handle
port
script
DESCRIPTION
This command is used to start the listening on *port for connections from FTP clients. When a connection request is made the script gets invoked. Upon return from this function the server_handle structure is initialized.
PARAMETERS
server_handle - A pointer to a initialized server handle.
port - A pointer to the port to listen on. If the initial value is zero it will be set to the default value.
script - TCL script to be invoked once connection requests are made. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_server_listen returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_server_listen $server_handle $port { server_listen_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_ftp_control_server_stop
SYNOPSIS
package require globus_ftp_control_server_stop
globus_ftp_control_server_stop
listener_handle
script
DESCRIPTION
This command is used to stop the GSIFTP server from listening on the given listener object for client connections. All existing client connections are left open.
PARAMETERS
listener_handle - The listener handle that is no longer listening for client connections.
script - TCL script to be invoked when the server structure is no longer listening. The command will be executed exactly once in global scope. If an error occurs while executing the command, then the bgerror mechanism is used to report the error.
RETURN VALUE
On success globus_ftp_control_server_stop returns 0. On error, this command will raise an error and must be caught using the appropriate bgerror command.
EXAMPLE
lassign [ globus_ftp_control_server_stop $listener_handle { stop_cb NULL } ] result
BUGS
None
TODO
None
SEE ALSO
NAME
globus_X_ftp_control_data_write_stripe
SYNOPSIS
package require globus_ftp_control
globus_X_ftp_control_data_write_stripe
handle
buffer
length
offset
eof
stripe_ndx
data_info
DESCRIPTION
This command is used to write FTP data to a particular stripe from an enqueue callback function only.
This command allows the user to register the write of FTP data on a specfic stripe. This function can only be called from an enqueue function callback. This command should be used only by the implementor of an enqueue function. It should be viewed as unstable and used used only by advanced users. This is the only command in the library that the enqueue function implementor is allowed from the enqueue callback.
PARAMETERS
handle - The FTP control handle contains information about the current state of the control and data connections.
buffer - A pointer to the data the user wishes to send along the FTP data channels.
length - The length of the data pointer to by the parameter buffer.
offset - The offset into the file of the data.
eof - A boolean stating that this will be the last chuck of data registered on the given stripe. In order to properly send an EOF message the user must register an EOF on every stripe.
stripe_ndx - The index of the stripe on which the data will be sent. The index of each stripe is determined by the call to local_spas or local_spor.
data_info - An opaque structure that is passed into the enqueue function and contains reference count and state information. The same data_info pointer that is passed into the enqueue function must be used for this parameter.
RETURN VALUE
On success globus_X_ftp_control_data_write_stripe returns 0. On error, this command will raise an error and must be caught using the appropriate catch command.
EXAMPLE
lassign [ globus_X_ftp_control_data_write_stripe $handle $buffer $length $offset $eof $stripe_ndx $data_info ] result
BUGS
None
TODO
None