Loading...
Searching...
No Matches
globus_ftp_control.h
Go to the documentation of this file.
/*
* Copyright 1999-2006 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GLOBUS_INCLUDE_FTP_CONTROL_H
#define GLOBUS_INCLUDE_FTP_CONTROL_H 1
#include "globus_common.h"
#include "globus_error_string.h"
#include "globus_io.h"
#include "globus_gss_assist.h"
#include "globus_handle_table.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef GLOBUS_GLOBAL_DOCUMENT_SET
#endif
typedef enum globus_ftp_control_type_e
{
GLOBUS_FTP_CONTROL_TYPE_NONE,
GLOBUS_FTP_CONTROL_TYPE_ASCII = 'A',
GLOBUS_FTP_CONTROL_TYPE_EBCDIC = 'E',
GLOBUS_FTP_CONTROL_TYPE_IMAGE = 'I',
GLOBUS_FTP_CONTROL_TYPE_LOCAL = 'L'
} globus_ftp_control_type_t;
typedef enum globus_ftp_control_mode_e
{
GLOBUS_FTP_CONTROL_MODE_NONE,
GLOBUS_FTP_CONTROL_MODE_STREAM = 'S',
GLOBUS_FTP_CONTROL_MODE_BLOCK = 'B',
GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK = 'E',
GLOBUS_FTP_CONTROL_MODE_COMPRESSED = 'C'
} globus_ftp_control_mode_t;
typedef enum globus_ftp_control_dcau_mode_e
{
GLOBUS_FTP_CONTROL_DCAU_NONE = 'N',
GLOBUS_FTP_CONTROL_DCAU_SELF = 'A',
GLOBUS_FTP_CONTROL_DCAU_SUBJECT = 'S',
GLOBUS_FTP_CONTROL_DCAU_DEFAULT
} globus_ftp_control_dcau_mode_t;
typedef struct globus_ftp_control_dcau_subject_s
{
globus_ftp_control_dcau_mode_t mode;
char * subject;
} globus_ftp_control_dcau_subject_t;
typedef enum globus_ftp_control_striping_mode_e
{
GLOBUS_FTP_CONTROL_STRIPING_NONE,
GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED,
GLOBUS_FTP_CONTROL_STRIPING_BLOCKED_ROUND_ROBIN
} globus_ftp_control_striping_mode_t;
typedef struct globus_ftp_control_round_robin_s
{
globus_ftp_control_striping_mode_t mode;
globus_size_t block_size;
} globus_ftp_control_round_robin_t;
typedef struct globus_ftp_control_partitioned_s
{
globus_ftp_control_striping_mode_t mode;
globus_size_t size;
} globus_ftp_control_partitioned_t;
typedef union globus_ftp_control_dcau_u
{
globus_ftp_control_dcau_mode_t mode;
globus_ftp_control_dcau_subject_t subject;
} globus_ftp_control_dcau_t;
typedef enum
{
GLOBUS_FTP_CONTROL_PROTECTION_CLEAR = 'C',
GLOBUS_FTP_CONTROL_PROTECTION_SAFE = 'S',
GLOBUS_FTP_CONTROL_PROTECTION_CONFIDENTIAL = 'E',
GLOBUS_FTP_CONTROL_PROTECTION_PRIVATE = 'P'
} globus_ftp_control_protection_t;
typedef enum
{
GLOBUS_FTP_CONTROL_DELAYED_SINGLE_PASSIVE = 'S',
GLOBUS_FTP_CONTROL_DELAYED_STRIPED_PASSIVE = 'M',
GLOBUS_FTP_CONTROL_NORMAL_PASSIVE = 'N'
} globus_ftp_control_delay_passive_t;
typedef union globus_ftp_control_layout_u
{
globus_ftp_control_striping_mode_t mode;
globus_ftp_control_round_robin_t round_robin;
globus_ftp_control_partitioned_t partitioned;
/*
* No data required for:
* GLOBUS_FTP_CONTROL_STRIPING_NONE
* GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED
*/
} globus_ftp_control_layout_t;
typedef enum globus_ftp_control_structure_e
{
GLOBUS_FTP_CONTROL_STRUCTURE_NONE,
GLOBUS_FTP_CONTROL_STRUCTURE_FILE,
GLOBUS_FTP_CONTROL_STRUCTURE_PAGE,
GLOBUS_FTP_CONTROL_STRUCTURE_RECORD
} globus_ftp_control_structure_t;
typedef enum globus_ftp_control_parallelism_mode_e
{
GLOBUS_FTP_CONTROL_PARALLELISM_NONE,
GLOBUS_FTP_CONTROL_PARALLELISM_FIXED
} globus_ftp_control_parallelism_mode_t;
/*
* The base class for all parallel types. Subtypes
* must first define all types in this structure.
*/
typedef struct globus_i_ftp_parallelism_base_s
{
globus_ftp_control_parallelism_mode_t mode;
globus_size_t size;
} globus_i_ftp_parallelism_base_t;
typedef struct globus_ftp_parallelism_fixed_s
{
globus_ftp_control_parallelism_mode_t mode;
globus_size_t size;
} globus_ftp_parallelism_fixed_t;
typedef union globus_ftp_control_parallelism_u
{
globus_ftp_control_parallelism_mode_t mode;
globus_i_ftp_parallelism_base_t base;
globus_ftp_parallelism_fixed_t fixed;
} globus_ftp_control_parallelism_t;
typedef struct globus_ftp_control_host_port_s
{
int host[16];
unsigned short port;
/*
* if ipv6 is not enabled, the following param will be assumed to be 4
* when passed as an in-parameter. otherwise it must indicate the correct
* len.
*
* for out-parameters, the following will _always_ be 4 unless ipv6 is
* allowed. then it will be either 4 or 16
*/
int hostlen;
} globus_ftp_control_host_port_t;
#define GLOBUS_FTP_CONTROL_MODULE (&globus_i_ftp_control_module)
extern globus_module_descriptor_t globus_i_ftp_control_module;
#define _FCSL(s) globus_common_i18n_get_string(GLOBUS_FTP_CONTROL_MODULE,s)
/*
* Module Specific Data Types
*/
typedef enum globus_ftp_control_response_class_e
{
GLOBUS_FTP_UNKNOWN_REPLY,
GLOBUS_FTP_POSITIVE_PRELIMINARY_REPLY,
GLOBUS_FTP_POSITIVE_COMPLETION_REPLY,
GLOBUS_FTP_POSITIVE_INTERMEDIATE_REPLY,
GLOBUS_FTP_TRANSIENT_NEGATIVE_COMPLETION_REPLY,
GLOBUS_FTP_PERMANENT_NEGATIVE_COMPLETION_REPLY
} globus_ftp_control_response_class_t;
typedef struct globus_ftp_control_response_s
{
int code;
globus_ftp_control_response_class_t response_class;
globus_byte_t * response_buffer;
globus_size_t response_length;
globus_size_t response_buffer_size;
} globus_ftp_control_response_t;
typedef enum globus_ftp_control_tcpbuffer_mode_e
{
GLOBUS_FTP_CONTROL_TCPBUFFER_DEFAULT,
GLOBUS_FTP_CONTROL_TCPBUFFER_FIXED,
GLOBUS_FTP_CONTROL_TCPBUFFER_AUTOMATIC
} globus_ftp_control_tcpbuffer_mode_t;
typedef struct
{
globus_ftp_control_tcpbuffer_mode_t mode;
}
globus_ftp_control_tcpbuffer_default_t;
typedef struct
{
globus_ftp_control_tcpbuffer_mode_t mode;
int size;
}
globus_ftp_control_tcpbuffer_fixed_t;
typedef struct globus_ftp_control_tcpbuffer_automatic_s
{
globus_ftp_control_tcpbuffer_mode_t mode;
unsigned int initial_size;
unsigned int minimum_size;
unsigned int maximum_size;
} globus_ftp_control_tcpbuffer_automatic_t;
typedef union globus_ftp_control_tcpbuffer_t
{
globus_ftp_control_tcpbuffer_mode_t mode;
globus_ftp_control_tcpbuffer_default_t default_tcpbuffer;
globus_ftp_control_tcpbuffer_fixed_t fixed;
globus_ftp_control_tcpbuffer_automatic_t automatic;
} globus_ftp_control_tcpbuffer_t;
/*
* each strip can have multiple parallel connections to
* the same host
*/
typedef enum globus_ftp_data_connection_state_e
{
GLOBUS_FTP_DATA_STATE_NONE, /* dc_handle has no references */
GLOBUS_FTP_DATA_STATE_PASV, /* in local pasv mode */
GLOBUS_FTP_DATA_STATE_PORT, /* in local port mode */
GLOBUS_FTP_DATA_STATE_SPOR, /* in local spor mode */
GLOBUS_FTP_DATA_STATE_CONNECT_READ, /* connected for reading */
GLOBUS_FTP_DATA_STATE_CONNECT_WRITE, /* connected for writing */
GLOBUS_FTP_DATA_STATE_CLOSING, /* closing all connections */
GLOBUS_FTP_DATA_STATE_EOF, /* user has received eof */
GLOBUS_FTP_DATA_STATE_SEND_EOF /* not used for state at all */
} globus_ftp_data_connection_state_t;
#define GLOBUS_FTP_CONTROL_READ_BUFFER_SIZE 1000
#define GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE 8192
typedef enum
{
GLOBUS_FTP_CONTROL_UNCONNECTED,
GLOBUS_FTP_CONTROL_CONNECTING,
GLOBUS_FTP_CONTROL_CONNECTED,
GLOBUS_FTP_CONTROL_CLOSING
}
globus_ftp_cc_state_t;
struct globus_ftp_control_handle_s;
struct globus_i_ftp_dc_transfer_handle_t;
union globus_ftp_control_command_u;
typedef enum globus_ftp_control_command_code_e
{
GLOBUS_FTP_CONTROL_COMMAND_OPTS,
GLOBUS_FTP_CONTROL_COMMAND_AUTH,
GLOBUS_FTP_CONTROL_COMMAND_ADAT,
GLOBUS_FTP_CONTROL_COMMAND_SPAS,
GLOBUS_FTP_CONTROL_COMMAND_SPOR,
GLOBUS_FTP_CONTROL_COMMAND_PORT,
GLOBUS_FTP_CONTROL_COMMAND_PASV,
GLOBUS_FTP_CONTROL_COMMAND_SITE,
GLOBUS_FTP_CONTROL_COMMAND_TYPE,
GLOBUS_FTP_CONTROL_COMMAND_DELE,
GLOBUS_FTP_CONTROL_COMMAND_FEAT,
GLOBUS_FTP_CONTROL_COMMAND_ERET,
GLOBUS_FTP_CONTROL_COMMAND_ESTO,
GLOBUS_FTP_CONTROL_COMMAND_RMD,
GLOBUS_FTP_CONTROL_COMMAND_MKD,
GLOBUS_FTP_CONTROL_COMMAND_PWD,
GLOBUS_FTP_CONTROL_COMMAND_CWD,
GLOBUS_FTP_CONTROL_COMMAND_CDUP,
GLOBUS_FTP_CONTROL_COMMAND_NLST,
GLOBUS_FTP_CONTROL_COMMAND_HELP,
GLOBUS_FTP_CONTROL_COMMAND_STAT,
GLOBUS_FTP_CONTROL_COMMAND_NOOP,
GLOBUS_FTP_CONTROL_COMMAND_SYST,
GLOBUS_FTP_CONTROL_COMMAND_STOU,
GLOBUS_FTP_CONTROL_COMMAND_QUIT,
GLOBUS_FTP_CONTROL_COMMAND_REIN,
GLOBUS_FTP_CONTROL_COMMAND_ABOR,
GLOBUS_FTP_CONTROL_COMMAND_ALLO,
GLOBUS_FTP_CONTROL_COMMAND_MODE,
GLOBUS_FTP_CONTROL_COMMAND_STRU,
GLOBUS_FTP_CONTROL_COMMAND_ACCT,
GLOBUS_FTP_CONTROL_COMMAND_PASS,
GLOBUS_FTP_CONTROL_COMMAND_USER,
GLOBUS_FTP_CONTROL_COMMAND_SMNT,
GLOBUS_FTP_CONTROL_COMMAND_LIST,
GLOBUS_FTP_CONTROL_COMMAND_RETR,
GLOBUS_FTP_CONTROL_COMMAND_REST,
GLOBUS_FTP_CONTROL_COMMAND_SBUF,
GLOBUS_FTP_CONTROL_COMMAND_SIZE,
GLOBUS_FTP_CONTROL_COMMAND_STOR,
GLOBUS_FTP_CONTROL_COMMAND_APPE,
GLOBUS_FTP_CONTROL_COMMAND_RNFR,
GLOBUS_FTP_CONTROL_COMMAND_RNTO,
GLOBUS_FTP_CONTROL_COMMAND_LANG,
GLOBUS_FTP_CONTROL_COMMAND_UNKNOWN
} globus_ftp_control_command_code_t;
typedef struct globus_ftp_control_auth_info_s
{
globus_bool_t authenticated;
globus_ftp_control_command_code_t prev_cmd;
char * auth_gssapi_subject;
gss_ctx_id_t auth_gssapi_context;
gss_cred_id_t credential_handle;
globus_bool_t locally_acquired_credential;
gss_name_t target_name;
OM_uint32 req_flags;
char * user;
char * password;
char * account;
gss_cred_id_t delegated_credential_handle;
globus_bool_t encrypt;
}
globus_ftp_control_auth_info_t;
typedef void (*globus_ftp_control_response_callback_t)(
void * callback_arg,
struct globus_ftp_control_handle_s * handle,
globus_object_t * error,
globus_ftp_control_response_t * ftp_response);
typedef void (*globus_ftp_control_callback_t)(
void * callback_arg,
struct globus_ftp_control_handle_s * handle,
globus_object_t * error);
typedef void
(*globus_ftp_control_data_connect_callback_t)(
void * callback_arg,
struct globus_ftp_control_handle_s * handle,
unsigned int stripe_ndx,
globus_bool_t reused,
globus_object_t * error);
typedef void (*globus_ftp_control_command_callback_t)(
void * callback_arg,
struct globus_ftp_control_handle_s * handle,
globus_object_t * error,
union globus_ftp_control_command_u * command);
typedef void
(*globus_ftp_control_auth_callback_t)(
void * callback_arg,
struct globus_ftp_control_handle_s * handle,
globus_object_t * error,
globus_ftp_control_auth_info_t * auth_result);
typedef unsigned long globus_ftp_control_auth_requirements_t;
#define GLOBUS_FTP_CONTROL_AUTH_REQ_NONE 1
#define GLOBUS_FTP_CONTROL_AUTH_REQ_GSSAPI 2
#define GLOBUS_FTP_CONTROL_AUTH_REQ_USER 4
#define GLOBUS_FTP_CONTROL_AUTH_REQ_PASS 8
#define GLOBUS_FTP_CONTROL_AUTH_REQ_ACCT 16
#define GLOBUS_FTP_CONTROL_AUTH_REQ_TLS 32
typedef struct globus_ftp_control_rw_queue_element_s
{
globus_ftp_control_response_callback_t callback;
globus_ftp_control_callback_t send_response_cb;
void * arg;
globus_byte_t * write_buf;
int write_flags;
globus_io_write_callback_t write_callback;
globus_io_read_callback_t read_callback;
globus_bool_t expect_response;
}
globus_ftp_control_rw_queue_element_t;
typedef struct globus_ftp_cc_handle_s
{
globus_io_attr_t io_attr;
globus_netlogger_handle_t nl_handle;
globus_bool_t nl_handle_set;
globus_fifo_t readers;
globus_fifo_t writers;
globus_ftp_control_command_callback_t command_cb;
void * command_cb_arg;
/* callback and arg for accept */
globus_ftp_control_callback_t accept_cb;
void * accept_cb_arg;
globus_ftp_control_auth_callback_t auth_cb;
void * auth_cb_arg;
globus_ftp_control_auth_requirements_t auth_requirements;
globus_ftp_control_response_t response;
globus_byte_t * read_buffer;
globus_size_t read_buffer_size;
globus_size_t bytes_read;
globus_ftp_control_auth_info_t auth_info;
globus_bool_t use_auth;
globus_io_handle_t io_handle;
globus_ftp_cc_state_t cc_state;
char serverhost[MAXHOSTNAMELEN];
struct hostent server;
char server_buffer[
GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE];
globus_list_t * list_elem;
globus_mutex_t mutex;
globus_bool_t do_close;
int cb_count;
globus_ftp_control_response_callback_t close_cb;
void * close_cb_arg;
globus_object_t * close_result;
globus_ftp_control_response_t quit_response;
globus_bool_t signal_deactivate;
}
globus_ftp_cc_handle_t;
struct globus_ftp_control_data_write_info_s;
typedef globus_result_t (*globus_ftp_control_layout_func_t)(
struct globus_ftp_control_handle_s * handle,
struct globus_ftp_control_data_write_info_s * data_info,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t offset,
globus_bool_t eof,
int stripe_count,
char * enqueue_str,
void * user_arg);
typedef globus_result_t (*globus_ftp_control_layout_verify_func_t)(
char * enqueue_str);
typedef struct globus_i_ftp_dc_handle_s
{
char magic[32];
globus_ftp_control_dcau_t dcau;
unsigned long pbsz;
globus_ftp_control_protection_t protection;
globus_ftp_data_connection_state_t state;
globus_ftp_control_mode_t mode;
globus_ftp_control_type_t type;
globus_ftp_control_structure_t structure;
int tcp_buffer_size;
int form_code;
globus_ftp_control_parallelism_t parallel;
globus_io_attr_t io_attr;
char * interface_addr;
struct globus_i_ftp_dc_transfer_handle_s * transfer_handle;
globus_list_t * transfer_list;
globus_bool_t send_eof;
globus_ftp_control_layout_func_t layout_func;
globus_ftp_control_layout_t layout;
char * layout_str;
void * layout_user_arg;
globus_bool_t initialized;
globus_mutex_t mutex;
globus_ftp_control_callback_t close_callback;
void * close_callback_arg;
globus_netlogger_handle_t nl_io_handle;
globus_bool_t nl_io_handle_set;
globus_netlogger_handle_t nl_ftp_handle;
globus_bool_t nl_ftp_handle_set;
globus_object_t * connect_error;
struct globus_ftp_control_handle_s * whos_my_daddy;
} globus_i_ftp_dc_handle_t;
typedef struct globus_ftp_control_handle_s
{
struct globus_i_ftp_dc_handle_s dc_handle;
struct globus_ftp_cc_handle_s cc_handle;
} globus_ftp_control_handle_t;
typedef void (*globus_ftp_control_data_callback_t)(
void * callback_arg,
globus_ftp_control_handle_t * handle,
globus_object_t * error,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t offset,
globus_bool_t eof);
typedef struct globus_ftp_control_data_write_info_s
{
globus_ftp_control_data_callback_t cb;
void * cb_arg;
globus_handle_t callback_table_handle;
} globus_ftp_control_data_write_info_t;
globus_result_t
globus_ftp_control_layout_register_func(
char * name,
globus_ftp_control_layout_func_t enqueue_func,
globus_ftp_control_layout_verify_func_t verify_func);
globus_result_t
globus_X_ftp_control_local_layout(
globus_ftp_control_handle_t * handle,
char * enqueue_str,
void * user_arg);
globus_result_t
globus_ftp_control_local_layout(
globus_ftp_control_handle_t * handle,
globus_ftp_control_layout_t * layout,
globus_size_t data_size);
/*
* NET LOGGER STUFF
*/
globus_result_t
globus_ftp_control_set_netlogger(
globus_ftp_control_handle_t * handle,
globus_netlogger_handle_t * nl_handle,
globus_bool_t nl_ftp_control,
globus_bool_t nl_globus_io);
globus_result_t
globus_ftp_control_data_set_interface(
globus_ftp_control_handle_t * handle,
const char * interface_addr);
globus_result_t
globus_i_ftp_control_data_set_stack(
globus_ftp_control_handle_t * handle,
globus_xio_stack_t stack);
globus_result_t
globus_i_ftp_control_data_get_attr(
globus_ftp_control_handle_t * handle,
globus_xio_attr_t * attr);
globus_result_t
globus_i_ftp_control_client_get_attr(
globus_ftp_control_handle_t * handle,
globus_xio_attr_t * attr);
globus_result_t
globus_i_ftp_control_client_set_stack(
globus_ftp_control_handle_t * handle,
globus_xio_stack_t stack);
globus_result_t
globus_i_ftp_control_load_xio_drivers(
char * driver_string,
globus_list_t ** driver_list);
void
globus_i_ftp_control_unload_xio_drivers(
globus_list_t * driver_list);
globus_result_t
globus_i_ftp_control_create_stack(
globus_ftp_control_handle_t * handle,
globus_list_t * driver_list,
globus_xio_stack_t * stack);
/*****************************************************************
* standard layout functions
****************************************************************/
/*
* blocked functions
*/
globus_result_t
globus_ftp_control_layout_blocked_verify(
char * layout_str);
void *
globus_ftp_control_layout_blocked_user_arg_create();
void
globus_ftp_control_layout_blocked_user_arg_destroy(
void * user_arg);
globus_result_t
globus_ftp_control_layout_blocked(
globus_ftp_control_handle_t * handle,
globus_ftp_control_data_write_info_t * data_info,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t in_offset,
globus_bool_t eof,
int stripe_count,
char * enqueue_str,
void * user_arg);
/*
* partitioned functions
*/
globus_result_t
globus_ftp_control_layout_partitioned_verify(
char * layout_str);
void *
globus_ftp_control_layout_partitioned_user_arg_create(
globus_size_t file_size);
void
globus_ftp_control_layout_partitioned_user_arg_destroy(
void * user_arg);
globus_result_t
globus_ftp_control_layout_partitioned(
globus_ftp_control_handle_t * handle,
globus_ftp_control_data_write_info_t * data_info,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t in_offset,
globus_bool_t eof,
int stripe_count,
char * enqueue_str,
void * user_arg);
/*
* data registration functions
*/
globus_result_t
globus_ftp_control_create_data_info(
globus_ftp_control_handle_t * handle,
globus_ftp_control_data_write_info_t * data_info,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t offset,
globus_bool_t eof,
globus_ftp_control_data_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_release_data_info(
globus_ftp_control_handle_t * handle,
globus_ftp_control_data_write_info_t * data_info);
globus_result_t
globus_ftp_control_data_write_stripe(
globus_ftp_control_handle_t * handle,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t offset,
globus_bool_t eof,
int stripe_ndx,
globus_ftp_control_data_callback_t callback,
void * callback_arg);
globus_result_t
globus_X_ftp_control_data_write_stripe(
globus_ftp_control_handle_t * handle,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t offset,
globus_bool_t eof,
int stripe_ndx,
globus_ftp_control_data_write_info_t * data_info);
/*
* Server API callbacks
* ----------------------------------------------------------------
*/
struct globus_ftp_control_server_s;
typedef void (*globus_ftp_control_server_callback_t)(
void * callback_arg,
struct globus_ftp_control_server_s * server_handle,
globus_object_t * error);
typedef enum globus_ftp_control_server_state_n
{
GLOBUS_FTP_CONTROL_SERVER_LISTENING,
GLOBUS_FTP_CONTROL_SERVER_DEAF
}
globus_ftp_control_server_state_t;
typedef struct globus_ftp_control_server_s
{
globus_io_handle_t io_handle;
globus_ftp_control_server_state_t state;
globus_ftp_control_server_callback_t callback;
void * callback_arg;
globus_list_t * list_elem;
globus_mutex_t mutex;
} globus_ftp_control_server_t;
typedef struct globus_ftp_control_command_str_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
char * string_arg;
} globus_ftp_control_command_str_t;
/*
* complex commands
*/
typedef struct globus_ftp_control_command_stru_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
globus_ftp_control_structure_t structure;
} globus_ftp_control_command_stru_t;
typedef struct globus_ftp_control_command_port_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
globus_ftp_control_host_port_t host_port;
} globus_ftp_control_command_port_t;
typedef struct globus_ftp_control_command_spor_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
int num_args;
globus_ftp_control_host_port_t * host_port;
} globus_ftp_control_command_spor_t;
typedef struct globus_ftp_control_command_mode_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
globus_ftp_control_mode_t mode;
} globus_ftp_control_command_mode_t;
typedef struct globus_ftp_control_command_allo_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
int size;
int record_size;
} globus_ftp_control_command_allo_t;
typedef struct globus_ftp_control_command_sbuf_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
int buffer_size;
} globus_ftp_control_command_sbuf_t;
/*
Can't parse marker unless I know state
typedef struct globus_ftp_control_command_rest_s
{
} globus_ftp_control_command_rest_t;
*/
typedef enum globus_ftp_control_type_option_e
{
GLOBUS_FTP_CONTROL_TYPE_NO_OPTION,
GLOBUS_FTP_CONTROL_TYPE_OPTION_N,
GLOBUS_FTP_CONTROL_TYPE_OPTION_T,
GLOBUS_FTP_CONTROL_TYPE_OPTION_C
} globus_ftp_control_type_option_t;
typedef struct globus_ftp_control_command_type_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
globus_ftp_control_type_t type;
globus_ftp_control_type_option_t option;
unsigned int bytesize;
} globus_ftp_control_command_type_t;
typedef enum globus_ftp_control_auth_type_e
{
GLOBUS_FTP_CONTROL_AUTH_GSSAPI,
GLOBUS_FTP_CONTROL_AUTH_UNKNOWN
} globus_ftp_control_auth_type_t;
typedef struct globus_ftp_control_command_auth_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
globus_ftp_control_auth_type_t type;
} globus_ftp_control_command_auth_t;
typedef struct globus_ftp_control_command_opts_s
{
globus_ftp_control_command_code_t code;
char * raw_command;
char * cmd_name;
char * cmd_opts;
} globus_ftp_control_command_opts_t;
/*
* single string commands
*/
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_site_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_acct_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_cwd_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_cdup_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_pass_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_user_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_smnt_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_list_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_retr_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_size_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_stor_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_appe_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_rnfr_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_rnto_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_feat_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_dele_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_rmd_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_mkd_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_nlst_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_help_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_stou_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_rest_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_eret_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_esto_t;
/*
* no string commands
*/
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_pasv_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_spas_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_stat_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_noop_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_syst_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_quit_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_rein_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_abor_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_pwd_t;
typedef globus_ftp_control_command_str_t
globus_ftp_control_command_adat_t;
typedef union globus_ftp_control_command_u
{
globus_ftp_control_command_code_t code;
globus_ftp_control_command_site_t site;
globus_ftp_control_command_sbuf_t sbuf;
globus_ftp_control_command_type_t type;
globus_ftp_control_command_rest_t rest;
globus_ftp_control_command_allo_t allo;
globus_ftp_control_command_eret_t eret;
globus_ftp_control_command_esto_t esto;
globus_ftp_control_command_mode_t mode;
globus_ftp_control_command_port_t port;
globus_ftp_control_command_spor_t spor;
globus_ftp_control_command_stru_t stru;
globus_ftp_control_command_auth_t auth;
globus_ftp_control_command_adat_t adat;
globus_ftp_control_command_acct_t acct;
globus_ftp_control_command_cwd_t cwd;
globus_ftp_control_command_cdup_t cdup;
globus_ftp_control_command_pass_t pass;
globus_ftp_control_command_user_t user;
globus_ftp_control_command_smnt_t smnt;
globus_ftp_control_command_opts_t opts;
globus_ftp_control_command_list_t list;
globus_ftp_control_command_retr_t retr;
globus_ftp_control_command_size_t size;
globus_ftp_control_command_stor_t stor;
globus_ftp_control_command_appe_t appe;
globus_ftp_control_command_rnfr_t rnfr;
globus_ftp_control_command_rnto_t rnto;
globus_ftp_control_command_dele_t dele;
globus_ftp_control_command_feat_t feat;
globus_ftp_control_command_rmd_t rmd;
globus_ftp_control_command_mkd_t mkd;
globus_ftp_control_command_nlst_t nlst;
globus_ftp_control_command_help_t help;
globus_ftp_control_command_pasv_t pasv;
globus_ftp_control_command_spas_t spas;
globus_ftp_control_command_stat_t stat;
globus_ftp_control_command_noop_t noop;
globus_ftp_control_command_syst_t syst;
globus_ftp_control_command_stou_t stou;
globus_ftp_control_command_quit_t quit;
globus_ftp_control_command_rein_t rein;
globus_ftp_control_command_abor_t abor;
globus_ftp_control_command_pwd_t pwd;
globus_ftp_control_command_str_t base;
} globus_ftp_control_command_t;
typedef struct globus_ftp_data_server_s
{
int bogus;
} globus_ftp_data_server_t;
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);
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);
globus_result_t
globus_ftp_control_handle_init(
globus_ftp_control_handle_t * handle);
globus_result_t
globus_ftp_control_handle_destroy(
globus_ftp_control_handle_t * handle);
globus_result_t
globus_ftp_control_server_handle_init(
globus_ftp_control_server_t * handle);
globus_result_t
globus_ftp_control_server_handle_destroy(
globus_ftp_control_server_t * handle);
globus_result_t
globus_ftp_control_response_destroy(
globus_ftp_control_response_t * response);
globus_result_t
globus_ftp_control_response_copy(
globus_ftp_control_response_t * src,
globus_ftp_control_response_t * dest);
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);
globus_result_t
globus_ftp_control_use_tls(
globus_ftp_control_handle_t * handle,
globus_ftp_control_auth_info_t * auth_info);
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);
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);
globus_result_t
globus_ftp_control_abort(
globus_ftp_control_handle_t * handle,
globus_ftp_control_response_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_quit(
globus_ftp_control_handle_t * handle,
globus_ftp_control_response_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_force_close(
globus_ftp_control_handle_t * handle,
globus_ftp_control_response_callback_t callback,
void * callback_arg);
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,
...);
globus_result_t
globus_ftp_control_local_pbsz(
globus_ftp_control_handle_t * handle,
unsigned long bufsize);
globus_result_t
globus_ftp_control_get_pbsz(
globus_ftp_control_handle_t * handle,
unsigned long * bufsize);
/* globus_ftp_control_server.c */
globus_result_t
globus_ftp_control_server_listen(
globus_ftp_control_server_t * handle,
unsigned short * port,
globus_ftp_control_server_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_server_listen_ex(
globus_ftp_control_server_t * handle,
globus_io_attr_t * attr,
unsigned short * port,
globus_ftp_control_server_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_server_stop(
globus_ftp_control_server_t * listener,
globus_ftp_control_server_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_server_accept(
globus_ftp_control_server_t * listener,
globus_ftp_control_handle_t * handle,
globus_ftp_control_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_server_authenticate(
globus_ftp_control_handle_t * handle,
globus_ftp_control_auth_requirements_t auth_requirements,
globus_ftp_control_auth_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_read_commands(
globus_ftp_control_handle_t * handle,
globus_ftp_control_command_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_send_response(
globus_ftp_control_handle_t * handle,
const char * respspec,
globus_ftp_control_callback_t callback,
void * callback_arg,
...);
globus_result_t
globus_ftp_control_close(
globus_ftp_control_server_t * listener,
globus_ftp_control_server_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_data_close(
globus_ftp_data_server_t * listener,
globus_ftp_control_server_callback_t callback,
void * callback_arg);
int
globus_i_ftp_queue_size(
globus_ftp_control_handle_t * handle,
int stripe_ndx);
/* command object functions */
globus_result_t
globus_ftp_control_command_copy(
globus_ftp_control_command_t * dest,
globus_ftp_control_command_t * src);
globus_result_t
globus_ftp_control_command_init(
globus_ftp_control_command_t * command,
char * raw_command,
globus_ftp_control_auth_info_t * auth_info);
globus_result_t
globus_ftp_control_command_destroy(
globus_ftp_control_command_t * command);
globus_result_t
globus_i_ftp_control_data_cc_init(
globus_ftp_control_handle_t * control_handle);
globus_result_t
globus_i_ftp_control_data_cc_destroy(
globus_ftp_control_handle_t * control_handle);
globus_result_t
globus_ftp_control_data_force_close(
globus_ftp_control_handle_t * control_handle,
globus_ftp_control_callback_t destroy_callback,
void * destroy_callback_arg);
globus_result_t
globus_ftp_control_local_send_eof(
globus_ftp_control_handle_t * handle,
globus_bool_t send_eof);
globus_result_t
globus_ftp_control_data_send_eof(
globus_ftp_control_handle_t * handle,
int count[],
int array_size,
globus_bool_t eof_message,
globus_ftp_control_callback_t cb,
void * user_arg);
globus_result_t
globus_ftp_control_get_stripe_count(
globus_ftp_control_handle_t * handle,
int * stripe_count);
globus_result_t
globus_ftp_control_data_connect_read(
globus_ftp_control_handle_t * handle,
globus_ftp_control_data_connect_callback_t callback,
void * user_arg);
globus_result_t
globus_ftp_control_data_connect_write(
globus_ftp_control_handle_t * handle,
globus_ftp_control_data_connect_callback_t callback,
void * user_arg);
globus_result_t
globus_ftp_control_data_add_channels(
globus_ftp_control_handle_t * handle,
unsigned int num_channels,
unsigned int stripe);
globus_result_t
globus_ftp_control_data_remove_channels(
globus_ftp_control_handle_t * handle,
unsigned int num_channels,
unsigned int stripe);
globus_result_t
globus_ftp_control_data_query_channels(
globus_ftp_control_handle_t * handle,
unsigned int * num_channels,
unsigned int stripe);
globus_result_t
globus_ftp_control_data_get_total_data_channels(
globus_ftp_control_handle_t * handle,
unsigned int * num_channels,
unsigned int stripe_ndx);
globus_result_t
globus_ftp_control_data_get_remote_hosts(
globus_ftp_control_handle_t * handle,
globus_ftp_control_host_port_t * address,
int * addr_count);
globus_result_t
globus_ftp_control_get_parallelism(
globus_ftp_control_handle_t * handle,
globus_ftp_control_parallelism_t * parallelism);
globus_result_t
globus_ftp_control_local_parallelism(
globus_ftp_control_handle_t * handle,
globus_ftp_control_parallelism_t * parallelism);
globus_result_t
globus_ftp_control_local_pasv(
globus_ftp_control_handle_t * handle,
globus_ftp_control_host_port_t * address);
globus_result_t
globus_ftp_control_local_spas(
globus_ftp_control_handle_t * handle,
globus_ftp_control_host_port_t addresses[],
unsigned int num_addresses);
globus_result_t
globus_ftp_control_local_port(
globus_ftp_control_handle_t * handle,
globus_ftp_control_host_port_t * address);
globus_result_t
globus_ftp_control_local_spor(
globus_ftp_control_handle_t * handle,
globus_ftp_control_host_port_t addresses[],
unsigned int num_addresses);
globus_result_t
globus_ftp_control_get_spor(
globus_ftp_control_handle_t * handle,
globus_ftp_control_host_port_t addresses[],
unsigned int * num_addresses);
globus_result_t
globus_ftp_control_local_type(
globus_ftp_control_handle_t * handle,
globus_ftp_control_type_t type,
int form_code);
globus_result_t
globus_ftp_control_local_tcp_buffer(
globus_ftp_control_handle_t * handle,
globus_ftp_control_tcpbuffer_t * tcp_buffer);
globus_result_t
globus_ftp_control_local_mode(
globus_ftp_control_handle_t * handle,
globus_ftp_control_mode_t mode);
globus_result_t
globus_ftp_control_get_mode(
globus_ftp_control_handle_t * handle,
globus_ftp_control_mode_t * mode);
globus_result_t
globus_ftp_control_get_type(
globus_ftp_control_handle_t * handle,
globus_ftp_control_type_t * type);
globus_result_t
globus_ftp_control_local_dcau(
globus_ftp_control_handle_t * handle,
const globus_ftp_control_dcau_t * dcau,
gss_cred_id_t delegated_credential_handle);
globus_result_t
globus_ftp_control_get_dcau(
globus_ftp_control_handle_t * handle,
globus_ftp_control_dcau_t * dcau);
globus_result_t
globus_ftp_control_local_prot(
globus_ftp_control_handle_t * handle,
globus_ftp_control_protection_t protection);
globus_result_t
globus_ftp_control_get_prot(
globus_ftp_control_handle_t * handle,
globus_ftp_control_protection_t * protection);
globus_result_t
globus_ftp_control_local_stru(
globus_ftp_control_handle_t * handle,
globus_ftp_control_structure_t structure);
globus_result_t
globus_ftp_control_data_write(
globus_ftp_control_handle_t * handle,
globus_byte_t * buffer,
globus_size_t length,
globus_off_t offset,
globus_bool_t eof,
globus_ftp_control_data_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_data_read(
globus_ftp_control_handle_t * handle,
globus_byte_t * buffer,
globus_size_t max_length,
globus_ftp_control_data_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_data_read_all(
globus_ftp_control_handle_t * handle,
globus_byte_t * buffer,
globus_size_t length,
globus_ftp_control_data_callback_t callback,
void * callback_arg);
globus_result_t
globus_ftp_control_set_force_order(
globus_ftp_control_handle_t * handle,
globus_bool_t order_data,
globus_off_t starting_offset);
/* this has only been tested enough for the client library and GridFTP server
* it is very likely to not work for general usage
*/
globus_result_t
globus_ftp_control_ipv6_allow(
globus_ftp_control_handle_t * handle,
globus_bool_t allow);
/*
* internal function definitions
*/
globus_result_t
globus_i_ftp_parallelism_copy(
globus_ftp_control_parallelism_t * dest_parallelism,
globus_ftp_control_parallelism_t * src_parallelism);
int
globus_i_ftp_parallelism_get_size(
globus_ftp_control_parallelism_t * parallelism);
int
globus_i_ftp_parallelism_get_min_size(
globus_ftp_control_parallelism_t * parallelism);
int
globus_i_ftp_parallelism_get_max_size(
globus_ftp_control_parallelism_t * parallelism);
void
globus_ftp_control_host_port_init(
globus_ftp_control_host_port_t * host_port,
char * host,
unsigned short port);
void
globus_ftp_control_host_port_destroy(
globus_ftp_control_host_port_t * host_port);
void
globus_ftp_control_host_port_get_host(
globus_ftp_control_host_port_t * host_port,
char * host);
unsigned short
globus_ftp_control_host_port_get_port(
globus_ftp_control_host_port_t * host_port);
void
globus_ftp_control_host_port_copy(
globus_ftp_control_host_port_t * dest,
globus_ftp_control_host_port_t * src);
#define globus_i_ftp_control_client_get_connection_info \
globus_ftp_control_client_get_connection_info
globus_result_t
globus_ftp_control_client_get_connection_info(
globus_ftp_control_handle_t * handle,
int localhost[4],
unsigned short * localport,
int remotehost[4],
unsigned short * remoteport);
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);
globus_result_t
globus_ftp_control_data_get_socket_buf(
globus_ftp_control_handle_t * handle,
int * rcvbuf,
int * sndbuf);
globus_result_t
globus_ftp_control_data_get_retransmit_count(
globus_ftp_control_handle_t * handle,
char ** retransmit_count);
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_INCLUDE_FTP_CONTROL_H */
globus_ftp_control_layout_t
union globus_ftp_control_layout_u globus_ftp_control_layout_t
Control striping attribute union.
globus_ftp_control_auth_requirements_t
unsigned long globus_ftp_control_auth_requirements_t
Definition globus_ftp_control.h:640
globus_ftp_control_tcpbuffer_automatic_t
struct globus_ftp_control_tcpbuffer_automatic_s globus_ftp_control_tcpbuffer_automatic_t
Automatically set the TCP buffer/window size.
globus_ftp_control_dcau_subject_t
struct globus_ftp_control_dcau_subject_s globus_ftp_control_dcau_subject_t
Control DCAU subject authentication type.
globus_ftp_control_round_robin_t
struct globus_ftp_control_round_robin_s globus_ftp_control_round_robin_t
Control striping round robin attribute structure.
globus_ftp_control_tcpbuffer_mode_e
globus_ftp_control_tcpbuffer_mode_e
Definition globus_ftp_control.h:339
GLOBUS_FTP_CONTROL_TCPBUFFER_DEFAULT
@ GLOBUS_FTP_CONTROL_TCPBUFFER_DEFAULT
Definition globus_ftp_control.h:341
GLOBUS_FTP_CONTROL_TCPBUFFER_FIXED
@ GLOBUS_FTP_CONTROL_TCPBUFFER_FIXED
Definition globus_ftp_control.h:344
GLOBUS_FTP_CONTROL_TCPBUFFER_AUTOMATIC
@ GLOBUS_FTP_CONTROL_TCPBUFFER_AUTOMATIC
Definition globus_ftp_control.h:347
globus_ftp_control_auth_info_t
struct globus_ftp_control_auth_info_s globus_ftp_control_auth_info_t
Authentication Values.
globus_ftp_control_auth_callback_t
void(* globus_ftp_control_auth_callback_t)(void *callback_arg, struct globus_ftp_control_handle_s *handle, globus_object_t *error, globus_ftp_control_auth_info_t *auth_result)
Definition globus_ftp_control.h:624
globus_ftp_control_delay_passive_t
globus_ftp_control_delay_passive_t
Definition globus_ftp_control.h:201
globus_ftp_control_data_callback_t
void(* globus_ftp_control_data_callback_t)(void *callback_arg, globus_ftp_control_handle_t *handle, globus_object_t *error, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof)
Definition globus_ftp_control.h:818
globus_ftp_control_structure_t
enum globus_ftp_control_structure_e globus_ftp_control_structure_t
globus_ftp_control_command_callback_t
void(* globus_ftp_control_command_callback_t)(void *callback_arg, struct globus_ftp_control_handle_s *handle, globus_object_t *error, union globus_ftp_control_command_u *command)
Definition globus_ftp_control.h:587
globus_ftp_control_parallelism_mode_t
enum globus_ftp_control_parallelism_mode_e globus_ftp_control_parallelism_mode_t
globus_ftp_control_parallelism_mode_e
globus_ftp_control_parallelism_mode_e
Definition globus_ftp_control.h:237
globus_ftp_control_callback_t
void(* globus_ftp_control_callback_t)(void *callback_arg, struct globus_ftp_control_handle_s *handle, globus_object_t *error)
Definition globus_ftp_control.h:546
globus_ftp_control_tcpbuffer_mode_t
enum globus_ftp_control_tcpbuffer_mode_e globus_ftp_control_tcpbuffer_mode_t
globus_ftp_control_parallelism_t
union globus_ftp_control_parallelism_u globus_ftp_control_parallelism_t
Control parallelism attribute structure.
globus_ftp_control_structure_e
globus_ftp_control_structure_e
Definition globus_ftp_control.h:226
globus_ftp_control_response_callback_t
void(* globus_ftp_control_response_callback_t)(void *callback_arg, struct globus_ftp_control_handle_s *handle, globus_object_t *error, globus_ftp_control_response_t *ftp_response)
Definition globus_ftp_control.h:526
globus_ftp_control_dcau_t
union globus_ftp_control_dcau_u globus_ftp_control_dcau_t
Control DCAU union.
globus_ftp_control_auth_info_init
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.
Definition globus_ftp_control_client.c:3952
globus_ftp_control_ipv6_allow
globus_result_t globus_ftp_control_ipv6_allow(globus_ftp_control_handle_t *handle, globus_bool_t allow)
Not documented yet.
Definition globus_ftp_control_client.c:5064
globus_ftp_control_handle_init
globus_result_t globus_ftp_control_handle_init(globus_ftp_control_handle_t *handle)
Initialize a globus ftp handle.
Definition globus_ftp_control_client.c:132
globus_ftp_control_response_copy
globus_result_t globus_ftp_control_response_copy(globus_ftp_control_response_t *src, globus_ftp_control_response_t *dest)
Copy a response structure.
Definition globus_ftp_control_client.c:1583
globus_ftp_control_auth_info_compare
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.
Definition globus_ftp_control_client.c:4017
globus_ftp_control_abort
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.
Definition globus_ftp_control_client.c:2392
globus_ftp_control_response_destroy
globus_result_t globus_ftp_control_response_destroy(globus_ftp_control_response_t *response)
Free the memory associated with a response.
Definition globus_ftp_control_client.c:1548
globus_ftp_control_send_command
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.
Definition globus_ftp_control_client.c:1967
globus_ftp_control_quit
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.
Definition globus_ftp_control_client.c:2674
globus_ftp_control_force_close
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.
Definition globus_ftp_control_client.c:3739
globus_ftp_control_connect
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.
Definition globus_ftp_control_client.c:558
globus_ftp_control_client_get_connection_info_ex
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.
Definition globus_ftp_control_client.c:4771
globus_ftp_control_authenticate
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.
Definition globus_ftp_control_client.c:1712
globus_ftp_control_handle_destroy
globus_result_t globus_ftp_control_handle_destroy(globus_ftp_control_handle_t *handle)
Destroy a globus ftp handle.
Definition globus_ftp_control_client.c:235
globus_ftp_control_authenticate_ex
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.
Definition globus_ftp_control_client.c:1764
globus_ftp_control_type_e
globus_ftp_control_type_e
GridFTP TYPE values.
Definition globus_ftp_control.h:80
globus_ftp_control_dcau_mode_e
globus_ftp_control_dcau_mode_e
GridFTP DCAU values.
Definition globus_ftp_control.h:120
globus_ftp_control_dcau_mode_t
enum globus_ftp_control_dcau_mode_e globus_ftp_control_dcau_mode_t
GridFTP DCAU values.
globus_ftp_control_type_t
enum globus_ftp_control_type_e globus_ftp_control_type_t
GridFTP TYPE values.
globus_ftp_control_protection_t
globus_ftp_control_protection_t
GridFTP Protection Types.
Definition globus_ftp_control.h:186
globus_ftp_control_striping_mode_e
globus_ftp_control_striping_mode_e
GridFTP Striping Types.
Definition globus_ftp_control.h:148
globus_ftp_control_mode_e
globus_ftp_control_mode_e
GridFTP MODE values.
Definition globus_ftp_control.h:100
globus_ftp_control_striping_mode_t
enum globus_ftp_control_striping_mode_e globus_ftp_control_striping_mode_t
GridFTP Striping Types.
globus_ftp_control_mode_t
enum globus_ftp_control_mode_e globus_ftp_control_mode_t
GridFTP MODE values.
GLOBUS_FTP_CONTROL_TYPE_LOCAL
@ GLOBUS_FTP_CONTROL_TYPE_LOCAL
Definition globus_ftp_control.h:90
GLOBUS_FTP_CONTROL_TYPE_EBCDIC
@ GLOBUS_FTP_CONTROL_TYPE_EBCDIC
Definition globus_ftp_control.h:86
GLOBUS_FTP_CONTROL_TYPE_IMAGE
@ GLOBUS_FTP_CONTROL_TYPE_IMAGE
Definition globus_ftp_control.h:88
GLOBUS_FTP_CONTROL_TYPE_ASCII
@ GLOBUS_FTP_CONTROL_TYPE_ASCII
Definition globus_ftp_control.h:84
GLOBUS_FTP_CONTROL_TYPE_NONE
@ GLOBUS_FTP_CONTROL_TYPE_NONE
Definition globus_ftp_control.h:82
GLOBUS_FTP_CONTROL_DCAU_DEFAULT
@ GLOBUS_FTP_CONTROL_DCAU_DEFAULT
Definition globus_ftp_control.h:128
GLOBUS_FTP_CONTROL_DCAU_SELF
@ GLOBUS_FTP_CONTROL_DCAU_SELF
Definition globus_ftp_control.h:124
GLOBUS_FTP_CONTROL_DCAU_SUBJECT
@ GLOBUS_FTP_CONTROL_DCAU_SUBJECT
Definition globus_ftp_control.h:126
GLOBUS_FTP_CONTROL_DCAU_NONE
@ GLOBUS_FTP_CONTROL_DCAU_NONE
Definition globus_ftp_control.h:122
GLOBUS_FTP_CONTROL_PROTECTION_CONFIDENTIAL
@ GLOBUS_FTP_CONTROL_PROTECTION_CONFIDENTIAL
Definition globus_ftp_control.h:192
GLOBUS_FTP_CONTROL_PROTECTION_PRIVATE
@ GLOBUS_FTP_CONTROL_PROTECTION_PRIVATE
Definition globus_ftp_control.h:194
GLOBUS_FTP_CONTROL_PROTECTION_CLEAR
@ GLOBUS_FTP_CONTROL_PROTECTION_CLEAR
Definition globus_ftp_control.h:188
GLOBUS_FTP_CONTROL_PROTECTION_SAFE
@ GLOBUS_FTP_CONTROL_PROTECTION_SAFE
Definition globus_ftp_control.h:190
GLOBUS_FTP_CONTROL_MODE_COMPRESSED
@ GLOBUS_FTP_CONTROL_MODE_COMPRESSED
Definition globus_ftp_control.h:110
GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK
@ GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK
Definition globus_ftp_control.h:108
GLOBUS_FTP_CONTROL_MODE_STREAM
@ GLOBUS_FTP_CONTROL_MODE_STREAM
Definition globus_ftp_control.h:104
GLOBUS_FTP_CONTROL_MODE_BLOCK
@ GLOBUS_FTP_CONTROL_MODE_BLOCK
Definition globus_ftp_control.h:106
GLOBUS_FTP_CONTROL_MODE_NONE
@ GLOBUS_FTP_CONTROL_MODE_NONE
Definition globus_ftp_control.h:102
globus_ftp_control_data_get_total_data_channels
globus_result_t globus_ftp_control_data_get_total_data_channels(globus_ftp_control_handle_t *handle, unsigned int *num_channels, unsigned int stripe_ndx)
Get Total Data Channels For a Stripe.
Definition globus_ftp_control_data.c:2399
globus_ftp_control_local_spor
globus_result_t globus_ftp_control_local_spor(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t addresses[], unsigned int num_addresses)
Set remote data addresses.
Definition globus_ftp_control_data.c:3195
globus_ftp_control_data_add_channels
globus_result_t globus_ftp_control_data_add_channels(globus_ftp_control_handle_t *handle, unsigned int num_channels, unsigned int stripe)
Add data channels.
Definition globus_ftp_control_data.c:1857
globus_ftp_control_local_dcau
globus_result_t globus_ftp_control_local_dcau(globus_ftp_control_handle_t *handle, const globus_ftp_control_dcau_t *dcau, gss_cred_id_t delegated_credential_handle)
Set data channel DCAU.
Definition globus_ftp_control_data.c:3942
globus_ftp_control_data_query_channels
globus_result_t globus_ftp_control_data_query_channels(globus_ftp_control_handle_t *handle, unsigned int *num_channels, unsigned int stripe)
Number of data channels.
Definition globus_ftp_control_data.c:2309
globus_ftp_control_data_write
globus_result_t globus_ftp_control_data_write(globus_ftp_control_handle_t *handle, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof, globus_ftp_control_data_callback_t callback, void *callback_arg)
Write data to data connections.
Definition globus_ftp_control_data.c:4493
globus_ftp_control_local_stru
globus_result_t globus_ftp_control_local_stru(globus_ftp_control_handle_t *handle, globus_ftp_control_structure_t structure)
Set data channel structure.
Definition globus_ftp_control_data.c:4406
globus_ftp_control_data_connect_read
globus_result_t globus_ftp_control_data_connect_read(globus_ftp_control_handle_t *handle, globus_ftp_control_data_connect_callback_t callback, void *user_arg)
Create an incoming FTP data connection.
Definition globus_ftp_control_data.c:1051
globus_ftp_control_data_connect_write
globus_result_t globus_ftp_control_data_connect_write(globus_ftp_control_handle_t *handle, globus_ftp_control_data_connect_callback_t callback, void *user_arg)
Create an outgoing FTP data connection.
Definition globus_ftp_control_data.c:1246
globus_ftp_control_local_parallelism
globus_result_t globus_ftp_control_local_parallelism(globus_ftp_control_handle_t *handle, globus_ftp_control_parallelism_t *parallelism)
Set control handle parallelism.
Definition globus_ftp_control_data.c:2730
globus_ftp_control_data_force_close
globus_result_t globus_ftp_control_data_force_close(globus_ftp_control_handle_t *control_handle, globus_ftp_control_callback_t destroy_callback, void *destroy_callback_arg)
Close data connections.
Definition globus_ftp_control_data.c:7952
globus_ftp_control_local_tcp_buffer
globus_result_t globus_ftp_control_local_tcp_buffer(globus_ftp_control_handle_t *handle, globus_ftp_control_tcpbuffer_t *tcp_buffer)
Set data handle TCP buffer size.
Definition globus_ftp_control_data.c:3603
globus_ftp_control_local_send_eof
globus_result_t globus_ftp_control_local_send_eof(globus_ftp_control_handle_t *handle, globus_bool_t send_eof)
Enable or disable automatic EOF handling.
Definition globus_ftp_control_data.c:2614
globus_X_ftp_control_data_write_stripe
globus_result_t globus_X_ftp_control_data_write_stripe(globus_ftp_control_handle_t *handle, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof, int stripe_ndx, globus_ftp_control_data_write_info_t *data_info)
Write data to a stripe from an enqueue callback.
Definition globus_ftp_control_data.c:6067
globus_ftp_control_create_data_info
globus_result_t globus_ftp_control_create_data_info(globus_ftp_control_handle_t *handle, globus_ftp_control_data_write_info_t *data_info, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof, globus_ftp_control_data_callback_t callback, void *callback_arg)
Create a globus_ftp_control_data_write_info_t structure.
Definition globus_ftp_control_data.c:5739
globus_ftp_control_data_write_stripe
globus_result_t globus_ftp_control_data_write_stripe(globus_ftp_control_handle_t *handle, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof, int stripe_ndx, globus_ftp_control_data_callback_t callback, void *callback_arg)
Write FTP data to a stripe.
Definition globus_ftp_control_data.c:5936
globus_ftp_control_data_set_interface
globus_result_t globus_ftp_control_data_set_interface(globus_ftp_control_handle_t *handle, const char *interface_addr)
Create an outgoing FTP data connection.
Definition globus_ftp_control_data.c:1163
globus_ftp_control_data_read
globus_result_t globus_ftp_control_data_read(globus_ftp_control_handle_t *handle, globus_byte_t *buffer, globus_size_t max_length, globus_ftp_control_data_callback_t callback, void *callback_arg)
Read data from data connections.
Definition globus_ftp_control_data.c:4694
globus_ftp_control_data_send_eof
globus_result_t globus_ftp_control_data_send_eof(globus_ftp_control_handle_t *handle, int count[], int array_size, globus_bool_t eof_message, globus_ftp_control_callback_t cb, void *user_arg)
Send EOF.
Definition globus_ftp_control_data.c:1938
globus_ftp_control_local_mode
globus_result_t globus_ftp_control_local_mode(globus_ftp_control_handle_t *handle, globus_ftp_control_mode_t mode)
Set data handle mode.
Definition globus_ftp_control_data.c:3456
globus_ftp_control_local_pbsz
globus_result_t globus_ftp_control_local_pbsz(globus_ftp_control_handle_t *handle, unsigned long bufsize)
Set data channel protection buffer size.
Definition globus_ftp_control_data.c:4291
globus_ftp_control_local_port
globus_result_t globus_ftp_control_local_port(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t *address)
Set remote data address.
Definition globus_ftp_control_data.c:3015
globus_ftp_control_local_layout
globus_result_t globus_ftp_control_local_layout(globus_ftp_control_handle_t *handle, globus_ftp_control_layout_t *layout, globus_size_t data_size)
Set data layout.
Definition globus_ftp_control_data.c:5463
globus_ftp_control_local_spas
globus_result_t globus_ftp_control_local_spas(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t addresses[], unsigned int num_addresses)
Create multiple passive sockets.
Definition globus_ftp_control_data.c:2987
globus_ftp_control_local_pasv
globus_result_t globus_ftp_control_local_pasv(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t *address)
Create a passive socket.
Definition globus_ftp_control_data.c:2818
globus_ftp_control_set_force_order
globus_result_t globus_ftp_control_set_force_order(globus_ftp_control_handle_t *handle, globus_bool_t order_data, globus_off_t starting_offset)
Set data handle to return read mode E data in order.
Definition globus_ftp_control_data.c:3531
globus_ftp_control_data_remove_channels
globus_result_t globus_ftp_control_data_remove_channels(globus_ftp_control_handle_t *handle, unsigned int num_channels, unsigned int stripe)
Remove Data Channels.
Definition globus_ftp_control_data.c:2203
globus_ftp_control_release_data_info
globus_result_t globus_ftp_control_release_data_info(globus_ftp_control_handle_t *handle, globus_ftp_control_data_write_info_t *data_info)
Release a data_info structure.
Definition globus_ftp_control_data.c:5838
globus_ftp_control_local_type
globus_result_t globus_ftp_control_local_type(globus_ftp_control_handle_t *handle, globus_ftp_control_type_t type, int form_code)
Set control handle TYPE value.
Definition globus_ftp_control_data.c:3285
globus_ftp_control_get_pbsz
globus_result_t globus_ftp_control_get_pbsz(globus_ftp_control_handle_t *handle, unsigned long *bufsize)
Get data channel protection buffer size.
Definition globus_ftp_control_data.c:4354
globus_ftp_control_server_listen_ex
globus_result_t globus_ftp_control_server_listen_ex(globus_ftp_control_server_t *handle, globus_io_attr_t *attr, unsigned short *port, globus_ftp_control_server_callback_t callback, void *callback_arg)
Listen on for FTP Client Connections.
Definition globus_ftp_control_server.c:333
globus_ftp_control_server_authenticate
globus_result_t globus_ftp_control_server_authenticate(globus_ftp_control_handle_t *handle, globus_ftp_control_auth_requirements_t auth_requirements, globus_ftp_control_auth_callback_t callback, void *callback_arg)
Authenticate a GridFTP Client Connection.
Definition globus_ftp_control_server.c:1250
globus_ftp_control_server_handle_destroy
globus_result_t globus_ftp_control_server_handle_destroy(globus_ftp_control_server_t *handle)
Destroy a GridFTP server handle.
Definition globus_ftp_control_server.c:214
globus_ftp_control_server_callback_t
void(* globus_ftp_control_server_callback_t)(void *callback_arg, struct globus_ftp_control_server_s *server_handle, globus_object_t *error)
Server callback.
Definition globus_ftp_control.h:1028
globus_ftp_control_command_destroy
globus_result_t globus_ftp_control_command_destroy(globus_ftp_control_command_t *command)
Destroy a GridFTP command.
Definition globus_ftp_control_server.c:639
globus_ftp_control_send_response
globus_result_t globus_ftp_control_send_response(globus_ftp_control_handle_t *handle, const char *respspec, globus_ftp_control_callback_t callback, void *callback_arg,...)
Send a GridFTP response.
Definition globus_ftp_control_server.c:2772
globus_ftp_control_server_stop
globus_result_t globus_ftp_control_server_stop(globus_ftp_control_server_t *listener, globus_ftp_control_server_callback_t callback, void *callback_arg)
Stop listening for GridFTP client connections.
Definition globus_ftp_control_server.c:867
globus_ftp_control_server_listen
globus_result_t globus_ftp_control_server_listen(globus_ftp_control_server_t *handle, unsigned short *port, globus_ftp_control_server_callback_t callback, void *callback_arg)
Listen on for FTP Client Connections.
Definition globus_ftp_control_server.c:279
globus_ftp_control_server_accept
globus_result_t globus_ftp_control_server_accept(globus_ftp_control_server_t *listener, globus_ftp_control_handle_t *handle, globus_ftp_control_callback_t callback, void *callback_arg)
Accept a Client Connection.
Definition globus_ftp_control_server.c:1026
globus_ftp_control_server_handle_init
globus_result_t globus_ftp_control_server_handle_init(globus_ftp_control_server_t *handle)
Initialize a GridFTP server handle.
Definition globus_ftp_control_server.c:164
globus_ftp_control_command_copy
globus_result_t globus_ftp_control_command_copy(globus_ftp_control_command_t *dest, globus_ftp_control_command_t *src)
Copy of GridFTP command.
Definition globus_ftp_control_server.c:709
globus_ftp_control_read_commands
globus_result_t globus_ftp_control_read_commands(globus_ftp_control_handle_t *handle, globus_ftp_control_command_callback_t callback, void *callback_arg)
Read GridFTP commands.
Definition globus_ftp_control_server.c:2472
globus_ftp_control_command_init
globus_result_t globus_ftp_control_command_init(globus_ftp_control_command_t *command, char *raw_command, globus_ftp_control_auth_info_t *auth_info)
Initialize a GridFTP command.
Definition globus_ftp_control_server.c:534
globus_ftp_control_auth_info_s
Authentication Values.
Definition globus_ftp_control.h:484
globus_ftp_control_dcau_subject_s
Control DCAU subject authentication type.
Definition globus_ftp_control.h:135
globus_ftp_control_round_robin_s
Control striping round robin attribute structure.
Definition globus_ftp_control.h:158
globus_ftp_control_tcpbuffer_automatic_s
Automatically set the TCP buffer/window size.
Definition globus_ftp_control.h:373
globus_ftp_control_tcpbuffer_default_t
Don't change the TCP buffer/window size from the system default.
Definition globus_ftp_control.h:354
globus_ftp_control_tcpbuffer_fixed_t
Set the TCP buffer/window size to a fixed value.
Definition globus_ftp_control.h:363
globus_ftp_control_dcau_u
Control DCAU union.
Definition globus_ftp_control.h:173
globus_ftp_control_layout_u
Control striping attribute union.
Definition globus_ftp_control.h:211
globus_ftp_control_parallelism_u
Control parallelism attribute structure.
Definition globus_ftp_control.h:262
globus_ftp_control_tcpbuffer_t
Control tcpbuffer attribute structure.
Definition globus_ftp_control.h:384