Grid Community Toolkit  6.2.1629922860 (tag: v6.2.20210826)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_i_gridftp_server.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_I_GRIDFTP_SERVER_H
18 #define GLOBUS_I_GRIDFTP_SERVER_H
19 
20 #include "globus_i_gridftp_server_config.h"
21 #include "globus_gridftp_server.h"
22 #include "globus_gridftp_server_control.h"
23 #include "globus_i_gfs_acl.h"
24 #include "globus_xio.h"
25 #include "globus_xio_system.h"
26 #include "globus_xio_tcp_driver.h"
27 #include "globus_xio_gsi.h"
28 #include "globus_ftp_control.h"
29 #include "globus_gsi_authz.h"
30 
31 #define _GSSL(s) globus_common_i18n_get_string_by_key(\
32  NULL, \
33  "globus_gridftp_server", \
34  s)
35 
36 #define _FSSL(s,p) globus_common_i18n_get_string_by_key(\
37  p, \
38  "globus_gridftp_server", \
39  s)
40 
41 typedef void
42 (*globus_i_gfs_server_close_cb_t)(
43  void * user_arg,
44  globus_object_t * error);
45 
46 typedef struct globus_i_gfs_monitor_s
47 {
48  globus_bool_t done;
49  globus_cond_t cond;
50  globus_mutex_t mutex;
51 } globus_i_gfs_monitor_t;
52 
53 typedef struct gfs_i_stack_entry_s
54 {
55  globus_xio_driver_t driver;
56  char * driver_name;
57  char * opts;
58 } gfs_i_stack_entry_t;
59 
60 typedef struct
61 {
62  int cmd_id;
63  char * cmd_name;
64  char * help_str;
65  int max_argc;
66  int min_argc;
67  globus_bool_t has_pathname;
68  int access_type;
69 } globus_i_gfs_cmd_ent_t;
70 
71 typedef struct globus_i_gfs_op_info_s
72 {
73  int id;
74  globus_hashtable_t custom_command_table;
75 
76  char ** argv;
77  int argc;
78  globus_i_gfs_cmd_ent_t * cmd_ent;
79 
80  char * remote_ip;
81 } globus_i_gfs_op_info_t;
82 
83 void
84 globus_i_gfs_monitor_init(
85  globus_i_gfs_monitor_t * monitor);
86 
87 void
88 globus_i_gfs_monitor_destroy(
89  globus_i_gfs_monitor_t * monitor);
90 
91 void
92 globus_i_gfs_monitor_wait(
93  globus_i_gfs_monitor_t * monitor);
94 
95 void
96 globus_i_gfs_monitor_signal(
97  globus_i_gfs_monitor_t * monitor);
98 
99 void
100 globus_i_gfs_ipc_stop();
101 
102 void
103 globus_i_gfs_control_stop();
104 
105 void
106 globus_i_gfs_control_init();
107 
109 globus_i_gfs_brain_init(
110  globus_callback_func_t ready_cb,
111  void * ready_cb_arg);
112 
113 void
114 globus_i_gfs_control_end_421(
115  const char * msg);
116 
117 void
118 globus_l_gfs_data_brain_ready(
119  void * user_arg);
120 
122 globus_i_gfs_get_full_path(
123  const char * home_dir,
124  const char * server_cwd,
125  void * session_arg,
126  const char * in_path,
127  char ** ret_path,
128  int access_type);
129 
130 #define GlobusGFSErrorGenericStr(_res, _fmt) \
131 do \
132 { \
133  char * _tmp_str; \
134  _tmp_str = globus_common_create_string _fmt; \
135  _res = globus_error_put( \
136  globus_error_construct_error( \
137  GLOBUS_NULL, \
138  GLOBUS_NULL, \
139  GLOBUS_GFS_ERROR_GENERIC, \
140  __FILE__, \
141  _gfs_name, \
142  __LINE__, \
143  "%s", \
144  _tmp_str)); \
145  globus_free(_tmp_str); \
146  \
147 } while(0)
148 
149 extern globus_gfs_acl_module_t globus_gfs_acl_cas_module;
150 extern globus_gfs_acl_module_t globus_gfs_acl_test_module;
151 
152 typedef enum globus_l_gfs_auth_level_e
153 {
154  GLOBUS_L_GFS_AUTH_NONE = 0x00,
155  GLOBUS_L_GFS_AUTH_IDENTIFY = 0x01,
156  GLOBUS_L_GFS_AUTH_ACTION = 0x02,
157  GLOBUS_L_GFS_AUTH_NOSETUID = 0x04,
158  GLOBUS_L_GFS_AUTH_NOGRIDMAP = 0x08,
159  GLOBUS_L_GFS_AUTH_DATA_NODE_PATH = 0x10,
160  GLOBUS_L_GFS_AUTH_ALL = 0xFF
161 } globus_l_gfs_auth_level_t;
162 
163 #include "globus_i_gfs_log.h"
164 #include "globus_i_gfs_control.h"
165 #include "globus_i_gfs_ipc.h"
166 #include "globus_i_gfs_data.h"
167 #include "globus_i_gfs_config.h"
168 
169 #endif
GridFTP Control Connection API.
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
XIO GSI Driver.
Header file for XIO TCP Driver.
GSI Authorization API.
Mutex.
Definition: globus_thread.h:107
Condition variable.
Definition: globus_thread.h:124
void(* globus_callback_func_t)(void *user_arg)
Globus callback prototype.
Definition: globus_callback.h:314
uint32_t globus_result_t
Definition: globus_types.h:99