Grid Community Toolkit  6.2.1607800521 (tag: v6.2.20201212)
globus_ftp_control.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef GLOBUS_INCLUDE_FTP_CONTROL_H
23 #define GLOBUS_INCLUDE_FTP_CONTROL_H 1
24 
25 #include "globus_common.h"
26 #include "globus_error_string.h"
27 #include "globus_io.h"
28 #include "globus_gss_assist.h"
29 #include "globus_handle_table.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
36 
40 #endif
41 
80 {
92 
100 {
112 
120 {
130 
135 {
136  globus_ftp_control_dcau_mode_t mode;
137  char * subject;
139 
148 {
149  GLOBUS_FTP_CONTROL_STRIPING_NONE,
150  GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED,
151  GLOBUS_FTP_CONTROL_STRIPING_BLOCKED_ROUND_ROBIN
153 
158 {
159  globus_ftp_control_striping_mode_t mode;
160  globus_size_t block_size;
162 
163 typedef struct globus_ftp_control_partitioned_s
164 {
165  globus_ftp_control_striping_mode_t mode;
166  globus_size_t size;
167 } globus_ftp_control_partitioned_t;
168 
173 {
174  globus_ftp_control_dcau_mode_t mode;
177 
185 typedef enum
186 {
196 
200 typedef enum
201 {
202  GLOBUS_FTP_CONTROL_DELAYED_SINGLE_PASSIVE = 'S',
203  GLOBUS_FTP_CONTROL_DELAYED_STRIPED_PASSIVE = 'M',
204  GLOBUS_FTP_CONTROL_NORMAL_PASSIVE = 'N'
206 
211 {
212  globus_ftp_control_striping_mode_t mode;
214  globus_ftp_control_partitioned_t partitioned;
215  /*
216  * No data required for:
217  * GLOBUS_FTP_CONTROL_STRIPING_NONE
218  * GLOBUS_FTP_CONTROL_STRIPING_PARTITIONED
219  */
221 
226 {
227  GLOBUS_FTP_CONTROL_STRUCTURE_NONE,
228  GLOBUS_FTP_CONTROL_STRUCTURE_FILE,
229  GLOBUS_FTP_CONTROL_STRUCTURE_PAGE,
230  GLOBUS_FTP_CONTROL_STRUCTURE_RECORD
232 
237 {
238  GLOBUS_FTP_CONTROL_PARALLELISM_NONE,
239  GLOBUS_FTP_CONTROL_PARALLELISM_FIXED
241 
242 /*
243  * The base class for all parallel types. Subtypes
244  * must first define all types in this structure.
245  */
246 typedef struct globus_i_ftp_parallelism_base_s
247 {
248  globus_ftp_control_parallelism_mode_t mode;
249  globus_size_t size;
250 } globus_i_ftp_parallelism_base_t;
251 
252 typedef struct globus_ftp_parallelism_fixed_s
253 {
254  globus_ftp_control_parallelism_mode_t mode;
255  globus_size_t size;
256 } globus_ftp_parallelism_fixed_t;
257 
262 {
263  globus_ftp_control_parallelism_mode_t mode;
264  globus_i_ftp_parallelism_base_t base;
265  globus_ftp_parallelism_fixed_t fixed;
267 
268 typedef struct globus_ftp_control_host_port_s
269 {
270  int host[16];
271  unsigned short port;
272 
273  /*
274  * if ipv6 is not enabled, the following param will be assumed to be 4
275  * when passed as an in-parameter. otherwise it must indicate the correct
276  * len.
277  *
278  * for out-parameters, the following will _always_ be 4 unless ipv6 is
279  * allowed. then it will be either 4 or 16
280  */
281  int hostlen;
282 } globus_ftp_control_host_port_t;
283 
309 #define GLOBUS_FTP_CONTROL_MODULE (&globus_i_ftp_control_module)
310 
311 extern globus_module_descriptor_t globus_i_ftp_control_module;
312 
313 #define _FCSL(s) globus_common_i18n_get_string(GLOBUS_FTP_CONTROL_MODULE,s)
314 /*
315  * Module Specific Data Types
316  */
317 typedef enum globus_ftp_control_response_class_e
318 {
319  GLOBUS_FTP_UNKNOWN_REPLY,
320  GLOBUS_FTP_POSITIVE_PRELIMINARY_REPLY,
321  GLOBUS_FTP_POSITIVE_COMPLETION_REPLY,
322  GLOBUS_FTP_POSITIVE_INTERMEDIATE_REPLY,
323  GLOBUS_FTP_TRANSIENT_NEGATIVE_COMPLETION_REPLY,
324  GLOBUS_FTP_PERMANENT_NEGATIVE_COMPLETION_REPLY
325 } globus_ftp_control_response_class_t;
326 
327 
328 typedef struct globus_ftp_control_response_s
329 {
330  int code;
331  globus_ftp_control_response_class_t response_class;
332  globus_byte_t * response_buffer;
333  globus_size_t response_length;
334  globus_size_t response_buffer_size;
335 } globus_ftp_control_response_t;
336 
339 {
342 
345 
349 
353 typedef struct
354 {
355  globus_ftp_control_tcpbuffer_mode_t mode;
356 }
358 
362 typedef struct
363 {
364  globus_ftp_control_tcpbuffer_mode_t mode;
365  int size;
366 }
368 
373 {
374  globus_ftp_control_tcpbuffer_mode_t mode;
375  unsigned int initial_size;
376  unsigned int minimum_size;
377  unsigned int maximum_size;
379 
384 {
385  globus_ftp_control_tcpbuffer_mode_t mode;
386  globus_ftp_control_tcpbuffer_default_t default_tcpbuffer;
390 
391 /*
392  * each strip can have multiple parallel connections to
393  * the same host
394  */
395 
396 typedef enum globus_ftp_data_connection_state_e
397 {
398  GLOBUS_FTP_DATA_STATE_NONE, /* dc_handle has no references */
399  GLOBUS_FTP_DATA_STATE_PASV, /* in local pasv mode */
400  GLOBUS_FTP_DATA_STATE_PORT, /* in local port mode */
401  GLOBUS_FTP_DATA_STATE_SPOR, /* in local spor mode */
402  GLOBUS_FTP_DATA_STATE_CONNECT_READ, /* connected for reading */
403  GLOBUS_FTP_DATA_STATE_CONNECT_WRITE, /* connected for writing */
404  GLOBUS_FTP_DATA_STATE_CLOSING, /* closing all connections */
405  GLOBUS_FTP_DATA_STATE_EOF, /* user has received eof */
406  GLOBUS_FTP_DATA_STATE_SEND_EOF /* not used for state at all */
407 } globus_ftp_data_connection_state_t;
408 
409 #define GLOBUS_FTP_CONTROL_READ_BUFFER_SIZE 1000
410 #define GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE 8192
411 
412 typedef enum
413 {
414  GLOBUS_FTP_CONTROL_UNCONNECTED,
415  GLOBUS_FTP_CONTROL_CONNECTING,
416  GLOBUS_FTP_CONTROL_CONNECTED,
417  GLOBUS_FTP_CONTROL_CLOSING
418 }
419 globus_ftp_cc_state_t;
420 
421 struct globus_ftp_control_handle_s;
422 struct globus_i_ftp_dc_transfer_handle_t;
423 
424 union globus_ftp_control_command_u;
425 
426 typedef enum globus_ftp_control_command_code_e
427 {
428  GLOBUS_FTP_CONTROL_COMMAND_OPTS,
429  GLOBUS_FTP_CONTROL_COMMAND_AUTH,
430  GLOBUS_FTP_CONTROL_COMMAND_ADAT,
431  GLOBUS_FTP_CONTROL_COMMAND_SPAS,
432  GLOBUS_FTP_CONTROL_COMMAND_SPOR,
433  GLOBUS_FTP_CONTROL_COMMAND_PORT,
434  GLOBUS_FTP_CONTROL_COMMAND_PASV,
435  GLOBUS_FTP_CONTROL_COMMAND_SITE,
436  GLOBUS_FTP_CONTROL_COMMAND_TYPE,
437  GLOBUS_FTP_CONTROL_COMMAND_DELE,
438  GLOBUS_FTP_CONTROL_COMMAND_FEAT,
439  GLOBUS_FTP_CONTROL_COMMAND_ERET,
440  GLOBUS_FTP_CONTROL_COMMAND_ESTO,
441  GLOBUS_FTP_CONTROL_COMMAND_RMD,
442  GLOBUS_FTP_CONTROL_COMMAND_MKD,
443  GLOBUS_FTP_CONTROL_COMMAND_PWD,
444  GLOBUS_FTP_CONTROL_COMMAND_CWD,
445  GLOBUS_FTP_CONTROL_COMMAND_CDUP,
446  GLOBUS_FTP_CONTROL_COMMAND_NLST,
447  GLOBUS_FTP_CONTROL_COMMAND_HELP,
448  GLOBUS_FTP_CONTROL_COMMAND_STAT,
449  GLOBUS_FTP_CONTROL_COMMAND_NOOP,
450  GLOBUS_FTP_CONTROL_COMMAND_SYST,
451  GLOBUS_FTP_CONTROL_COMMAND_STOU,
452  GLOBUS_FTP_CONTROL_COMMAND_QUIT,
453  GLOBUS_FTP_CONTROL_COMMAND_REIN,
454  GLOBUS_FTP_CONTROL_COMMAND_ABOR,
455  GLOBUS_FTP_CONTROL_COMMAND_ALLO,
456  GLOBUS_FTP_CONTROL_COMMAND_MODE,
457  GLOBUS_FTP_CONTROL_COMMAND_STRU,
458  GLOBUS_FTP_CONTROL_COMMAND_ACCT,
459  GLOBUS_FTP_CONTROL_COMMAND_PASS,
460  GLOBUS_FTP_CONTROL_COMMAND_USER,
461  GLOBUS_FTP_CONTROL_COMMAND_SMNT,
462  GLOBUS_FTP_CONTROL_COMMAND_LIST,
463  GLOBUS_FTP_CONTROL_COMMAND_RETR,
464  GLOBUS_FTP_CONTROL_COMMAND_REST,
465  GLOBUS_FTP_CONTROL_COMMAND_SBUF,
466  GLOBUS_FTP_CONTROL_COMMAND_SIZE,
467  GLOBUS_FTP_CONTROL_COMMAND_STOR,
468  GLOBUS_FTP_CONTROL_COMMAND_APPE,
469  GLOBUS_FTP_CONTROL_COMMAND_RNFR,
470  GLOBUS_FTP_CONTROL_COMMAND_RNTO,
471  GLOBUS_FTP_CONTROL_COMMAND_LANG,
472  GLOBUS_FTP_CONTROL_COMMAND_UNKNOWN
473 } globus_ftp_control_command_code_t;
474 
484 {
485  globus_bool_t authenticated;
486  globus_ftp_control_command_code_t prev_cmd;
487  char * auth_gssapi_subject;
488  gss_ctx_id_t auth_gssapi_context;
489  gss_cred_id_t credential_handle;
490  globus_bool_t locally_acquired_credential;
491  gss_name_t target_name;
492  OM_uint32 req_flags;
493  char * user;
494  char * password;
495  char * account;
496  gss_cred_id_t delegated_credential_handle;
497  globus_bool_t encrypt;
498 }
500 
501 
502 
527  void * callback_arg,
528  struct globus_ftp_control_handle_s * handle,
529  globus_object_t * error,
530  globus_ftp_control_response_t * ftp_response);
531 
547  void * callback_arg,
548  struct globus_ftp_control_handle_s * handle,
549  globus_object_t * error);
550 
551 
552 typedef void
553 (*globus_ftp_control_data_connect_callback_t)(
554  void * callback_arg,
555  struct globus_ftp_control_handle_s * handle,
556  unsigned int stripe_ndx,
557  globus_bool_t reused,
558  globus_object_t * error);
559 
588  void * callback_arg,
589  struct globus_ftp_control_handle_s * handle,
590  globus_object_t * error,
591  union globus_ftp_control_command_u * command);
592 
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 #define GLOBUS_FTP_CONTROL_AUTH_REQ_TLS 32
641 
642 typedef struct globus_ftp_control_rw_queue_element_s
643 {
645  globus_ftp_control_callback_t send_response_cb;
646  void * arg;
647  globus_byte_t * write_buf;
648  int write_flags;
649  globus_io_write_callback_t write_callback;
650  globus_io_read_callback_t read_callback;
651  globus_bool_t expect_response;
652 }
653 globus_ftp_control_rw_queue_element_t;
654 
655 typedef struct globus_ftp_cc_handle_s
656 {
657  globus_io_attr_t io_attr;
658  globus_netlogger_handle_t nl_handle;
659  globus_bool_t nl_handle_set;
660 
661  globus_fifo_t readers;
662  globus_fifo_t writers;
664  void * command_cb_arg;
665 
666  /* callback and arg for accept */
668  void * accept_cb_arg;
669 
671  void * auth_cb_arg;
672  globus_ftp_control_auth_requirements_t auth_requirements;
673  globus_ftp_control_response_t response;
674  globus_byte_t * read_buffer;
675  globus_size_t read_buffer_size;
676  globus_size_t bytes_read;
678  globus_bool_t use_auth;
679  globus_io_handle_t io_handle;
680  globus_ftp_cc_state_t cc_state;
681  char serverhost[MAXHOSTNAMELEN];
682  struct hostent server;
683  char server_buffer[
684  GLOBUS_FTP_CONTROL_HOSTENT_BUFFER_SIZE];
685  globus_list_t * list_elem;
686 
687  globus_mutex_t mutex;
688  globus_bool_t do_close;
689  int cb_count;
691  void * close_cb_arg;
692  globus_object_t * close_result;
693  globus_ftp_control_response_t quit_response;
694  globus_bool_t signal_deactivate;
695 }
696 globus_ftp_cc_handle_t;
697 
698 struct globus_ftp_control_data_write_info_s;
699 
700 typedef globus_result_t (*globus_ftp_control_layout_func_t)(
701  struct globus_ftp_control_handle_s * handle,
702  struct globus_ftp_control_data_write_info_s * data_info,
703  globus_byte_t * buffer,
704  globus_size_t length,
705  globus_off_t offset,
706  globus_bool_t eof,
707  int stripe_count,
708  char * enqueue_str,
709  void * user_arg);
710 
711 typedef globus_result_t (*globus_ftp_control_layout_verify_func_t)(
712  char * enqueue_str);
713 
714 typedef struct globus_i_ftp_dc_handle_s
715 {
716  char magic[32];
717 
719  unsigned long pbsz;
721 
722  globus_ftp_data_connection_state_t state;
723 
726  globus_ftp_control_structure_t structure;
727  int tcp_buffer_size;
728  int form_code;
730 
731  globus_io_attr_t io_attr;
732  char * interface_addr;
733 
734  struct globus_i_ftp_dc_transfer_handle_s * transfer_handle;
735  globus_list_t * transfer_list;
736  globus_bool_t send_eof;
737 
738  globus_ftp_control_layout_func_t layout_func;
740  char * layout_str;
741  void * layout_user_arg;
742 
743  globus_bool_t initialized;
744  globus_mutex_t mutex;
745 
746  globus_ftp_control_callback_t close_callback;
747  void * close_callback_arg;
748 
749  globus_netlogger_handle_t nl_io_handle;
750  globus_bool_t nl_io_handle_set;
751 
752  globus_netlogger_handle_t nl_ftp_handle;
753  globus_bool_t nl_ftp_handle_set;
754 
755  globus_object_t * connect_error;
756  struct globus_ftp_control_handle_s * whos_my_daddy;
757 } globus_i_ftp_dc_handle_t;
758 
759 typedef struct globus_ftp_control_handle_s
760 {
761  struct globus_i_ftp_dc_handle_s dc_handle;
762  struct globus_ftp_cc_handle_s cc_handle;
763 } globus_ftp_control_handle_t;
764 
765 
812  void * callback_arg,
813  globus_ftp_control_handle_t * handle,
814  globus_object_t * error,
815  globus_byte_t * buffer,
816  globus_size_t length,
817  globus_off_t offset,
818  globus_bool_t eof);
819 
820 typedef struct globus_ftp_control_data_write_info_s
821 {
823  void * cb_arg;
824  globus_handle_t callback_table_handle;
825 } globus_ftp_control_data_write_info_t;
826 
828 globus_ftp_control_layout_register_func(
829  char * name,
830  globus_ftp_control_layout_func_t enqueue_func,
831  globus_ftp_control_layout_verify_func_t verify_func);
832 
834 globus_X_ftp_control_local_layout(
835  globus_ftp_control_handle_t * handle,
836  char * enqueue_str,
837  void * user_arg);
838 
841  globus_ftp_control_handle_t * handle,
843  globus_size_t data_size);
844 
845 /*
846  * NET LOGGER STUFF
847  */
849 globus_ftp_control_set_netlogger(
850  globus_ftp_control_handle_t * handle,
851  globus_netlogger_handle_t * nl_handle,
852  globus_bool_t nl_ftp_control,
853  globus_bool_t nl_globus_io);
854 
857  globus_ftp_control_handle_t * handle,
858  const char * interface_addr);
859 
861 globus_i_ftp_control_data_set_stack(
862  globus_ftp_control_handle_t * handle,
863  globus_xio_stack_t stack);
864 
866 globus_i_ftp_control_data_get_attr(
867  globus_ftp_control_handle_t * handle,
868  globus_xio_attr_t * attr);
869 
871 globus_i_ftp_control_client_get_attr(
872  globus_ftp_control_handle_t * handle,
873  globus_xio_attr_t * attr);
874 
876 globus_i_ftp_control_client_set_stack(
877  globus_ftp_control_handle_t * handle,
878  globus_xio_stack_t stack);
879 
881 globus_i_ftp_control_load_xio_drivers(
882  char * driver_string,
883  globus_list_t ** driver_list);
884 
885 void
886 globus_i_ftp_control_unload_xio_drivers(
887  globus_list_t * driver_list);
888 
890 globus_i_ftp_control_create_stack(
891  globus_ftp_control_handle_t * handle,
892  globus_list_t * driver_list,
893  globus_xio_stack_t * stack);
894 
895 
896 
897 /*****************************************************************
898  * standard layout functions
899  ****************************************************************/
900 /*
901  * blocked functions
902  */
904 globus_ftp_control_layout_blocked_verify(
905  char * layout_str);
906 
907 void *
908 globus_ftp_control_layout_blocked_user_arg_create();
909 
910 void
911 globus_ftp_control_layout_blocked_user_arg_destroy(
912  void * user_arg);
913 
915 globus_ftp_control_layout_blocked(
916  globus_ftp_control_handle_t * handle,
917  globus_ftp_control_data_write_info_t * data_info,
918  globus_byte_t * buffer,
919  globus_size_t length,
920  globus_off_t in_offset,
921  globus_bool_t eof,
922  int stripe_count,
923  char * enqueue_str,
924  void * user_arg);
925 
926 /*
927  * partitioned functions
928  */
930 globus_ftp_control_layout_partitioned_verify(
931  char * layout_str);
932 
933 void *
934 globus_ftp_control_layout_partitioned_user_arg_create(
935  globus_size_t file_size);
936 
937 void
938 globus_ftp_control_layout_partitioned_user_arg_destroy(
939  void * user_arg);
940 
942 globus_ftp_control_layout_partitioned(
943  globus_ftp_control_handle_t * handle,
944  globus_ftp_control_data_write_info_t * data_info,
945  globus_byte_t * buffer,
946  globus_size_t length,
947  globus_off_t in_offset,
948  globus_bool_t eof,
949  int stripe_count,
950  char * enqueue_str,
951  void * user_arg);
952 
953 /*
954  * data registration functions
955  */
958  globus_ftp_control_handle_t * handle,
959  globus_ftp_control_data_write_info_t * data_info,
960  globus_byte_t * buffer,
961  globus_size_t length,
962  globus_off_t offset,
963  globus_bool_t eof,
965  void * callback_arg);
966 
969  globus_ftp_control_handle_t * handle,
970  globus_ftp_control_data_write_info_t * data_info);
971 
974  globus_ftp_control_handle_t * handle,
975  globus_byte_t * buffer,
976  globus_size_t length,
977  globus_off_t offset,
978  globus_bool_t eof,
979  int stripe_ndx,
981  void * callback_arg);
982 
985  globus_ftp_control_handle_t * handle,
986  globus_byte_t * buffer,
987  globus_size_t length,
988  globus_off_t offset,
989  globus_bool_t eof,
990  int stripe_ndx,
991  globus_ftp_control_data_write_info_t * data_info);
992 
993 
994 /*
995  * Server API callbacks
996  * ----------------------------------------------------------------
997  */
998 
1004 struct globus_ftp_control_server_s;
1005 
1022  void * callback_arg,
1023  struct globus_ftp_control_server_s * server_handle,
1024  globus_object_t * error);
1025 
1026 
1027 typedef enum globus_ftp_control_server_state_n
1028 {
1029  GLOBUS_FTP_CONTROL_SERVER_LISTENING,
1030  GLOBUS_FTP_CONTROL_SERVER_DEAF
1031 }
1032 globus_ftp_control_server_state_t;
1033 
1034 typedef struct globus_ftp_control_server_s
1035 {
1036  globus_io_handle_t io_handle;
1037  globus_ftp_control_server_state_t state;
1039  void * callback_arg;
1040  globus_list_t * list_elem;
1041  globus_mutex_t mutex;
1042 } globus_ftp_control_server_t;
1043 
1044 
1045 
1046 typedef struct globus_ftp_control_command_str_s
1047 {
1048  globus_ftp_control_command_code_t code;
1049  char * raw_command;
1050  char * string_arg;
1051 } globus_ftp_control_command_str_t;
1052 
1053 /*
1054  * complex commands
1055  */
1056 
1057 typedef struct globus_ftp_control_command_stru_s
1058 {
1059  globus_ftp_control_command_code_t code;
1060  char * raw_command;
1061  globus_ftp_control_structure_t structure;
1062 } globus_ftp_control_command_stru_t;
1063 
1064 typedef struct globus_ftp_control_command_port_s
1065 {
1066  globus_ftp_control_command_code_t code;
1067  char * raw_command;
1068  globus_ftp_control_host_port_t host_port;
1069 } globus_ftp_control_command_port_t;
1070 
1071 typedef struct globus_ftp_control_command_spor_s
1072 {
1073  globus_ftp_control_command_code_t code;
1074  char * raw_command;
1075  int num_args;
1076  globus_ftp_control_host_port_t * host_port;
1077 } globus_ftp_control_command_spor_t;
1078 
1079 typedef struct globus_ftp_control_command_mode_s
1080 {
1081  globus_ftp_control_command_code_t code;
1082  char * raw_command;
1084 } globus_ftp_control_command_mode_t;
1085 
1086 typedef struct globus_ftp_control_command_allo_s
1087 {
1088  globus_ftp_control_command_code_t code;
1089  char * raw_command;
1090  int size;
1091  int record_size;
1092 } globus_ftp_control_command_allo_t;
1093 
1094 typedef struct globus_ftp_control_command_sbuf_s
1095 {
1096  globus_ftp_control_command_code_t code;
1097  char * raw_command;
1098  int buffer_size;
1099 } globus_ftp_control_command_sbuf_t;
1100 /*
1101 
1102 Can't parse marker unless I know state
1103 
1104 typedef struct globus_ftp_control_command_rest_s
1105 {
1106 } globus_ftp_control_command_rest_t;
1107 
1108 */
1109 
1110 typedef enum globus_ftp_control_type_option_e
1111 {
1112  GLOBUS_FTP_CONTROL_TYPE_NO_OPTION,
1113  GLOBUS_FTP_CONTROL_TYPE_OPTION_N,
1114  GLOBUS_FTP_CONTROL_TYPE_OPTION_T,
1115  GLOBUS_FTP_CONTROL_TYPE_OPTION_C
1116 } globus_ftp_control_type_option_t;
1117 
1118 typedef struct globus_ftp_control_command_type_s
1119 {
1120  globus_ftp_control_command_code_t code;
1121  char * raw_command;
1123  globus_ftp_control_type_option_t option;
1124  unsigned int bytesize;
1125 } globus_ftp_control_command_type_t;
1126 
1127 typedef enum globus_ftp_control_auth_type_e
1128 {
1129  GLOBUS_FTP_CONTROL_AUTH_GSSAPI,
1130  GLOBUS_FTP_CONTROL_AUTH_UNKNOWN
1131 } globus_ftp_control_auth_type_t;
1132 
1133 typedef struct globus_ftp_control_command_auth_s
1134 {
1135  globus_ftp_control_command_code_t code;
1136  char * raw_command;
1137  globus_ftp_control_auth_type_t type;
1138 } globus_ftp_control_command_auth_t;
1139 
1140 typedef struct globus_ftp_control_command_opts_s
1141 {
1142  globus_ftp_control_command_code_t code;
1143  char * raw_command;
1144  char * cmd_name;
1145  char * cmd_opts;
1146 } globus_ftp_control_command_opts_t;
1147 
1148 /*
1149  * single string commands
1150  */
1151 
1152 typedef globus_ftp_control_command_str_t
1153 globus_ftp_control_command_site_t;
1154 
1155 typedef globus_ftp_control_command_str_t
1156 globus_ftp_control_command_acct_t;
1157 
1158 typedef globus_ftp_control_command_str_t
1159 globus_ftp_control_command_cwd_t;
1160 
1161 typedef globus_ftp_control_command_str_t
1162 globus_ftp_control_command_cdup_t;
1163 
1164 typedef globus_ftp_control_command_str_t
1165 globus_ftp_control_command_pass_t;
1166 
1167 typedef globus_ftp_control_command_str_t
1168 globus_ftp_control_command_user_t;
1169 
1170 typedef globus_ftp_control_command_str_t
1171 globus_ftp_control_command_smnt_t;
1172 
1173 typedef globus_ftp_control_command_str_t
1174 globus_ftp_control_command_list_t;
1175 
1176 typedef globus_ftp_control_command_str_t
1177 globus_ftp_control_command_retr_t;
1178 
1179 typedef globus_ftp_control_command_str_t
1180 globus_ftp_control_command_size_t;
1181 
1182 typedef globus_ftp_control_command_str_t
1183 globus_ftp_control_command_stor_t;
1184 
1185 typedef globus_ftp_control_command_str_t
1186 globus_ftp_control_command_appe_t;
1187 
1188 typedef globus_ftp_control_command_str_t
1189 globus_ftp_control_command_rnfr_t;
1190 
1191 typedef globus_ftp_control_command_str_t
1192 globus_ftp_control_command_rnto_t;
1193 
1194 typedef globus_ftp_control_command_str_t
1195 globus_ftp_control_command_feat_t;
1196 
1197 typedef globus_ftp_control_command_str_t
1198 globus_ftp_control_command_dele_t;
1199 
1200 typedef globus_ftp_control_command_str_t
1201 globus_ftp_control_command_rmd_t;
1202 
1203 typedef globus_ftp_control_command_str_t
1204 globus_ftp_control_command_mkd_t;
1205 
1206 typedef globus_ftp_control_command_str_t
1207 globus_ftp_control_command_nlst_t;
1208 
1209 typedef globus_ftp_control_command_str_t
1210 globus_ftp_control_command_help_t;
1211 
1212 typedef globus_ftp_control_command_str_t
1213 globus_ftp_control_command_stou_t;
1214 
1215 typedef globus_ftp_control_command_str_t
1216 globus_ftp_control_command_rest_t;
1217 
1218 typedef globus_ftp_control_command_str_t
1219 globus_ftp_control_command_eret_t;
1220 
1221 typedef globus_ftp_control_command_str_t
1222 globus_ftp_control_command_esto_t;
1223 
1224 /*
1225  * no string commands
1226  */
1227 typedef globus_ftp_control_command_str_t
1228 globus_ftp_control_command_pasv_t;
1229 
1230 typedef globus_ftp_control_command_str_t
1231 globus_ftp_control_command_spas_t;
1232 
1233 typedef globus_ftp_control_command_str_t
1234 globus_ftp_control_command_stat_t;
1235 
1236 typedef globus_ftp_control_command_str_t
1237 globus_ftp_control_command_noop_t;
1238 
1239 typedef globus_ftp_control_command_str_t
1240 globus_ftp_control_command_syst_t;
1241 
1242 typedef globus_ftp_control_command_str_t
1243 globus_ftp_control_command_quit_t;
1244 
1245 typedef globus_ftp_control_command_str_t
1246 globus_ftp_control_command_rein_t;
1247 
1248 typedef globus_ftp_control_command_str_t
1249 globus_ftp_control_command_abor_t;
1250 
1251 typedef globus_ftp_control_command_str_t
1252 globus_ftp_control_command_pwd_t;
1253 
1254 typedef globus_ftp_control_command_str_t
1255 globus_ftp_control_command_adat_t;
1256 
1257 
1258 
1259 
1260 typedef union globus_ftp_control_command_u
1261 {
1262  globus_ftp_control_command_code_t code;
1263  globus_ftp_control_command_site_t site;
1264  globus_ftp_control_command_sbuf_t sbuf;
1265  globus_ftp_control_command_type_t type;
1266  globus_ftp_control_command_rest_t rest;
1267  globus_ftp_control_command_allo_t allo;
1268  globus_ftp_control_command_eret_t eret;
1269  globus_ftp_control_command_esto_t esto;
1270  globus_ftp_control_command_mode_t mode;
1271  globus_ftp_control_command_port_t port;
1272  globus_ftp_control_command_spor_t spor;
1273  globus_ftp_control_command_stru_t stru;
1274  globus_ftp_control_command_auth_t auth;
1275 
1276  globus_ftp_control_command_adat_t adat;
1277  globus_ftp_control_command_acct_t acct;
1278  globus_ftp_control_command_cwd_t cwd;
1279  globus_ftp_control_command_cdup_t cdup;
1280  globus_ftp_control_command_pass_t pass;
1281  globus_ftp_control_command_user_t user;
1282  globus_ftp_control_command_smnt_t smnt;
1283  globus_ftp_control_command_opts_t opts;
1284  globus_ftp_control_command_list_t list;
1285  globus_ftp_control_command_retr_t retr;
1286  globus_ftp_control_command_size_t size;
1287  globus_ftp_control_command_stor_t stor;
1288  globus_ftp_control_command_appe_t appe;
1289  globus_ftp_control_command_rnfr_t rnfr;
1290  globus_ftp_control_command_rnto_t rnto;
1291  globus_ftp_control_command_dele_t dele;
1292  globus_ftp_control_command_feat_t feat;
1293  globus_ftp_control_command_rmd_t rmd;
1294  globus_ftp_control_command_mkd_t mkd;
1295  globus_ftp_control_command_nlst_t nlst;
1296  globus_ftp_control_command_help_t help;
1297 
1298  globus_ftp_control_command_pasv_t pasv;
1299  globus_ftp_control_command_spas_t spas;
1300  globus_ftp_control_command_stat_t stat;
1301  globus_ftp_control_command_noop_t noop;
1302  globus_ftp_control_command_syst_t syst;
1303  globus_ftp_control_command_stou_t stou;
1304  globus_ftp_control_command_quit_t quit;
1305  globus_ftp_control_command_rein_t rein;
1306  globus_ftp_control_command_abor_t abor;
1307  globus_ftp_control_command_pwd_t pwd;
1308 
1309  globus_ftp_control_command_str_t base;
1310 } globus_ftp_control_command_t;
1311 
1312 
1313 typedef struct globus_ftp_data_server_s
1314 {
1315  int bogus;
1316 } globus_ftp_data_server_t;
1317 
1325  globus_ftp_control_auth_info_t * auth_info,
1326  gss_cred_id_t credential_handle,
1327  globus_bool_t encrypt,
1328  char * user,
1329  char * password,
1330  char * account,
1331  char * subject);
1332 
1333 int
1335  globus_ftp_control_auth_info_t * auth_info_1,
1336  globus_ftp_control_auth_info_t * auth_info_2);
1337 
1340  globus_ftp_control_handle_t * handle);
1341 
1344  globus_ftp_control_handle_t * handle);
1345 
1348  globus_ftp_control_server_t * handle);
1349 
1352  globus_ftp_control_server_t * handle);
1353 
1356  globus_ftp_control_response_t * response);
1357 
1360  globus_ftp_control_response_t * src,
1361  globus_ftp_control_response_t * dest);
1362 
1363 
1366  globus_ftp_control_handle_t * handle,
1367  char * host,
1368  unsigned short port,
1370  void * callback_arg);
1371 
1372 
1374 globus_ftp_control_use_tls(
1375  globus_ftp_control_handle_t * handle,
1376  globus_ftp_control_auth_info_t * auth_info);
1377 
1380  globus_ftp_control_handle_t * handle,
1381  globus_ftp_control_auth_info_t * auth_info,
1382  globus_bool_t use_auth,
1384  void * callback_arg);
1385 
1388  globus_ftp_control_handle_t * handle,
1389  globus_ftp_control_auth_info_t * auth_info,
1390  globus_bool_t use_auth,
1392  void * callback_arg);
1393 
1396  globus_ftp_control_handle_t * handle,
1398  void * callback_arg);
1399 
1402  globus_ftp_control_handle_t * handle,
1404  void * callback_arg);
1405 
1408  globus_ftp_control_handle_t * handle,
1410  void * callback_arg);
1411 
1412 
1415  globus_ftp_control_handle_t * handle,
1416  const char * cmdspec,
1418  void * callback_arg,
1419  ...);
1420 
1423  globus_ftp_control_handle_t * handle,
1424  unsigned long bufsize);
1425 
1428  globus_ftp_control_handle_t * handle,
1429  unsigned long * bufsize);
1430 
1431 /* globus_ftp_control_server.c */
1434  globus_ftp_control_server_t * handle,
1435  unsigned short * port,
1437  void * callback_arg);
1438 
1441  globus_ftp_control_server_t * handle,
1442  globus_io_attr_t * attr,
1443  unsigned short * port,
1445  void * callback_arg);
1446 
1449  globus_ftp_control_server_t * listener,
1451  void * callback_arg);
1452 
1455  globus_ftp_control_server_t * listener,
1456  globus_ftp_control_handle_t * handle,
1458  void * callback_arg);
1459 
1462  globus_ftp_control_handle_t * handle,
1463  globus_ftp_control_auth_requirements_t auth_requirements,
1465  void * callback_arg);
1466 
1469  globus_ftp_control_handle_t * handle,
1471  void * callback_arg);
1472 
1475  globus_ftp_control_handle_t * handle,
1476  const char * respspec,
1478  void * callback_arg,
1479  ...);
1480 
1482 globus_ftp_control_close(
1483  globus_ftp_control_server_t * listener,
1485  void * callback_arg);
1486 
1488 globus_ftp_data_close(
1489  globus_ftp_data_server_t * listener,
1491  void * callback_arg);
1492 
1493 int
1494  globus_i_ftp_queue_size(
1495  globus_ftp_control_handle_t * handle,
1496  int stripe_ndx);
1497 
1498 /* command object functions */
1501  globus_ftp_control_command_t * dest,
1502  globus_ftp_control_command_t * src);
1503 
1506  globus_ftp_control_command_t * command,
1507  char * raw_command,
1508  globus_ftp_control_auth_info_t * auth_info);
1509 
1512  globus_ftp_control_command_t * command);
1513 
1520 globus_i_ftp_control_data_cc_init(
1521  globus_ftp_control_handle_t * control_handle);
1522 
1524 globus_i_ftp_control_data_cc_destroy(
1525  globus_ftp_control_handle_t * control_handle);
1526 
1529  globus_ftp_control_handle_t * control_handle,
1530  globus_ftp_control_callback_t destroy_callback,
1531  void * destroy_callback_arg);
1532 
1535  globus_ftp_control_handle_t * handle,
1536  globus_bool_t send_eof);
1537 
1540  globus_ftp_control_handle_t * handle,
1541  int count[],
1542  int array_size,
1543  globus_bool_t eof_message,
1545  void * user_arg);
1546 
1548 globus_ftp_control_get_stripe_count(
1549  globus_ftp_control_handle_t * handle,
1550  int * stripe_count);
1551 
1554  globus_ftp_control_handle_t * handle,
1555  globus_ftp_control_data_connect_callback_t callback,
1556  void * user_arg);
1557 
1560  globus_ftp_control_handle_t * handle,
1561  globus_ftp_control_data_connect_callback_t callback,
1562  void * user_arg);
1563 
1566  globus_ftp_control_handle_t * handle,
1567  unsigned int num_channels,
1568  unsigned int stripe);
1569 
1572  globus_ftp_control_handle_t * handle,
1573  unsigned int num_channels,
1574  unsigned int stripe);
1575 
1578  globus_ftp_control_handle_t * handle,
1579  unsigned int * num_channels,
1580  unsigned int stripe);
1581 
1584  globus_ftp_control_handle_t * handle,
1585  unsigned int * num_channels,
1586  unsigned int stripe_ndx);
1587 
1589 globus_ftp_control_data_get_remote_hosts(
1590  globus_ftp_control_handle_t * handle,
1591  globus_ftp_control_host_port_t * address,
1592  int * addr_count);
1593 
1595 globus_ftp_control_get_parallelism(
1596  globus_ftp_control_handle_t * handle,
1597  globus_ftp_control_parallelism_t * parallelism);
1598 
1601  globus_ftp_control_handle_t * handle,
1602  globus_ftp_control_parallelism_t * parallelism);
1603 
1606  globus_ftp_control_handle_t * handle,
1607  globus_ftp_control_host_port_t * address);
1608 
1611  globus_ftp_control_handle_t * handle,
1612  globus_ftp_control_host_port_t addresses[],
1613  unsigned int num_addresses);
1614 
1617  globus_ftp_control_handle_t * handle,
1618  globus_ftp_control_host_port_t * address);
1619 
1622  globus_ftp_control_handle_t * handle,
1623  globus_ftp_control_host_port_t addresses[],
1624  unsigned int num_addresses);
1625 
1627 globus_ftp_control_get_spor(
1628  globus_ftp_control_handle_t * handle,
1629  globus_ftp_control_host_port_t addresses[],
1630  unsigned int * num_addresses);
1631 
1634  globus_ftp_control_handle_t * handle,
1636  int form_code);
1637 
1640  globus_ftp_control_handle_t * handle,
1641  globus_ftp_control_tcpbuffer_t * tcp_buffer);
1642 
1645  globus_ftp_control_handle_t * handle,
1647 
1649 globus_ftp_control_get_mode(
1650  globus_ftp_control_handle_t * handle,
1651  globus_ftp_control_mode_t * mode);
1652 
1654 globus_ftp_control_get_type(
1655  globus_ftp_control_handle_t * handle,
1656  globus_ftp_control_type_t * type);
1657 
1660  globus_ftp_control_handle_t * handle,
1661  const globus_ftp_control_dcau_t * dcau,
1662  gss_cred_id_t delegated_credential_handle);
1663 
1665 globus_ftp_control_get_dcau(
1666  globus_ftp_control_handle_t * handle,
1667  globus_ftp_control_dcau_t * dcau);
1668 
1670 globus_ftp_control_local_prot(
1671  globus_ftp_control_handle_t * handle,
1672  globus_ftp_control_protection_t protection);
1673 
1675 globus_ftp_control_get_prot(
1676  globus_ftp_control_handle_t * handle,
1677  globus_ftp_control_protection_t * protection);
1678 
1681  globus_ftp_control_handle_t * handle,
1682  globus_ftp_control_structure_t structure);
1683 
1686  globus_ftp_control_handle_t * handle,
1687  globus_byte_t * buffer,
1688  globus_size_t length,
1689  globus_off_t offset,
1690  globus_bool_t eof,
1692  void * callback_arg);
1693 
1696  globus_ftp_control_handle_t * handle,
1697  globus_byte_t * buffer,
1698  globus_size_t max_length,
1700  void * callback_arg);
1701 
1703 globus_ftp_control_data_read_all(
1704  globus_ftp_control_handle_t * handle,
1705  globus_byte_t * buffer,
1706  globus_size_t length,
1708  void * callback_arg);
1709 
1712  globus_ftp_control_handle_t * handle,
1713  globus_bool_t order_data,
1714  globus_off_t starting_offset);
1715 
1716 /* this has only been tested enough for the client library and GridFTP server
1717  * it is very likely to not work for general usage
1718  */
1721  globus_ftp_control_handle_t * handle,
1722  globus_bool_t allow);
1723 
1724 /*
1725  * internal function definitions
1726  */
1728 globus_i_ftp_parallelism_copy(
1729  globus_ftp_control_parallelism_t * dest_parallelism,
1730  globus_ftp_control_parallelism_t * src_parallelism);
1731 
1732 int
1733 globus_i_ftp_parallelism_get_size(
1734  globus_ftp_control_parallelism_t * parallelism);
1735 
1736 int
1737 globus_i_ftp_parallelism_get_min_size(
1738  globus_ftp_control_parallelism_t * parallelism);
1739 
1740 int
1741 globus_i_ftp_parallelism_get_max_size(
1742  globus_ftp_control_parallelism_t * parallelism);
1743 
1744 void
1745 globus_ftp_control_host_port_init(
1746  globus_ftp_control_host_port_t * host_port,
1747  char * host,
1748  unsigned short port);
1749 
1750 void
1751 globus_ftp_control_host_port_destroy(
1752  globus_ftp_control_host_port_t * host_port);
1753 
1754 void
1755 globus_ftp_control_host_port_get_host(
1756  globus_ftp_control_host_port_t * host_port,
1757  char * host);
1758 
1759 unsigned short
1760 globus_ftp_control_host_port_get_port(
1761  globus_ftp_control_host_port_t * host_port);
1762 
1763 void
1764 globus_ftp_control_host_port_copy(
1765  globus_ftp_control_host_port_t * dest,
1766  globus_ftp_control_host_port_t * src);
1767 
1768 #define globus_i_ftp_control_client_get_connection_info \
1769  globus_ftp_control_client_get_connection_info
1771 globus_ftp_control_client_get_connection_info(
1772  globus_ftp_control_handle_t * handle,
1773  int localhost[4],
1774  unsigned short * localport,
1775  int remotehost[4],
1776  unsigned short * remoteport);
1777 
1780  globus_ftp_control_handle_t * handle,
1781  globus_ftp_control_host_port_t * local_info,
1782  globus_ftp_control_host_port_t * remote_info);
1783 
1785 globus_ftp_control_data_get_socket_buf(
1786  globus_ftp_control_handle_t * handle,
1787  int * rcvbuf,
1788  int * sndbuf);
1789 
1791 globus_ftp_control_data_get_retransmit_count(
1792  globus_ftp_control_handle_t * handle,
1793  char ** retransmit_count);
1794 
1795 #ifdef __cplusplus
1796 }
1797 #endif
1798 
1799 
1800 #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:587
enum globus_ftp_control_striping_mode_e globus_ftp_control_striping_mode_t
GridFTP Striping Types.
globus_result_t globus_ftp_control_server_handle_init(globus_ftp_control_server_t *handle)
Initialize a GridFTP server handle.
Definition: globus_ftp_control_server.c:164
Definition: globus_ftp_control.h:126
Definition: globus_ftp_control.h:122
globus_result_t globus_ftp_control_server_authenticate(globus_ftp_control_handle_t *handle, globus_ftp_control_auth_requirements_t auth_requirements, globus_ftp_control_auth_callback_t callback, void *callback_arg)
Authenticate a GridFTP Client Connection.
Definition: globus_ftp_control_server.c:1250
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
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:526
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:108
globus_result_t globus_ftp_control_command_copy(globus_ftp_control_command_t *dest, globus_ftp_control_command_t *src)
Copy of GridFTP command.
Definition: globus_ftp_control_server.c:709
globus_result_t globus_ftp_control_create_data_info(globus_ftp_control_handle_t *handle, globus_ftp_control_data_write_info_t *data_info, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof, globus_ftp_control_data_callback_t callback, void *callback_arg)
Create a globus_ftp_control_data_write_info_t structure.
Definition: globus_ftp_control_data.c:5754
Definition: globus_ftp_control.h:347
struct globus_ftp_control_auth_info_s globus_ftp_control_auth_info_t
Authentication Values.
globus_result_t globus_ftp_control_data_send_eof(globus_ftp_control_handle_t *handle, int count[], int array_size, globus_bool_t eof_message, globus_ftp_control_callback_t cb, void *user_arg)
Send EOF.
Definition: globus_ftp_control_data.c:1938
Error Object Containing a String.
globus_result_t globus_ftp_control_local_spas(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t addresses[], unsigned int num_addresses)
Create multiple passive sockets.
Definition: globus_ftp_control_data.c:2995
Definition: globus_ftp_control.h:106
Definition: globus_ftp_control.h:82
Control DCAU union.
Definition: globus_ftp_control.h:172
globus_ftp_control_structure_e
Definition: globus_ftp_control.h:225
globus_result_t globus_ftp_control_server_handle_destroy(globus_ftp_control_server_t *handle)
Destroy a GridFTP server handle.
Definition: globus_ftp_control_server.c:214
globus_result_t globus_ftp_control_local_port(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t *address)
Set remote data address.
Definition: globus_ftp_control_data.c:3023
globus_ftp_control_parallelism_mode_e
Definition: globus_ftp_control.h:236
Definition: globus_ftp_control.h:88
globus_result_t globus_ftp_control_response_copy(globus_ftp_control_response_t *src, globus_ftp_control_response_t *dest)
Copy a response structure.
Definition: globus_ftp_control_client.c:1583
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
globus_ftp_control_delay_passive_t
Definition: globus_ftp_control.h:200
union globus_ftp_control_dcau_u globus_ftp_control_dcau_t
Control DCAU union.
Definition: globus_ftp_control.h:341
Definition: globus_ftp_control.h:86
struct globus_fifo_s * globus_fifo_t
Definition: globus_fifo.h:48
globus_result_t globus_ftp_control_send_command(globus_ftp_control_handle_t *handle, const char *cmdspec, globus_ftp_control_response_callback_t callback, void *callback_arg,...)
Send an FTP protocol command.
Definition: globus_ftp_control_client.c:1967
Definition: globus_ftp_control.h:84
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:811
globus_result_t globus_ftp_control_data_set_interface(globus_ftp_control_handle_t *handle, const char *interface_addr)
Create an outgoing FTP data connection.
Definition: globus_ftp_control_data.c:1163
Definition: globus_ftp_control.h:188
globus_result_t globus_ftp_control_release_data_info(globus_ftp_control_handle_t *handle, globus_ftp_control_data_write_info_t *data_info)
Release a data_info structure.
Definition: globus_ftp_control_data.c: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:192
Definition: globus_ftp_control.h:110
globus_result_t globus_ftp_control_read_commands(globus_ftp_control_handle_t *handle, globus_ftp_control_command_callback_t callback, void *callback_arg)
Read GridFTP commands.
Definition: globus_ftp_control_server.c: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:1021
globus_result_t globus_ftp_control_command_init(globus_ftp_control_command_t *command, char *raw_command, globus_ftp_control_auth_info_t *auth_info)
Initialize a GridFTP command.
Definition: globus_ftp_control_server.c:534
Definition: globus_ftp_control.h:128
struct globus_ftp_control_dcau_subject_s globus_ftp_control_dcau_subject_t
Control DCAU subject authentication type.
Control tcpbuffer attribute structure.
Definition: globus_ftp_control.h:383
Control striping attribute union.
Definition: globus_ftp_control.h:210
int globus_handle_t
Handle abstract type.
Definition: globus_handle_table.h:57
globus_result_t globus_ftp_control_client_get_connection_info_ex(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t *local_info, globus_ftp_control_host_port_t *remote_info)
Not documented yet.
Definition: globus_ftp_control_client.c:4771
globus_result_t globus_ftp_control_local_layout(globus_ftp_control_handle_t *handle, globus_ftp_control_layout_t *layout, globus_size_t data_size)
Set data layout.
Definition: globus_ftp_control_data.c:5478
List data type.
Definition: globus_list.h:44
globus_result_t globus_ftp_control_data_connect_write(globus_ftp_control_handle_t *handle, globus_ftp_control_data_connect_callback_t callback, void *user_arg)
Create an outgoing FTP data connection.
Definition: globus_ftp_control_data.c:1246
enum globus_ftp_control_structure_e globus_ftp_control_structure_t
globus_result_t globus_ftp_control_force_close(globus_ftp_control_handle_t *handle, globus_ftp_control_response_callback_t callback, void *callback_arg)
Force a control connection to close.
Definition: globus_ftp_control_client.c:3739
GSS Assist Header.
globus_result_t globus_ftp_control_get_pbsz(globus_ftp_control_handle_t *handle, unsigned long *bufsize)
Get data channel protection buffer size.
Definition: globus_ftp_control_data.c:4362
Definition: globus_ftp_control.h:104
globus_result_t globus_ftp_control_local_send_eof(globus_ftp_control_handle_t *handle, globus_bool_t send_eof)
Enable or disable automatic EOF handling.
Definition: globus_ftp_control_data.c:2622
Automatically set the TCP buffer/window size.
Definition: globus_ftp_control.h:372
Mutex.
Definition: globus_thread.h:107
globus_result_t globus_ftp_control_local_stru(globus_ftp_control_handle_t *handle, globus_ftp_control_structure_t structure)
Set data channel structure.
Definition: globus_ftp_control_data.c:4414
globus_result_t globus_ftp_control_quit(globus_ftp_control_handle_t *handle, globus_ftp_control_response_callback_t callback, void *callback_arg)
Send a GridFTP QUIT.
Definition: globus_ftp_control_client.c:2674
Control striping round robin attribute structure.
Definition: globus_ftp_control.h:157
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:90
globus_ftp_control_dcau_mode_e
GridFTP DCAU values.
Definition: globus_ftp_control.h:119
globus_result_t globus_ftp_control_handle_init(globus_ftp_control_handle_t *handle)
Initialize a globus ftp handle.
Definition: globus_ftp_control_client.c:132
globus_result_t globus_ftp_control_server_listen(globus_ftp_control_server_t *handle, unsigned short *port, globus_ftp_control_server_callback_t callback, void *callback_arg)
Listen on for FTP Client Connections.
Definition: globus_ftp_control_server.c:279
globus_result_t globus_ftp_control_authenticate_ex(globus_ftp_control_handle_t *handle, globus_ftp_control_auth_info_t *auth_info, globus_bool_t use_auth, globus_ftp_control_response_callback_t callback, void *callback_arg)
Authenticate the user to the FTP server.
Definition: globus_ftp_control_client.c:1764
int globus_ftp_control_auth_info_compare(globus_ftp_control_auth_info_t *auth_info_1, globus_ftp_control_auth_info_t *auth_info_2)
Compare authentication information.
Definition: globus_ftp_control_client.c:4017
globus_result_t globus_ftp_control_data_read(globus_ftp_control_handle_t *handle, globus_byte_t *buffer, globus_size_t max_length, globus_ftp_control_data_callback_t callback, void *callback_arg)
Read data from data connections.
Definition: globus_ftp_control_data.c: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:353
Definition: globus_ftp_control.h:344
unsigned char globus_byte_t
Unsigned byte datatypeThis is used for byte-addressable arrays of arbitrary data which is not subject...
Definition: globus_types.h:85
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:190
globus_result_t globus_ftp_control_data_remove_channels(globus_ftp_control_handle_t *handle, unsigned int num_channels, unsigned int stripe)
Remove Data Channels.
Definition: globus_ftp_control_data.c:2203
globus_result_t globus_ftp_control_server_accept(globus_ftp_control_server_t *listener, globus_ftp_control_handle_t *handle, globus_ftp_control_callback_t callback, void *callback_arg)
Accept a Client Connection.
Definition: globus_ftp_control_server.c:1026
Headers common to all of Globus.
globus_result_t globus_ftp_control_data_write(globus_ftp_control_handle_t *handle, globus_byte_t *buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof, globus_ftp_control_data_callback_t callback, void *callback_arg)
Write data to data connections.
Definition: globus_ftp_control_data.c:4501
uint32_t globus_result_t
Definition: globus_types.h:99
globus_ftp_control_tcpbuffer_mode_e
Definition: globus_ftp_control.h:338
struct globus_ftp_control_tcpbuffer_automatic_s globus_ftp_control_tcpbuffer_automatic_t
Automatically set the TCP buffer/window size.
Definition: globus_ftp_control.h:194
globus_result_t globus_ftp_control_set_force_order(globus_ftp_control_handle_t *handle, globus_bool_t order_data, globus_off_t starting_offset)
Set data handle to return read mode E data in order.
Definition: globus_ftp_control_data.c:3539
globus_result_t globus_ftp_control_local_tcp_buffer(globus_ftp_control_handle_t *handle, globus_ftp_control_tcpbuffer_t *tcp_buffer)
Set data handle TCP buffer size.
Definition: globus_ftp_control_data.c:3611
globus_result_t globus_ftp_control_data_get_total_data_channels(globus_ftp_control_handle_t *handle, unsigned int *num_channels, unsigned int stripe_ndx)
Get Total Data Channels For a Stripe.
Definition: globus_ftp_control_data.c:2399
enum globus_ftp_control_dcau_mode_e globus_ftp_control_dcau_mode_t
GridFTP DCAU values.
Definition: globus_ftp_control.h:102
globus_result_t globus_ftp_control_local_type(globus_ftp_control_handle_t *handle, globus_ftp_control_type_t type, int form_code)
Set control handle TYPE value.
Definition: globus_ftp_control_data.c:3293
globus_result_t globus_ftp_control_abort(globus_ftp_control_handle_t *handle, globus_ftp_control_response_callback_t callback, void *callback_arg)
Send a GridFTP ABORT.
Definition: globus_ftp_control_client.c:2392
Set the TCP buffer/window size to a fixed value.
Definition: globus_ftp_control.h:362
Control DCAU subject authentication type.
Definition: globus_ftp_control.h:134
globus_result_t globus_ftp_control_ipv6_allow(globus_ftp_control_handle_t *handle, globus_bool_t allow)
Not documented yet.
Definition: globus_ftp_control_client.c:5064
globus_result_t globus_ftp_control_local_dcau(globus_ftp_control_handle_t *handle, const globus_ftp_control_dcau_t *dcau, gss_cred_id_t delegated_credential_handle)
Set data channel DCAU.
Definition: globus_ftp_control_data.c:3950
globus_result_t globus_ftp_control_local_spor(globus_ftp_control_handle_t *handle, globus_ftp_control_host_port_t addresses[], unsigned int num_addresses)
Set remote data addresses.
Definition: globus_ftp_control_data.c:3203
globus_ftp_control_type_e
GridFTP TYPE values.
Definition: globus_ftp_control.h:79
void(* globus_ftp_control_callback_t)(void *callback_arg, struct globus_ftp_control_handle_s *handle, globus_object_t *error)
Definition: globus_ftp_control.h:546
globus_result_t globus_ftp_control_local_pbsz(globus_ftp_control_handle_t *handle, unsigned long bufsize)
Set data channel protection buffer size.
Definition: globus_ftp_control_data.c:4299
union globus_ftp_control_tcpbuffer_t globus_ftp_control_tcpbuffer_t
Control tcpbuffer attribute structure.
globus_result_t globus_ftp_control_authenticate(globus_ftp_control_handle_t *handle, globus_ftp_control_auth_info_t *auth_info, globus_bool_t use_auth, globus_ftp_control_response_callback_t callback, void *callback_arg)
Authenticate the user to the FTP server.
Definition: globus_ftp_control_client.c:1712
globus_result_t globus_ftp_control_handle_destroy(globus_ftp_control_handle_t *handle)
Destroy a globus ftp handle.
Definition: globus_ftp_control_client.c:235
globus_result_t globus_ftp_control_auth_info_init(globus_ftp_control_auth_info_t *auth_info, gss_cred_id_t credential_handle, globus_bool_t encrypt, char *user, char *password, char *account, char *subject)
Initialize authentication information.
Definition: globus_ftp_control_client.c:3952
globus_ftp_control_striping_mode_e
GridFTP Striping Types.
Definition: globus_ftp_control.h:147
Handle Table for Reference Counting Data.
globus_ftp_control_mode_e
GridFTP MODE values.
Definition: globus_ftp_control.h:99
globus_result_t globus_ftp_control_send_response(globus_ftp_control_handle_t *handle, const char *respspec, globus_ftp_control_callback_t callback, void *callback_arg,...)
Send a GridFTP response.
Definition: globus_ftp_control_server.c: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:633
Authentication Values.
Definition: globus_ftp_control.h:483
Definition: globus_ftp_control.h:124
Control parallelism attribute structure.
Definition: globus_ftp_control.h:261
globus_ftp_control_protection_t
GridFTP Protection Types.
Definition: globus_ftp_control.h:185
Module Descriptor.
Definition: globus_module.h:71
globus_result_t globus_ftp_control_local_parallelism(globus_ftp_control_handle_t *handle, globus_ftp_control_parallelism_t *parallelism)
Set control handle parallelism.
Definition: globus_ftp_control_data.c:2738