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