globus_gass_transfer_protocol(3) | globus_gass_transfer | globus_gass_transfer_protocol(3) |
globus_gass_transfer_protocol - Protocol Implementation API.
struct globus_gass_transfer_request_proto_s
Protocol module request handling structure. struct
globus_gass_transfer_listener_proto_s
Protocol module listener handling structure. struct
globus_gass_transfer_proto_descriptor_t
Protocol module descriptor structure.
typedef struct globus_gass_transfer_request_proto_s
globus_gass_transfer_request_proto_t
typedef struct globus_gass_transfer_listener_proto_s
globus_gass_transfer_listener_proto_t
typedef void(* globus_gass_transfer_proto_send_t)
(globus_gass_transfer_request_proto_t *proto,
globus_gass_transfer_request_t request, globus_byte_t *bytes,
globus_size_t send_length, globus_bool_t last_data)
typedef void(* globus_gass_transfer_proto_receive_t)
(globus_gass_transfer_request_proto_t *proto,
globus_gass_transfer_request_t request, globus_byte_t *bytes,
globus_size_t bytes_length, globus_size_t wait_for_length)
typedef void(* globus_gass_transfer_proto_func_t)
(globus_gass_transfer_request_proto_t *proto,
globus_gass_transfer_request_t request)
typedef void(* globus_gass_transfer_proto_new_request_t)
(globus_gass_transfer_request_t request,
globus_gass_transfer_requestattr_t *attr)
typedef int(* globus_gass_transfer_proto_create_listener_t)
(globus_gass_transfer_listener_t listener,
globus_gass_transfer_listenerattr_t *attr, char *scheme, char **base_url,
globus_gass_transfer_listener_proto_t **proto)
typedef void(* globus_gass_transfer_proto_listener_t)
(globus_gass_transfer_listener_proto_t *proto,
globus_gass_transfer_listener_t listener)
typedef globus_object_t *(* globus_gass_transfer_proto_new_attr_t)
(char *url_scheme)
typedef void(* globus_gass_transfer_proto_accept_t)
(globus_gass_transfer_listener_proto_t *proto,
globus_gass_transfer_listener_t listener,
globus_gass_transfer_request_t request,
globus_gass_transfer_requestattr_t *attr)
void globus_gass_transfer_proto_send_complete
(globus_gass_transfer_request_t request, globus_byte_t *bytes,
globus_size_t nbytes, globus_bool_t failed, globus_bool_t last_data)
void globus_gass_transfer_proto_receive_complete
(globus_gass_transfer_request_t request, globus_byte_t *bytes,
globus_size_t nbytes, globus_bool_t failed, globus_bool_t last_data)
void globus_gass_transfer_proto_listener_ready
(globus_gass_transfer_listener_t listener)
int globus_gass_transfer_proto_register_protocol
(globus_gass_transfer_proto_descriptor_t *proto_desc)
int globus_gass_transfer_proto_unregister_protocol
(globus_gass_transfer_proto_descriptor_t *proto_desc)
void globus_gass_transfer_proto_request_ready
(globus_gass_transfer_request_t request,
globus_gass_transfer_request_proto_t *proto)
void globus_gass_transfer_proto_new_listener_request
(globus_gass_transfer_listener_t listener,
globus_gass_transfer_request_t request,
globus_gass_transfer_request_proto_t *proto)
void globus_gass_transfer_proto_request_denied
(globus_gass_transfer_request_t request, int reason, char *message)
void globus_gass_transfer_proto_request_referred
(globus_gass_transfer_request_t request, char **url, globus_size_t
num_urls)
Protocol Implementation API.
Protocol Modules
The GASS Protocol Module API is designed to make it possible to extend the GASS client and server APIs to support additional protocols without making any changes to the core of the GASS implementation. GASS protocol modules are intended to to handle protocol-specific connection and data handling. The GASS Transfer library includes protocol modules which implement the HTTP, HTTPS, FTP, and GSI-FTP protocols.
Every protocol module implementation must include the following header file:
#include "globus_gass_transfer_proto.h"
To implement a protocol module, one must create a globus_gass_transfer_proto_descriptor_t structure which indicates what the protocol module is able to do. This structure contains the URL scheme which the protocol module supports, and function pointers which indicate what type of operations (client or server) that the module implements. To implement a client-side protocol module, the new_requestattr and new_request fields must be set to the protocol module's implementations of those functions. To implement a server-side protocol module, the new_listenerattr and new_listener functions must be set to the protocol module's implementations of those functions.
A protocol module implementor registers a protocol module with the GASS Transfer library by calling the function globus_gass_transfer_proto_register_protocol(), and unregisters the module by calling globus_gass_transfer_proto_unregister_protocol(). This functions must be called after the GLOBUS_GASS_TRANSFER_MODULE has already been activated. Once registered, applications may use URLs of the scheme type provided by the protocol module for the standard client or server operations.
Protocol module listener handling structure.
See also:
Protocol module implementation function type for server request parsing.
Function pointers of this type are associated with the globus_gass_transfer_listener_proto_t associated with a particular listener handle. They are called when a server implementation wants to accept a new connection from the listener. A new request is generated based on the protocol-specific request done on the new connection.
The new request will be created with the attributes specified in the attr parameter. Once the protocol module has parsed the request, it must call globus_gass_transfer_proto_new_listener_request() to let the server implementation decide how to process this request.
The protocol module should update the request to indicate the type of operation being requested, the size of the file (if applicable), and the identity of the client (if applicable).
Parameters:
Protocol module implementation function type for new server listeners.
A function pointer of this type is associated with the globus_gass_transfer_proto_descriptor_t for a particular protocol module's implementation. It is called when the server has called globus_gass_transfer_create_listener().
Parameters:
Returns:
Protocol module implementation function type.
Function pointers of this type are associated with the globus_gass_transfer_request_proto_t associated with a particular request handle. They are called when certain functions which modify the status of a request have been called by a client or server.
A function of this type is used for the fail, deny, refer, authorize, and destroy fields of the globus_gass_transfer_request_proto_t. A protocol module can query the request handle to determine the status and, if applicable, denial reasons if necessary.
Parameters:
Protocol module implementation function type for server operations.
Function pointers of this type are associated with the globus_gass_transfer_listener_proto_t associated with a particular listener handle. They are called when a server implementation wants to close the listener, listen for new connections, or destroy the listener.
Parameters:
See also:
Protocol module implementation function type for attribute creation.
A function pointer of this type is associated with the globus_gass_transfer_proto_descriptor_t defining a protocol module. It is called when a client requests a new request attribute set be created for a URL scheme handled by a protocol module. The function implementation must create a new request attribute usuable by the protocol.
The returned attribute must be a globus object which inherits from one of the base attributes defined in the GASS Transfer API. A client or server operation will use a request attribute generated by this function when creating a new globus_gass_transfer_request_proto_t to handle a request.
Parameters:
Returns:
See also:
Protocol module implementation function type for new client requests.
A function pointer of this type is associated with the globus_gass_transfer_proto_descriptor_t for a particular protocol module's implementation. It is called when the client has begun a file transfer request by calling one of the functions in the '@ref globus_gass_transfer_client' section of this manual.
When this function is called for a protocol module, the module should query the request handle to determine the URL which is being requested by the client, and the operation being done on that URL. The protocol module should initiate the request, and once it has determined that it has been authorized, denied, or referred, one of globus_gass_transfer_proto_request_ready(), globus_gass_transfer_proto_request_denied(), or globus_gass_transfer_proto_request_referred() must be called.
Parameters:
Protocol module function type to handle receiving data.
A function pointer of this type is associated with the globus_gass_transfer_request_proto_t associated with a request handle. It is called when client or server has registered a bytes array for receiving from the client or server which is handling the request. The GASS Transfer Library will only pass one bytes array to the protocol module for processing per request at any given time.
Once the protocol module has processed the array, it must call globus_gass_transfer_proto_receive_complete() to let the GASS Transfer library continue to process the request.
Parameters:
See also:
Protocol module function type to handle sending data.
A function pointer of this type is associated with the globus_gass_transfer_request_proto_t associated with a request handle. It is called when client or server has registered a bytes array for sending to the client or server which is handling the request. The GASS Transfer Library will only pass one bytes array to the protocol module for processing per request at any given time.
Once the protocol module has processed the array, it must call globus_gass_transfer_proto_send_complete() to let the GASS Transfer library continue to process the request.
Parameters:
See also:
Protocol module request handling structure.
See also:
Server listener ready.
This function notifies the GASS Transfer Library that the protocol module has decided that a new request can be accepted on this particular listener. It must only be called after the GASS Transfer Library has called the listen function in a globus_gass_transfer_listener_proto_t protocol module-specific listener structure.
Parameters:
New listener request.
This function notifies the GASS Transfer Library that new request generated by a server calling the globus_gass_transfer_register_accept() function has begun processing in a protocol module, and that protocol module is now ready to send or receive data to handle this request.
Parameters:
Data receive complete.
A protocol module must call this function once a byte range registered for receive via the protocol module's recv_buffer method has been completely processed. This function is called for protocol modules implementing either server or client functionality.
Parameters:
See also:
Register protocol.
This function registers a protocol module handler with the GASS Transfer library. If this succeeds, then users of the library may use the URLs with the protocol scheme implemented by this module descriptor in GASS Transfer operations.
Parameters:
Return values:
Request denied.
This function notifies the GASS Transfer Library that new request generated by a client calling one of the functions in the '@ref globus_gass_transfer_client' section of the manual has been denied by the server, and so cannot be processed by the protocol module.
Parameters:
See also:
Request ready.
This function notifies the GASS Transfer Library that new request generated by a client has begun processing in a protocol module, and that protocol module is now ready to send or receive data to handle this request.
Parameters:
See also:
Request referred.
This function notifies the GASS Transfer Library that new request generated by a client calling one of the functions in the '@ref globus_gass_transfer_client' section of the manual has been referred to another URL by the server, and so processing has stopped.
Parameters:
See also:
Data send complete.
A protocol module must call this function once a byte range registered for sending via the protocol module's send_buffer method has been completely processed. This function is called for protocol modules implementing either server or client functionality.
Parameters:
See also:
Unregister protocol.
This function unregisters a protocol module handler from the GASS Transfer library. If this succeeds, then users of the library may no longer user URLs with the protocol scheme implemented by this module descriptor in GASS Transfer operations.
Parameters:
Return values:
Generated automatically by Doxygen for globus_gass_transfer from the source code.
Wed Feb 27 2019 | Version 9.1 |