globus_ftp_control  5.11
 All Data Structures Files Functions Typedefs Enumerations Enumerator Modules 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 
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 parrallel 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-paramater. 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 conections 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 
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 
616 typedef void
618  void * callback_arg,
619  struct globus_ftp_control_handle_s * handle,
620  globus_object_t * error,
621  globus_ftp_control_auth_info_t * auth_result);
622 
634 
635 #define GLOBUS_FTP_CONTROL_AUTH_REQ_NONE 1
636 #define GLOBUS_FTP_CONTROL_AUTH_REQ_GSSAPI 2
637 #define GLOBUS_FTP_CONTROL_AUTH_REQ_USER 4
638 #define GLOBUS_FTP_CONTROL_AUTH_REQ_PASS 8
639 #define GLOBUS_FTP_CONTROL_AUTH_REQ_ACCT 16
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 
826 globus_result_t
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 
832 globus_result_t
833 globus_X_ftp_control_local_layout(
834  globus_ftp_control_handle_t * handle,
835  char * enqueue_str,
836  void * user_arg);
837 
838 globus_result_t
840  globus_ftp_control_handle_t * handle,
842  globus_size_t data_size);
843 
844 /*
845  * NET LOGGER STUFF
846  */
847 globus_result_t
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 
854 globus_result_t
856  globus_ftp_control_handle_t * handle,
857  const char * interface_addr);
858 
859 globus_result_t
860 globus_i_ftp_control_data_set_stack(
861  globus_ftp_control_handle_t * handle,
862  globus_xio_stack_t stack);
863 
864 globus_result_t
865 globus_i_ftp_control_data_get_attr(
866  globus_ftp_control_handle_t * handle,
867  globus_xio_attr_t * attr);
868 
869 globus_result_t
870 globus_i_ftp_control_client_get_attr(
871  globus_ftp_control_handle_t * handle,
872  globus_xio_attr_t * attr);
873 
874 globus_result_t
875 globus_i_ftp_control_client_set_stack(
876  globus_ftp_control_handle_t * handle,
877  globus_xio_stack_t stack);
878 
879 globus_result_t
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 
888 globus_result_t
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  */
902 globus_result_t
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 
913 globus_result_t
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  */
928 globus_result_t
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 
940 globus_result_t
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  */
955 globus_result_t
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 
966 globus_result_t
968  globus_ftp_control_handle_t * handle,
969  globus_ftp_control_data_write_info_t * data_info);
970 
971 globus_result_t
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 
982 globus_result_t
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 
1322 globus_result_t
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 
1337 globus_result_t
1339  globus_ftp_control_handle_t * handle);
1340 
1341 globus_result_t
1343  globus_ftp_control_handle_t * handle);
1344 
1345 globus_result_t
1347  globus_ftp_control_server_t * handle);
1348 
1349 globus_result_t
1351  globus_ftp_control_server_t * handle);
1352 
1353 globus_result_t
1355  globus_ftp_control_response_t * response);
1356 
1357 globus_result_t
1359  globus_ftp_control_response_t * src,
1360  globus_ftp_control_response_t * dest);
1361 
1362 
1363 globus_result_t
1365  globus_ftp_control_handle_t * handle,
1366  char * host,
1367  unsigned short port,
1369  void * callback_arg);
1370 
1371 globus_result_t
1373  globus_ftp_control_handle_t * handle,
1374  globus_ftp_control_auth_info_t * auth_info,
1375  globus_bool_t use_auth,
1377  void * callback_arg);
1378 
1379 globus_result_t
1381  globus_ftp_control_handle_t * handle,
1382  globus_ftp_control_auth_info_t * auth_info,
1383  globus_bool_t use_auth,
1385  void * callback_arg);
1386 
1387 globus_result_t
1389  globus_ftp_control_handle_t * handle,
1391  void * callback_arg);
1392 
1393 globus_result_t
1395  globus_ftp_control_handle_t * handle,
1397  void * callback_arg);
1398 
1399 globus_result_t
1401  globus_ftp_control_handle_t * handle,
1403  void * callback_arg);
1404 
1405 
1406 globus_result_t
1408  globus_ftp_control_handle_t * handle,
1409  const char * cmdspec,
1411  void * callback_arg,
1412  ...);
1413 
1414 globus_result_t
1416  globus_ftp_control_handle_t * handle,
1417  unsigned long bufsize);
1418 
1419 globus_result_t
1421  globus_ftp_control_handle_t * handle,
1422  unsigned long * bufsize);
1423 
1424 /* globus_ftp_control_server.c */
1425 globus_result_t
1427  globus_ftp_control_server_t * handle,
1428  unsigned short * port,
1430  void * callback_arg);
1431 
1432 globus_result_t
1434  globus_ftp_control_server_t * listener,
1436  void * callback_arg);
1437 
1438 globus_result_t
1440  globus_ftp_control_server_t * listener,
1441  globus_ftp_control_handle_t * handle,
1443  void * callback_arg);
1444 
1445 globus_result_t
1447  globus_ftp_control_handle_t * handle,
1448  globus_ftp_control_auth_requirements_t auth_requirements,
1450  void * callback_arg);
1451 
1452 globus_result_t
1454  globus_ftp_control_handle_t * handle,
1456  void * callback_arg);
1457 
1458 globus_result_t
1460  globus_ftp_control_handle_t * handle,
1461  const char * respspec,
1463  void * callback_arg,
1464  ...);
1465 
1466 globus_result_t
1467 globus_ftp_control_close(
1468  globus_ftp_control_server_t * listener,
1470  void * callback_arg);
1471 
1472 globus_result_t
1473 globus_ftp_data_close(
1474  globus_ftp_data_server_t * listener,
1476  void * callback_arg);
1477 
1478 int
1479  globus_i_ftp_queue_size(
1480  globus_ftp_control_handle_t * handle,
1481  int stripe_ndx);
1482 
1483 /* command object functions */
1484 globus_result_t
1486  globus_ftp_control_command_t * dest,
1487  globus_ftp_control_command_t * src);
1488 
1489 globus_result_t
1491  globus_ftp_control_command_t * command,
1492  char * raw_command,
1493  globus_ftp_control_auth_info_t * auth_info);
1494 
1495 globus_result_t
1497  globus_ftp_control_command_t * command);
1498 
1499 /*globus_result_t
1500 globus_ftp_i_control_create_command_<port,pasv,spor,spas,etc>(
1501  globus_ftp_control_command_t * command);
1502 
1503 */
1504 
1510 globus_result_t
1511 globus_i_ftp_control_data_cc_init(
1512  globus_ftp_control_handle_t * control_handle);
1513 
1514 globus_result_t
1515 globus_i_ftp_control_data_cc_destroy(
1516  globus_ftp_control_handle_t * control_handle);
1517 
1518 globus_result_t
1520  globus_ftp_control_handle_t * control_handle,
1521  globus_ftp_control_callback_t destroy_callback,
1522  void * destroy_callback_arg);
1523 
1524 globus_result_t
1526  globus_ftp_control_handle_t * handle,
1527  globus_bool_t send_eof);
1528 
1529 globus_result_t
1531  globus_ftp_control_handle_t * handle,
1532  int count[],
1533  int array_size,
1534  globus_bool_t eof_message,
1536  void * user_arg);
1537 
1538 globus_result_t
1539 globus_ftp_control_get_stripe_count(
1540  globus_ftp_control_handle_t * handle,
1541  int * stripe_count);
1542 
1543 globus_result_t
1545  globus_ftp_control_handle_t * handle,
1546  globus_ftp_control_data_connect_callback_t callback,
1547  void * user_arg);
1548 
1549 globus_result_t
1551  globus_ftp_control_handle_t * handle,
1552  globus_ftp_control_data_connect_callback_t callback,
1553  void * user_arg);
1554 
1555 globus_result_t
1557  globus_ftp_control_handle_t * handle,
1558  unsigned int num_channels,
1559  unsigned int stripe);
1560 
1561 globus_result_t
1563  globus_ftp_control_handle_t * handle,
1564  unsigned int num_channels,
1565  unsigned int stripe);
1566 
1567 globus_result_t
1569  globus_ftp_control_handle_t * handle,
1570  unsigned int * num_channels,
1571  unsigned int stripe);
1572 
1573 globus_result_t
1575  globus_ftp_control_handle_t * handle,
1576  unsigned int * num_channels,
1577  unsigned int stripe_ndx);
1578 
1579 globus_result_t
1580 globus_ftp_control_data_get_remote_hosts(
1581  globus_ftp_control_handle_t * handle,
1582  globus_ftp_control_host_port_t * address,
1583  int * addr_count);
1584 
1585 globus_result_t
1586 globus_ftp_control_get_parallelism(
1587  globus_ftp_control_handle_t * handle,
1588  globus_ftp_control_parallelism_t * parallelism);
1589 
1590 globus_result_t
1592  globus_ftp_control_handle_t * handle,
1593  globus_ftp_control_parallelism_t * parallelism);
1594 
1595 globus_result_t
1597  globus_ftp_control_handle_t * handle,
1598  globus_ftp_control_host_port_t * address);
1599 
1600 globus_result_t
1602  globus_ftp_control_handle_t * handle,
1603  globus_ftp_control_host_port_t addresses[],
1604  unsigned int num_addresses);
1605 
1606 globus_result_t
1608  globus_ftp_control_handle_t * handle,
1609  globus_ftp_control_host_port_t * address);
1610 
1611 globus_result_t
1613  globus_ftp_control_handle_t * handle,
1614  globus_ftp_control_host_port_t addresses[],
1615  unsigned int num_addresses);
1616 
1617 globus_result_t
1618 globus_ftp_control_get_spor(
1619  globus_ftp_control_handle_t * handle,
1620  globus_ftp_control_host_port_t addresses[],
1621  unsigned int * num_addresses);
1622 
1623 globus_result_t
1625  globus_ftp_control_handle_t * handle,
1627  int form_code);
1628 
1629 globus_result_t
1631  globus_ftp_control_handle_t * handle,
1632  globus_ftp_control_tcpbuffer_t * tcp_buffer);
1633 
1634 globus_result_t
1636  globus_ftp_control_handle_t * handle,
1638 
1639 globus_result_t
1640 globus_ftp_control_get_mode(
1641  globus_ftp_control_handle_t * handle,
1642  globus_ftp_control_mode_t * mode);
1643 
1644 globus_result_t
1645 globus_ftp_control_get_type(
1646  globus_ftp_control_handle_t * handle,
1647  globus_ftp_control_type_t * type);
1648 
1649 globus_result_t
1651  globus_ftp_control_handle_t * handle,
1652  const globus_ftp_control_dcau_t * dcau,
1653  gss_cred_id_t delegated_credential_handle);
1654 
1655 globus_result_t
1656 globus_ftp_control_get_dcau(
1657  globus_ftp_control_handle_t * handle,
1658  globus_ftp_control_dcau_t * dcau);
1659 
1660 globus_result_t
1661 globus_ftp_control_local_prot(
1662  globus_ftp_control_handle_t * handle,
1663  globus_ftp_control_protection_t protection);
1664 
1665 globus_result_t
1666 globus_ftp_control_get_prot(
1667  globus_ftp_control_handle_t * handle,
1668  globus_ftp_control_protection_t * protection);
1669 
1670 globus_result_t
1672  globus_ftp_control_handle_t * handle,
1673  globus_ftp_control_structure_t structure);
1674 
1675 globus_result_t
1677  globus_ftp_control_handle_t * handle,
1678  globus_byte_t * buffer,
1679  globus_size_t length,
1680  globus_off_t offset,
1681  globus_bool_t eof,
1683  void * callback_arg);
1684 
1685 globus_result_t
1687  globus_ftp_control_handle_t * handle,
1688  globus_byte_t * buffer,
1689  globus_size_t max_length,
1691  void * callback_arg);
1692 
1693 globus_result_t
1694 globus_ftp_control_data_read_all(
1695  globus_ftp_control_handle_t * handle,
1696  globus_byte_t * buffer,
1697  globus_size_t length,
1699  void * callback_arg);
1700 
1701 /* this has only been tested enough for the client library and gridftp server
1702  * it is very likely to not work for general usage
1703  */
1704 globus_result_t
1706  globus_ftp_control_handle_t * handle,
1707  globus_bool_t allow);
1708 
1709 /*
1710  * internal function defintions
1711  */
1712 globus_result_t
1713 globus_i_ftp_parallelism_copy(
1714  globus_ftp_control_parallelism_t * dest_parallelism,
1715  globus_ftp_control_parallelism_t * src_parallelism);
1716 
1717 int
1718 globus_i_ftp_parallelism_get_size(
1719  globus_ftp_control_parallelism_t * parallelism);
1720 
1721 int
1722 globus_i_ftp_parallelism_get_min_size(
1723  globus_ftp_control_parallelism_t * parallelism);
1724 
1725 int
1726 globus_i_ftp_parallelism_get_max_size(
1727  globus_ftp_control_parallelism_t * parallelism);
1728 
1729 void
1730 globus_ftp_control_host_port_init(
1731  globus_ftp_control_host_port_t * host_port,
1732  char * host,
1733  unsigned short port);
1734 
1735 void
1736 globus_ftp_control_host_port_destroy(
1737  globus_ftp_control_host_port_t * host_port);
1738 
1739 void
1740 globus_ftp_control_host_port_get_host(
1741  globus_ftp_control_host_port_t * host_port,
1742  char * host);
1743 
1744 unsigned short
1745 globus_ftp_control_host_port_get_port(
1746  globus_ftp_control_host_port_t * host_port);
1747 
1748 void
1749 globus_ftp_control_host_port_copy(
1750  globus_ftp_control_host_port_t * dest,
1751  globus_ftp_control_host_port_t * src);
1752 
1753 #define globus_i_ftp_control_client_get_connection_info \
1754  globus_ftp_control_client_get_connection_info
1755 globus_result_t
1756 globus_ftp_control_client_get_connection_info(
1757  globus_ftp_control_handle_t * handle,
1758  int localhost[4],
1759  unsigned short * localport,
1760  int remotehost[4],
1761  unsigned short * remoteport);
1762 
1763 globus_result_t
1765  globus_ftp_control_handle_t * handle,
1766  globus_ftp_control_host_port_t * local_info,
1767  globus_ftp_control_host_port_t * remote_info);
1768 
1769 globus_result_t
1770 globus_ftp_control_data_get_socket_buf(
1771  globus_ftp_control_handle_t * handle,
1772  int * rcvbuf,
1773  int * sndbuf);
1774 
1775 #ifdef __cplusplus
1776 }
1777 #endif
1778 
1779 
1780 #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:2789
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:1189
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:5691
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:577
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:617
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:647
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:5494
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:1901
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:2958
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:2986
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:1466
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
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:1837
Definition: globus_ftp_control.h:83
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:1126
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:5593
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:3427
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:2304
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:472
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
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:4643
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:5218
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:1209
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:3609
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:4104
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:2585
Automatically set the TCP buffer/window size.
Definition: globus_ftp_control.h:371
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:4156
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:2544
Control striping round robin attribute structure.
Definition: globus_ftp_control.h:156
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:810
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:1820
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:1647
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:3887
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:4447
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:805
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
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_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:7594
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:1014
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:2272
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: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:2166
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:964
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:4243
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_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:3499
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:2362
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:3256
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:2262
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:4936
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:3692
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:3166
globus_ftp_control_type_e
GridFTP TYPE values.
Definition: globus_ftp_control.h:78
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:4041
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:1595
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:3822
globus_ftp_control_striping_mode_e
GridFTP Striping Types.
Definition: globus_ftp_control.h:146
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:2604
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:5822
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:443
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:1431
unsigned long globus_ftp_control_auth_requirements_t
Definition: globus_ftp_control.h:633
Authentication Values.
Definition: globus_ftp_control.h:483
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
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:2701