Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Enumerations | Functions | Variables
globus_gridftp_server.h File Reference

DSI interface. More...

#include "globus_common.h"
#include "globus_gridftp_server_control.h"
#include <grp.h>

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
 

Detailed Description

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.nosp@m.tp-d.nosp@m.ev@gl.nosp@m.obus.nosp@m..org: https://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 Documentation

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

Enumeration Type Documentation

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.

Enumerator
GLOBUS_GFS_EVENT_TRANSFER_BEGIN 

[Reply] Data will start to transfer. Only ONE of these events may be passed back per globus_gfs_operation_t.

GLOBUS_GFS_EVENT_TRANSFER_ABORT 

[Request] abort of a transfer that is between BEGIN and COMPLETE.

GLOBUS_GFS_EVENT_TRANSFER_COMPLETE 

[Request] Requesting side is completely done with transfer and any related references have been destroyed.

GLOBUS_GFS_EVENT_DISCONNECTED 

[Reply] Data connection has been disconnected. Only ONE of these events may be passed forward per globus_gfs_operation_t.

GLOBUS_GFS_EVENT_BYTES_RECVD 

[Request] Ask for a 'bytes recieved' transfer update. [Reply] Report bytes recieved since last update. This event may be passed back multiple times per globus_gfs_operation_t.

GLOBUS_GFS_EVENT_RANGES_RECVD 

[Request] Ask for a 'ranges recieved' transfer update. [Reply] Report ranges recieved since last update. This event may be passed back multiple times per globus_gfs_operation_t.

GLOBUS_GFS_EVENT_TRANSFER_CONNECTED 

[Reply] Data connection to be used for this transfer is (or already has been) established. Only ONE of these events may be back forward per globus_gfs_operation_t.

GLOBUS_GFS_EVENT_PARTIAL_EOF_COUNT 

unused

GLOBUS_GFS_EVENT_FINAL_EOF_COUNT 

unused

GLOBUS_GFS_EVENT_ALL 

bitmask catchall

Helper Functions

Function Documentation

int globus_gfs_error_get_ftp_response_code ( globus_object_t *  error)

Retrieve the response code from a globus_ftp_response_error object

Parameters
errorThe error from which to retrieve the response code
Returns
The response code stored in the object
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

Parameters
errorThe error from which to retrieve the response code
Returns
The response error code stored in the object
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

Parameters
errorThe error from which to retrieve the response code
response_error_codeThe response error code string to match.
Returns
The response error code stored in the object
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

Parameters
base_sourcePointer to the originating module.
base_causeThe error object causing the error. If this is the original error, this parameter may be NULL.
response_codeThe FTP response code.
response_error_codeIf 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.
fmtResponse string format
...Response string format arguments
Returns
The resulting error object. It is the user's responsibility to eventually free this object using globus_object_free(). A globus_result_t may be obtained by calling globus_error_put() on this object.
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

Parameters
errorThe previously allocated error object.
base_sourcePointer to the originating module.
base_causeThe error object causing the error. If this is the original error this parameter may be NULL.
response_codeThe FTP response code.
response_error_codeIf 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.
fmtResponse string format
...Response string format arguments
Returns
The resulting error object. You may have to call globus_error_put() on this object before passing it on.
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

Parameters
errorThe previously allocated error object.
base_sourcePointer to the originating module.
base_causeThe error object causing the error. If this is the original error this parameter may be NULL.
response_codeThe FTP response code.
response_error_codeIf 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.
fmtResponse string format
apResponse string format arguments
Returns
The resulting error object. You may have to call globus_error_put() on this object before passing it on.
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,
  ... 
)
Parameters
[in]ftp_codeFTP Response code. If this is 0, a reasonable value (based on system_errno) is used.
[in]system_errnoError value. This is the errno set upon failing the system call.
[in]fmtUnstructured 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.

Variable Documentation

const globus_object_type_t GLOBUS_GFS_ERROR_FTP_RESPONSE_TYPE_DEFINITION

Error type static initializer.