globus_ftp_control.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00022 #ifndef GLOBUS_INCLUDE_FTP_CONTROL_H
00023 #define GLOBUS_INCLUDE_FTP_CONTROL_H 1
00024 
00025 #include "globus_common.h"
00026 #include "globus_error_string.h"
00027 #include "globus_io.h"
00028 #include "globus_gss_assist.h"
00029 #include "globus_handle_table.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
00036 
00040 #endif
00041 
00078 typedef enum globus_ftp_control_type_e
00079 {
00081     GLOBUS_FTP_CONTROL_TYPE_NONE,
00083     GLOBUS_FTP_CONTROL_TYPE_ASCII = 'A',
00085     GLOBUS_FTP_CONTROL_TYPE_EBCDIC = 'E',
00087     GLOBUS_FTP_CONTROL_TYPE_IMAGE = 'I',
00089     GLOBUS_FTP_CONTROL_TYPE_LOCAL = 'L'
00090 } globus_ftp_control_type_t;
00091 
00098 typedef enum globus_ftp_control_mode_e
00099 {
00101     GLOBUS_FTP_CONTROL_MODE_NONE, 
00103     GLOBUS_FTP_CONTROL_MODE_STREAM = 'S',
00105     GLOBUS_FTP_CONTROL_MODE_BLOCK = 'B', 
00107     GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK = 'E',
00109     GLOBUS_FTP_CONTROL_MODE_COMPRESSED = 'C'
00110 } globus_ftp_control_mode_t;
00111 
00118 typedef enum globus_ftp_control_dcau_mode_e
00119 {
00121     GLOBUS_FTP_CONTROL_DCAU_NONE = 'N',
00123     GLOBUS_FTP_CONTROL_DCAU_SELF = 'A',
00125     GLOBUS_FTP_CONTROL_DCAU_SUBJECT = 'S',
00127     GLOBUS_FTP_CONTROL_DCAU_DEFAULT
00128 } globus_ftp_control_dcau_mode_t;
00129 
00133 typedef struct globus_ftp_control_dcau_subject_s
00134 {
00135     globus_ftp_control_dcau_mode_t      mode;
00136     char *                              subject;
00137 } globus_ftp_control_dcau_subject_t;
00138 
00146 typedef enum globus_ftp_control_striping_mode_e
00147 {
00148     GLOBUS_FTP_CONTROL_STRIPING_NONE,
00149     GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED,
00150     GLOBUS_FTP_CONTROL_STRIPING_BLOCKED_ROUND_ROBIN
00151 } globus_ftp_control_striping_mode_t;
00152 
00156 typedef struct globus_ftp_control_round_robin_s
00157 {
00158     globus_ftp_control_striping_mode_t mode;
00159     globus_size_t                 block_size;
00160 } globus_ftp_control_round_robin_t;
00161 
00162 typedef struct globus_ftp_control_partitioned_s
00163 {
00164     globus_ftp_control_striping_mode_t    mode;
00165     globus_size_t                         size;
00166 } globus_ftp_control_partitioned_t;
00167 
00171 typedef union globus_ftp_control_dcau_u
00172 {
00173     globus_ftp_control_dcau_mode_t      mode;
00174     globus_ftp_control_dcau_subject_t   subject;
00175 } globus_ftp_control_dcau_t;
00176 
00184 typedef enum
00185 {
00187     GLOBUS_FTP_CONTROL_PROTECTION_CLEAR = 'C',
00189     GLOBUS_FTP_CONTROL_PROTECTION_SAFE = 'S',
00191     GLOBUS_FTP_CONTROL_PROTECTION_CONFIDENTIAL = 'E',
00193     GLOBUS_FTP_CONTROL_PROTECTION_PRIVATE = 'P'
00194 } globus_ftp_control_protection_t;
00195 
00199 typedef enum
00200 {
00201     GLOBUS_FTP_CONTROL_DELAYED_SINGLE_PASSIVE = 'S',
00202     GLOBUS_FTP_CONTROL_DELAYED_STRIPED_PASSIVE = 'M',
00203     GLOBUS_FTP_CONTROL_NORMAL_PASSIVE = 'N'
00204 } globus_ftp_control_delay_passive_t;
00205 
00209 typedef union globus_ftp_control_layout_u
00210 {
00211     globus_ftp_control_striping_mode_t    mode;
00212     globus_ftp_control_round_robin_t      round_robin;
00213     globus_ftp_control_partitioned_t      partitioned;
00214     /*
00215      * No data required for:
00216      *     GLOBUS_FTP_CONTROL_STRIPING_NONE
00217      *     GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED
00218      */
00219 } globus_ftp_control_layout_t;
00220 
00224 typedef enum globus_ftp_control_structure_e
00225 {
00226     GLOBUS_FTP_CONTROL_STRUCTURE_NONE,
00227     GLOBUS_FTP_CONTROL_STRUCTURE_FILE,
00228     GLOBUS_FTP_CONTROL_STRUCTURE_PAGE,
00229     GLOBUS_FTP_CONTROL_STRUCTURE_RECORD
00230 } globus_ftp_control_structure_t;
00231 
00235 typedef enum globus_ftp_control_parallelism_mode_e
00236 {
00237     GLOBUS_FTP_CONTROL_PARALLELISM_NONE,
00238     GLOBUS_FTP_CONTROL_PARALLELISM_FIXED
00239 } globus_ftp_control_parallelism_mode_t;
00240 
00241 /*  
00242  *  The base class for all parallel types.  Subtypes
00243  *  must first define all types in this structure.
00244  */
00245 typedef struct globus_i_ftp_parallelism_base_s
00246 {
00247     globus_ftp_control_parallelism_mode_t       mode;
00248     globus_size_t                               size;
00249 } globus_i_ftp_parallelism_base_t;
00250 
00251 typedef struct globus_ftp_parallelism_fixed_s
00252 {
00253     globus_ftp_control_parallelism_mode_t       mode;
00254     globus_size_t                               size;
00255 } globus_ftp_parallelism_fixed_t;
00256 
00260 typedef union globus_ftp_control_parallelism_u
00261 {
00262     globus_ftp_control_parallelism_mode_t    mode;
00263     globus_i_ftp_parallelism_base_t          base;
00264     globus_ftp_parallelism_fixed_t           fixed;
00265 } globus_ftp_control_parallelism_t;
00266 
00267 typedef struct globus_ftp_control_host_port_s
00268 {
00269     int                                         host[16];
00270     unsigned short                              port;
00271     
00272     /*
00273      * if ipv6 is not enabled, the following param will be assumed to be 4
00274      * when passed as an in-parameter. otherwise it must indicate the correct
00275      * len.
00276      * 
00277      * for out-parameters, the following will _always_ be 4 unless ipv6 is
00278      * allowed. then it will be either 4 or 16
00279      */
00280     int                                         hostlen;
00281 } globus_ftp_control_host_port_t;
00282 
00308 #define GLOBUS_FTP_CONTROL_MODULE (&globus_i_ftp_control_module)
00309 
00310 extern globus_module_descriptor_t globus_i_ftp_control_module; 
00311 
00312 #define _FCSL(s) globus_common_i18n_get_string(GLOBUS_FTP_CONTROL_MODULE,s)
00313 /*
00314  * Module Specific Data Types
00315  */
00316 typedef enum globus_ftp_control_response_class_e
00317 {
00318     GLOBUS_FTP_UNKNOWN_REPLY,
00319     GLOBUS_FTP_POSITIVE_PRELIMINARY_REPLY,
00320     GLOBUS_FTP_POSITIVE_COMPLETION_REPLY,
00321     GLOBUS_FTP_POSITIVE_INTERMEDIATE_REPLY,
00322     GLOBUS_FTP_TRANSIENT_NEGATIVE_COMPLETION_REPLY,
00323     GLOBUS_FTP_PERMANENT_NEGATIVE_COMPLETION_REPLY
00324 } globus_ftp_control_response_class_t;
00325 
00326 
00327 typedef struct globus_ftp_control_response_s
00328 { 
00329     int                                     code;
00330     globus_ftp_control_response_class_t     response_class;
00331     globus_byte_t *                         response_buffer;
00332     globus_size_t                           response_length;
00333     globus_size_t                           response_buffer_size;
00334 } globus_ftp_control_response_t;
00335 
00337 typedef enum globus_ftp_control_tcpbuffer_mode_e
00338 {
00340     GLOBUS_FTP_CONTROL_TCPBUFFER_DEFAULT,
00341     
00343     GLOBUS_FTP_CONTROL_TCPBUFFER_FIXED,
00344 
00346     GLOBUS_FTP_CONTROL_TCPBUFFER_AUTOMATIC
00347 } globus_ftp_control_tcpbuffer_mode_t;
00348 
00352 typedef struct
00353 {
00354     globus_ftp_control_tcpbuffer_mode_t mode;
00355 }
00356 globus_ftp_control_tcpbuffer_default_t;
00357 
00361 typedef struct
00362 {
00363     globus_ftp_control_tcpbuffer_mode_t mode;
00364     int                                 size;
00365 }
00366 globus_ftp_control_tcpbuffer_fixed_t;
00367 
00371 typedef struct globus_ftp_control_tcpbuffer_automatic_s
00372 {
00373     globus_ftp_control_tcpbuffer_mode_t mode;
00374     unsigned int                                initial_size;
00375     unsigned int                                minimum_size;
00376     unsigned int                                maximum_size;
00377 } globus_ftp_control_tcpbuffer_automatic_t;
00378 
00382 typedef union globus_ftp_control_tcpbuffer_t
00383 {
00384     globus_ftp_control_tcpbuffer_mode_t         mode;
00385     globus_ftp_control_tcpbuffer_default_t      default_tcpbuffer; 
00386     globus_ftp_control_tcpbuffer_fixed_t        fixed;
00387     globus_ftp_control_tcpbuffer_automatic_t    automatic;
00388 } globus_ftp_control_tcpbuffer_t;
00389 
00390 /*
00391  *  each strip can have multiple parallel connections to
00392  *  the same host
00393  */
00394 
00395 typedef enum globus_ftp_data_connection_state_e
00396 {
00397     GLOBUS_FTP_DATA_STATE_NONE, /* dc_handle has no references */
00398     GLOBUS_FTP_DATA_STATE_PASV, /* in local pasv mode */
00399     GLOBUS_FTP_DATA_STATE_PORT, /* in local port mode */
00400     GLOBUS_FTP_DATA_STATE_SPOR, /* in local spor mode */
00401     GLOBUS_FTP_DATA_STATE_CONNECT_READ, /* connected for reading */
00402     GLOBUS_FTP_DATA_STATE_CONNECT_WRITE, /* connected for writing */
00403     GLOBUS_FTP_DATA_STATE_CLOSING, /* closing all connections */
00404     GLOBUS_FTP_DATA_STATE_EOF, /* user has received eof */
00405     GLOBUS_FTP_DATA_STATE_SEND_EOF /* not used for state at all */
00406 } globus_ftp_data_connection_state_t;
00407 
00408 #define GLOBUS_FTP_CONTROL_READ_BUFFER_SIZE 1000
00409 #define GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE 8192
00410 
00411 typedef enum
00412 {
00413     GLOBUS_FTP_CONTROL_UNCONNECTED,
00414     GLOBUS_FTP_CONTROL_CONNECTING,
00415     GLOBUS_FTP_CONTROL_CONNECTED,
00416     GLOBUS_FTP_CONTROL_CLOSING
00417 }
00418 globus_ftp_cc_state_t;
00419 
00420 struct globus_ftp_control_handle_s;
00421 struct globus_i_ftp_dc_transfer_handle_t;
00422 
00423 union globus_ftp_control_command_u;
00424 
00425 typedef enum globus_ftp_control_command_code_e
00426 {
00427     GLOBUS_FTP_CONTROL_COMMAND_OPTS,
00428     GLOBUS_FTP_CONTROL_COMMAND_AUTH,
00429     GLOBUS_FTP_CONTROL_COMMAND_ADAT,
00430     GLOBUS_FTP_CONTROL_COMMAND_SPAS,
00431     GLOBUS_FTP_CONTROL_COMMAND_SPOR,
00432     GLOBUS_FTP_CONTROL_COMMAND_PORT,
00433     GLOBUS_FTP_CONTROL_COMMAND_PASV,
00434     GLOBUS_FTP_CONTROL_COMMAND_SITE,
00435     GLOBUS_FTP_CONTROL_COMMAND_TYPE,
00436     GLOBUS_FTP_CONTROL_COMMAND_DELE,
00437     GLOBUS_FTP_CONTROL_COMMAND_FEAT,
00438     GLOBUS_FTP_CONTROL_COMMAND_ERET,
00439     GLOBUS_FTP_CONTROL_COMMAND_ESTO,
00440     GLOBUS_FTP_CONTROL_COMMAND_RMD,
00441     GLOBUS_FTP_CONTROL_COMMAND_MKD,
00442     GLOBUS_FTP_CONTROL_COMMAND_PWD,
00443     GLOBUS_FTP_CONTROL_COMMAND_CWD,
00444     GLOBUS_FTP_CONTROL_COMMAND_CDUP,
00445     GLOBUS_FTP_CONTROL_COMMAND_NLST,
00446     GLOBUS_FTP_CONTROL_COMMAND_HELP,
00447     GLOBUS_FTP_CONTROL_COMMAND_STAT,
00448     GLOBUS_FTP_CONTROL_COMMAND_NOOP,
00449     GLOBUS_FTP_CONTROL_COMMAND_SYST,
00450     GLOBUS_FTP_CONTROL_COMMAND_STOU,
00451     GLOBUS_FTP_CONTROL_COMMAND_QUIT,
00452     GLOBUS_FTP_CONTROL_COMMAND_REIN,
00453     GLOBUS_FTP_CONTROL_COMMAND_ABOR,
00454     GLOBUS_FTP_CONTROL_COMMAND_ALLO,
00455     GLOBUS_FTP_CONTROL_COMMAND_MODE,
00456     GLOBUS_FTP_CONTROL_COMMAND_STRU,
00457     GLOBUS_FTP_CONTROL_COMMAND_ACCT,
00458     GLOBUS_FTP_CONTROL_COMMAND_PASS,
00459     GLOBUS_FTP_CONTROL_COMMAND_USER,
00460     GLOBUS_FTP_CONTROL_COMMAND_SMNT,
00461     GLOBUS_FTP_CONTROL_COMMAND_LIST,
00462     GLOBUS_FTP_CONTROL_COMMAND_RETR,
00463     GLOBUS_FTP_CONTROL_COMMAND_REST,
00464     GLOBUS_FTP_CONTROL_COMMAND_SBUF,
00465     GLOBUS_FTP_CONTROL_COMMAND_SIZE,
00466     GLOBUS_FTP_CONTROL_COMMAND_STOR,
00467     GLOBUS_FTP_CONTROL_COMMAND_APPE,
00468     GLOBUS_FTP_CONTROL_COMMAND_RNFR,
00469     GLOBUS_FTP_CONTROL_COMMAND_RNTO,
00470     GLOBUS_FTP_CONTROL_COMMAND_LANG,
00471     GLOBUS_FTP_CONTROL_COMMAND_UNKNOWN
00472 } globus_ftp_control_command_code_t;
00473 
00474 
00483 typedef struct globus_ftp_control_auth_info_s
00484 {
00485     globus_bool_t                               authenticated;
00486     globus_ftp_control_command_code_t           prev_cmd;
00487     char *                                      auth_gssapi_subject;
00488     gss_ctx_id_t                                auth_gssapi_context;
00489     gss_cred_id_t                               credential_handle;
00490     globus_bool_t                               locally_acquired_credential;
00491     gss_name_t                                  target_name;
00492     OM_uint32                                   req_flags;
00493     char *                                      user;
00494     char *                                      password;
00495     char *                                          account;
00496     gss_cred_id_t                               delegated_credential_handle;
00497     globus_bool_t                               encrypt;
00498 }
00499 globus_ftp_control_auth_info_t;
00500 
00501 
00502 
00526 typedef void (*globus_ftp_control_response_callback_t)(
00527     void *                                      callback_arg,
00528     struct globus_ftp_control_handle_s *        handle,
00529     globus_object_t *                           error,
00530     globus_ftp_control_response_t *             ftp_response);
00531 
00546 typedef void (*globus_ftp_control_callback_t)(
00547     void *                                      callback_arg,
00548     struct globus_ftp_control_handle_s *        handle,
00549     globus_object_t *                           error);
00550 
00551 
00552 typedef void
00553 (*globus_ftp_control_data_connect_callback_t)(
00554     void *                                      callback_arg,
00555     struct globus_ftp_control_handle_s *        handle,
00556     unsigned int                                stripe_ndx,
00557     globus_bool_t                               reused,
00558     globus_object_t *                           error);
00559     
00587 typedef void (*globus_ftp_control_command_callback_t)(
00588     void *                                   callback_arg,
00589     struct globus_ftp_control_handle_s *     handle,
00590     globus_object_t *                        error,
00591     union globus_ftp_control_command_u *     command);
00592 
00616 typedef void
00617 (*globus_ftp_control_auth_callback_t)(
00618     void *                                   callback_arg,
00619     struct globus_ftp_control_handle_s *     handle,
00620     globus_object_t *                        error,
00621     globus_ftp_control_auth_info_t *         auth_result);
00622 
00633 typedef unsigned long globus_ftp_control_auth_requirements_t;
00634 
00635 #define GLOBUS_FTP_CONTROL_AUTH_REQ_NONE             1
00636 #define GLOBUS_FTP_CONTROL_AUTH_REQ_GSSAPI           2
00637 #define GLOBUS_FTP_CONTROL_AUTH_REQ_USER             4
00638 #define GLOBUS_FTP_CONTROL_AUTH_REQ_PASS             8
00639 #define GLOBUS_FTP_CONTROL_AUTH_REQ_ACCT             16
00640 
00641 typedef struct globus_ftp_control_rw_queue_element_s
00642 {
00643     globus_ftp_control_response_callback_t      callback;
00644     globus_ftp_control_callback_t               send_response_cb;
00645     void *                                      arg;
00646     globus_byte_t *                             write_buf;
00647     int                                         write_flags;
00648     globus_io_write_callback_t                  write_callback;
00649     globus_io_read_callback_t                   read_callback;
00650     globus_bool_t                               expect_response;
00651 } 
00652 globus_ftp_control_rw_queue_element_t;
00653 
00654 typedef struct globus_ftp_cc_handle_s
00655 {
00656     globus_io_attr_t                                 io_attr;
00657     globus_netlogger_handle_t                        nl_handle;
00658     globus_bool_t                                    nl_handle_set;
00659 
00660     globus_fifo_t                                    readers;
00661     globus_fifo_t                                    writers;
00662     globus_ftp_control_command_callback_t            command_cb; 
00663     void *                                           command_cb_arg;
00664 
00665     /* callback and arg for accept */
00666     globus_ftp_control_callback_t                    accept_cb;
00667     void *                                           accept_cb_arg;
00668 
00669     globus_ftp_control_auth_callback_t               auth_cb;
00670     void *                                           auth_cb_arg;
00671     globus_ftp_control_auth_requirements_t           auth_requirements; 
00672     globus_ftp_control_response_t                    response;
00673     globus_byte_t *                                  read_buffer;
00674     globus_size_t                                    read_buffer_size;
00675     globus_size_t                                    bytes_read;
00676     globus_ftp_control_auth_info_t                   auth_info;
00677     globus_bool_t                                    use_auth;
00678     globus_io_handle_t                               io_handle;
00679     globus_ftp_cc_state_t                            cc_state;
00680     char                                             serverhost[MAXHOSTNAMELEN];
00681     struct hostent                                   server;
00682     char                                             server_buffer[
00683         GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE];
00684     globus_list_t *                                  list_elem;
00685     
00686     globus_mutex_t                                   mutex;
00687     globus_bool_t                                    do_close;
00688     int                                              cb_count;
00689     globus_ftp_control_response_callback_t           close_cb;
00690     void *                                           close_cb_arg;
00691     globus_object_t *                                close_result;
00692     globus_ftp_control_response_t                    quit_response;
00693     globus_bool_t                                    signal_deactivate;
00694 }
00695 globus_ftp_cc_handle_t;
00696 
00697 struct globus_ftp_control_data_write_info_s;
00698 
00699 typedef globus_result_t (*globus_ftp_control_layout_func_t)(
00700     struct globus_ftp_control_handle_s *        handle,
00701     struct globus_ftp_control_data_write_info_s *      data_info,
00702     globus_byte_t *                             buffer,
00703     globus_size_t                               length,
00704     globus_off_t                                offset,
00705     globus_bool_t                               eof,
00706     int                                         stripe_count,
00707     char *                                      enqueue_str,
00708     void *                                      user_arg);
00709 
00710 typedef globus_result_t (*globus_ftp_control_layout_verify_func_t)(
00711     char *                                     enqueue_str);
00712 
00713 typedef struct globus_i_ftp_dc_handle_s
00714 {
00715     char                                        magic[32];
00716 
00717     globus_ftp_control_dcau_t                   dcau;
00718     unsigned long                               pbsz;
00719     globus_ftp_control_protection_t             protection;
00720 
00721     globus_ftp_data_connection_state_t          state;
00722 
00723     globus_ftp_control_mode_t                   mode;
00724     globus_ftp_control_type_t                   type;
00725     globus_ftp_control_structure_t              structure;
00726     int                                         tcp_buffer_size;
00727     int                                         form_code;
00728     globus_ftp_control_parallelism_t            parallel;
00729 
00730     globus_io_attr_t                            io_attr;
00731     char *                                      interface_addr;
00732 
00733     struct globus_i_ftp_dc_transfer_handle_s *  transfer_handle;
00734     globus_list_t *                             transfer_list;
00735     globus_bool_t                               send_eof;
00736 
00737     globus_ftp_control_layout_func_t            layout_func;
00738     globus_ftp_control_layout_t                 layout;
00739     char *                                      layout_str;
00740     void *                                      layout_user_arg;
00741 
00742     globus_bool_t                               initialized;
00743     globus_mutex_t                              mutex;
00744 
00745     globus_ftp_control_callback_t               close_callback;
00746     void *                                      close_callback_arg;
00747 
00748     globus_netlogger_handle_t                   nl_io_handle;
00749     globus_bool_t                               nl_io_handle_set;
00750 
00751     globus_netlogger_handle_t                   nl_ftp_handle;
00752     globus_bool_t                               nl_ftp_handle_set;
00753     
00754     globus_object_t *                           connect_error;
00755     struct globus_ftp_control_handle_s *        whos_my_daddy;
00756 } globus_i_ftp_dc_handle_t;
00757 
00758 typedef struct globus_ftp_control_handle_s
00759 {
00760     struct globus_i_ftp_dc_handle_s          dc_handle;
00761     struct globus_ftp_cc_handle_s            cc_handle;
00762 } globus_ftp_control_handle_t;
00763 
00764 
00810 typedef void (*globus_ftp_control_data_callback_t)(
00811     void *                                      callback_arg,
00812     globus_ftp_control_handle_t *               handle,
00813     globus_object_t *                           error,
00814     globus_byte_t *                             buffer,
00815     globus_size_t                               length,
00816     globus_off_t                                offset,
00817     globus_bool_t                               eof);
00818 
00819 typedef struct globus_ftp_control_data_write_info_s
00820 {
00821     globus_ftp_control_data_callback_t          cb;
00822     void *                                      cb_arg;
00823     globus_handle_t                             callback_table_handle;
00824 } globus_ftp_control_data_write_info_t;
00825 
00826 globus_result_t
00827 globus_ftp_control_layout_register_func(
00828     char *                                      name,
00829     globus_ftp_control_layout_func_t            enqueue_func,
00830     globus_ftp_control_layout_verify_func_t     verify_func);
00831 
00832 globus_result_t
00833 globus_X_ftp_control_local_layout(
00834     globus_ftp_control_handle_t *               handle,
00835     char *                                      enqueue_str,
00836     void *                                      user_arg);
00837 
00838 globus_result_t
00839 globus_ftp_control_local_layout(
00840     globus_ftp_control_handle_t *               handle,
00841     globus_ftp_control_layout_t *               layout,
00842     globus_size_t                               data_size);
00843 
00844 /*
00845  *  NET LOGGER STUFF
00846  */
00847 globus_result_t
00848 globus_ftp_control_set_netlogger(
00849     globus_ftp_control_handle_t *               handle,
00850     globus_netlogger_handle_t *                 nl_handle,
00851     globus_bool_t                               nl_ftp_control,
00852     globus_bool_t                               nl_globus_io);
00853 
00854 globus_result_t
00855 globus_ftp_control_data_set_interface(
00856     globus_ftp_control_handle_t *               handle,
00857     const char *                                interface_addr);
00858 
00859 globus_result_t
00860 globus_i_ftp_control_data_set_stack(
00861     globus_ftp_control_handle_t *               handle,
00862     globus_xio_stack_t                          stack);
00863 
00864 globus_result_t
00865 globus_i_ftp_control_data_get_attr(
00866     globus_ftp_control_handle_t *               handle,
00867     globus_xio_attr_t *                         attr);
00868 
00869 globus_result_t
00870 globus_i_ftp_control_client_get_attr(
00871     globus_ftp_control_handle_t *               handle,
00872     globus_xio_attr_t *                         attr);
00873 
00874 globus_result_t
00875 globus_i_ftp_control_client_set_stack(
00876     globus_ftp_control_handle_t *               handle,
00877     globus_xio_stack_t                          stack);
00878     
00879 globus_result_t
00880 globus_i_ftp_control_load_xio_drivers(
00881     char *                                      driver_string,
00882     globus_list_t **                            driver_list);
00883 
00884 void
00885 globus_i_ftp_control_unload_xio_drivers(
00886     globus_list_t *                             driver_list);
00887 
00888 globus_result_t
00889 globus_i_ftp_control_create_stack(
00890     globus_ftp_control_handle_t *               handle,
00891     globus_list_t *                             driver_list,
00892     globus_xio_stack_t  *                       stack);
00893 
00894 
00895 
00896 /*****************************************************************
00897  *  standard layout functions 
00898  ****************************************************************/
00899 /*
00900  * blocked functions
00901  */
00902 globus_result_t
00903 globus_ftp_control_layout_blocked_verify(
00904     char *                                     layout_str);
00905 
00906 void *
00907 globus_ftp_control_layout_blocked_user_arg_create();
00908 
00909 void
00910 globus_ftp_control_layout_blocked_user_arg_destroy(
00911     void *                                      user_arg);
00912 
00913 globus_result_t
00914 globus_ftp_control_layout_blocked(
00915     globus_ftp_control_handle_t *               handle,
00916     globus_ftp_control_data_write_info_t *      data_info,
00917     globus_byte_t *                             buffer,
00918     globus_size_t                               length,
00919     globus_off_t                                in_offset,
00920     globus_bool_t                               eof,
00921     int                                         stripe_count,
00922     char *                                      enqueue_str,
00923     void *                                      user_arg);
00924 
00925 /*
00926  * partitioned functions
00927  */
00928 globus_result_t
00929 globus_ftp_control_layout_partitioned_verify(
00930     char *                                     layout_str);
00931 
00932 void *
00933 globus_ftp_control_layout_partitioned_user_arg_create(
00934     globus_size_t                              file_size);
00935 
00936 void
00937 globus_ftp_control_layout_partitioned_user_arg_destroy(
00938     void *                                      user_arg);
00939 
00940 globus_result_t
00941 globus_ftp_control_layout_partitioned(
00942     globus_ftp_control_handle_t *               handle,
00943     globus_ftp_control_data_write_info_t *      data_info,
00944     globus_byte_t *                             buffer,
00945     globus_size_t                               length,
00946     globus_off_t                                in_offset,
00947     globus_bool_t                               eof,
00948     int                                         stripe_count,
00949     char *                                      enqueue_str,
00950     void *                                      user_arg);
00951 
00952 /*
00953  *  data registration functions
00954  */
00955 globus_result_t
00956 globus_ftp_control_create_data_info(
00957     globus_ftp_control_handle_t *               handle,
00958     globus_ftp_control_data_write_info_t *      data_info,
00959     globus_byte_t *                             buffer,
00960     globus_size_t                               length,
00961     globus_off_t                                offset,
00962     globus_bool_t                               eof,
00963     globus_ftp_control_data_callback_t          callback,
00964     void *                                      callback_arg);
00965 
00966 globus_result_t
00967 globus_ftp_control_release_data_info(
00968     globus_ftp_control_handle_t *               handle,
00969     globus_ftp_control_data_write_info_t *      data_info);
00970 
00971 globus_result_t
00972 globus_ftp_control_data_write_stripe(
00973     globus_ftp_control_handle_t *               handle,
00974     globus_byte_t *                             buffer,
00975     globus_size_t                               length,
00976     globus_off_t                                offset,
00977     globus_bool_t                               eof,
00978     int                                         stripe_ndx,
00979     globus_ftp_control_data_callback_t          callback,
00980     void *                                      callback_arg);
00981 
00982 globus_result_t
00983 globus_X_ftp_control_data_write_stripe(
00984     globus_ftp_control_handle_t *               handle,
00985     globus_byte_t *                             buffer,
00986     globus_size_t                               length,
00987     globus_off_t                                offset,
00988     globus_bool_t                               eof,
00989     int                                         stripe_ndx,
00990     globus_ftp_control_data_write_info_t *      data_info);
00991 
00992 
00993 /* 
00994  *  Server API callbacks
00995  *  ----------------------------------------------------------------
00996  */
00997 
01003 struct globus_ftp_control_server_s;
01004 
01020 typedef void (*globus_ftp_control_server_callback_t)(
01021     void *                                      callback_arg,
01022     struct globus_ftp_control_server_s *        server_handle,
01023     globus_object_t *                           error);
01024 
01025 
01026 typedef enum globus_ftp_control_server_state_n
01027 {
01028     GLOBUS_FTP_CONTROL_SERVER_LISTENING,
01029     GLOBUS_FTP_CONTROL_SERVER_DEAF
01030 }
01031 globus_ftp_control_server_state_t;
01032 
01033 typedef struct globus_ftp_control_server_s
01034 {
01035     globus_io_handle_t                          io_handle;
01036     globus_ftp_control_server_state_t           state;
01037     globus_ftp_control_server_callback_t        callback;
01038     void *                                      callback_arg;
01039     globus_list_t *                             list_elem;
01040     globus_mutex_t                              mutex;
01041 } globus_ftp_control_server_t;
01042 
01043 
01044 
01045 typedef struct globus_ftp_control_command_str_s
01046 { 
01047     globus_ftp_control_command_code_t         code;
01048     char *                                    raw_command;
01049     char *                                    string_arg;
01050 } globus_ftp_control_command_str_t;
01051 
01052 /*
01053  * complex commands
01054  */
01055 
01056 typedef struct globus_ftp_control_command_stru_s
01057 {
01058     globus_ftp_control_command_code_t         code;
01059     char *                                    raw_command;
01060     globus_ftp_control_structure_t            structure; 
01061 } globus_ftp_control_command_stru_t;
01062 
01063 typedef struct globus_ftp_control_command_port_s
01064 {
01065     globus_ftp_control_command_code_t         code;
01066     char *                                    raw_command;
01067     globus_ftp_control_host_port_t            host_port;
01068 } globus_ftp_control_command_port_t;
01069 
01070 typedef struct globus_ftp_control_command_spor_s
01071 {
01072     globus_ftp_control_command_code_t         code;
01073     char *                                    raw_command;
01074     int                                       num_args;
01075     globus_ftp_control_host_port_t *          host_port;
01076 } globus_ftp_control_command_spor_t;
01077 
01078 typedef struct globus_ftp_control_command_mode_s
01079 {
01080     globus_ftp_control_command_code_t         code;
01081     char *                                    raw_command;
01082     globus_ftp_control_mode_t                 mode; 
01083 } globus_ftp_control_command_mode_t;
01084 
01085 typedef struct  globus_ftp_control_command_allo_s
01086 {
01087     globus_ftp_control_command_code_t         code;
01088     char *                                    raw_command;
01089     int                                       size;
01090     int                                       record_size;
01091 } globus_ftp_control_command_allo_t;
01092 
01093 typedef struct globus_ftp_control_command_sbuf_s
01094 {
01095     globus_ftp_control_command_code_t         code;
01096     char *                                    raw_command;
01097     int                                       buffer_size;
01098 } globus_ftp_control_command_sbuf_t;
01099 /*
01100 
01101 Can't parse marker unless I know state
01102 
01103 typedef struct globus_ftp_control_command_rest_s
01104 {
01105 } globus_ftp_control_command_rest_t;
01106 
01107 */
01108 
01109 typedef enum globus_ftp_control_type_option_e
01110 {
01111     GLOBUS_FTP_CONTROL_TYPE_NO_OPTION,
01112     GLOBUS_FTP_CONTROL_TYPE_OPTION_N,
01113     GLOBUS_FTP_CONTROL_TYPE_OPTION_T,
01114     GLOBUS_FTP_CONTROL_TYPE_OPTION_C
01115 } globus_ftp_control_type_option_t;
01116 
01117 typedef struct globus_ftp_control_command_type_s
01118 {
01119     globus_ftp_control_command_code_t         code;
01120     char *                                    raw_command;
01121     globus_ftp_control_type_t                 type;
01122     globus_ftp_control_type_option_t          option;
01123     unsigned int                              bytesize; 
01124 } globus_ftp_control_command_type_t;
01125 
01126 typedef enum globus_ftp_control_auth_type_e
01127 {
01128     GLOBUS_FTP_CONTROL_AUTH_GSSAPI,
01129     GLOBUS_FTP_CONTROL_AUTH_UNKNOWN
01130 } globus_ftp_control_auth_type_t;
01131 
01132 typedef struct globus_ftp_control_command_auth_s
01133 {
01134     globus_ftp_control_command_code_t         code;
01135     char *                                    raw_command;
01136     globus_ftp_control_auth_type_t            type;
01137 } globus_ftp_control_command_auth_t;
01138 
01139 typedef struct globus_ftp_control_command_opts_s
01140 {
01141     globus_ftp_control_command_code_t         code;
01142     char *                                    raw_command;
01143     char *                                    cmd_name;
01144     char *                                    cmd_opts;
01145 } globus_ftp_control_command_opts_t;
01146 
01147 /*
01148  * single string commands
01149  */
01150 
01151 typedef globus_ftp_control_command_str_t
01152 globus_ftp_control_command_site_t;
01153 
01154 typedef globus_ftp_control_command_str_t
01155 globus_ftp_control_command_acct_t;
01156 
01157 typedef globus_ftp_control_command_str_t  
01158 globus_ftp_control_command_cwd_t;
01159 
01160 typedef globus_ftp_control_command_str_t  
01161 globus_ftp_control_command_cdup_t;
01162 
01163 typedef globus_ftp_control_command_str_t
01164 globus_ftp_control_command_pass_t;
01165 
01166 typedef globus_ftp_control_command_str_t  
01167 globus_ftp_control_command_user_t;
01168 
01169 typedef globus_ftp_control_command_str_t
01170 globus_ftp_control_command_smnt_t;
01171 
01172 typedef globus_ftp_control_command_str_t
01173 globus_ftp_control_command_list_t;
01174 
01175 typedef globus_ftp_control_command_str_t 
01176 globus_ftp_control_command_retr_t;
01177 
01178 typedef globus_ftp_control_command_str_t    
01179 globus_ftp_control_command_size_t;
01180 
01181 typedef globus_ftp_control_command_str_t    
01182 globus_ftp_control_command_stor_t;
01183 
01184 typedef globus_ftp_control_command_str_t 
01185 globus_ftp_control_command_appe_t;
01186 
01187 typedef globus_ftp_control_command_str_t 
01188 globus_ftp_control_command_rnfr_t;
01189 
01190 typedef globus_ftp_control_command_str_t  
01191 globus_ftp_control_command_rnto_t;
01192 
01193 typedef globus_ftp_control_command_str_t
01194 globus_ftp_control_command_feat_t;
01195 
01196 typedef globus_ftp_control_command_str_t   
01197 globus_ftp_control_command_dele_t;
01198 
01199 typedef globus_ftp_control_command_str_t 
01200 globus_ftp_control_command_rmd_t;
01201 
01202 typedef globus_ftp_control_command_str_t  
01203 globus_ftp_control_command_mkd_t;
01204 
01205 typedef globus_ftp_control_command_str_t
01206 globus_ftp_control_command_nlst_t;
01207 
01208 typedef globus_ftp_control_command_str_t      
01209 globus_ftp_control_command_help_t;
01210 
01211 typedef globus_ftp_control_command_str_t
01212 globus_ftp_control_command_stou_t;
01213 
01214 typedef globus_ftp_control_command_str_t      
01215 globus_ftp_control_command_rest_t;
01216 
01217 typedef globus_ftp_control_command_str_t      
01218 globus_ftp_control_command_eret_t;
01219 
01220 typedef globus_ftp_control_command_str_t      
01221 globus_ftp_control_command_esto_t;
01222 
01223 /*
01224  * no string commands
01225  */
01226 typedef globus_ftp_control_command_str_t 
01227 globus_ftp_control_command_pasv_t;
01228 
01229 typedef globus_ftp_control_command_str_t 
01230 globus_ftp_control_command_spas_t;
01231 
01232 typedef globus_ftp_control_command_str_t
01233 globus_ftp_control_command_stat_t;
01234 
01235 typedef globus_ftp_control_command_str_t      
01236 globus_ftp_control_command_noop_t;
01237 
01238 typedef globus_ftp_control_command_str_t
01239 globus_ftp_control_command_syst_t;
01240 
01241 typedef globus_ftp_control_command_str_t      
01242 globus_ftp_control_command_quit_t;
01243 
01244 typedef globus_ftp_control_command_str_t      
01245 globus_ftp_control_command_rein_t;
01246 
01247 typedef globus_ftp_control_command_str_t      
01248 globus_ftp_control_command_abor_t;
01249 
01250 typedef globus_ftp_control_command_str_t      
01251 globus_ftp_control_command_pwd_t;
01252 
01253 typedef globus_ftp_control_command_str_t      
01254 globus_ftp_control_command_adat_t;
01255 
01256 
01257 
01258 
01259 typedef union globus_ftp_control_command_u
01260 {
01261     globus_ftp_control_command_code_t         code;
01262     globus_ftp_control_command_site_t         site;
01263     globus_ftp_control_command_sbuf_t         sbuf;
01264     globus_ftp_control_command_type_t         type;
01265     globus_ftp_control_command_rest_t         rest;
01266     globus_ftp_control_command_allo_t         allo;
01267     globus_ftp_control_command_eret_t         eret;
01268     globus_ftp_control_command_esto_t         esto;
01269     globus_ftp_control_command_mode_t         mode;
01270     globus_ftp_control_command_port_t         port;
01271     globus_ftp_control_command_spor_t         spor;
01272     globus_ftp_control_command_stru_t         stru;
01273     globus_ftp_control_command_auth_t         auth;
01274 
01275     globus_ftp_control_command_adat_t         adat;
01276     globus_ftp_control_command_acct_t         acct;
01277     globus_ftp_control_command_cwd_t          cwd;
01278     globus_ftp_control_command_cdup_t         cdup;
01279     globus_ftp_control_command_pass_t         pass;
01280     globus_ftp_control_command_user_t         user;
01281     globus_ftp_control_command_smnt_t         smnt;
01282     globus_ftp_control_command_opts_t         opts;
01283     globus_ftp_control_command_list_t         list;
01284     globus_ftp_control_command_retr_t         retr;
01285     globus_ftp_control_command_size_t         size;
01286     globus_ftp_control_command_stor_t         stor;
01287     globus_ftp_control_command_appe_t         appe;
01288     globus_ftp_control_command_rnfr_t         rnfr;
01289     globus_ftp_control_command_rnto_t         rnto;
01290     globus_ftp_control_command_dele_t         dele;
01291     globus_ftp_control_command_feat_t         feat;
01292     globus_ftp_control_command_rmd_t          rmd;
01293     globus_ftp_control_command_mkd_t          mkd;
01294     globus_ftp_control_command_nlst_t         nlst;
01295     globus_ftp_control_command_help_t         help;
01296 
01297     globus_ftp_control_command_pasv_t         pasv;
01298     globus_ftp_control_command_spas_t         spas;
01299     globus_ftp_control_command_stat_t         stat;
01300     globus_ftp_control_command_noop_t         noop;
01301     globus_ftp_control_command_syst_t         syst;
01302     globus_ftp_control_command_stou_t         stou;
01303     globus_ftp_control_command_quit_t         quit;
01304     globus_ftp_control_command_rein_t         rein;
01305     globus_ftp_control_command_abor_t         abor; 
01306     globus_ftp_control_command_pwd_t          pwd;
01307  
01308     globus_ftp_control_command_str_t          base;
01309 } globus_ftp_control_command_t;
01310 
01311 
01312 typedef struct globus_ftp_data_server_s
01313 {
01314     int bogus;
01315 } globus_ftp_data_server_t;
01316 
01322 globus_result_t 
01323 globus_ftp_control_auth_info_init(
01324     globus_ftp_control_auth_info_t *       auth_info,
01325     gss_cred_id_t                          credential_handle,
01326     globus_bool_t                          encrypt,
01327     char *                                 user,
01328     char *                                 password,
01329     char *                                 account,
01330     char *                                 subject);
01331 
01332 int
01333 globus_ftp_control_auth_info_compare(
01334     globus_ftp_control_auth_info_t *       auth_info_1,
01335     globus_ftp_control_auth_info_t *       auth_info_2);
01336 
01337 globus_result_t 
01338 globus_ftp_control_handle_init(
01339     globus_ftp_control_handle_t *           handle);
01340 
01341 globus_result_t 
01342 globus_ftp_control_handle_destroy(
01343     globus_ftp_control_handle_t *          handle);
01344 
01345 globus_result_t 
01346 globus_ftp_control_server_handle_init(
01347     globus_ftp_control_server_t *           handle);
01348 
01349 globus_result_t 
01350 globus_ftp_control_server_handle_destroy(
01351     globus_ftp_control_server_t *          handle);
01352 
01353 globus_result_t 
01354 globus_ftp_control_response_destroy(
01355     globus_ftp_control_response_t *        response);
01356 
01357 globus_result_t 
01358 globus_ftp_control_response_copy(
01359     globus_ftp_control_response_t *       src,
01360     globus_ftp_control_response_t *       dest);
01361 
01362 
01363 globus_result_t
01364 globus_ftp_control_connect(
01365     globus_ftp_control_handle_t *               handle,
01366     char *                                      host,
01367     unsigned short                              port,
01368     globus_ftp_control_response_callback_t      callback,
01369     void *                                      callback_arg);
01370 
01371 globus_result_t
01372 globus_ftp_control_authenticate(
01373     globus_ftp_control_handle_t *               handle,
01374     globus_ftp_control_auth_info_t *            auth_info,
01375     globus_bool_t                               use_auth,
01376     globus_ftp_control_response_callback_t      callback,
01377     void *                                      callback_arg);
01378 
01379 globus_result_t
01380 globus_ftp_control_authenticate_ex(
01381     globus_ftp_control_handle_t *               handle,
01382     globus_ftp_control_auth_info_t *            auth_info,
01383     globus_bool_t                               use_auth,
01384     globus_ftp_control_response_callback_t      callback,
01385     void *                                      callback_arg);
01386 
01387 globus_result_t
01388 globus_ftp_control_abort(
01389     globus_ftp_control_handle_t *               handle,
01390     globus_ftp_control_response_callback_t      callback,
01391     void *                                      callback_arg);
01392 
01393 globus_result_t
01394 globus_ftp_control_quit(
01395     globus_ftp_control_handle_t *               handle,
01396     globus_ftp_control_response_callback_t      callback,
01397     void *                                      callback_arg);
01398 
01399 globus_result_t
01400 globus_ftp_control_force_close(
01401     globus_ftp_control_handle_t *               handle,
01402     globus_ftp_control_response_callback_t      callback,
01403     void *                                      callback_arg);
01404 
01405 
01406 globus_result_t
01407 globus_ftp_control_send_command(
01408     globus_ftp_control_handle_t *               handle,
01409     const char *                                cmdspec,
01410     globus_ftp_control_response_callback_t      callback,
01411     void *                                      callback_arg,
01412     ...);
01413 
01414 globus_result_t
01415 globus_ftp_control_local_pbsz(
01416     globus_ftp_control_handle_t *               handle,
01417     unsigned long                               bufsize);
01418 
01419 globus_result_t
01420 globus_ftp_control_get_pbsz(
01421     globus_ftp_control_handle_t *               handle,
01422     unsigned long *                             bufsize);
01423 
01424 /* globus_ftp_control_server.c */
01425 globus_result_t
01426 globus_ftp_control_server_listen(
01427     globus_ftp_control_server_t *               handle,
01428     unsigned short *                            port,
01429     globus_ftp_control_server_callback_t        callback,
01430     void *                                      callback_arg);
01431 
01432 globus_result_t
01433 globus_ftp_control_server_listen_ex(
01434     globus_ftp_control_server_t *               handle,
01435     globus_io_attr_t *                          attr,
01436     unsigned short *                            port,
01437     globus_ftp_control_server_callback_t        callback,
01438     void *                                      callback_arg);
01439 
01440 globus_result_t
01441 globus_ftp_control_server_stop(
01442     globus_ftp_control_server_t *               listener,
01443     globus_ftp_control_server_callback_t        callback,
01444     void *                                      callback_arg);
01445 
01446 globus_result_t
01447 globus_ftp_control_server_accept(
01448     globus_ftp_control_server_t *               listener,
01449     globus_ftp_control_handle_t *               handle,
01450     globus_ftp_control_callback_t               callback,
01451     void *                                      callback_arg);
01452 
01453 globus_result_t
01454 globus_ftp_control_server_authenticate(
01455     globus_ftp_control_handle_t *               handle,
01456     globus_ftp_control_auth_requirements_t      auth_requirements,
01457     globus_ftp_control_auth_callback_t          callback,
01458     void *                                      callback_arg);
01459 
01460 globus_result_t
01461 globus_ftp_control_read_commands(
01462     globus_ftp_control_handle_t *               handle,
01463     globus_ftp_control_command_callback_t       callback,
01464     void *                                      callback_arg);
01465 
01466 globus_result_t
01467 globus_ftp_control_send_response(
01468     globus_ftp_control_handle_t *               handle,
01469     const char *                                respspec,
01470     globus_ftp_control_callback_t               callback,
01471     void *                                      callback_arg,
01472     ...);
01473 
01474 globus_result_t
01475 globus_ftp_control_close(
01476     globus_ftp_control_server_t *               listener,
01477     globus_ftp_control_server_callback_t        callback,
01478     void *                                      callback_arg);
01479 
01480 globus_result_t
01481 globus_ftp_data_close(
01482     globus_ftp_data_server_t *                  listener,
01483     globus_ftp_control_server_callback_t        callback,
01484     void *                                      callback_arg);
01485 
01486 int
01487  globus_i_ftp_queue_size(
01488      globus_ftp_control_handle_t *           handle,
01489      int                                          stripe_ndx);
01490 
01491 /* command object functions */
01492 globus_result_t
01493 globus_ftp_control_command_copy(
01494     globus_ftp_control_command_t *           dest,
01495     globus_ftp_control_command_t *           src);
01496 
01497 globus_result_t
01498 globus_ftp_control_command_init(
01499     globus_ftp_control_command_t *              command,
01500     char *                                      raw_command,
01501     globus_ftp_control_auth_info_t *            auth_info);
01502 
01503 globus_result_t
01504 globus_ftp_control_command_destroy(
01505     globus_ftp_control_command_t *           command);
01506 
01512 globus_result_t
01513 globus_i_ftp_control_data_cc_init(
01514     globus_ftp_control_handle_t *                control_handle);
01515 
01516 globus_result_t
01517 globus_i_ftp_control_data_cc_destroy(
01518     globus_ftp_control_handle_t *                control_handle);
01519 
01520 globus_result_t
01521 globus_ftp_control_data_force_close(
01522     globus_ftp_control_handle_t *                control_handle,
01523     globus_ftp_control_callback_t                destroy_callback,
01524     void *                                       destroy_callback_arg);
01525 
01526 globus_result_t
01527 globus_ftp_control_local_send_eof(
01528     globus_ftp_control_handle_t *               handle,
01529     globus_bool_t                               send_eof);
01530 
01531 globus_result_t
01532 globus_ftp_control_data_send_eof(
01533     globus_ftp_control_handle_t *                  handle,
01534     int                                            count[],
01535     int                                            array_size,
01536     globus_bool_t                                  eof_message,
01537     globus_ftp_control_callback_t                  cb,
01538     void *                                         user_arg);
01539 
01540 globus_result_t
01541 globus_ftp_control_get_stripe_count(
01542     globus_ftp_control_handle_t *               handle,
01543     int *                                       stripe_count);
01544 
01545 globus_result_t
01546 globus_ftp_control_data_connect_read(
01547     globus_ftp_control_handle_t *               handle,
01548     globus_ftp_control_data_connect_callback_t  callback,
01549     void *                                      user_arg);
01550 
01551 globus_result_t
01552 globus_ftp_control_data_connect_write(
01553     globus_ftp_control_handle_t *               handle,
01554     globus_ftp_control_data_connect_callback_t  callback,
01555     void *                                      user_arg);
01556 
01557 globus_result_t
01558 globus_ftp_control_data_add_channels(
01559     globus_ftp_control_handle_t *               handle,
01560     unsigned int                                num_channels,
01561     unsigned int                                stripe);
01562 
01563 globus_result_t
01564 globus_ftp_control_data_remove_channels(
01565     globus_ftp_control_handle_t *            handle,
01566     unsigned int                                num_channels,
01567     unsigned int                                stripe);
01568 
01569 globus_result_t
01570 globus_ftp_control_data_query_channels(
01571     globus_ftp_control_handle_t *               handle,
01572     unsigned int *                              num_channels,
01573     unsigned int                                stripe);
01574 
01575 globus_result_t
01576 globus_ftp_control_data_get_total_data_channels(
01577     globus_ftp_control_handle_t *               handle,
01578     unsigned int *                              num_channels,
01579     unsigned int                                stripe_ndx);
01580 
01581 globus_result_t
01582 globus_ftp_control_data_get_remote_hosts(
01583     globus_ftp_control_handle_t *               handle,
01584     globus_ftp_control_host_port_t *            address,
01585     int *                                       addr_count);
01586 
01587 globus_result_t
01588 globus_ftp_control_get_parallelism(
01589     globus_ftp_control_handle_t *               handle,
01590     globus_ftp_control_parallelism_t *          parallelism);
01591 
01592 globus_result_t
01593 globus_ftp_control_local_parallelism(
01594     globus_ftp_control_handle_t *               handle,
01595     globus_ftp_control_parallelism_t *          parallelism);
01596 
01597 globus_result_t
01598 globus_ftp_control_local_pasv(
01599     globus_ftp_control_handle_t *               handle,
01600     globus_ftp_control_host_port_t *            address);
01601 
01602 globus_result_t
01603 globus_ftp_control_local_spas(
01604     globus_ftp_control_handle_t *               handle,
01605     globus_ftp_control_host_port_t              addresses[],
01606     unsigned int                                num_addresses);
01607 
01608 globus_result_t
01609 globus_ftp_control_local_port(
01610     globus_ftp_control_handle_t *               handle,
01611     globus_ftp_control_host_port_t *            address);
01612 
01613 globus_result_t
01614 globus_ftp_control_local_spor(
01615     globus_ftp_control_handle_t *               handle,
01616     globus_ftp_control_host_port_t              addresses[],
01617     unsigned int                                num_addresses);
01618 
01619 globus_result_t
01620 globus_ftp_control_get_spor(
01621     globus_ftp_control_handle_t *               handle,
01622     globus_ftp_control_host_port_t              addresses[],
01623     unsigned int *                              num_addresses);
01624 
01625 globus_result_t
01626 globus_ftp_control_local_type(
01627     globus_ftp_control_handle_t *               handle,
01628     globus_ftp_control_type_t                   type,
01629     int                                         form_code);
01630 
01631 globus_result_t
01632 globus_ftp_control_local_tcp_buffer(
01633     globus_ftp_control_handle_t *               handle,
01634     globus_ftp_control_tcpbuffer_t *            tcp_buffer);
01635 
01636 globus_result_t
01637 globus_ftp_control_local_mode(
01638     globus_ftp_control_handle_t *               handle,
01639     globus_ftp_control_mode_t                   mode);
01640 
01641 globus_result_t
01642 globus_ftp_control_get_mode(
01643     globus_ftp_control_handle_t *               handle,
01644     globus_ftp_control_mode_t *                 mode);
01645 
01646 globus_result_t
01647 globus_ftp_control_get_type(
01648     globus_ftp_control_handle_t *               handle,
01649     globus_ftp_control_type_t *                 type);
01650 
01651 globus_result_t
01652 globus_ftp_control_local_dcau(
01653     globus_ftp_control_handle_t *               handle,
01654     const globus_ftp_control_dcau_t *           dcau,
01655     gss_cred_id_t                               delegated_credential_handle);
01656 
01657 globus_result_t
01658 globus_ftp_control_get_dcau(
01659     globus_ftp_control_handle_t *               handle,
01660     globus_ftp_control_dcau_t *                 dcau);
01661 
01662 globus_result_t
01663 globus_ftp_control_local_prot(
01664     globus_ftp_control_handle_t *               handle,
01665     globus_ftp_control_protection_t             protection);
01666 
01667 globus_result_t
01668 globus_ftp_control_get_prot(
01669     globus_ftp_control_handle_t *               handle,
01670     globus_ftp_control_protection_t *           protection);
01671 
01672 globus_result_t
01673 globus_ftp_control_local_stru(
01674     globus_ftp_control_handle_t *               handle,
01675     globus_ftp_control_structure_t              structure);
01676 
01677 globus_result_t
01678 globus_ftp_control_data_write(
01679     globus_ftp_control_handle_t *               handle,
01680     globus_byte_t *                             buffer,
01681     globus_size_t                               length,
01682     globus_off_t                                offset,
01683     globus_bool_t                               eof,
01684     globus_ftp_control_data_callback_t          callback,
01685     void *                                      callback_arg);
01686 
01687 globus_result_t
01688 globus_ftp_control_data_read(
01689     globus_ftp_control_handle_t *               handle,
01690     globus_byte_t *                             buffer,
01691     globus_size_t                               max_length,
01692     globus_ftp_control_data_callback_t          callback,
01693     void *                                      callback_arg);
01694 
01695 globus_result_t
01696 globus_ftp_control_data_read_all(
01697     globus_ftp_control_handle_t *               handle,
01698     globus_byte_t *                             buffer,
01699     globus_size_t                               length,
01700     globus_ftp_control_data_callback_t          callback,
01701     void *                                      callback_arg);
01702 
01703 /* this has only been tested enough for the client library and GridFTP server
01704  * it is very likely to not work for general usage
01705  */
01706 globus_result_t
01707 globus_ftp_control_ipv6_allow(
01708     globus_ftp_control_handle_t *               handle,
01709     globus_bool_t                               allow);
01710 
01711 /*
01712  *  internal function definitions
01713  */
01714 globus_result_t
01715 globus_i_ftp_parallelism_copy(
01716     globus_ftp_control_parallelism_t *             dest_parallelism,
01717     globus_ftp_control_parallelism_t *             src_parallelism);
01718 
01719 int
01720 globus_i_ftp_parallelism_get_size(
01721     globus_ftp_control_parallelism_t *             parallelism);
01722 
01723 int
01724 globus_i_ftp_parallelism_get_min_size(
01725     globus_ftp_control_parallelism_t *             parallelism);
01726 
01727 int
01728 globus_i_ftp_parallelism_get_max_size(
01729     globus_ftp_control_parallelism_t *             parallelism);
01730 
01731 void
01732 globus_ftp_control_host_port_init(
01733     globus_ftp_control_host_port_t *              host_port,
01734     char *                                        host,
01735     unsigned short                                port);
01736 
01737 void
01738 globus_ftp_control_host_port_destroy(
01739     globus_ftp_control_host_port_t *              host_port);
01740 
01741 void
01742 globus_ftp_control_host_port_get_host(
01743     globus_ftp_control_host_port_t *              host_port,
01744     char *                                        host);
01745 
01746 unsigned short
01747 globus_ftp_control_host_port_get_port(
01748     globus_ftp_control_host_port_t *              host_port);
01749 
01750 void
01751 globus_ftp_control_host_port_copy(
01752     globus_ftp_control_host_port_t *              dest,
01753     globus_ftp_control_host_port_t *              src);
01754 
01755 #define globus_i_ftp_control_client_get_connection_info \
01756      globus_ftp_control_client_get_connection_info
01757 globus_result_t
01758 globus_ftp_control_client_get_connection_info(
01759     globus_ftp_control_handle_t *         handle,
01760     int                                   localhost[4],
01761     unsigned short *                      localport,
01762     int                                   remotehost[4],
01763     unsigned short *                      remoteport);
01764 
01765 globus_result_t
01766 globus_ftp_control_client_get_connection_info_ex(
01767     globus_ftp_control_handle_t *         handle,
01768     globus_ftp_control_host_port_t *      local_info,
01769     globus_ftp_control_host_port_t *      remote_info);
01770 
01771 globus_result_t
01772 globus_ftp_control_data_get_socket_buf(
01773     globus_ftp_control_handle_t *       handle,
01774     int *                               rcvbuf,
01775     int *                               sndbuf);
01776 
01777 globus_result_t
01778 globus_ftp_control_data_get_retransmit_count(
01779     globus_ftp_control_handle_t *       handle,
01780     char **                             retransmit_count);
01781 
01782 #ifdef __cplusplus
01783 }
01784 #endif
01785 
01786 
01787 #endif  /* GLOBUS_INCLUDE_FTP_CONTROL_H */

Generated on 14 Nov 2014 for globus_ftp_control by  doxygen 1.4.7