21 #ifndef GLOBUS_XIO_SYSTEM_INCLUDE
22 #define GLOBUS_XIO_SYSTEM_INCLUDE
25 #include "globus_xio_types.h"
31 #define GLOBUS_XIO_SYSTEM_MODULE (&globus_i_xio_system_module)
38 #define GLOBUS_XIO_SYSTEM_INVALID_FILE INVALID_HANDLE_VALUE
39 #define GLOBUS_XIO_SYSTEM_INVALID_SOCKET INVALID_SOCKET
41 typedef struct globus_l_xio_win32_file_s * globus_xio_system_file_handle_t;
42 typedef struct globus_l_xio_win32_socket_s * globus_xio_system_socket_handle_t;
44 typedef SOCKET globus_xio_system_socket_t;
45 typedef HANDLE globus_xio_system_file_t;
49 #define GLOBUS_XIO_SYSTEM_INVALID_FILE -1
50 #define GLOBUS_XIO_SYSTEM_INVALID_SOCKET -1
53 typedef struct globus_l_xio_system_s * globus_xio_system_file_handle_t;
54 typedef struct globus_l_xio_system_s * globus_xio_system_socket_handle_t;
57 typedef int globus_xio_system_socket_t;
58 typedef int globus_xio_system_file_t;
61 typedef int globus_xio_system_native_handle_t;
66 GLOBUS_XIO_SYSTEM_ERROR_SYSTEM_ERROR = 1024,
67 GLOBUS_XIO_SYSTEM_ERROR_TOO_MANY_FDS,
68 GLOBUS_XIO_SYSTEM_ERROR_ALREADY_REGISTERED,
69 GLOBUS_XIO_SYSTEM_ERROR_OPERATION_CANCELED,
70 GLOBUS_XIO_SYSTEM_ERROR_NOT_REGISTERED
71 } globus_xio_system_error_type_t;
75 GLOBUS_XIO_SYSTEM_FILE = 1,
76 GLOBUS_XIO_SYSTEM_TCP,
77 GLOBUS_XIO_SYSTEM_TCP_LISTENER,
79 } globus_xio_system_type_t;
82 (*globus_xio_system_callback_t)(
87 (*globus_xio_system_data_callback_t)(
101 globus_xio_system_file_init(
102 globus_xio_system_file_handle_t * handle,
103 globus_xio_system_file_t fd);
112 globus_xio_system_file_destroy(
113 globus_xio_system_file_handle_t handle);
116 globus_xio_system_file_register_read(
117 globus_xio_operation_t op,
118 globus_xio_system_file_handle_t handle,
120 const globus_xio_iovec_t * iov,
123 globus_xio_system_data_callback_t callback,
127 globus_xio_system_file_register_write(
128 globus_xio_operation_t op,
129 globus_xio_system_file_handle_t handle,
131 const globus_xio_iovec_t * iov,
134 globus_xio_system_data_callback_t callback,
139 globus_xio_system_file_read(
140 globus_xio_system_file_handle_t handle,
142 const globus_xio_iovec_t * iov,
148 globus_xio_system_file_write(
149 globus_xio_system_file_handle_t handle,
151 const globus_xio_iovec_t * iov,
158 globus_xio_system_file_get_position(
159 globus_xio_system_file_t fd);
162 globus_xio_system_file_get_size(
163 globus_xio_system_file_t fd);
165 globus_xio_system_file_t
166 globus_xio_system_convert_stdio(
170 globus_xio_system_file_truncate(
171 globus_xio_system_file_t fd,
175 globus_xio_system_file_open(
176 globus_xio_system_file_t * fd,
177 const char * filename,
182 globus_xio_system_file_close(
183 globus_xio_system_file_t fd);
191 globus_xio_system_socket_init(
192 globus_xio_system_socket_handle_t * handle,
193 globus_xio_system_socket_t socket,
194 globus_xio_system_type_t type);
203 globus_xio_system_socket_destroy(
204 globus_xio_system_socket_handle_t handle);
207 globus_xio_system_socket_register_connect(
208 globus_xio_operation_t op,
209 globus_xio_system_socket_handle_t handle,
210 globus_sockaddr_t * addr,
211 globus_xio_system_callback_t callback,
215 globus_xio_system_socket_register_accept(
216 globus_xio_operation_t op,
217 globus_xio_system_socket_handle_t listener_handle,
218 globus_xio_system_socket_t * out_handle,
219 globus_xio_system_callback_t callback,
227 globus_xio_system_socket_register_read(
228 globus_xio_operation_t op,
229 globus_xio_system_socket_handle_t handle,
230 const globus_xio_iovec_t * iov,
234 globus_sockaddr_t * out_from,
235 globus_xio_system_data_callback_t callback,
242 globus_xio_system_socket_register_write(
243 globus_xio_operation_t op,
244 globus_xio_system_socket_handle_t handle,
245 const globus_xio_iovec_t * iov,
249 globus_sockaddr_t * to,
250 globus_xio_system_data_callback_t callback,
255 globus_xio_system_socket_read(
256 globus_xio_system_socket_handle_t handle,
257 const globus_xio_iovec_t * iov,
261 globus_sockaddr_t * from,
266 globus_xio_system_socket_write(
267 globus_xio_system_socket_handle_t handle,
268 const globus_xio_iovec_t * iov,
272 globus_sockaddr_t * to,
277 globus_xio_system_socket_create(
278 globus_xio_system_socket_t * socket,
284 globus_xio_system_socket_setsockopt(
285 globus_xio_system_socket_t socket,
292 globus_xio_system_socket_getsockopt(
293 globus_xio_system_socket_t socket,
300 globus_xio_system_socket_getsockname(
301 globus_xio_system_socket_t socket,
302 struct sockaddr * name,
306 globus_xio_system_socket_getpeername(
307 globus_xio_system_socket_t socket,
308 struct sockaddr * name,
312 globus_xio_system_socket_bind(
313 globus_xio_system_socket_t socket,
314 struct sockaddr * addr,
318 globus_xio_system_socket_listen(
319 globus_xio_system_socket_t socket,
323 globus_xio_system_socket_connect(
324 globus_xio_system_socket_t socket,
325 const struct sockaddr * addr,
329 globus_xio_system_socket_close(
330 globus_xio_system_socket_t socket);
socklen_t globus_socklen_t
Size of a socket length parameter.
Definition: globus_types.h:68
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
Headers common to all of Globus.
uint32_t globus_result_t
Definition: globus_types.h:99
Module Descriptor.
Definition: globus_module.h:71