globus_ftp_control 9.10
Loading...
Searching...
No Matches
globus_i_ftp_control.h
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
17#ifndef GLOBUS_INCLUDE_FTP_I_CONTROL_H
18#define GLOBUS_INCLUDE_FTP_I_CONTROL_H 1
19
20#define GLOBUS_I_FTP_CONTROL_BUF_SIZE 200
21#define GLOBUS_I_FTP_CONTROL_BUF_INCR 100
22
23#define GLOBUS_I_TELNET_IP "\xFF\xF4"
24#define GLOBUS_I_TELNET_SYNCH "\xFF\xF2"
25#define GLOBUS_I_TELNET_IAC '\xFF'
26
27#include "globus_config.h"
28
29extern
30FILE * globus_i_ftp_control_devnull;
31
32typedef enum
33{
34 GLOBUS_I_FTP_AUTH,
35 GLOBUS_I_FTP_ACCT,
36 GLOBUS_I_FTP_ADAT,
37 GLOBUS_I_FTP_QUIT,
38 GLOBUS_I_FTP_USER,
39 GLOBUS_I_FTP_PASS,
40 GLOBUS_I_FTP_NOOP
41}
42globus_i_ftp_cmd_t;
43
44typedef struct globus_i_ftp_passthru_cb_arg_s
45{
47 void * user_cb_arg;
48 globus_i_ftp_cmd_t cmd;
49 globus_ftp_control_handle_t * handle;
50} globus_i_ftp_passthru_cb_arg_t;
51
52typedef struct globus_i_ftp_server_passthru_cb_arg_s
53{
55 void * callback_arg;
56 globus_ftp_control_server_t * server_handle;
57} globus_i_ftp_server_passthru_cb_arg_t;
58
59
60void
61globus_i_ftp_control_call_close_cb(
62 globus_ftp_control_handle_t * handle);
63
64void
65globus_i_ftp_control_write_next(
66 globus_ftp_control_handle_t * handle);
67
68globus_result_t
69globus_i_ftp_control_radix_encode(
70 unsigned char * inbuf,
71 unsigned char * outbuf,
72 int * length);
73
74globus_result_t
75globus_i_ftp_control_radix_decode(
76 unsigned char * inbuf,
77 unsigned char * outbuf,
78 int * length);
79
80globus_result_t
81globus_i_ftp_control_decode_command(
82 char * cmd,
83 char ** decoded_cmd,
85
86globus_result_t
87globus_i_ftp_control_encode_command(
88 globus_ftp_cc_handle_t * cc_handle,
89 char * cmd,
90 char ** encoded_cmd);
91
92
93globus_result_t
94globus_i_ftp_control_encode_reply(
95 char * reply,
96 char ** encoded_reply,
98
99globus_result_t
100globus_i_ftp_control_data_set_netlogger(
101 globus_ftp_control_handle_t * handle,
102 globus_netlogger_handle_t * nl_handle,
103 globus_bool_t nl_ftp_control,
104 globus_bool_t nl_globus_io);
105
106globus_result_t
107globus_i_ftp_control_client_set_netlogger(
108 globus_ftp_control_handle_t * handle,
109 globus_netlogger_handle_t * nl_handle);
110
111globus_result_t
112globus_i_ftp_control_data_activate(void);
113
114globus_result_t
115globus_i_ftp_control_data_deactivate(void);
116
117
118globus_result_t
119globus_i_ftp_control_client_activate(void);
120
121globus_result_t
122globus_i_ftp_control_client_deactivate(void);
123
124globus_result_t
125globus_i_ftp_control_server_activate(void);
126
127globus_result_t
128globus_i_ftp_control_server_deactivate(void);
129
130globus_result_t
131globus_i_ftp_control_data_cc_destroy(
132 globus_ftp_control_handle_t * control_handle);
133
134globus_result_t
135globus_i_ftp_control_data_cc_blocking_destroy(
136 globus_ftp_control_handle_t * control_handle);
137
138globus_result_t
139globus_i_ftp_control_data_abort(
140 globus_ftp_control_handle_t * control_handle,
141 globus_object_t * error);
142
143globus_result_t
144globus_i_ftp_control_auth_info_init(
147
148globus_result_t
149globus_i_ftp_control_auth_info_destroy(
151
152globus_result_t
153globus_i_ftp_control_get_connection_info(
154 globus_ftp_control_handle_t * handle,
155 int * local_host,
156 unsigned short * local_port,
157 int * remote_host,
158 unsigned short * remote_port);
159
160/*
161 * internal function definitions
162 */
163globus_result_t
164globus_i_ftp_parallelism_copy(
165 globus_ftp_control_parallelism_t * dest_parallelism,
166 globus_ftp_control_parallelism_t * src_parallelism);
167
168int
169globus_i_ftp_parallelism_get_size(
171
172int
173globus_i_ftp_parallelism_get_min_size(
175
176int
177globus_i_ftp_parallelism_get_max_size(
179
180void
181globus_ftp_control_host_port_init(
182 globus_ftp_control_host_port_t * host_port,
183 char * host,
184 unsigned short port);
185
186void
187globus_ftp_control_host_port_destroy(
188 globus_ftp_control_host_port_t * host_port);
189
190void
191globus_ftp_control_host_port_get_host(
192 globus_ftp_control_host_port_t * host_port,
193 char * host);
194
195unsigned short
196globus_ftp_control_host_port_get_port(
197 globus_ftp_control_host_port_t * host_port);
198
199void
200globus_ftp_control_host_port_copy(
201 globus_ftp_control_host_port_t * dest,
202 globus_ftp_control_host_port_t * src);
203
204globus_result_t
205globus_i_ftp_control_client_get_connection_info(
206 globus_ftp_control_handle_t * handle,
207 int localhost[4],
208 unsigned short * localport,
209 int remotehost[4],
210 unsigned short * remoteport);
211
212extern const char * globus_i_ftp_server_welcome;
213extern const char * globus_i_ftp_server_user_reply;
214extern const char * globus_i_ftp_server_pass_reply;
215
216extern int globus_i_ftp_control_debug_level;
217
218#ifdef BUILD_DEBUG
219#define globus_i_ftp_control_debug(Level) \
220 (globus_i_ftp_control_debug_level >= (Level))
221
222#define globus_i_ftp_control_debug_printf(level, message) \
223do { \
224 if (globus_i_ftp_control_debug(level)) \
225 { \
226 globus_libc_fprintf message; \
227 } \
228} while (0)
229#else
230#define globus_i_ftp_control_debug_printf(level, message)
231#endif
232
233
234#endif
235
236
struct globus_ftp_control_auth_info_s globus_ftp_control_auth_info_t
Authentication Values.
union globus_ftp_control_parallelism_u globus_ftp_control_parallelism_t
Control parallelism attribute structure.
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
void(* globus_ftp_control_server_callback_t)(void *callback_arg, struct globus_ftp_control_server_s *server_handle, globus_object_t *error)
Server callback.
Definition globus_ftp_control.h:1028