Grid Community Toolkit  6.2.1567772254 (tag: v6.2.20190906)
Typedefs | Functions
globus_gram_protocol.h File Reference

GRAM Protocol API. More...

#include "globus_io.h"
#include "globus_gram_protocol_constants.h"

Go to the source code of this file.

Typedefs

typedef unsigned long globus_gram_protocol_handle_t
 Unique GRAM protocol identifier. More...
 
typedef struct globus_gram_protocol_hash_entry_s globus_gram_protocol_extension_t
 GRAM protocol extension attribute-value pair. More...
 

Functions

int globus_gram_protocol_setup_attr (globus_io_attr_t *attr)
 Create default I/O attribute for GRAM. More...
 
globus_bool_t globus_gram_protocol_authorize_self (gss_ctx_id_t context)
 Determine if a GSSAPI context has the same source and target identities. More...
 
int globus_gram_protocol_allow_attach (char **url, globus_gram_protocol_callback_t callback, void *callback_arg)
 Create a GRAM protocol service listener. More...
 
int globus_gram_protocol_callback_disallow (char *url)
 Stop a GASS protocol listener from handling new requests. More...
 
int globus_gram_protocol_post (const char *url, globus_gram_protocol_handle_t *handle, globus_io_attr_t *attr, globus_byte_t *message, globus_size_t message_size, globus_gram_protocol_callback_t callback, void *callback_arg)
 Post a GRAM protocol request to a GRAM server. More...
 
int globus_gram_protocol_post_delegation (const char *url, globus_gram_protocol_handle_t *handle, globus_io_attr_t *attr, globus_byte_t *message, globus_size_t message_size, gss_cred_id_t cred_handle, gss_OID_set restriction_oids, gss_buffer_set_t restriction_buffers, OM_uint32 req_flags, OM_uint32 time_req, globus_gram_protocol_callback_t callback, void *callback_arg)
 Post a GRAM protocol delegation request to a GRAM server. More...
 
int globus_gram_protocol_reply (globus_gram_protocol_handle_t handle, int code, globus_byte_t *message, globus_size_t message_size)
 Reply to a GRAM protocol message. More...
 
int globus_gram_protocol_accept_delegation (globus_gram_protocol_handle_t handle, gss_OID_set restriction_oids, gss_buffer_set_t restriction_bufers, OM_uint32 req_flags, OM_uint32 time_req, globus_gram_protocol_delegation_callback_t callback, void *arg)
 Perform the server-side of the GSSAPI delegation handshake to receive a new delegated credential. More...
 
int globus_gram_protocol_frame_request (const char *url, const globus_byte_t *msg, globus_size_t msgsize, globus_byte_t **framedmsg, globus_size_t *framedsize)
 Create a HTTP-framed copy of a GRAM request. More...
 
int globus_gram_protocol_frame_reply (int code, const globus_byte_t *msg, globus_size_t msgsize, globus_byte_t **framedmsg, globus_size_t *framedsize)
 Create a HTTP-framed copy of a GRAM reply. More...
 
int globus_gram_protocol_pack_job_request (int job_state_mask, const char *callback_url, const char *rsl, globus_byte_t **query, globus_size_t *querysize)
 Pack a GRAM Job Request. More...
 
int globus_gram_protocol_unpack_job_request (const globus_byte_t *query, globus_size_t querysize, int *job_state_mask, char **callback_url, char **description)
 Unpack a GRAM Job Request. More...
 
int globus_gram_protocol_pack_job_request_reply (int status, const char *job_contact, globus_byte_t **reply, globus_size_t *replysize)
 Pack a GRAM reply message. More...
 
int globus_gram_protocol_unpack_job_request_reply (const globus_byte_t *reply, globus_size_t replysize, int *status, char **job_contact)
 Unpack a GRAM reply message. More...
 
int globus_gram_protocol_pack_job_request_reply_with_extensions (int status, const char *job_contact, globus_hashtable_t *extensions, globus_byte_t **reply, globus_size_t *replysize)
 Pack a GRAM reply message with extension attributes. More...
 
int globus_gram_protocol_unpack_job_request_reply_with_extensions (const globus_byte_t *reply, globus_size_t replysize, int *status, char **job_contact, globus_hashtable_t *extensions)
 Unpack a GRAM reply message, parsing all extensions. More...
 
int globus_gram_protocol_pack_status_request (const char *status_request, globus_byte_t **query, globus_size_t *querysize)
 Pack a GRAM query message. More...
 
int globus_gram_protocol_unpack_status_request (const globus_byte_t *query, globus_size_t querysize, char **status_requst)
 Unpack a GRAM query message. More...
 
int globus_gram_protocol_pack_status_reply (int job_status, int failure_code, int job_failure_code, globus_byte_t **reply, globus_size_t *replysize)
 Pack a GRAM query reply message. More...
 
int globus_gram_protocol_pack_status_reply_with_extensions (int job_status, int failure_code, int job_failure_code, globus_hashtable_t *extensions, globus_byte_t **reply, globus_size_t *replysize)
 Pack a GRAM query reply message with extensions. More...
 
int globus_gram_protocol_unpack_status_reply (const globus_byte_t *reply, globus_size_t replysize, int *job_status, int *failure_code, int *job_failure_code)
 Unpack a GRAM query reply. More...
 
int globus_gram_protocol_unpack_status_reply_with_extensions (const globus_byte_t *reply, globus_size_t replysize, globus_hashtable_t *extensions)
 Unpack a GRAM query reply with extensions. More...
 
int globus_gram_protocol_pack_status_update_message (char *job_contact, int status, int failure_code, globus_byte_t **reply, globus_size_t *replysize)
 Pack a GRAM status update message. More...
 
int globus_gram_protocol_unpack_status_update_message (const globus_byte_t *reply, globus_size_t replysize, char **job_contact, int *status, int *failure_code)
 Unpack a GRAM status update message. More...
 
int globus_gram_protocol_pack_status_update_message_with_extensions (char *job_contact, int status, int failure_code, globus_hashtable_t *extensions, globus_byte_t **reply, globus_size_t *replysize)
 Pack a GRAM status update message with extensions. More...
 
int globus_gram_protocol_unpack_status_update_message_with_extensions (const globus_byte_t *reply, globus_size_t replysize, globus_hashtable_t *message_hash)
 Unpack a GRAM status update message with extensions. More...
 
int globus_gram_protocol_pack_version_request (char **request, size_t *requestsize)
 Pack a GRAM version request message. More...
 
void globus_gram_protocol_hash_destroy (globus_hashtable_t *message_hash)
 
globus_gram_protocol_extension_tglobus_gram_protocol_create_extension (const char *attribute, const char *format,...)
 
int globus_gram_protocol_get_sec_context (globus_gram_protocol_handle_t handle, gss_ctx_id_t *context)
 Get a reference to the GSSAPI security context associated with a GRAM protocol handle. More...
 
const char * globus_gram_protocol_error_string (int error_code)
 Get a description of a a GRAM error code. More...
 
void globus_gram_protocol_error_7_hack_replace_message (const char *message)
 Replace the error message associated with error 7 with a custom message. More...
 
void globus_gram_protocol_error_10_hack_replace_message (const char *message)
 Replace the error message associated with error 10 with a custom message. More...
 

Detailed Description

GRAM Protocol API.

Function Documentation

◆ globus_gram_protocol_create_extension()

globus_gram_protocol_extension_t* globus_gram_protocol_create_extension ( const char *  attribute,
const char *  format,
  ... 
)

Create a GRAM5 protocol extension entry

Allocates a new GRAM5 protocol extension entry containing an attribute-value pair. The attribute parameter is copied into the extension, and the format parameter is a printf-style format string used to construct the value of the extension.

The caller is responsible for freeing the extension when done with it. The quoting rules described in GRAM Protocol must be implemented by the caller in the format string.

Parameters
attributeName of the extension attribute
formatPrintf-style format string used along with the varargs to construct the extension's value string.
Return values
Anew GRAM5 extension structure, or NULL if a malloc error occurred.