Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_ftp_control.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef GLOBUS_INCLUDE_FTP_CONTROL_H
23 #define GLOBUS_INCLUDE_FTP_CONTROL_H 1
24 
25 #include "globus_common.h"
26 #include "globus_error_string.h"
27 #include "globus_io.h"
28 #include "globus_gss_assist.h"
29 #include "globus_handle_table.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
36 
40 #endif
41 
80 {
92 
100 {
112 
120 {
130 
135 {
137  char * subject;
139 
148 {
149  GLOBUS_FTP_CONTROL_STRIPING_NONE,
150  GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED,
151  GLOBUS_FTP_CONTROL_STRIPING_BLOCKED_ROUND_ROBIN
153 
158 {
160  globus_size_t block_size;
162 
163 typedef struct globus_ftp_control_partitioned_s
164 {
166  globus_size_t size;
167 } globus_ftp_control_partitioned_t;
168 
173 {
177 
185 typedef enum
186 {
196 
200 typedef enum
201 {
202  GLOBUS_FTP_CONTROL_DELAYED_SINGLE_PASSIVE = 'S',
203  GLOBUS_FTP_CONTROL_DELAYED_STRIPED_PASSIVE = 'M',
204  GLOBUS_FTP_CONTROL_NORMAL_PASSIVE = 'N'
206 
211 {
214  globus_ftp_control_partitioned_t partitioned;
215  /*
216  * No data required for:
217  * GLOBUS_FTP_CONTROL_STRIPING_NONE
218  * GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED
219  */
221 
226 {
227  GLOBUS_FTP_CONTROL_STRUCTURE_NONE,
228  GLOBUS_FTP_CONTROL_STRUCTURE_FILE,
229  GLOBUS_FTP_CONTROL_STRUCTURE_PAGE,
230  GLOBUS_FTP_CONTROL_STRUCTURE_RECORD
232 
237 {
238  GLOBUS_FTP_CONTROL_PARALLELISM_NONE,
239  GLOBUS_FTP_CONTROL_PARALLELISM_FIXED
241 
242 /*
243  * The base class for all parallel types. Subtypes
244  * must first define all types in this structure.
245  */
246 typedef struct globus_i_ftp_parallelism_base_s
247 {
249  globus_size_t size;
250 } globus_i_ftp_parallelism_base_t;
251 
252 typedef struct globus_ftp_parallelism_fixed_s
253 {
255  globus_size_t size;
256 } globus_ftp_parallelism_fixed_t;
257 
262 {
264  globus_i_ftp_parallelism_base_t base;
265  globus_ftp_parallelism_fixed_t fixed;
267 
268 typedef struct globus_ftp_control_host_port_s
269 {
270  int host[16];
271  unsigned short port;
272 
273  /*
274  * if ipv6 is not enabled, the following param will be assumed to be 4
275  * when passed as an in-parameter. otherwise it must indicate the correct
276  * len.
277  *
278  * for out-parameters, the following will _always_ be 4 unless ipv6 is
279  * allowed. then it will be either 4 or 16
280  */
281  int hostlen;
282 } globus_ftp_control_host_port_t;
283 
309 #define GLOBUS_FTP_CONTROL_MODULE (&globus_i_ftp_control_module)
310 
311 extern globus_module_descriptor_t globus_i_ftp_control_module;
312 
313 #define _FCSL(s) globus_common_i18n_get_string(GLOBUS_FTP_CONTROL_MODULE,s)
314 /*
315  * Module Specific Data Types
316  */
317 typedef enum globus_ftp_control_response_class_e
318 {
319  GLOBUS_FTP_UNKNOWN_REPLY,
320  GLOBUS_FTP_POSITIVE_PRELIMINARY_REPLY,
321  GLOBUS_FTP_POSITIVE_COMPLETION_REPLY,
322  GLOBUS_FTP_POSITIVE_INTERMEDIATE_REPLY,
323  GLOBUS_FTP_TRANSIENT_NEGATIVE_COMPLETION_REPLY,
324  GLOBUS_FTP_PERMANENT_NEGATIVE_COMPLETION_REPLY
325 } globus_ftp_control_response_class_t;
326 
327 
328 typedef struct globus_ftp_control_response_s
329 {
330  int code;
331  globus_ftp_control_response_class_t response_class;
332  globus_byte_t * response_buffer;
333  globus_size_t response_length;
334  globus_size_t response_buffer_size;
335 } globus_ftp_control_response_t;
336 
339 {
342 
345 
349 
353 typedef struct
354 {
356 }
358 
362 typedef struct
363 {
365  int size;
366 }
368 
373 {
375  unsigned int initial_size;
376  unsigned int minimum_size;
377  unsigned int maximum_size;
379 
384 {
386  globus_ftp_control_tcpbuffer_default_t default_tcpbuffer;
390 
391 /*
392  * each strip can have multiple parallel connections to
393  * the same host
394  */
395 
396 typedef enum globus_ftp_data_connection_state_e
397 {
398  GLOBUS_FTP_DATA_STATE_NONE, /* dc_handle has no references */
399  GLOBUS_FTP_DATA_STATE_PASV, /* in local pasv mode */
400  GLOBUS_FTP_DATA_STATE_PORT, /* in local port mode */
401  GLOBUS_FTP_DATA_STATE_SPOR, /* in local spor mode */
402  GLOBUS_FTP_DATA_STATE_CONNECT_READ, /* connected for reading */
403  GLOBUS_FTP_DATA_STATE_CONNECT_WRITE, /* connected for writing */
404  GLOBUS_FTP_DATA_STATE_CLOSING, /* closing all connections */
405  GLOBUS_FTP_DATA_STATE_EOF, /* user has received eof */
406  GLOBUS_FTP_DATA_STATE_SEND_EOF /* not used for state at all */
407 } globus_ftp_data_connection_state_t;
408 
409 #define GLOBUS_FTP_CONTROL_READ_BUFFER_SIZE 1000
410 #define GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE 8192
411 
412 typedef enum
413 {
414  GLOBUS_FTP_CONTROL_UNCONNECTED,
415  GLOBUS_FTP_CONTROL_CONNECTING,
416  GLOBUS_FTP_CONTROL_CONNECTED,
417  GLOBUS_FTP_CONTROL_CLOSING
418 }
419 globus_ftp_cc_state_t;
420 
421 struct globus_ftp_control_handle_s;
422 struct globus_i_ftp_dc_transfer_handle_t;
423 
424 union globus_ftp_control_command_u;
425 
426 typedef enum globus_ftp_control_command_code_e
427 {
428  GLOBUS_FTP_CONTROL_COMMAND_OPTS,
429  GLOBUS_FTP_CONTROL_COMMAND_AUTH,
430  GLOBUS_FTP_CONTROL_COMMAND_ADAT,
431  GLOBUS_FTP_CONTROL_COMMAND_SPAS,
432  GLOBUS_FTP_CONTROL_COMMAND_SPOR,
433  GLOBUS_FTP_CONTROL_COMMAND_PORT,
434  GLOBUS_FTP_CONTROL_COMMAND_PASV,
435  GLOBUS_FTP_CONTROL_COMMAND_SITE,
436  GLOBUS_FTP_CONTROL_COMMAND_TYPE,
437  GLOBUS_FTP_CONTROL_COMMAND_DELE,
438  GLOBUS_FTP_CONTROL_COMMAND_FEAT,
439  GLOBUS_FTP_CONTROL_COMMAND_ERET,
440  GLOBUS_FTP_CONTROL_COMMAND_ESTO,
441  GLOBUS_FTP_CONTROL_COMMAND_RMD,
442  GLOBUS_FTP_CONTROL_COMMAND_MKD,
443  GLOBUS_FTP_CONTROL_COMMAND_PWD,
444  GLOBUS_FTP_CONTROL_COMMAND_CWD,
445  GLOBUS_FTP_CONTROL_COMMAND_CDUP,
446  GLOBUS_FTP_CONTROL_COMMAND_NLST,
447  GLOBUS_FTP_CONTROL_COMMAND_HELP,
448  GLOBUS_FTP_CONTROL_COMMAND_STAT,
449  GLOBUS_FTP_CONTROL_COMMAND_NOOP,
450  GLOBUS_FTP_CONTROL_COMMAND_SYST,
451  GLOBUS_FTP_CONTROL_COMMAND_STOU,
452  GLOBUS_FTP_CONTROL_COMMAND_QUIT,
453  GLOBUS_FTP_CONTROL_COMMAND_REIN,
454  GLOBUS_FTP_CONTROL_COMMAND_ABOR,
455  GLOBUS_FTP_CONTROL_COMMAND_ALLO,
456  GLOBUS_FTP_CONTROL_COMMAND_MODE,
457  GLOBUS_FTP_CONTROL_COMMAND_STRU,
458  GLOBUS_FTP_CONTROL_COMMAND_ACCT,
459  GLOBUS_FTP_CONTROL_COMMAND_PASS,
460  GLOBUS_FTP_CONTROL_COMMAND_USER,
461  GLOBUS_FTP_CONTROL_COMMAND_SMNT,
462  GLOBUS_FTP_CONTROL_COMMAND_LIST,
463  GLOBUS_FTP_CONTROL_COMMAND_RETR,
464  GLOBUS_FTP_CONTROL_COMMAND_REST,
465  GLOBUS_FTP_CONTROL_COMMAND_SBUF,
466  GLOBUS_FTP_CONTROL_COMMAND_SIZE,
467  GLOBUS_FTP_CONTROL_COMMAND_STOR,
468  GLOBUS_FTP_CONTROL_COMMAND_APPE,
469  GLOBUS_FTP_CONTROL_COMMAND_RNFR,
470  GLOBUS_FTP_CONTROL_COMMAND_RNTO,
471  GLOBUS_FTP_CONTROL_COMMAND_LANG,
472  GLOBUS_FTP_CONTROL_COMMAND_UNKNOWN
473 } globus_ftp_control_command_code_t;
474 
484 {
485  globus_bool_t authenticated;
486  globus_ftp_control_command_code_t prev_cmd;
487  char * auth_gssapi_subject;
488  gss_ctx_id_t auth_gssapi_context;
489  gss_cred_id_t credential_handle;
490  globus_bool_t locally_acquired_credential;
491  gss_name_t target_name;
492  OM_uint32 req_flags;
493  char * user;
494  char * password;
495  char * account;
496  gss_cred_id_t delegated_credential_handle;
497  globus_bool_t encrypt;
498 }
500 
501 
502 
527  void * callback_arg,
528  struct globus_ftp_control_handle_s * handle,
529  globus_object_t * error,
530  globus_ftp_control_response_t * ftp_response);
531 
547  void * callback_arg,
548  struct globus_ftp_control_handle_s * handle,
549  globus_object_t * error);
550 
551 
552 typedef void
553 (*globus_ftp_control_data_connect_callback_t)(
554  void * callback_arg,
555  struct globus_ftp_control_handle_s * handle,
556  unsigned int stripe_ndx,
557  globus_bool_t reused,
558  globus_object_t * error);
559 
588  void * callback_arg,
589  struct globus_ftp_control_handle_s * handle,
590  globus_object_t * error,
591  union globus_ftp_control_command_u * command);
592 
623 typedef void
625  void * callback_arg,
626  struct globus_ftp_control_handle_s * handle,
627  globus_object_t * error,
628  globus_ftp_control_auth_info_t * auth_result);
629 
641 
642 #define GLOBUS_FTP_CONTROL_AUTH_REQ_NONE 1
643 #define GLOBUS_FTP_CONTROL_AUTH_REQ_GSSAPI 2
644 #define GLOBUS_FTP_CONTROL_AUTH_REQ_USER 4
645 #define GLOBUS_FTP_CONTROL_AUTH_REQ_PASS 8
646 #define GLOBUS_FTP_CONTROL_AUTH_REQ_ACCT 16
647 #define GLOBUS_FTP_CONTROL_AUTH_REQ_TLS 32
648 
649 typedef struct globus_ftp_control_rw_queue_element_s
650 {
652  globus_ftp_control_callback_t send_response_cb;
653  void * arg;
654  globus_byte_t * write_buf;
655  int write_flags;
656  globus_io_write_callback_t write_callback;
657  globus_io_read_callback_t read_callback;
658  globus_bool_t expect_response;
659 }
660 globus_ftp_control_rw_queue_element_t;
661 
662 typedef struct globus_ftp_cc_handle_s
663 {
664  globus_io_attr_t io_attr;
665  globus_netlogger_handle_t nl_handle;
666  globus_bool_t nl_handle_set;
667 
668  globus_fifo_t readers;
669  globus_fifo_t writers;
671  void * command_cb_arg;
672 
673  /* callback and arg for accept */
675  void * accept_cb_arg;
676 
678  void * auth_cb_arg;
679  globus_ftp_control_auth_requirements_t auth_requirements;
680  globus_ftp_control_response_t response;
681  globus_byte_t * read_buffer;
682  globus_size_t read_buffer_size;
683  globus_size_t bytes_read;
685  globus_bool_t use_auth;
686  globus_io_handle_t io_handle;
687  globus_ftp_cc_state_t cc_state;
688  char serverhost[MAXHOSTNAMELEN];
689  struct hostent server;
690  char server_buffer[
691  GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE];
692  globus_list_t * list_elem;
693 
694  globus_mutex_t mutex;
695  globus_bool_t do_close;
696  int cb_count;
698  void * close_cb_arg;
699  globus_object_t * close_result;
700  globus_ftp_control_response_t quit_response;
701  globus_bool_t signal_deactivate;
702 }
703 globus_ftp_cc_handle_t;
704 
705 struct globus_ftp_control_data_write_info_s;
706 
707 typedef globus_result_t (*globus_ftp_control_layout_func_t)(
708  struct globus_ftp_control_handle_s * handle,
709  struct globus_ftp_control_data_write_info_s * data_info,
710  globus_byte_t * buffer,
711  globus_size_t length,
712  globus_off_t offset,
713  globus_bool_t eof,
714  int stripe_count,
715  char * enqueue_str,
716  void * user_arg);
717 
718 typedef globus_result_t (*globus_ftp_control_layout_verify_func_t)(
719  char * enqueue_str);
720 
721 typedef struct globus_i_ftp_dc_handle_s
722 {
723  char magic[32];
724 
726  unsigned long pbsz;
728 
729  globus_ftp_data_connection_state_t state;
730 
734  int tcp_buffer_size;
735  int form_code;
737 
738  globus_io_attr_t io_attr;
739  char * interface_addr;
740 
741  struct globus_i_ftp_dc_transfer_handle_s * transfer_handle;
742  globus_list_t * transfer_list;
743  globus_bool_t send_eof;
744 
745  globus_ftp_control_layout_func_t layout_func;
747  char * layout_str;
748  void * layout_user_arg;
749 
750  globus_bool_t initialized;
751  globus_mutex_t mutex;
752 
753  globus_ftp_control_callback_t close_callback;
754  void * close_callback_arg;
755 
756  globus_netlogger_handle_t nl_io_handle;
757  globus_bool_t nl_io_handle_set;
758 
759  globus_netlogger_handle_t nl_ftp_handle;
760  globus_bool_t nl_ftp_handle_set;
761 
762  globus_object_t * connect_error;
763  struct globus_ftp_control_handle_s * whos_my_daddy;
764 } globus_i_ftp_dc_handle_t;
765 
766 typedef struct globus_ftp_control_handle_s
767 {
768  struct globus_i_ftp_dc_handle_s dc_handle;
769  struct globus_ftp_cc_handle_s cc_handle;
770 } globus_ftp_control_handle_t;
771 
772 
819  void * callback_arg,
820  globus_ftp_control_handle_t * handle,
821  globus_object_t * error,
822  globus_byte_t * buffer,
823  globus_size_t length,
824  globus_off_t offset,
825  globus_bool_t eof);
826 
827 typedef struct globus_ftp_control_data_write_info_s
828 {
830  void * cb_arg;
831  globus_handle_t callback_table_handle;
832 } globus_ftp_control_data_write_info_t;
833 
835 globus_ftp_control_layout_register_func(
836  char * name,
837  globus_ftp_control_layout_func_t enqueue_func,
838  globus_ftp_control_layout_verify_func_t verify_func);
839 
841 globus_X_ftp_control_local_layout(
842  globus_ftp_control_handle_t * handle,
843  char * enqueue_str,
844  void * user_arg);
845 
848  globus_ftp_control_handle_t * handle,
850  globus_size_t data_size);
851 
852 /*
853  * NET LOGGER STUFF
854  */
856 globus_ftp_control_set_netlogger(
857  globus_ftp_control_handle_t * handle,
858  globus_netlogger_handle_t * nl_handle,
859  globus_bool_t nl_ftp_control,
860  globus_bool_t nl_globus_io);
861 
864  globus_ftp_control_handle_t * handle,
865  const char * interface_addr);
866 
868 globus_i_ftp_control_data_set_stack(
869  globus_ftp_control_handle_t * handle,
870  globus_xio_stack_t stack);
871 
873 globus_i_ftp_control_data_get_attr(
874  globus_ftp_control_handle_t * handle,
875  globus_xio_attr_t * attr);
876 
878 globus_i_ftp_control_client_get_attr(
879  globus_ftp_control_handle_t * handle,
880  globus_xio_attr_t * attr);
881 
883 globus_i_ftp_control_client_set_stack(
884  globus_ftp_control_handle_t * handle,
885  globus_xio_stack_t stack);
886 
888 globus_i_ftp_control_load_xio_drivers(
889  char * driver_string,
890  globus_list_t ** driver_list);
891 
892 void
893 globus_i_ftp_control_unload_xio_drivers(
894  globus_list_t * driver_list);
895 
897 globus_i_ftp_control_create_stack(
898  globus_ftp_control_handle_t * handle,
899  globus_list_t * driver_list,
900  globus_xio_stack_t * stack);
901 
902 
903 
904 /*****************************************************************
905  * standard layout functions
906  ****************************************************************/
907 /*
908  * blocked functions
909  */
911 globus_ftp_control_layout_blocked_verify(
912  char * layout_str);
913 
914 void *
915 globus_ftp_control_layout_blocked_user_arg_create();
916 
917 void
918 globus_ftp_control_layout_blocked_user_arg_destroy(
919  void * user_arg);
920 
922 globus_ftp_control_layout_blocked(
923  globus_ftp_control_handle_t * handle,
924  globus_ftp_control_data_write_info_t * data_info,
925  globus_byte_t * buffer,
926  globus_size_t length,
927  globus_off_t in_offset,
928  globus_bool_t eof,
929  int stripe_count,
930  char * enqueue_str,
931  void * user_arg);
932 
933 /*
934  * partitioned functions
935  */
937 globus_ftp_control_layout_partitioned_verify(
938  char * layout_str);
939 
940 void *
941 globus_ftp_control_layout_partitioned_user_arg_create(
942  globus_size_t file_size);
943 
944 void
945 globus_ftp_control_layout_partitioned_user_arg_destroy(
946  void * user_arg);
947 
949 globus_ftp_control_layout_partitioned(
950  globus_ftp_control_handle_t * handle,
951  globus_ftp_control_data_write_info_t * data_info,
952  globus_byte_t * buffer,
953  globus_size_t length,
954  globus_off_t in_offset,
955  globus_bool_t eof,
956  int stripe_count,
957  char * enqueue_str,
958  void * user_arg);
959 
960 /*
961  * data registration functions
962  */
965  globus_ftp_control_handle_t * handle,
966  globus_ftp_control_data_write_info_t * data_info,
967  globus_byte_t * buffer,
968  globus_size_t length,
969  globus_off_t offset,
970  globus_bool_t eof,
972  void * callback_arg);
973 
976  globus_ftp_control_handle_t * handle,
977  globus_ftp_control_data_write_info_t * data_info);
978 
981  globus_ftp_control_handle_t * handle,
982  globus_byte_t * buffer,
983  globus_size_t length,
984  globus_off_t offset,
985  globus_bool_t eof,
986  int stripe_ndx,
988  void * callback_arg);
989 
992  globus_ftp_control_handle_t * handle,
993  globus_byte_t * buffer,
994  globus_size_t length,
995  globus_off_t offset,
996  globus_bool_t eof,
997  int stripe_ndx,
998  globus_ftp_control_data_write_info_t * data_info);
999 
1000 
1001 /*
1002  * Server API callbacks
1003  * ----------------------------------------------------------------
1004  */
1005 
1011 struct globus_ftp_control_server_s;
1012 
1029  void * callback_arg,
1030  struct globus_ftp_control_server_s * server_handle,
1031  globus_object_t * error);
1032 
1033 
1034 typedef enum globus_ftp_control_server_state_n
1035 {
1036  GLOBUS_FTP_CONTROL_SERVER_LISTENING,
1037  GLOBUS_FTP_CONTROL_SERVER_DEAF
1038 }
1039 globus_ftp_control_server_state_t;
1040 
1041 typedef struct globus_ftp_control_server_s
1042 {
1043  globus_io_handle_t io_handle;
1044  globus_ftp_control_server_state_t state;
1046  void * callback_arg;
1047  globus_list_t * list_elem;
1048  globus_mutex_t mutex;
1049 } globus_ftp_control_server_t;
1050 
1051 
1052 
1053 typedef struct globus_ftp_control_command_str_s
1054 {
1055  globus_ftp_control_command_code_t code;
1056  char * raw_command;
1057  char * string_arg;
1058 } globus_ftp_control_command_str_t;
1059 
1060 /*
1061  * complex commands
1062  */
1063 
1064 typedef struct globus_ftp_control_command_stru_s
1065 {
1066  globus_ftp_control_command_code_t code;
1067  char * raw_command;
1068  globus_ftp_control_structure_t structure;
1069 } globus_ftp_control_command_stru_t;
1070 
1071 typedef struct globus_ftp_control_command_port_s
1072 {
1073  globus_ftp_control_command_code_t code;
1074  char * raw_command;
1075  globus_ftp_control_host_port_t host_port;
1076 } globus_ftp_control_command_port_t;
1077 
1078 typedef struct globus_ftp_control_command_spor_s
1079 {
1080  globus_ftp_control_command_code_t code;
1081  char * raw_command;
1082  int num_args;
1083  globus_ftp_control_host_port_t * host_port;
1084 } globus_ftp_control_command_spor_t;
1085 
1086 typedef struct globus_ftp_control_command_mode_s
1087 {
1088  globus_ftp_control_command_code_t code;
1089  char * raw_command;
1091 } globus_ftp_control_command_mode_t;
1092 
1093 typedef struct globus_ftp_control_command_allo_s
1094 {
1095  globus_ftp_control_command_code_t code;
1096  char * raw_command;
1097  int size;
1098  int record_size;
1099 } globus_ftp_control_command_allo_t;
1100 
1101 typedef struct globus_ftp_control_command_sbuf_s
1102 {
1103  globus_ftp_control_command_code_t code;
1104  char * raw_command;
1105  int buffer_size;
1106 } globus_ftp_control_command_sbuf_t;
1107 /*
1108 
1109 Can't parse marker unless I know state
1110 
1111 typedef struct globus_ftp_control_command_rest_s
1112 {
1113 } globus_ftp_control_command_rest_t;
1114 
1115 */
1116 
1117 typedef enum globus_ftp_control_type_option_e
1118 {
1119  GLOBUS_FTP_CONTROL_TYPE_NO_OPTION,
1120  GLOBUS_FTP_CONTROL_TYPE_OPTION_N,
1121  GLOBUS_FTP_CONTROL_TYPE_OPTION_T,
1122  GLOBUS_FTP_CONTROL_TYPE_OPTION_C
1123 } globus_ftp_control_type_option_t;
1124 
1125 typedef struct globus_ftp_control_command_type_s
1126 {
1127  globus_ftp_control_command_code_t code;
1128  char * raw_command;
1130  globus_ftp_control_type_option_t option;
1131  unsigned int bytesize;
1132 } globus_ftp_control_command_type_t;
1133 
1134 typedef enum globus_ftp_control_auth_type_e
1135 {
1136  GLOBUS_FTP_CONTROL_AUTH_GSSAPI,
1137  GLOBUS_FTP_CONTROL_AUTH_UNKNOWN
1138 } globus_ftp_control_auth_type_t;
1139 
1140 typedef struct globus_ftp_control_command_auth_s
1141 {
1142  globus_ftp_control_command_code_t code;
1143  char * raw_command;
1144  globus_ftp_control_auth_type_t type;
1145 } globus_ftp_control_command_auth_t;
1146 
1147 typedef struct globus_ftp_control_command_opts_s
1148 {
1149  globus_ftp_control_command_code_t code;
1150  char * raw_command;
1151  char * cmd_name;
1152  char * cmd_opts;
1153 } globus_ftp_control_command_opts_t;
1154 
1155 /*
1156  * single string commands
1157  */
1158 
1159 typedef globus_ftp_control_command_str_t
1160 globus_ftp_control_command_site_t;
1161 
1162 typedef globus_ftp_control_command_str_t
1163 globus_ftp_control_command_acct_t;
1164 
1165 typedef globus_ftp_control_command_str_t
1166 globus_ftp_control_command_cwd_t;
1167 
1168 typedef globus_ftp_control_command_str_t
1169 globus_ftp_control_command_cdup_t;
1170 
1171 typedef globus_ftp_control_command_str_t
1172 globus_ftp_control_command_pass_t;
1173 
1174 typedef globus_ftp_control_command_str_t
1175 globus_ftp_control_command_user_t;
1176 
1177 typedef globus_ftp_control_command_str_t
1178 globus_ftp_control_command_smnt_t;
1179 
1180 typedef globus_ftp_control_command_str_t
1181 globus_ftp_control_command_list_t;
1182 
1183 typedef globus_ftp_control_command_str_t
1184 globus_ftp_control_command_retr_t;
1185 
1186 typedef globus_ftp_control_command_str_t
1187 globus_ftp_control_command_size_t;
1188 
1189 typedef globus_ftp_control_command_str_t
1190 globus_ftp_control_command_stor_t;
1191 
1192 typedef globus_ftp_control_command_str_t
1193 globus_ftp_control_command_appe_t;
1194 
1195 typedef globus_ftp_control_command_str_t
1196 globus_ftp_control_command_rnfr_t;
1197 
1198 typedef globus_ftp_control_command_str_t
1199 globus_ftp_control_command_rnto_t;
1200 
1201 typedef globus_ftp_control_command_str_t
1202 globus_ftp_control_command_feat_t;
1203 
1204 typedef globus_ftp_control_command_str_t
1205 globus_ftp_control_command_dele_t;
1206 
1207 typedef globus_ftp_control_command_str_t
1208 globus_ftp_control_command_rmd_t;
1209 
1210 typedef globus_ftp_control_command_str_t
1211 globus_ftp_control_command_mkd_t;
1212 
1213 typedef globus_ftp_control_command_str_t
1214 globus_ftp_control_command_nlst_t;
1215 
1216 typedef globus_ftp_control_command_str_t
1217 globus_ftp_control_command_help_t;
1218 
1219 typedef globus_ftp_control_command_str_t
1220 globus_ftp_control_command_stou_t;
1221 
1222 typedef globus_ftp_control_command_str_t
1223 globus_ftp_control_command_rest_t;
1224 
1225 typedef globus_ftp_control_command_str_t
1226 globus_ftp_control_command_eret_t;
1227 
1228 typedef globus_ftp_control_command_str_t
1229 globus_ftp_control_command_esto_t;
1230 
1231 /*
1232  * no string commands
1233  */
1234 typedef globus_ftp_control_command_str_t
1235 globus_ftp_control_command_pasv_t;
1236 
1237 typedef globus_ftp_control_command_str_t
1238 globus_ftp_control_command_spas_t;
1239 
1240 typedef globus_ftp_control_command_str_t
1241 globus_ftp_control_command_stat_t;
1242 
1243 typedef globus_ftp_control_command_str_t
1244 globus_ftp_control_command_noop_t;
1245 
1246 typedef globus_ftp_control_command_str_t
1247 globus_ftp_control_command_syst_t;
1248 
1249 typedef globus_ftp_control_command_str_t
1250 globus_ftp_control_command_quit_t;
1251 
1252 typedef globus_ftp_control_command_str_t
1253 globus_ftp_control_command_rein_t;
1254 
1255 typedef globus_ftp_control_command_str_t
1256 globus_ftp_control_command_abor_t;
1257 
1258 typedef globus_ftp_control_command_str_t
1259 globus_ftp_control_command_pwd_t;
1260 
1261 typedef globus_ftp_control_command_str_t
1262 globus_ftp_control_command_adat_t;
1263 
1264 
1265 
1266 
1267 typedef union globus_ftp_control_command_u
1268 {
1269  globus_ftp_control_command_code_t code;
1270  globus_ftp_control_command_site_t site;
1271  globus_ftp_control_command_sbuf_t sbuf;
1272  globus_ftp_control_command_type_t type;
1273  globus_ftp_control_command_rest_t rest;
1274  globus_ftp_control_command_allo_t allo;
1275  globus_ftp_control_command_eret_t eret;
1276  globus_ftp_control_command_esto_t esto;
1277  globus_ftp_control_command_mode_t mode;
1278  globus_ftp_control_command_port_t port;
1279  globus_ftp_control_command_spor_t spor;
1280  globus_ftp_control_command_stru_t stru;
1281  globus_ftp_control_command_auth_t auth;
1282 
1283  globus_ftp_control_command_adat_t adat;
1284  globus_ftp_control_command_acct_t acct;
1285  globus_ftp_control_command_cwd_t cwd;
1286  globus_ftp_control_command_cdup_t cdup;
1287  globus_ftp_control_command_pass_t pass;
1288  globus_ftp_control_command_user_t user;
1289  globus_ftp_control_command_smnt_t smnt;
1290  globus_ftp_control_command_opts_t opts;
1291  globus_ftp_control_command_list_t list;
1292  globus_ftp_control_command_retr_t retr;
1293  globus_ftp_control_command_size_t size;
1294  globus_ftp_control_command_stor_t stor;
1295  globus_ftp_control_command_appe_t appe;
1296  globus_ftp_control_command_rnfr_t rnfr;
1297  globus_ftp_control_command_rnto_t rnto;
1298  globus_ftp_control_command_dele_t dele;
1299  globus_ftp_control_command_feat_t feat;
1300  globus_ftp_control_command_rmd_t rmd;
1301  globus_ftp_control_command_mkd_t mkd;
1302  globus_ftp_control_command_nlst_t nlst;
1303  globus_ftp_control_command_help_t help;
1304 
1305  globus_ftp_control_command_pasv_t pasv;
1306  globus_ftp_control_command_spas_t spas;
1307  globus_ftp_control_command_stat_t stat;
1308  globus_ftp_control_command_noop_t noop;
1309  globus_ftp_control_command_syst_t syst;
1310  globus_ftp_control_command_stou_t stou;
1311  globus_ftp_control_command_quit_t quit;
1312  globus_ftp_control_command_rein_t rein;
1313  globus_ftp_control_command_abor_t abor;
1314  globus_ftp_control_command_pwd_t pwd;
1315 
1316  globus_ftp_control_command_str_t base;
1317 } globus_ftp_control_command_t;
1318 
1319 
1320 typedef struct globus_ftp_data_server_s
1321 {
1322  int bogus;
1323 } globus_ftp_data_server_t;
1324 
1332  globus_ftp_control_auth_info_t * auth_info,
1333  gss_cred_id_t credential_handle,
1334  globus_bool_t encrypt,
1335  char * user,
1336  char * password,
1337  char * account,
1338  char * subject);
1339 
1340 int
1342  globus_ftp_control_auth_info_t * auth_info_1,
1343  globus_ftp_control_auth_info_t * auth_info_2);
1344 
1347  globus_ftp_control_handle_t * handle);
1348 
1351  globus_ftp_control_handle_t * handle);
1352 
1355  globus_ftp_control_server_t * handle);
1356 
1359  globus_ftp_control_server_t * handle);
1360 
1363  globus_ftp_control_response_t * response);
1364 
1367  globus_ftp_control_response_t * src,
1368  globus_ftp_control_response_t * dest);
1369 
1370 
1373  globus_ftp_control_handle_t * handle,
1374  char * host,
1375  unsigned short port,
1377  void * callback_arg);
1378 
1379 
1381 globus_ftp_control_use_tls(
1382  globus_ftp_control_handle_t * handle,
1383  globus_ftp_control_auth_info_t * auth_info);
1384 
1387  globus_ftp_control_handle_t * handle,
1388  globus_ftp_control_auth_info_t * auth_info,
1389  globus_bool_t use_auth,
1391  void * callback_arg);
1392 
1395  globus_ftp_control_handle_t * handle,
1396  globus_ftp_control_auth_info_t * auth_info,
1397  globus_bool_t use_auth,
1399  void * callback_arg);
1400 
1403  globus_ftp_control_handle_t * handle,
1405  void * callback_arg);
1406 
1409  globus_ftp_control_handle_t * handle,
1411  void * callback_arg);
1412 
1415  globus_ftp_control_handle_t * handle,
1417  void * callback_arg);
1418 
1419 
1422  globus_ftp_control_handle_t * handle,
1423  const char * cmdspec,
1425  void * callback_arg,
1426  ...);
1427 
1430  globus_ftp_control_handle_t * handle,
1431  unsigned long bufsize);
1432 
1435  globus_ftp_control_handle_t * handle,
1436  unsigned long * bufsize);
1437 
1438 /* globus_ftp_control_server.c */
1441  globus_ftp_control_server_t * handle,
1442  unsigned short * port,
1444  void * callback_arg);
1445 
1448  globus_ftp_control_server_t * handle,
1449  globus_io_attr_t * attr,
1450  unsigned short * port,
1452  void * callback_arg);
1453 
1456  globus_ftp_control_server_t * listener,
1458  void * callback_arg);
1459 
1462  globus_ftp_control_server_t * listener,
1463  globus_ftp_control_handle_t * handle,
1465  void * callback_arg);
1466 
1469  globus_ftp_control_handle_t * handle,
1470  globus_ftp_control_auth_requirements_t auth_requirements,
1472  void * callback_arg);
1473 
1476  globus_ftp_control_handle_t * handle,
1478  void * callback_arg);
1479 
1482  globus_ftp_control_handle_t * handle,
1483  const char * respspec,
1485  void * callback_arg,
1486  ...);
1487 
1489 globus_ftp_control_close(
1490  globus_ftp_control_server_t * listener,
1492  void * callback_arg);
1493 
1495 globus_ftp_data_close(
1496  globus_ftp_data_server_t * listener,
1498  void * callback_arg);
1499 
1500 int
1501  globus_i_ftp_queue_size(
1502  globus_ftp_control_handle_t * handle,
1503  int stripe_ndx);
1504 
1505 /* command object functions */
1508  globus_ftp_control_command_t * dest,
1509  globus_ftp_control_command_t * src);
1510 
1513  globus_ftp_control_command_t * command,
1514  char * raw_command,
1515  globus_ftp_control_auth_info_t * auth_info);
1516 
1519  globus_ftp_control_command_t * command);
1520 
1527 globus_i_ftp_control_data_cc_init(
1528  globus_ftp_control_handle_t * control_handle);
1529 
1531 globus_i_ftp_control_data_cc_destroy(
1532  globus_ftp_control_handle_t * control_handle);
1533 
1536  globus_ftp_control_handle_t * control_handle,
1537  globus_ftp_control_callback_t destroy_callback,
1538  void * destroy_callback_arg);
1539 
1542  globus_ftp_control_handle_t * handle,
1543  globus_bool_t send_eof);
1544 
1547  globus_ftp_control_handle_t * handle,
1548  int count[],
1549  int array_size,
1550  globus_bool_t eof_message,
1552  void * user_arg);
1553 
1555 globus_ftp_control_get_stripe_count(
1556  globus_ftp_control_handle_t * handle,
1557  int * stripe_count);
1558 
1561  globus_ftp_control_handle_t * handle,
1562  globus_ftp_control_data_connect_callback_t callback,
1563  void * user_arg);
1564 
1567  globus_ftp_control_handle_t * handle,
1568  globus_ftp_control_data_connect_callback_t callback,
1569  void * user_arg);
1570 
1573  globus_ftp_control_handle_t * handle,
1574  unsigned int num_channels,
1575  unsigned int stripe);
1576 
1579  globus_ftp_control_handle_t * handle,
1580  unsigned int num_channels,
1581  unsigned int stripe);
1582 
1585  globus_ftp_control_handle_t * handle,
1586  unsigned int * num_channels,
1587  unsigned int stripe);
1588 
1591  globus_ftp_control_handle_t * handle,
1592  unsigned int * num_channels,
1593  unsigned int stripe_ndx);
1594 
1596 globus_ftp_control_data_get_remote_hosts(
1597  globus_ftp_control_handle_t * handle,
1598  globus_ftp_control_host_port_t * address,
1599  int * addr_count);
1600 
1602 globus_ftp_control_get_parallelism(
1603  globus_ftp_control_handle_t * handle,
1604  globus_ftp_control_parallelism_t * parallelism);
1605 
1608  globus_ftp_control_handle_t * handle,
1609  globus_ftp_control_parallelism_t * parallelism);
1610 
1613  globus_ftp_control_handle_t * handle,
1614  globus_ftp_control_host_port_t * address);
1615 
1618  globus_ftp_control_handle_t * handle,
1619  globus_ftp_control_host_port_t addresses[],
1620  unsigned int num_addresses);
1621 
1624  globus_ftp_control_handle_t * handle,
1625  globus_ftp_control_host_port_t * address);
1626 
1629  globus_ftp_control_handle_t * handle,
1630  globus_ftp_control_host_port_t addresses[],
1631  unsigned int num_addresses);
1632 
1634 globus_ftp_control_get_spor(
1635  globus_ftp_control_handle_t * handle,
1636  globus_ftp_control_host_port_t addresses[],
1637  unsigned int * num_addresses);
1638 
1641  globus_ftp_control_handle_t * handle,
1643  int form_code);
1644 
1647  globus_ftp_control_handle_t * handle,
1648  globus_ftp_control_tcpbuffer_t * tcp_buffer);
1649 
1652  globus_ftp_control_handle_t * handle,
1654 
1656 globus_ftp_control_get_mode(
1657  globus_ftp_control_handle_t * handle,
1658  globus_ftp_control_mode_t * mode);
1659 
1661 globus_ftp_control_get_type(
1662  globus_ftp_control_handle_t * handle,
1663  globus_ftp_control_type_t * type);
1664 
1667  globus_ftp_control_handle_t * handle,
1668  const globus_ftp_control_dcau_t * dcau,
1669  gss_cred_id_t delegated_credential_handle);
1670 
1672 globus_ftp_control_get_dcau(
1673  globus_ftp_control_handle_t * handle,
1674  globus_ftp_control_dcau_t * dcau);
1675 
1677 globus_ftp_control_local_prot(
1678  globus_ftp_control_handle_t * handle,
1679  globus_ftp_control_protection_t protection);
1680 
1682 globus_ftp_control_get_prot(
1683  globus_ftp_control_handle_t * handle,
1684  globus_ftp_control_protection_t * protection);
1685 
1688  globus_ftp_control_handle_t * handle,
1689  globus_ftp_control_structure_t structure);
1690 
1693  globus_ftp_control_handle_t * handle,
1694  globus_byte_t * buffer,
1695  globus_size_t length,
1696  globus_off_t offset,
1697  globus_bool_t eof,
1699  void * callback_arg);
1700 
1703  globus_ftp_control_handle_t * handle,
1704  globus_byte_t * buffer,
1705  globus_size_t max_length,
1707  void * callback_arg);
1708 
1710 globus_ftp_control_data_read_all(
1711  globus_ftp_control_handle_t * handle,
1712  globus_byte_t * buffer,
1713  globus_size_t length,
1715  void * callback_arg);
1716 
1719  globus_ftp_control_handle_t * handle,
1720  globus_bool_t order_data,
1721  globus_off_t starting_offset);
1722 
1723 /* this has only been tested enough for the client library and GridFTP server
1724  * it is very likely to not work for general usage
1725  */
1728  globus_ftp_control_handle_t * handle,
1729  globus_bool_t allow);
1730 
1731 /*
1732  * internal function definitions
1733  */
1735 globus_i_ftp_parallelism_copy(
1736  globus_ftp_control_parallelism_t * dest_parallelism,
1737  globus_ftp_control_parallelism_t * src_parallelism);
1738 
1739 int
1740 globus_i_ftp_parallelism_get_size(
1741  globus_ftp_control_parallelism_t * parallelism);
1742 
1743 int
1744 globus_i_ftp_parallelism_get_min_size(
1745  globus_ftp_control_parallelism_t * parallelism);
1746 
1747 int
1748 globus_i_ftp_parallelism_get_max_size(
1749  globus_ftp_control_parallelism_t * parallelism);
1750 
1751 void
1752 globus_ftp_control_host_port_init(
1753  globus_ftp_control_host_port_t * host_port,
1754  char * host,
1755  unsigned short port);
1756 
1757 void
1758 globus_ftp_control_host_port_destroy(
1759  globus_ftp_control_host_port_t * host_port);
1760 
1761 void
1762 globus_ftp_control_host_port_get_host(
1763  globus_ftp_control_host_port_t * host_port,
1764  char * host);
1765 
1766 unsigned short
1767 globus_ftp_control_host_port_get_port(
1768  globus_ftp_control_host_port_t * host_port);
1769 
1770 void
1771 globus_ftp_control_host_port_copy(
1772  globus_ftp_control_host_port_t * dest,
1773  globus_ftp_control_host_port_t * src);
1774 
1775 #define globus_i_ftp_control_client_get_connection_info \
1776  globus_ftp_control_client_get_connection_info
1778 globus_ftp_control_client_get_connection_info(
1779  globus_ftp_control_handle_t * handle,
1780  int localhost[4],
1781  unsigned short * localport,
1782  int remotehost[4],
1783  unsigned short * remoteport);
1784 
1787  globus_ftp_control_handle_t * handle,
1788  globus_ftp_control_host_port_t * local_info,
1789  globus_ftp_control_host_port_t * remote_info);
1790 
1792 globus_ftp_control_data_get_socket_buf(
1793  globus_ftp_control_handle_t * handle,
1794  int * rcvbuf,
1795  int * sndbuf);
1796 
1798 globus_ftp_control_data_get_retransmit_count(
1799  globus_ftp_control_handle_t * handle,
1800  char ** retransmit_count);
1801 
1802 #ifdef __cplusplus
1803 }
1804 #endif
1805 
1806 
1807 #endif /* GLOBUS_INCLUDE_FTP_CONTROL_H */
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:2826
enum globus_ftp_control_striping_mode_e globus_ftp_control_striping_mode_t
GridFTP Striping Types.
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
Definition: globus_ftp_control.h:126
Definition: globus_ftp_control.h:122
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
enum globus_ftp_control_mode_e globus_ftp_control_mode_t
GridFTP MODE values.
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:5944
enum globus_ftp_control_tcpbuffer_mode_e globus_ftp_control_tcpbuffer_mode_t
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_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
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
Definition: globus_ftp_control.h:108
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_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:5747
Definition: globus_ftp_control.h:347
struct globus_ftp_control_auth_info_s globus_ftp_control_auth_info_t
Authentication Values.
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
Error Object Containing a String.
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:2995
Definition: globus_ftp_control.h:106
Definition: globus_ftp_control.h:82
Control DCAU union.
Definition: globus_ftp_control.h:172
globus_ftp_control_structure_e
Definition: globus_ftp_control.h:225
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_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:3023
globus_ftp_control_parallelism_mode_e
Definition: globus_ftp_control.h:236
Definition: globus_ftp_control.h:88
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
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
globus_ftp_control_delay_passive_t
Definition: globus_ftp_control.h:200
union globus_ftp_control_dcau_u globus_ftp_control_dcau_t
Control DCAU union.
Definition: globus_ftp_control.h:341
Definition: globus_ftp_control.h:86
struct globus_fifo_s * globus_fifo_t
Definition: globus_fifo.h:48
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
Definition: globus_ftp_control.h:84
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
Definition: globus_ftp_control.h:188
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:5846
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:3464
Definition: globus_ftp_control.h:192
Definition: globus_ftp_control.h:110
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:2469
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
Definition: globus_ftp_control.h:128
struct globus_ftp_control_dcau_subject_s globus_ftp_control_dcau_subject_t
Control DCAU subject authentication type.
Control tcpbuffer attribute structure.
Definition: globus_ftp_control.h:383
Control striping attribute union.
Definition: globus_ftp_control.h:210
int globus_handle_t
Handle abstract type.
Definition: globus_handle_table.h:57
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_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:5471
List data type.
Definition: globus_list.h:44
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
enum globus_ftp_control_structure_e globus_ftp_control_structure_t
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
GSS Assist Header.
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:4362
Definition: globus_ftp_control.h:104
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:2622
Automatically set the TCP buffer/window size.
Definition: globus_ftp_control.h:372
Mutex.
Definition: globus_thread.h:107
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:4414
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_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
Control striping round robin attribute structure.
Definition: globus_ftp_control.h:157
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
union globus_ftp_control_layout_u globus_ftp_control_layout_t
Control striping attribute union.
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_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
Definition: globus_ftp_control.h:90
globus_ftp_control_dcau_mode_e
GridFTP DCAU values.
Definition: globus_ftp_control.h:119
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_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_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
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_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:4702
union globus_ftp_control_parallelism_u globus_ftp_control_parallelism_t
Control parallelism attribute structure.
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
size_t globus_size_t
Standard size of memory objectThe globus_size_t is the size of a memory object. It is identical to si...
Definition: globus_types.h:48
enum globus_ftp_control_type_e globus_ftp_control_type_t
GridFTP TYPE values.
Don't change the TCP buffer/window size from the system default.
Definition: globus_ftp_control.h:353
Definition: globus_ftp_control.h:344
unsigned char globus_byte_t
Unsigned byte datatypeThis is used for byte-addressable arrays of arbitrary data which is not subject...
Definition: globus_types.h:85
void(* globus_ftp_control_server_callback_t)(void *callback_arg, struct globus_ftp_control_server_s *server_handle, globus_object_t *error)
Server callbackA function with this signature can be used as general callbacks for the GridFTP server...
Definition: globus_ftp_control.h:1028
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:7960
enum globus_ftp_control_parallelism_mode_e globus_ftp_control_parallelism_mode_t
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_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
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
struct globus_ftp_control_round_robin_s globus_ftp_control_round_robin_t
Control striping round robin attribute structure.
Definition: globus_ftp_control.h:190
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_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
Headers common to all of Globus.
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:4501
uint32_t globus_result_t
Definition: globus_types.h:99
globus_ftp_control_tcpbuffer_mode_e
Definition: globus_ftp_control.h:338
struct globus_ftp_control_tcpbuffer_automatic_s globus_ftp_control_tcpbuffer_automatic_t
Automatically set the TCP buffer/window size.
Definition: globus_ftp_control.h:194
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:3539
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:3611
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
enum globus_ftp_control_dcau_mode_e globus_ftp_control_dcau_mode_t
GridFTP DCAU values.
Definition: globus_ftp_control.h:102
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:3293
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
Set the TCP buffer/window size to a fixed value.
Definition: globus_ftp_control.h:362
Control DCAU subject authentication type.
Definition: globus_ftp_control.h:134
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_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:3950
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:3203
globus_ftp_control_type_e
GridFTP TYPE values.
Definition: globus_ftp_control.h:79
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:4299
union globus_ftp_control_tcpbuffer_t globus_ftp_control_tcpbuffer_t
Control tcpbuffer attribute structure.
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_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_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_striping_mode_e
GridFTP Striping Types.
Definition: globus_ftp_control.h:147
Handle Table for Reference Counting Data.
globus_ftp_control_mode_e
GridFTP MODE values.
Definition: globus_ftp_control.h:99
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:2769
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:6075
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_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
unsigned long globus_ftp_control_auth_requirements_t
Definition: globus_ftp_control.h:640
Authentication Values.
Definition: globus_ftp_control.h:483
Definition: globus_ftp_control.h:124
Control parallelism attribute structure.
Definition: globus_ftp_control.h:261
globus_ftp_control_protection_t
GridFTP Protection Types.
Definition: globus_ftp_control.h:185
Module Descriptor.
Definition: globus_module.h:71
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:2738