Grid Community Toolkit
6.2.1705709074 (tag: v6.2.20240202)
|
Control Client. More...
Functions | |
globus_result_t | globus_ftp_control_handle_init (globus_ftp_control_handle_t *handle) |
Initialize a globus ftp handle. More... | |
globus_result_t | globus_ftp_control_handle_destroy (globus_ftp_control_handle_t *handle) |
Destroy a globus ftp handle. More... | |
globus_result_t | globus_ftp_control_connect (globus_ftp_control_handle_t *handle, char *host, unsigned short port, globus_ftp_control_response_callback_t callback, void *callback_arg) |
Create a new control connection to an FTP server. More... | |
globus_result_t | globus_ftp_control_response_destroy (globus_ftp_control_response_t *response) |
Free the memory associated with a response. More... | |
globus_result_t | globus_ftp_control_response_copy (globus_ftp_control_response_t *src, globus_ftp_control_response_t *dest) |
Copy a response structure. More... | |
globus_result_t | globus_ftp_control_authenticate (globus_ftp_control_handle_t *handle, globus_ftp_control_auth_info_t *auth_info, globus_bool_t use_auth, globus_ftp_control_response_callback_t callback, void *callback_arg) |
Authenticate the user to the FTP server. More... | |
globus_result_t | globus_ftp_control_authenticate_ex (globus_ftp_control_handle_t *handle, globus_ftp_control_auth_info_t *auth_info, globus_bool_t use_auth, globus_ftp_control_response_callback_t callback, void *callback_arg) |
Authenticate the user to the FTP server. More... | |
globus_result_t | globus_ftp_control_send_command (globus_ftp_control_handle_t *handle, const char *cmdspec, globus_ftp_control_response_callback_t callback, void *callback_arg,...) |
Send an FTP protocol command. More... | |
globus_result_t | globus_ftp_control_abort (globus_ftp_control_handle_t *handle, globus_ftp_control_response_callback_t callback, void *callback_arg) |
Send a GridFTP ABORT. More... | |
globus_result_t | globus_ftp_control_quit (globus_ftp_control_handle_t *handle, globus_ftp_control_response_callback_t callback, void *callback_arg) |
Send a GridFTP QUIT. More... | |
globus_result_t | globus_ftp_control_force_close (globus_ftp_control_handle_t *handle, globus_ftp_control_response_callback_t callback, void *callback_arg) |
Force a control connection to close. More... | |
globus_result_t | globus_ftp_control_auth_info_init (globus_ftp_control_auth_info_t *auth_info, gss_cred_id_t credential_handle, globus_bool_t encrypt, char *user, char *password, char *account, char *subject) |
Initialize authentication information. More... | |
int | globus_ftp_control_auth_info_compare (globus_ftp_control_auth_info_t *auth_info_1, globus_ftp_control_auth_info_t *auth_info_2) |
Compare authentication information. More... | |
globus_result_t | globus_ftp_control_client_get_connection_info_ex (globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t *local_info, globus_ftp_control_host_port_t *remote_info) |
Not documented yet. | |
globus_result_t | globus_ftp_control_ipv6_allow (globus_ftp_control_handle_t *handle, globus_bool_t allow) |
Not documented yet. | |
Control Client.
globus_result_t globus_ftp_control_abort | ( | globus_ftp_control_handle_t * | handle, |
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg | ||
) |
Send a GridFTP ABORT.
This function 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.
handle | A pointer to a GridFTP control handle. The ABORT command is issued to the server over the control channel associated with this handle. |
callback | The function to be called once the authentication process is complete or when an error occurs. |
callback_arg | User supplied argument to the callback function |
int globus_ftp_control_auth_info_compare | ( | globus_ftp_control_auth_info_t * | auth_info_1, |
globus_ftp_control_auth_info_t * | auth_info_2 | ||
) |
Compare authentication information.
This is helper function compares two authentication information structures and return zero if the two structures are deemed equal and a non-zero value otherwise.
auth_info_1 | The first authentication structure |
auth_info_2 | The second authentication structure |
globus_result_t globus_ftp_control_auth_info_init | ( | globus_ftp_control_auth_info_t * | auth_info, |
gss_cred_id_t | credential_handle, | ||
globus_bool_t | encrypt, | ||
char * | user, | ||
char * | password, | ||
char * | account, | ||
char * | subject | ||
) |
Initialize authentication information.
This is helper function initializes a authentication information structure with the values contained in the second to fifth arguments, which may be GLOBUS_NULL. No memory is allocated in this function.
auth_info | The authentication structure to initialize. |
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 |
globus_result_t globus_ftp_control_authenticate | ( | globus_ftp_control_handle_t * | handle, |
globus_ftp_control_auth_info_t * | auth_info, | ||
globus_bool_t | use_auth, | ||
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg | ||
) |
Authenticate the user to the FTP server.
This will 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.
handle | A pointer to a unauthenticated GridFTP control handle. In the case of GSS authentication the GSS security context is stored in this structure. |
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. |
callback | The function to be called once the authentication process is complete or when an error occurs. |
callback_arg | User supplied argument to the callback function |
globus_result_t globus_ftp_control_authenticate_ex | ( | globus_ftp_control_handle_t * | handle, |
globus_ftp_control_auth_info_t * | auth_info, | ||
globus_bool_t | use_auth, | ||
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg | ||
) |
Authenticate the user to the FTP server.
This will 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.
handle | A pointer to a unauthenticated GridFTP control handle. In the case of GSS authentication the GSS security context is stored in this structure. |
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. |
callback | The function to be called once the authentication process is complete or when an error occurs. |
callback_arg | User supplied argument to the callback function |
globus_result_t globus_ftp_control_connect | ( | globus_ftp_control_handle_t * | handle, |
char * | host, | ||
unsigned short | port, | ||
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg | ||
) |
Create a new control connection to an FTP server.
This function 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 callback function will be invoked.
handle | A pointer to a initialized FTP control handle. This handle will be used for all subsequent FTP control operations. |
host | The hostname of the FTP server. |
port | The TCP port number of the FTP server. |
callback | A function to be called once the connection to the server is established, and a response has been read. |
callback_arg | Parameter to the callback function. |
globus_result_t globus_ftp_control_force_close | ( | globus_ftp_control_handle_t * | handle, |
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg | ||
) |
Force a control connection to close.
Force a close of the control connection without waiting for outstanding commands to complete and without sending QUIT.
This function 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 GridFTP control operations.
handle | A pointer to a GridFTP control handle. The quit message is issued to the server over the control channel associated with this handle. |
callback | The function to be called once the authentication process is complete or when an error occurs. |
callback_arg | User supplied argument to the callback function |
globus_result_t globus_ftp_control_handle_destroy | ( | globus_ftp_control_handle_t * | handle | ) |
Destroy a globus ftp handle.
This function will free up all dynamically 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 function should only be called after a call to either globus_ftp_control_force_close or globus_ftp_control_quit.
handle | The handle to destroy. |
globus_result_t globus_ftp_control_handle_init | ( | globus_ftp_control_handle_t * | handle | ) |
Initialize a globus ftp handle.
This function will set up (i.e. initialize all mutexes and variables) a globus ftp handle. It will also enter the handle in a list used by the module activation/deactivation functions.
handle | The handle to initialize. |
globus_result_t globus_ftp_control_quit | ( | globus_ftp_control_handle_t * | handle, |
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg | ||
) |
Send a GridFTP QUIT.
This function 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 GridFTP control operations.
handle | A pointer to a GridFTP control handle. The quit message is issued to the server over the control channel associated with this handle. |
callback | The function to be called once the authentication process is complete or when an error occurs. |
callback_arg | User supplied argument to the callback function |
globus_result_t globus_ftp_control_response_copy | ( | globus_ftp_control_response_t * | src, |
globus_ftp_control_response_t * | dest | ||
) |
Copy a response structure.
This is a helper function which copies one response structure to another.
src | This parameter indicates the response structure to copy |
dest | This parameter specifies the target response structure |
globus_result_t globus_ftp_control_response_destroy | ( | globus_ftp_control_response_t * | response | ) |
Free the memory associated with a response.
This is a helper function which frees the memory associated with a response structure.
response | This parameter indicates the response structure to destroy |
globus_result_t globus_ftp_control_send_command | ( | globus_ftp_control_handle_t * | handle, |
const char * | cmdspec, | ||
globus_ftp_control_response_callback_t | callback, | ||
void * | callback_arg, | ||
... | |||
) |
Send an FTP protocol command.
This function 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.
handle | A pointer to a GridFTP 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. The optional parameters to the format string are passed after the callback_arg in the function invocation. |
callback | The function to be called once the authentication process is complete or when an error occurs. |
callback_arg | User supplied argument to the callback function |
... | Parameters which will be substituted into the % escapes in the cmdspec string. |