Grid Community Toolkit
6.2.1629922860 (tag: v6.2.20210826)
|
DSI interface. More...
Go to the source code of this file.
Typedefs | |
typedef enum globus_gfs_event_type_e | globus_gfs_event_type_t |
Event types. More... | |
typedef void(* | globus_gfs_storage_init_t )(globus_gfs_operation_t op, globus_gfs_session_info_t *session_info) |
typedef void(* | globus_gridftp_server_write_cb_t )(globus_gfs_operation_t op, globus_result_t result, globus_byte_t *buffer, globus_size_t nbytes, void *user_arg) |
Enumerations | |
enum | globus_gfs_event_type_e { GLOBUS_GFS_EVENT_TRANSFER_BEGIN = 0x0001, GLOBUS_GFS_EVENT_TRANSFER_ABORT = 0x0002, GLOBUS_GFS_EVENT_TRANSFER_COMPLETE = 0x0004, GLOBUS_GFS_EVENT_DISCONNECTED = 0x0008, GLOBUS_GFS_EVENT_BYTES_RECVD = 0x0010, GLOBUS_GFS_EVENT_RANGES_RECVD = 0x0020, GLOBUS_GFS_EVENT_TRANSFER_CONNECTED = 0x0040, GLOBUS_GFS_EVENT_PARTIAL_EOF_COUNT = 0x0100, GLOBUS_GFS_EVENT_FINAL_EOF_COUNT = 0x0200, GLOBUS_GFS_EVENT_ALL = 0xFFFF } |
Event types. More... | |
enum | globus_gfs_op_info_param_t |
enum | |
Functions | |
void | globus_gridftp_server_operation_finished (globus_gfs_operation_t op, globus_result_t result, globus_gfs_finished_info_t *finished_info) |
globus_result_t | globus_gridftp_server_set_checksum_support (globus_gfs_operation_t op, const char *cksm_str) |
globus_object_t * | globus_gfs_ftp_response_error_construct (globus_module_descriptor_t *base_source, globus_object_t *base_cause, int response_code, const char *response_error_code, const char *fmt,...) |
globus_object_t * | globus_gfs_ftp_response_error_v_initialize (globus_object_t *error, globus_module_descriptor_t *base_source, globus_object_t *base_cause, int response_code, const char *response_error_code, const char *fmt, va_list ap) |
globus_object_t * | globus_gfs_ftp_response_error_initialize (globus_object_t *error, globus_module_descriptor_t *base_source, globus_object_t *base_cause, int response_code, const char *response_error_code, const char *fmt,...) |
int | globus_gfs_error_get_ftp_response_code (globus_object_t *error) |
const char * | globus_gfs_error_get_ftp_response_error_code (globus_object_t *error) |
globus_bool_t | globus_gfs_error_match_response_error_code (globus_object_t *error, const char *response_error_code) |
globus_object_t * | globus_i_gfs_error_system (int ftp_code, int system_errno, const char *fmt,...) |
Variables | |
const globus_object_type_t | GLOBUS_GFS_ERROR_FTP_RESPONSE_TYPE_DEFINITION |
DSI interface.
If you are interested in writing a module for this server and want to discuss it's design, or are already writing one and would like support, please subscribe to gridf: tp-d ev@gl obus .orghttps://lists.globus.org/mailman/listinfo/gridftp-dev In fact, we'd like to hear from you even if you don't need any assistance.
typedef enum globus_gfs_event_type_e globus_gfs_event_type_t |
Event types.
[Request] types are passed as parameters to the DSI's globus_gfs_storage_trev_t func. Supported events must be specified in the event_mask of globus_gridftp_server_begin_transfer().
[Reply] types are passed back via globus_gridftp_server_operation_event() with any associated data. globus_gridftp_server_begin_transfer() is a convience wrapper which accomplishes the same as globus_gridftp_server_operation_event() with an event type of a GLOBUS_GFS_EVENT_TRANSFER_BEGIN.
In a multi-node configuration, generally request types must be passed on to all nodes (multiplexed), and reply types must be counted and passed back as one event (demultiplexed). Some events can be passed back multiple times as noted.
typedef void(* globus_gfs_storage_init_t)(globus_gfs_operation_t op, globus_gfs_session_info_t *session_info) |
Interface Definition
typedef void(* globus_gridftp_server_write_cb_t)(globus_gfs_operation_t op, globus_result_t result, globus_byte_t *buffer, globus_size_t nbytes, void *user_arg) |
Data Read and Write Functions
anonymous enum |
Error and result object helper macros
Event types.
[Request] types are passed as parameters to the DSI's globus_gfs_storage_trev_t func. Supported events must be specified in the event_mask of globus_gridftp_server_begin_transfer().
[Reply] types are passed back via globus_gridftp_server_operation_event() with any associated data. globus_gridftp_server_begin_transfer() is a convience wrapper which accomplishes the same as globus_gridftp_server_operation_event() with an event type of a GLOBUS_GFS_EVENT_TRANSFER_BEGIN.
In a multi-node configuration, generally request types must be passed on to all nodes (multiplexed), and reply types must be counted and passed back as one event (demultiplexed). Some events can be passed back multiple times as noted.
Helper Functions
int globus_gfs_error_get_ftp_response_code | ( | globus_object_t * | error | ) |
Retrieve the response code from a globus_ftp_response_error object
error | The error from which to retrieve the response code |
const char* globus_gfs_error_get_ftp_response_error_code | ( | globus_object_t * | error | ) |
Retrieve the gridftp response_error_code from a globus_ftp_response_error object
error | The error from which to retrieve the response code |
globus_bool_t globus_gfs_error_match_response_error_code | ( | globus_object_t * | error, |
const char * | response_error_code | ||
) |
Determine if the gridftp response_error_code matches
error | The error from which to retrieve the response code |
response_error_code | The response error code string to match. |
globus_object_t* globus_gfs_ftp_response_error_construct | ( | globus_module_descriptor_t * | base_source, |
globus_object_t * | base_cause, | ||
int | response_code, | ||
const char * | response_error_code, | ||
const char * | fmt, | ||
... | |||
) |
Allocate and initialize an error of type GLOBUS_ERROR_TYPE_FTP_RESPONSE
base_source | Pointer to the originating module. |
base_cause | The error object causing the error. If this is the original error, this parameter may be NULL. |
response_code | The FTP response code. |
response_error_code | If non-NULL, this is the GlobusError response code and the message will be formatted as a v=1 message and fmt is optional. If NULL, the fmt parameter is required to be non-NULL and the error will not be formatted as a v=1 error. |
fmt | Response string format |
... | Response string format arguments |
globus_object_t* globus_gfs_ftp_response_error_initialize | ( | globus_object_t * | error, |
globus_module_descriptor_t * | base_source, | ||
globus_object_t * | base_cause, | ||
int | response_code, | ||
const char * | response_error_code, | ||
const char * | fmt, | ||
... | |||
) |
Initialize a previously allocated error of type GLOBUS_GRIDFTP_SERVER_ERROR_FTP_RESPONSE_TYPE
error | The previously allocated error object. |
base_source | Pointer to the originating module. |
base_cause | The error object causing the error. If this is the original error this parameter may be NULL. |
response_code | The FTP response code. |
response_error_code | If non-NULL, this is the GlobusError response code and the message will be formatted as a v=1 message and fmt is optional. If NULL, the fmt parameter is required to be non-NULL and the error will not be formatted as a v=1 error. |
fmt | Response string format |
... | Response string format arguments |
globus_object_t* globus_gfs_ftp_response_error_v_initialize | ( | globus_object_t * | error, |
globus_module_descriptor_t * | base_source, | ||
globus_object_t * | base_cause, | ||
int | response_code, | ||
const char * | response_error_code, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Initialize a previously allocated error of type GLOBUS_GRIDFTP_SERVER_ERROR_FTP_RESPONSE_TYPE
error | The previously allocated error object. |
base_source | Pointer to the originating module. |
base_cause | The error object causing the error. If this is the original error this parameter may be NULL. |
response_code | The FTP response code. |
response_error_code | If non-NULL, this is the GlobusError response code and the message will be formatted as a v=1 message and fmt is optional. If NULL, the fmt parameter is required to be non-NULL and the error will not be formatted as a v=1 error. |
fmt | Response string format |
ap | Response string format arguments |
void globus_gridftp_server_operation_finished | ( | globus_gfs_operation_t | op, |
globus_result_t | result, | ||
globus_gfs_finished_info_t * | finished_info | ||
) |
Notification Functions
globus_result_t globus_gridftp_server_set_checksum_support | ( | globus_gfs_operation_t | op, |
const char * | cksm_str | ||
) |
Register support for checksum algorithms
cksm_str is a string in the form of alg1:metric1;alg2:metric2;[...] example: SHA1:10;MD5:10:ADLER32:10;
Range of metrics should be 1-20, and should be set to indicate not only a relative preference within the connector, but a general preference in terms of how expensive an algorithm is. General guidelines: 1-5: checksum is available with inexpensive metadata reads 6-9: checksum is often available with metadata reads 10-15: checksum is often recomputed, but data is readily available 15-20: checksum is often recomputed, data may be costly to read
globus_object_t* globus_i_gfs_error_system | ( | int | ftp_code, |
int | system_errno, | ||
const char * | fmt, | ||
... | |||
) |
[in] | ftp_code | FTP Response code. If this is 0, a reasonable value (based on system_errno) is used. |
[in] | system_errno | Error value. This is the errno set upon failing the system call. |
[in] | fmt | Unstructured error context added to the resulting error object. This is a printf-style format string, with conversion values passed as the variable arguments that follow. If this is NULL, then the strerror() value associated with the errno is used. |
const globus_object_type_t GLOBUS_GFS_ERROR_FTP_RESPONSE_TYPE_DEFINITION |
Error type static initializer.