17 #if !defined(GLOBUS_XIO_DRIVER_H)
18 #define GLOBUS_XIO_DRIVER_H 1
20 #include "globus_common.h"
21 #include "globus_xio_load.h"
22 #include "globus_common.h"
23 #include "globus_xio_types.h"
24 #include "globus_xio.h"
25 #include "globus_xio_util.h"
35 #define GlobusIXIOAttrGetDS(_out_ds, _in_attr, _in_driver) \
39 globus_i_xio_attr_t * _attr; \
40 globus_xio_driver_t _driver; \
41 globus_i_xio_attr_ent_t * _entry; \
45 _driver = (_in_driver); \
47 if(_in_attr == NULL) \
53 _entry = _attr->entry; \
54 for(_ctr = 0; _ctr < _attr->ndx && _ds == NULL; _ctr++) \
56 if(_entry[_ctr].driver == _driver) \
58 _ds = _entry[_ctr].driver_data; \
288 globus_xio_operation_t op,
289 globus_result_t result,
316 globus_xio_operation_t op,
317 globus_result_t result,
318 globus_size_t nbytes,
322 typedef globus_result_t
323 (*globus_xio_driver_push_driver_t)(
324 globus_xio_driver_t driver,
325 globus_xio_stack_t stack);
328 globus_xio_driver_attr_cntl(
329 globus_xio_operation_t op,
330 globus_xio_driver_t driver,
335 globus_xio_driver_data_descriptor_cntl(
336 globus_xio_operation_t op,
337 globus_xio_driver_t driver,
352 globus_xio_driver_handle_t handle,
353 globus_xio_driver_t driver,
360 typedef globus_result_t
361 (*globus_xio_driver_get_driver_t)(
362 globus_xio_driver_t * out_driver);
371 typedef globus_result_t
373 void ** out_driver_attr);
382 typedef globus_result_t
394 typedef globus_result_t
417 typedef globus_result_t
449 typedef globus_result_t
452 const globus_xio_contact_t * contact_info,
453 globus_xio_operation_t op);
480 globus_xio_driver_pass_server_init(
481 globus_xio_operation_t op,
482 const globus_xio_contact_t * contact_info,
483 void * driver_server);
499 typedef globus_result_t
501 void * driver_server);
523 typedef globus_result_t
525 void * driver_server,
526 globus_xio_operation_t op);
529 globus_xio_driver_pass_accept(
530 globus_xio_operation_t op,
538 (*globus_xio_driver_cancel_callback_t)(
539 globus_xio_operation_t op,
541 globus_xio_error_type_t reason);
564 globus_xio_operation_t op,
566 globus_result_t result);
585 typedef globus_result_t
587 void * driver_server,
595 typedef globus_result_t
596 (*globus_xio_driver_link_cntl_t)(
611 typedef globus_result_t
648 typedef globus_result_t
650 const globus_xio_contact_t * contact_info,
653 globus_xio_operation_t op);
659 typedef globus_result_t
661 const globus_xio_contact_t * contact_info,
664 globus_xio_operation_t op);
696 globus_xio_operation_t op,
697 const globus_xio_contact_t * contact_info,
722 void * driver_handle,
723 globus_xio_operation_t op,
724 globus_result_t result);
749 globus_xio_operation_t * operation,
750 globus_xio_driver_handle_t handle);
756 globus_xio_driver_operation_destroy(
757 globus_xio_operation_t operation);
763 globus_xio_driver_operation_cancel(
764 globus_xio_driver_handle_t handle,
765 globus_xio_operation_t operation);
777 globus_xio_operation_t operation);
790 typedef globus_result_t
798 globus_xio_driver_merge_handle(
799 globus_xio_operation_t op,
800 globus_xio_driver_handle_t handle);
826 typedef globus_result_t
828 void * driver_handle,
830 globus_xio_operation_t op);
852 globus_xio_operation_t op,
873 globus_xio_operation_t op,
874 globus_result_t result);
902 typedef globus_result_t
904 void * driver_specific_handle,
905 const globus_xio_iovec_t * iovec,
907 globus_xio_operation_t op);
942 globus_xio_operation_t op,
943 globus_xio_iovec_t * iovec,
945 globus_size_t wait_for,
968 globus_xio_operation_t op,
969 globus_result_t result,
970 globus_size_t nread);
998 globus_xio_operation_t op);
1024 globus_xio_operation_t op);
1052 typedef globus_result_t
1054 void * driver_specific_handle,
1055 const globus_xio_iovec_t * iovec,
1057 globus_xio_operation_t op);
1093 globus_xio_operation_t op,
1094 globus_xio_iovec_t * iovec,
1096 globus_size_t wait_for,
1119 globus_xio_operation_t op,
1120 globus_result_t result,
1121 globus_size_t nwritten);
1149 globus_xio_operation_t top_op,
1150 globus_xio_operation_t bottom_op);
1214 globus_xio_driver_init(
1215 globus_xio_driver_t * driver,
1216 const char * driver_name,
1223 globus_xio_driver_get_user_data(
1224 globus_xio_driver_t in_driver,
1225 void ** out_user_data);
1231 globus_xio_operation_attr_cntl(
1232 globus_xio_operation_t op,
1233 globus_xio_attr_cmd_t cmd,
1240 globus_xio_driver_destroy(
1241 globus_xio_driver_t driver);
1247 globus_xio_driver_set_transport(
1248 globus_xio_driver_t driver,
1259 globus_xio_driver_set_transform(
1260 globus_xio_driver_t driver,
1266 globus_xio_driver_push_driver_t push_driver_func);
1272 globus_xio_driver_set_server(
1273 globus_xio_driver_t driver,
1278 globus_xio_driver_link_cntl_t link_cntl_func,
1285 globus_xio_driver_set_attr(
1286 globus_xio_driver_t driver,
1296 globus_xio_operation_block_timeout(
1297 globus_xio_operation_t op);
1300 globus_xio_operation_unblock_timeout(
1301 globus_xio_operation_t op);
1304 globus_xio_operation_refresh_timeout(
1305 globus_xio_operation_t op);
1309 globus_xio_operation_enable_cancel(
1310 globus_xio_operation_t op,
1311 globus_xio_driver_cancel_callback_t cb,
1315 globus_xio_operation_disable_cancel(
1316 globus_xio_operation_t op);
1319 globus_xio_operation_is_canceled(
1320 globus_xio_operation_t op);
1323 globus_xio_operation_get_wait_for(
1324 globus_xio_operation_t op);
1327 globus_xio_operation_get_driver_specific(
1328 globus_xio_operation_t op);
1331 globus_xio_operation_get_user_driver(
1332 globus_xio_operation_t op);
1335 globus_xio_driver_handle_t
1336 globus_xio_operation_get_driver_handle(
1337 globus_xio_operation_t op);
1343 globus_xio_driver_handle_t
1344 globus_xio_operation_get_driver_self_handle(
1345 globus_xio_operation_t op);
1348 globus_xio_operation_get_data_descriptor(
1349 globus_xio_operation_t op,
1350 globus_bool_t force_create);
1353 globus_xio_operation_copy_stack(
1354 globus_xio_operation_t op,
1355 globus_xio_stack_t * stack);
1361 typedef globus_result_t
1362 (*globus_xio_string_cntl_parse_func_t)(
1372 typedef struct globus_xio_string_cntl_table_s
1376 globus_xio_string_cntl_parse_func_t parse_func;
1377 } globus_xio_string_cntl_table_t;
1434 globus_xio_driver_string_cntl_set_table(
1435 globus_xio_driver_t driver,
1436 globus_xio_string_cntl_table_t * table);
1518 globus_xio_string_cntl_formated_off(
1526 globus_xio_string_cntl_formated_int(
1534 globus_xio_string_cntl_string_list(