Grid Community Toolkit  6.2.1541705016
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 
79 {
91 
99 {
111 
119 {
129 
134 {
136  char * subject;
138 
147 {
148  GLOBUS_FTP_CONTROL_STRIPING_NONE,
149  GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED,
150  GLOBUS_FTP_CONTROL_STRIPING_BLOCKED_ROUND_ROBIN
152 
157 {
159  globus_size_t block_size;
161 
162 typedef struct globus_ftp_control_partitioned_s
163 {
165  globus_size_t size;
166 } globus_ftp_control_partitioned_t;
167 
172 {
176 
184 typedef enum
185 {
195 
199 typedef enum
200 {
201  GLOBUS_FTP_CONTROL_DELAYED_SINGLE_PASSIVE = 'S',
202  GLOBUS_FTP_CONTROL_DELAYED_STRIPED_PASSIVE = 'M',
203  GLOBUS_FTP_CONTROL_NORMAL_PASSIVE = 'N'
205 
210 {
213  globus_ftp_control_partitioned_t partitioned;
214  /*
215  * No data required for:
216  * GLOBUS_FTP_CONTROL_STRIPING_NONE
217  * GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED
218  */
220 
225 {
226  GLOBUS_FTP_CONTROL_STRUCTURE_NONE,
227  GLOBUS_FTP_CONTROL_STRUCTURE_FILE,
228  GLOBUS_FTP_CONTROL_STRUCTURE_PAGE,
229  GLOBUS_FTP_CONTROL_STRUCTURE_RECORD
231 
236 {
237  GLOBUS_FTP_CONTROL_PARALLELISM_NONE,
238  GLOBUS_FTP_CONTROL_PARALLELISM_FIXED
240 
241 /*
242  * The base class for all parallel types. Subtypes
243  * must first define all types in this structure.
244  */
245 typedef struct globus_i_ftp_parallelism_base_s
246 {
248  globus_size_t size;
249 } globus_i_ftp_parallelism_base_t;
250 
251 typedef struct globus_ftp_parallelism_fixed_s
252 {
254  globus_size_t size;
255 } globus_ftp_parallelism_fixed_t;
256 
261 {
263  globus_i_ftp_parallelism_base_t base;
264  globus_ftp_parallelism_fixed_t fixed;
266 
267 typedef struct globus_ftp_control_host_port_s
268 {
269  int host[16];
270  unsigned short port;
271 
272  /*
273  * if ipv6 is not enabled, the following param will be assumed to be 4
274  * when passed as an in-parameter. otherwise it must indicate the correct
275  * len.
276  *
277  * for out-parameters, the following will _always_ be 4 unless ipv6 is
278  * allowed. then it will be either 4 or 16
279  */
280  int hostlen;
281 } globus_ftp_control_host_port_t;
282 
308 #define GLOBUS_FTP_CONTROL_MODULE (&globus_i_ftp_control_module)
309 
310 extern globus_module_descriptor_t globus_i_ftp_control_module;
311 
312 #define _FCSL(s) globus_common_i18n_get_string(GLOBUS_FTP_CONTROL_MODULE,s)
313 /*
314  * Module Specific Data Types
315  */
316 typedef enum globus_ftp_control_response_class_e
317 {
318  GLOBUS_FTP_UNKNOWN_REPLY,
319  GLOBUS_FTP_POSITIVE_PRELIMINARY_REPLY,
320  GLOBUS_FTP_POSITIVE_COMPLETION_REPLY,
321  GLOBUS_FTP_POSITIVE_INTERMEDIATE_REPLY,
322  GLOBUS_FTP_TRANSIENT_NEGATIVE_COMPLETION_REPLY,
323  GLOBUS_FTP_PERMANENT_NEGATIVE_COMPLETION_REPLY
324 } globus_ftp_control_response_class_t;
325 
326 
327 typedef struct globus_ftp_control_response_s
328 {
329  int code;
330  globus_ftp_control_response_class_t response_class;
331  globus_byte_t * response_buffer;
332  globus_size_t response_length;
333  globus_size_t response_buffer_size;
334 } globus_ftp_control_response_t;
335 
338 {
341 
344 
348 
352 typedef struct
353 {
355 }
357 
361 typedef struct
362 {
364  int size;
365 }
367 
372 {
374  unsigned int initial_size;
375  unsigned int minimum_size;
376  unsigned int maximum_size;
378 
383 {
385  globus_ftp_control_tcpbuffer_default_t default_tcpbuffer;
389 
390 /*
391  * each strip can have multiple parallel connections to
392  * the same host
393  */
394 
395 typedef enum globus_ftp_data_connection_state_e
396 {
397  GLOBUS_FTP_DATA_STATE_NONE, /* dc_handle has no references */
398  GLOBUS_FTP_DATA_STATE_PASV, /* in local pasv mode */
399  GLOBUS_FTP_DATA_STATE_PORT, /* in local port mode */
400  GLOBUS_FTP_DATA_STATE_SPOR, /* in local spor mode */
401  GLOBUS_FTP_DATA_STATE_CONNECT_READ, /* connected for reading */
402  GLOBUS_FTP_DATA_STATE_CONNECT_WRITE, /* connected for writing */
403  GLOBUS_FTP_DATA_STATE_CLOSING, /* closing all connections */
404  GLOBUS_FTP_DATA_STATE_EOF, /* user has received eof */
405  GLOBUS_FTP_DATA_STATE_SEND_EOF /* not used for state at all */
406 } globus_ftp_data_connection_state_t;
407 
408 #define GLOBUS_FTP_CONTROL_READ_BUFFER_SIZE 1000
409 #define GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE 8192
410 
411 typedef enum
412 {
413  GLOBUS_FTP_CONTROL_UNCONNECTED,
414  GLOBUS_FTP_CONTROL_CONNECTING,
415  GLOBUS_FTP_CONTROL_CONNECTED,
416  GLOBUS_FTP_CONTROL_CLOSING
417 }
418 globus_ftp_cc_state_t;
419 
420 struct globus_ftp_control_handle_s;
421 struct globus_i_ftp_dc_transfer_handle_t;
422 
423 union globus_ftp_control_command_u;
424 
425 typedef enum globus_ftp_control_command_code_e
426 {
427  GLOBUS_FTP_CONTROL_COMMAND_OPTS,
428  GLOBUS_FTP_CONTROL_COMMAND_AUTH,
429  GLOBUS_FTP_CONTROL_COMMAND_ADAT,
430  GLOBUS_FTP_CONTROL_COMMAND_SPAS,
431  GLOBUS_FTP_CONTROL_COMMAND_SPOR,
432  GLOBUS_FTP_CONTROL_COMMAND_PORT,
433  GLOBUS_FTP_CONTROL_COMMAND_PASV,
434  GLOBUS_FTP_CONTROL_COMMAND_SITE,
435  GLOBUS_FTP_CONTROL_COMMAND_TYPE,
436  GLOBUS_FTP_CONTROL_COMMAND_DELE,
437  GLOBUS_FTP_CONTROL_COMMAND_FEAT,
438  GLOBUS_FTP_CONTROL_COMMAND_ERET,
439  GLOBUS_FTP_CONTROL_COMMAND_ESTO,
440  GLOBUS_FTP_CONTROL_COMMAND_RMD,
441  GLOBUS_FTP_CONTROL_COMMAND_MKD,
442  GLOBUS_FTP_CONTROL_COMMAND_PWD,
443  GLOBUS_FTP_CONTROL_COMMAND_CWD,
444  GLOBUS_FTP_CONTROL_COMMAND_CDUP,
445  GLOBUS_FTP_CONTROL_COMMAND_NLST,
446  GLOBUS_FTP_CONTROL_COMMAND_HELP,
447  GLOBUS_FTP_CONTROL_COMMAND_STAT,
448  GLOBUS_FTP_CONTROL_COMMAND_NOOP,
449  GLOBUS_FTP_CONTROL_COMMAND_SYST,
450  GLOBUS_FTP_CONTROL_COMMAND_STOU,
451  GLOBUS_FTP_CONTROL_COMMAND_QUIT,
452  GLOBUS_FTP_CONTROL_COMMAND_REIN,
453  GLOBUS_FTP_CONTROL_COMMAND_ABOR,
454  GLOBUS_FTP_CONTROL_COMMAND_ALLO,
455  GLOBUS_FTP_CONTROL_COMMAND_MODE,
456  GLOBUS_FTP_CONTROL_COMMAND_STRU,
457  GLOBUS_FTP_CONTROL_COMMAND_ACCT,
458  GLOBUS_FTP_CONTROL_COMMAND_PASS,
459  GLOBUS_FTP_CONTROL_COMMAND_USER,
460  GLOBUS_FTP_CONTROL_COMMAND_SMNT,
461  GLOBUS_FTP_CONTROL_COMMAND_LIST,
462  GLOBUS_FTP_CONTROL_COMMAND_RETR,
463  GLOBUS_FTP_CONTROL_COMMAND_REST,
464  GLOBUS_FTP_CONTROL_COMMAND_SBUF,
465  GLOBUS_FTP_CONTROL_COMMAND_SIZE,
466  GLOBUS_FTP_CONTROL_COMMAND_STOR,
467  GLOBUS_FTP_CONTROL_COMMAND_APPE,
468  GLOBUS_FTP_CONTROL_COMMAND_RNFR,
469  GLOBUS_FTP_CONTROL_COMMAND_RNTO,
470  GLOBUS_FTP_CONTROL_COMMAND_LANG,
471  GLOBUS_FTP_CONTROL_COMMAND_UNKNOWN
472 } globus_ftp_control_command_code_t;
473 
483 {
484  globus_bool_t authenticated;
485  globus_ftp_control_command_code_t prev_cmd;
486  char * auth_gssapi_subject;
487  gss_ctx_id_t auth_gssapi_context;
488  gss_cred_id_t credential_handle;
489  globus_bool_t locally_acquired_credential;
490  gss_name_t target_name;
491  OM_uint32 req_flags;
492  char * user;
493  char * password;
494  char * account;
495  gss_cred_id_t delegated_credential_handle;
496  globus_bool_t encrypt;
497 }
499 
500 
501 
526  void * callback_arg,
527  struct globus_ftp_control_handle_s * handle,
528  globus_object_t * error,
529  globus_ftp_control_response_t * ftp_response);
530 
546  void * callback_arg,
547  struct globus_ftp_control_handle_s * handle,
548  globus_object_t * error);
549 
550 
551 typedef void
552 (*globus_ftp_control_data_connect_callback_t)(
553  void * callback_arg,
554  struct globus_ftp_control_handle_s * handle,
555  unsigned int stripe_ndx,
556  globus_bool_t reused,
557  globus_object_t * error);
558 
587  void * callback_arg,
588  struct globus_ftp_control_handle_s * handle,
589  globus_object_t * error,
590  union globus_ftp_control_command_u * command);
591 
615 typedef void
617  void * callback_arg,
618  struct globus_ftp_control_handle_s * handle,
619  globus_object_t * error,
620  globus_ftp_control_auth_info_t * auth_result);
621 
633 
634 #define GLOBUS_FTP_CONTROL_AUTH_REQ_NONE 1
635 #define GLOBUS_FTP_CONTROL_AUTH_REQ_GSSAPI 2
636 #define GLOBUS_FTP_CONTROL_AUTH_REQ_USER 4
637 #define GLOBUS_FTP_CONTROL_AUTH_REQ_PASS 8
638 #define GLOBUS_FTP_CONTROL_AUTH_REQ_ACCT 16
639 #define GLOBUS_FTP_CONTROL_AUTH_REQ_TLS 32
640 
641 typedef struct globus_ftp_control_rw_queue_element_s
642 {
644  globus_ftp_control_callback_t send_response_cb;
645  void * arg;
646  globus_byte_t * write_buf;
647  int write_flags;
648  globus_io_write_callback_t write_callback;
649  globus_io_read_callback_t read_callback;
650  globus_bool_t expect_response;
651 }
652 globus_ftp_control_rw_queue_element_t;
653 
654 typedef struct globus_ftp_cc_handle_s
655 {
656  globus_io_attr_t io_attr;
657  globus_netlogger_handle_t nl_handle;
658  globus_bool_t nl_handle_set;
659 
660  globus_fifo_t readers;
661  globus_fifo_t writers;
663  void * command_cb_arg;
664 
665  /* callback and arg for accept */
667  void * accept_cb_arg;
668 
670  void * auth_cb_arg;
671  globus_ftp_control_auth_requirements_t auth_requirements;
672  globus_ftp_control_response_t response;
673  globus_byte_t * read_buffer;
674  globus_size_t read_buffer_size;
675  globus_size_t bytes_read;
677  globus_bool_t use_auth;
678  globus_io_handle_t io_handle;
679  globus_ftp_cc_state_t cc_state;
680  char serverhost[MAXHOSTNAMELEN];
681  struct hostent server;
682  char server_buffer[
683  GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE];
684  globus_list_t * list_elem;
685 
686  globus_mutex_t mutex;
687  globus_bool_t do_close;
688  int cb_count;
690  void * close_cb_arg;
691  globus_object_t * close_result;
692  globus_ftp_control_response_t quit_response;
693  globus_bool_t signal_deactivate;
694 }
695 globus_ftp_cc_handle_t;
696 
697 struct globus_ftp_control_data_write_info_s;
698 
699 typedef globus_result_t (*globus_ftp_control_layout_func_t)(
700  struct globus_ftp_control_handle_s * handle,
701  struct globus_ftp_control_data_write_info_s * data_info,
702  globus_byte_t * buffer,
703  globus_size_t length,
704  globus_off_t offset,
705  globus_bool_t eof,
706  int stripe_count,
707  char * enqueue_str,
708  void * user_arg);
709 
710 typedef globus_result_t (*globus_ftp_control_layout_verify_func_t)(
711  char * enqueue_str);
712 
713 typedef struct globus_i_ftp_dc_handle_s
714 {
715  char magic[32];
716 
718  unsigned long pbsz;
720 
721  globus_ftp_data_connection_state_t state;
722 
726  int tcp_buffer_size;
727  int form_code;
729 
730  globus_io_attr_t io_attr;
731  char * interface_addr;
732 
733  struct globus_i_ftp_dc_transfer_handle_s * transfer_handle;
734  globus_list_t * transfer_list;
735  globus_bool_t send_eof;
736 
737  globus_ftp_control_layout_func_t layout_func;
739  char * layout_str;
740  void * layout_user_arg;
741 
742  globus_bool_t initialized;
743  globus_mutex_t mutex;
744 
745  globus_ftp_control_callback_t close_callback;
746  void * close_callback_arg;
747 
748  globus_netlogger_handle_t nl_io_handle;
749  globus_bool_t nl_io_handle_set;
750 
751  globus_netlogger_handle_t nl_ftp_handle;
752  globus_bool_t nl_ftp_handle_set;
753 
754  globus_object_t * connect_error;
755  struct globus_ftp_control_handle_s * whos_my_daddy;
756 } globus_i_ftp_dc_handle_t;
757 
758 typedef struct globus_ftp_control_handle_s
759 {
760  struct globus_i_ftp_dc_handle_s dc_handle;
761  struct globus_ftp_cc_handle_s cc_handle;
762 } globus_ftp_control_handle_t;
763 
764 
811  void * callback_arg,
812  globus_ftp_control_handle_t * handle,
813  globus_object_t * error,
814  globus_byte_t * buffer,
815  globus_size_t length,
816  globus_off_t offset,
817  globus_bool_t eof);
818 
819 typedef struct globus_ftp_control_data_write_info_s
820 {
822  void * cb_arg;
823  globus_handle_t callback_table_handle;
824 } globus_ftp_control_data_write_info_t;
825 
827 globus_ftp_control_layout_register_func(
828  char * name,
829  globus_ftp_control_layout_func_t enqueue_func,
830  globus_ftp_control_layout_verify_func_t verify_func);
831 
833 globus_X_ftp_control_local_layout(
834  globus_ftp_control_handle_t * handle,
835  char * enqueue_str,
836  void * user_arg);
837 
840  globus_ftp_control_handle_t * handle,
842  globus_size_t data_size);
843 
844 /*
845  * NET LOGGER STUFF
846  */
848 globus_ftp_control_set_netlogger(
849  globus_ftp_control_handle_t * handle,
850  globus_netlogger_handle_t * nl_handle,
851  globus_bool_t nl_ftp_control,
852  globus_bool_t nl_globus_io);
853 
856  globus_ftp_control_handle_t * handle,
857  const char * interface_addr);
858 
860 globus_i_ftp_control_data_set_stack(
861  globus_ftp_control_handle_t * handle,
862  globus_xio_stack_t stack);
863 
865 globus_i_ftp_control_data_get_attr(
866  globus_ftp_control_handle_t * handle,
867  globus_xio_attr_t * attr);
868 
870 globus_i_ftp_control_client_get_attr(
871  globus_ftp_control_handle_t * handle,
872  globus_xio_attr_t * attr);
873 
875 globus_i_ftp_control_client_set_stack(
876  globus_ftp_control_handle_t * handle,
877  globus_xio_stack_t stack);
878 
880 globus_i_ftp_control_load_xio_drivers(
881  char * driver_string,
882  globus_list_t ** driver_list);
883 
884 void
885 globus_i_ftp_control_unload_xio_drivers(
886  globus_list_t * driver_list);
887 
889 globus_i_ftp_control_create_stack(
890  globus_ftp_control_handle_t * handle,
891  globus_list_t * driver_list,
892  globus_xio_stack_t * stack);
893 
894 
895 
896 /*****************************************************************
897  * standard layout functions
898  ****************************************************************/
899 /*
900  * blocked functions
901  */
903 globus_ftp_control_layout_blocked_verify(
904  char * layout_str);
905 
906 void *
907 globus_ftp_control_layout_blocked_user_arg_create();
908 
909 void
910 globus_ftp_control_layout_blocked_user_arg_destroy(
911  void * user_arg);
912 
914 globus_ftp_control_layout_blocked(
915  globus_ftp_control_handle_t * handle,
916  globus_ftp_control_data_write_info_t * data_info,
917  globus_byte_t * buffer,
918  globus_size_t length,
919  globus_off_t in_offset,
920  globus_bool_t eof,
921  int stripe_count,
922  char * enqueue_str,
923  void * user_arg);
924 
925 /*
926  * partitioned functions
927  */
929 globus_ftp_control_layout_partitioned_verify(
930  char * layout_str);
931 
932 void *
933 globus_ftp_control_layout_partitioned_user_arg_create(
934  globus_size_t file_size);
935 
936 void
937 globus_ftp_control_layout_partitioned_user_arg_destroy(
938  void * user_arg);
939 
941 globus_ftp_control_layout_partitioned(
942  globus_ftp_control_handle_t * handle,
943  globus_ftp_control_data_write_info_t * data_info,
944  globus_byte_t * buffer,
945  globus_size_t length,
946  globus_off_t in_offset,
947  globus_bool_t eof,
948  int stripe_count,
949  char * enqueue_str,
950  void * user_arg);
951 
952 /*
953  * data registration functions
954  */
957  globus_ftp_control_handle_t * handle,
958  globus_ftp_control_data_write_info_t * data_info,
959  globus_byte_t * buffer,
960  globus_size_t length,
961  globus_off_t offset,
962  globus_bool_t eof,
964  void * callback_arg);
965 
968  globus_ftp_control_handle_t * handle,
969  globus_ftp_control_data_write_info_t * data_info);
970 
973  globus_ftp_control_handle_t * handle,
974  globus_byte_t * buffer,
975  globus_size_t length,
976  globus_off_t offset,
977  globus_bool_t eof,
978  int stripe_ndx,
980  void * callback_arg);
981 
984  globus_ftp_control_handle_t * handle,
985  globus_byte_t * buffer,
986  globus_size_t length,
987  globus_off_t offset,
988  globus_bool_t eof,
989  int stripe_ndx,
990  globus_ftp_control_data_write_info_t * data_info);
991 
992 
993 /*
994  * Server API callbacks
995  * ----------------------------------------------------------------
996  */
997 
1003 struct globus_ftp_control_server_s;
1004 
1021  void * callback_arg,
1022  struct globus_ftp_control_server_s * server_handle,
1023  globus_object_t * error);
1024 
1025 
1026 typedef enum globus_ftp_control_server_state_n
1027 {
1028  GLOBUS_FTP_CONTROL_SERVER_LISTENING,
1029  GLOBUS_FTP_CONTROL_SERVER_DEAF
1030 }
1031 globus_ftp_control_server_state_t;
1032 
1033 typedef struct globus_ftp_control_server_s
1034 {
1035  globus_io_handle_t io_handle;
1036  globus_ftp_control_server_state_t state;
1038  void * callback_arg;
1039  globus_list_t * list_elem;
1040  globus_mutex_t mutex;
1041 } globus_ftp_control_server_t;
1042 
1043 
1044 
1045 typedef struct globus_ftp_control_command_str_s
1046 {
1047  globus_ftp_control_command_code_t code;
1048  char * raw_command;
1049  char * string_arg;
1050 } globus_ftp_control_command_str_t;
1051 
1052 /*
1053  * complex commands
1054  */
1055 
1056 typedef struct globus_ftp_control_command_stru_s
1057 {
1058  globus_ftp_control_command_code_t code;
1059  char * raw_command;
1060  globus_ftp_control_structure_t structure;
1061 } globus_ftp_control_command_stru_t;
1062 
1063 typedef struct globus_ftp_control_command_port_s
1064 {
1065  globus_ftp_control_command_code_t code;
1066  char * raw_command;
1067  globus_ftp_control_host_port_t host_port;
1068 } globus_ftp_control_command_port_t;
1069 
1070 typedef struct globus_ftp_control_command_spor_s
1071 {
1072  globus_ftp_control_command_code_t code;
1073  char * raw_command;
1074  int num_args;
1075  globus_ftp_control_host_port_t * host_port;
1076 } globus_ftp_control_command_spor_t;
1077 
1078 typedef struct globus_ftp_control_command_mode_s
1079 {
1080  globus_ftp_control_command_code_t code;
1081  char * raw_command;
1083 } globus_ftp_control_command_mode_t;
1084 
1085 typedef struct globus_ftp_control_command_allo_s
1086 {
1087  globus_ftp_control_command_code_t code;
1088  char * raw_command;
1089  int size;
1090  int record_size;
1091 } globus_ftp_control_command_allo_t;
1092 
1093 typedef struct globus_ftp_control_command_sbuf_s
1094 {
1095  globus_ftp_control_command_code_t code;
1096  char * raw_command;
1097  int buffer_size;
1098 } globus_ftp_control_command_sbuf_t;
1099 /*
1100 
1101 Can't parse marker unless I know state
1102 
1103 typedef struct globus_ftp_control_command_rest_s
1104 {
1105 } globus_ftp_control_command_rest_t;
1106 
1107 */
1108 
1109 typedef enum globus_ftp_control_type_option_e
1110 {
1111  GLOBUS_FTP_CONTROL_TYPE_NO_OPTION,
1112  GLOBUS_FTP_CONTROL_TYPE_OPTION_N,
1113  GLOBUS_FTP_CONTROL_TYPE_OPTION_T,
1114  GLOBUS_FTP_CONTROL_TYPE_OPTION_C
1115 } globus_ftp_control_type_option_t;
1116 
1117 typedef struct globus_ftp_control_command_type_s
1118 {
1119  globus_ftp_control_command_code_t code;
1120  char * raw_command;
1122  globus_ftp_control_type_option_t option;
1123  unsigned int bytesize;
1124 } globus_ftp_control_command_type_t;
1125 
1126 typedef enum globus_ftp_control_auth_type_e
1127 {
1128  GLOBUS_FTP_CONTROL_AUTH_GSSAPI,
1129  GLOBUS_FTP_CONTROL_AUTH_UNKNOWN
1130 } globus_ftp_control_auth_type_t;
1131 
1132 typedef struct globus_ftp_control_command_auth_s
1133 {
1134  globus_ftp_control_command_code_t code;
1135  char * raw_command;
1136  globus_ftp_control_auth_type_t type;
1137 } globus_ftp_control_command_auth_t;
1138 
1139 typedef struct globus_ftp_control_command_opts_s
1140 {
1141  globus_ftp_control_command_code_t code;
1142  char * raw_command;
1143  char * cmd_name;
1144  char * cmd_opts;
1145 } globus_ftp_control_command_opts_t;
1146 
1147 /*
1148  * single string commands
1149  */
1150 
1151 typedef globus_ftp_control_command_str_t
1152 globus_ftp_control_command_site_t;
1153 
1154 typedef globus_ftp_control_command_str_t
1155 globus_ftp_control_command_acct_t;
1156 
1157 typedef globus_ftp_control_command_str_t
1158 globus_ftp_control_command_cwd_t;
1159 
1160 typedef globus_ftp_control_command_str_t
1161 globus_ftp_control_command_cdup_t;
1162 
1163 typedef globus_ftp_control_command_str_t
1164 globus_ftp_control_command_pass_t;
1165 
1166 typedef globus_ftp_control_command_str_t
1167 globus_ftp_control_command_user_t;
1168 
1169 typedef globus_ftp_control_command_str_t
1170 globus_ftp_control_command_smnt_t;
1171 
1172 typedef globus_ftp_control_command_str_t
1173 globus_ftp_control_command_list_t;
1174 
1175 typedef globus_ftp_control_command_str_t
1176 globus_ftp_control_command_retr_t;
1177 
1178 typedef globus_ftp_control_command_str_t
1179 globus_ftp_control_command_size_t;
1180 
1181 typedef globus_ftp_control_command_str_t
1182 globus_ftp_control_command_stor_t;
1183 
1184 typedef globus_ftp_control_command_str_t
1185 globus_ftp_control_command_appe_t;
1186 
1187 typedef globus_ftp_control_command_str_t
1188 globus_ftp_control_command_rnfr_t;
1189 
1190 typedef globus_ftp_control_command_str_t
1191 globus_ftp_control_command_rnto_t;
1192 
1193 typedef globus_ftp_control_command_str_t
1194 globus_ftp_control_command_feat_t;
1195 
1196 typedef globus_ftp_control_command_str_t
1197 globus_ftp_control_command_dele_t;
1198 
1199 typedef globus_ftp_control_command_str_t
1200 globus_ftp_control_command_rmd_t;
1201 
1202 typedef globus_ftp_control_command_str_t
1203 globus_ftp_control_command_mkd_t;
1204 
1205 typedef globus_ftp_control_command_str_t
1206 globus_ftp_control_command_nlst_t;
1207 
1208 typedef globus_ftp_control_command_str_t
1209 globus_ftp_control_command_help_t;
1210 
1211 typedef globus_ftp_control_command_str_t
1212 globus_ftp_control_command_stou_t;
1213 
1214 typedef globus_ftp_control_command_str_t
1215 globus_ftp_control_command_rest_t;
1216 
1217 typedef globus_ftp_control_command_str_t
1218 globus_ftp_control_command_eret_t;
1219 
1220 typedef globus_ftp_control_command_str_t
1221 globus_ftp_control_command_esto_t;
1222 
1223 /*
1224  * no string commands
1225  */
1226 typedef globus_ftp_control_command_str_t
1227 globus_ftp_control_command_pasv_t;
1228 
1229 typedef globus_ftp_control_command_str_t
1230 globus_ftp_control_command_spas_t;
1231 
1232 typedef globus_ftp_control_command_str_t
1233 globus_ftp_control_command_stat_t;
1234 
1235 typedef globus_ftp_control_command_str_t
1236 globus_ftp_control_command_noop_t;
1237 
1238 typedef globus_ftp_control_command_str_t
1239 globus_ftp_control_command_syst_t;
1240 
1241 typedef globus_ftp_control_command_str_t
1242 globus_ftp_control_command_quit_t;
1243 
1244 typedef globus_ftp_control_command_str_t
1245 globus_ftp_control_command_rein_t;
1246 
1247 typedef globus_ftp_control_command_str_t
1248 globus_ftp_control_command_abor_t;
1249 
1250 typedef globus_ftp_control_command_str_t
1251 globus_ftp_control_command_pwd_t;
1252 
1253 typedef globus_ftp_control_command_str_t
1254 globus_ftp_control_command_adat_t;
1255 
1256 
1257 
1258 
1259 typedef union globus_ftp_control_command_u
1260 {
1261  globus_ftp_control_command_code_t code;
1262  globus_ftp_control_command_site_t site;
1263  globus_ftp_control_command_sbuf_t sbuf;
1264  globus_ftp_control_command_type_t type;
1265  globus_ftp_control_command_rest_t rest;
1266  globus_ftp_control_command_allo_t allo;
1267  globus_ftp_control_command_eret_t eret;
1268  globus_ftp_control_command_esto_t esto;
1269  globus_ftp_control_command_mode_t mode;
1270  globus_ftp_control_command_port_t port;
1271  globus_ftp_control_command_spor_t spor;
1272  globus_ftp_control_command_stru_t stru;
1273  globus_ftp_control_command_auth_t auth;
1274 
1275  globus_ftp_control_command_adat_t adat;
1276  globus_ftp_control_command_acct_t acct;
1277  globus_ftp_control_command_cwd_t cwd;
1278  globus_ftp_control_command_cdup_t cdup;
1279  globus_ftp_control_command_pass_t pass;
1280  globus_ftp_control_command_user_t user;
1281  globus_ftp_control_command_smnt_t smnt;
1282  globus_ftp_control_command_opts_t opts;
1283  globus_ftp_control_command_list_t list;
1284  globus_ftp_control_command_retr_t retr;
1285  globus_ftp_control_command_size_t size;
1286  globus_ftp_control_command_stor_t stor;
1287  globus_ftp_control_command_appe_t appe;
1288  globus_ftp_control_command_rnfr_t rnfr;
1289  globus_ftp_control_command_rnto_t rnto;
1290  globus_ftp_control_command_dele_t dele;
1291  globus_ftp_control_command_feat_t feat;
1292  globus_ftp_control_command_rmd_t rmd;
1293  globus_ftp_control_command_mkd_t mkd;
1294  globus_ftp_control_command_nlst_t nlst;
1295  globus_ftp_control_command_help_t help;
1296 
1297  globus_ftp_control_command_pasv_t pasv;
1298  globus_ftp_control_command_spas_t spas;
1299  globus_ftp_control_command_stat_t stat;
1300  globus_ftp_control_command_noop_t noop;
1301  globus_ftp_control_command_syst_t syst;
1302  globus_ftp_control_command_stou_t stou;
1303  globus_ftp_control_command_quit_t quit;
1304  globus_ftp_control_command_rein_t rein;
1305  globus_ftp_control_command_abor_t abor;
1306  globus_ftp_control_command_pwd_t pwd;
1307 
1308  globus_ftp_control_command_str_t base;
1309 } globus_ftp_control_command_t;
1310 
1311 
1312 typedef struct globus_ftp_data_server_s
1313 {
1314  int bogus;
1315 } globus_ftp_data_server_t;
1316 
1324  globus_ftp_control_auth_info_t * auth_info,
1325  gss_cred_id_t credential_handle,
1326  globus_bool_t encrypt,
1327  char * user,
1328  char * password,
1329  char * account,
1330  char * subject);
1331 
1332 int
1334  globus_ftp_control_auth_info_t * auth_info_1,
1335  globus_ftp_control_auth_info_t * auth_info_2);
1336 
1339  globus_ftp_control_handle_t * handle);
1340 
1343  globus_ftp_control_handle_t * handle);
1344 
1347  globus_ftp_control_server_t * handle);
1348 
1351  globus_ftp_control_server_t * handle);
1352 
1355  globus_ftp_control_response_t * response);
1356 
1359  globus_ftp_control_response_t * src,
1360  globus_ftp_control_response_t * dest);
1361 
1362 
1365  globus_ftp_control_handle_t * handle,
1366  char * host,
1367  unsigned short port,
1369  void * callback_arg);
1370 
1371 
1373 globus_ftp_control_use_tls(
1374  globus_ftp_control_handle_t * handle,
1375  globus_ftp_control_auth_info_t * auth_info);
1376 
1379  globus_ftp_control_handle_t * handle,
1380  globus_ftp_control_auth_info_t * auth_info,
1381  globus_bool_t use_auth,
1383  void * callback_arg);
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,
1397  void * callback_arg);
1398 
1401  globus_ftp_control_handle_t * handle,
1403  void * callback_arg);
1404 
1407  globus_ftp_control_handle_t * handle,
1409  void * callback_arg);
1410 
1411 
1414  globus_ftp_control_handle_t * handle,
1415  const char * cmdspec,
1417  void * callback_arg,
1418  ...);
1419 
1422  globus_ftp_control_handle_t * handle,
1423  unsigned long bufsize);
1424 
1427  globus_ftp_control_handle_t * handle,
1428  unsigned long * bufsize);
1429 
1430 /* globus_ftp_control_server.c */
1433  globus_ftp_control_server_t * handle,
1434  unsigned short * port,
1436  void * callback_arg);
1437 
1440  globus_ftp_control_server_t * handle,
1441  globus_io_attr_t * attr,
1442  unsigned short * port,
1444  void * callback_arg);
1445 
1448  globus_ftp_control_server_t * listener,
1450  void * callback_arg);
1451 
1454  globus_ftp_control_server_t * listener,
1455  globus_ftp_control_handle_t * handle,
1457  void * callback_arg);
1458 
1461  globus_ftp_control_handle_t * handle,
1462  globus_ftp_control_auth_requirements_t auth_requirements,
1464  void * callback_arg);
1465 
1468  globus_ftp_control_handle_t * handle,
1470  void * callback_arg);
1471 
1474  globus_ftp_control_handle_t * handle,
1475  const char * respspec,
1477  void * callback_arg,
1478  ...);
1479 
1481 globus_ftp_control_close(
1482  globus_ftp_control_server_t * listener,
1484  void * callback_arg);
1485 
1487 globus_ftp_data_close(
1488  globus_ftp_data_server_t * listener,
1490  void * callback_arg);
1491 
1492 int
1493  globus_i_ftp_queue_size(
1494  globus_ftp_control_handle_t * handle,
1495  int stripe_ndx);
1496 
1497 /* command object functions */
1500  globus_ftp_control_command_t * dest,
1501  globus_ftp_control_command_t * src);
1502 
1505  globus_ftp_control_command_t * command,
1506  char * raw_command,
1507  globus_ftp_control_auth_info_t * auth_info);
1508 
1511  globus_ftp_control_command_t * command);
1512 
1519 globus_i_ftp_control_data_cc_init(
1520  globus_ftp_control_handle_t * control_handle);
1521 
1523 globus_i_ftp_control_data_cc_destroy(
1524  globus_ftp_control_handle_t * control_handle);
1525 
1528  globus_ftp_control_handle_t * control_handle,
1529  globus_ftp_control_callback_t destroy_callback,
1530  void * destroy_callback_arg);
1531 
1534  globus_ftp_control_handle_t * handle,
1535  globus_bool_t send_eof);
1536 
1539  globus_ftp_control_handle_t * handle,
1540  int count[],
1541  int array_size,
1542  globus_bool_t eof_message,
1544  void * user_arg);
1545 
1547 globus_ftp_control_get_stripe_count(
1548  globus_ftp_control_handle_t * handle,
1549  int * stripe_count);
1550 
1553  globus_ftp_control_handle_t * handle,
1554  globus_ftp_control_data_connect_callback_t callback,
1555  void * user_arg);
1556 
1559  globus_ftp_control_handle_t * handle,
1560  globus_ftp_control_data_connect_callback_t callback,
1561  void * user_arg);
1562 
1565  globus_ftp_control_handle_t * handle,
1566  unsigned int num_channels,
1567  unsigned int stripe);
1568 
1571  globus_ftp_control_handle_t * handle,
1572  unsigned int num_channels,
1573  unsigned int stripe);
1574 
1577  globus_ftp_control_handle_t * handle,
1578  unsigned int * num_channels,
1579  unsigned int stripe);
1580 
1583  globus_ftp_control_handle_t * handle,
1584  unsigned int * num_channels,
1585  unsigned int stripe_ndx);
1586 
1588 globus_ftp_control_data_get_remote_hosts(
1589  globus_ftp_control_handle_t * handle,
1590  globus_ftp_control_host_port_t * address,
1591  int * addr_count);
1592 
1594 globus_ftp_control_get_parallelism(
1595  globus_ftp_control_handle_t * handle,
1596  globus_ftp_control_parallelism_t * parallelism);
1597 
1600  globus_ftp_control_handle_t * handle,
1601  globus_ftp_control_parallelism_t * parallelism);
1602 
1605  globus_ftp_control_handle_t * handle,
1606  globus_ftp_control_host_port_t * address);
1607 
1610  globus_ftp_control_handle_t * handle,
1611  globus_ftp_control_host_port_t addresses[],
1612  unsigned int num_addresses);
1613 
1616  globus_ftp_control_handle_t * handle,
1617  globus_ftp_control_host_port_t * address);
1618 
1621  globus_ftp_control_handle_t * handle,
1622  globus_ftp_control_host_port_t addresses[],
1623  unsigned int num_addresses);
1624 
1626 globus_ftp_control_get_spor(
1627  globus_ftp_control_handle_t * handle,
1628  globus_ftp_control_host_port_t addresses[],
1629  unsigned int * num_addresses);
1630 
1633  globus_ftp_control_handle_t * handle,
1635  int form_code);
1636 
1639  globus_ftp_control_handle_t * handle,
1640  globus_ftp_control_tcpbuffer_t * tcp_buffer);
1641 
1644  globus_ftp_control_handle_t * handle,
1646 
1648 globus_ftp_control_get_mode(
1649  globus_ftp_control_handle_t * handle,
1650  globus_ftp_control_mode_t * mode);
1651 
1653 globus_ftp_control_get_type(
1654  globus_ftp_control_handle_t * handle,
1655  globus_ftp_control_type_t * type);
1656 
1659  globus_ftp_control_handle_t * handle,
1660  const globus_ftp_control_dcau_t * dcau,
1661  gss_cred_id_t delegated_credential_handle);
1662 
1664 globus_ftp_control_get_dcau(
1665  globus_ftp_control_handle_t * handle,
1666  globus_ftp_control_dcau_t * dcau);
1667 
1669 globus_ftp_control_local_prot(
1670  globus_ftp_control_handle_t * handle,
1671  globus_ftp_control_protection_t protection);
1672 
1674 globus_ftp_control_get_prot(
1675  globus_ftp_control_handle_t * handle,
1676  globus_ftp_control_protection_t * protection);
1677 
1680  globus_ftp_control_handle_t * handle,
1681  globus_ftp_control_structure_t structure);
1682 
1685  globus_ftp_control_handle_t * handle,
1686  globus_byte_t * buffer,
1687  globus_size_t length,
1688  globus_off_t offset,
1689  globus_bool_t eof,
1691  void * callback_arg);
1692 
1695  globus_ftp_control_handle_t * handle,
1696  globus_byte_t * buffer,
1697  globus_size_t max_length,
1699  void * callback_arg);
1700 
1702 globus_ftp_control_data_read_all(
1703  globus_ftp_control_handle_t * handle,
1704  globus_byte_t * buffer,
1705  globus_size_t length,
1707  void * callback_arg);
1708 
1711  globus_ftp_control_handle_t * handle,
1712  globus_bool_t order_data,
1713  globus_off_t starting_offset);
1714 
1715 /* this has only been tested enough for the client library and GridFTP server
1716  * it is very likely to not work for general usage
1717  */
1720  globus_ftp_control_handle_t * handle,
1721  globus_bool_t allow);
1722 
1723 /*
1724  * internal function definitions
1725  */
1727 globus_i_ftp_parallelism_copy(
1728  globus_ftp_control_parallelism_t * dest_parallelism,
1729  globus_ftp_control_parallelism_t * src_parallelism);
1730 
1731 int
1732 globus_i_ftp_parallelism_get_size(
1733  globus_ftp_control_parallelism_t * parallelism);
1734 
1735 int
1736 globus_i_ftp_parallelism_get_min_size(
1737  globus_ftp_control_parallelism_t * parallelism);
1738 
1739 int
1740 globus_i_ftp_parallelism_get_max_size(
1741  globus_ftp_control_parallelism_t * parallelism);
1742 
1743 void
1744 globus_ftp_control_host_port_init(
1745  globus_ftp_control_host_port_t * host_port,
1746  char * host,
1747  unsigned short port);
1748 
1749 void
1750 globus_ftp_control_host_port_destroy(
1751  globus_ftp_control_host_port_t * host_port);
1752 
1753 void
1754 globus_ftp_control_host_port_get_host(
1755  globus_ftp_control_host_port_t * host_port,
1756  char * host);
1757 
1758 unsigned short
1759 globus_ftp_control_host_port_get_port(
1760  globus_ftp_control_host_port_t * host_port);
1761 
1762 void
1763 globus_ftp_control_host_port_copy(
1764  globus_ftp_control_host_port_t * dest,
1765  globus_ftp_control_host_port_t * src);
1766 
1767 #define globus_i_ftp_control_client_get_connection_info \
1768  globus_ftp_control_client_get_connection_info
1770 globus_ftp_control_client_get_connection_info(
1771  globus_ftp_control_handle_t * handle,
1772  int localhost[4],
1773  unsigned short * localport,
1774  int remotehost[4],
1775  unsigned short * remoteport);
1776 
1779  globus_ftp_control_handle_t * handle,
1780  globus_ftp_control_host_port_t * local_info,
1781  globus_ftp_control_host_port_t * remote_info);
1782 
1784 globus_ftp_control_data_get_socket_buf(
1785  globus_ftp_control_handle_t * handle,
1786  int * rcvbuf,
1787  int * sndbuf);
1788 
1790 globus_ftp_control_data_get_retransmit_count(
1791  globus_ftp_control_handle_t * handle,
1792  char ** retransmit_count);
1793 
1794 #ifdef __cplusplus
1795 }
1796 #endif
1797 
1798 
1799 #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
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:586
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:125
Definition: globus_ftp_control.h:121
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
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:616
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:5951
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
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:525
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
Definition: globus_ftp_control.h:107
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:5754
Definition: globus_ftp_control.h:346
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:105
Definition: globus_ftp_control.h:81
Control DCAU union.
Definition: globus_ftp_control.h:171
globus_ftp_control_structure_e
Definition: globus_ftp_control.h:224
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:235
Definition: globus_ftp_control.h:87
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:199
union globus_ftp_control_dcau_u globus_ftp_control_dcau_t
Control DCAU union.
Definition: globus_ftp_control.h:340
Definition: globus_ftp_control.h:85
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:83
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:810
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:187
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:5853
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:191
Definition: globus_ftp_control.h:109
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:2470
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:1020
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:127
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:382
Control striping attribute union.
Definition: globus_ftp_control.h:209
int globus_handle_t
Handle abstract type.
Definition: globus_handle_table.h:55
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:5478
List data type.
Definition: globus_list.h:43
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:103
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:371
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
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:156
union globus_ftp_control_layout_u globus_ftp_control_layout_t
Control striping attribute union.
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:89
globus_ftp_control_dcau_mode_e
GridFTP DCAU values.
Definition: globus_ftp_control.h:118
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:4705
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:352
Definition: globus_ftp_control.h:343
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
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:7971
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
struct globus_ftp_control_round_robin_s globus_ftp_control_round_robin_t
Control striping round robin attribute structure.
Definition: globus_ftp_control.h:189
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:337
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:193
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:101
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:361
Control DCAU subject authentication type.
Definition: globus_ftp_control.h:133
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:78
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:545
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:146
Handle Table for Reference Counting Data.
globus_ftp_control_mode_e
GridFTP MODE values.
Definition: globus_ftp_control.h:98
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:2770
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:6082
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:632
Authentication Values.
Definition: globus_ftp_control.h:482
Definition: globus_ftp_control.h:123
Control parallelism attribute structure
Definition: globus_ftp_control.h:260
globus_ftp_control_protection_t
GridFTP Protection Types.
Definition: globus_ftp_control.h:184
Module Descriptor.
Definition: globus_module.h:69
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