17 #if !defined(GLOBUS_GRAM_PROTOCOL_H) 18 #define GLOBUS_GRAM_PROTOCOL_H 25 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET 49 #include "globus_io.h" 56 enum { GLOBUS_GRAM_PROTOCOL_VERSION = 2 };
57 enum { GLOBUS_GRAM_PROTOCOL_MAX_MSG_SIZE = 64000 };
58 enum { GLOBUS_GRAM_PROTOCOL_PARAM_SIZE = 1024 };
83 typedef struct globus_gram_protocol_hash_entry_s
92 typedef void (*globus_gram_protocol_callback_t)(
100 typedef void (*globus_gram_protocol_delegation_callback_t)(
103 gss_cred_id_t credential,
105 #define GLOBUS_GRAM_PROTOCOL_MODULE (&globus_i_gram_protocol_module) 109 extern gss_cred_id_t globus_i_gram_protocol_credential;
117 globus_io_attr_t * attr);
127 gss_ctx_id_t context);
134 globus_gram_protocol_set_credentials(gss_cred_id_t new_credentials);
144 globus_gram_protocol_callback_t callback,
145 void * callback_arg);
160 globus_io_attr_t * attr,
163 globus_gram_protocol_callback_t callback,
164 void * callback_arg);
173 globus_io_attr_t * attr,
176 gss_cred_id_t cred_handle,
177 gss_OID_set restriction_oids,
178 gss_buffer_set_t restriction_buffers,
181 globus_gram_protocol_callback_t callback,
182 void * callback_arg);
202 gss_OID_set restriction_oids,
203 gss_buffer_set_t restriction_bufers,
206 globus_gram_protocol_delegation_callback_t
232 const char * callback_url,
242 int * job_state_mask,
243 char ** callback_url,
244 char ** description);
250 const char * job_contact,
260 char ** job_contact);
265 const char * job_contact,
266 globus_hashtable_t * extensions,
277 globus_hashtable_t * extensions);
281 const char * status_request,
290 char ** status_requst);
297 int job_failure_code,
305 int job_failure_code,
306 globus_hashtable_t * extensions,
316 int * job_failure_code);
322 globus_hashtable_t * extensions);
346 globus_hashtable_t * extensions,
354 globus_hashtable_t * message_hash);
357 globus_gram_protocol_unpack_message(
358 const char * message,
359 size_t message_length,
360 globus_hashtable_t * message_attributes);
365 size_t * requestsize);
369 globus_hashtable_t * message_hash);
373 const char * attribute,
380 gss_ctx_id_t * context);
394 #define GLOBUS_GRAM_PROTOCOL_EXECUTABLE_PARAM "executable" 395 #define GLOBUS_GRAM_PROTOCOL_ARGUMENTS_PARAM "arguments" 396 #define GLOBUS_GRAM_PROTOCOL_ENVIRONMENT_PARAM "environment" 397 #define GLOBUS_GRAM_PROTOCOL_DIR_PARAM "directory" 398 #define GLOBUS_GRAM_PROTOCOL_COUNT_PARAM "count" 399 #define GLOBUS_GRAM_PROTOCOL_STDIN_PARAM "stdin" 400 #define GLOBUS_GRAM_PROTOCOL_STDOUT_PARAM "stdout" 401 #define GLOBUS_GRAM_PROTOCOL_STDERR_PARAM "stderr" 402 #define GLOBUS_GRAM_PROTOCOL_MAX_WALL_TIME_PARAM "maxwalltime" 403 #define GLOBUS_GRAM_PROTOCOL_MAX_CPU_TIME_PARAM "maxcputime" 404 #define GLOBUS_GRAM_PROTOCOL_MAX_TIME_PARAM "maxtime" 405 #define GLOBUS_GRAM_PROTOCOL_PARADYN_PARAM "paradyn" 406 #define GLOBUS_GRAM_PROTOCOL_JOB_TYPE_PARAM "jobtype" 407 #define GLOBUS_GRAM_PROTOCOL_MYJOB_PARAM "grammyjob" 408 #define GLOBUS_GRAM_PROTOCOL_QUEUE_PARAM "queue" 409 #define GLOBUS_GRAM_PROTOCOL_PROJECT_PARAM "project" 410 #define GLOBUS_GRAM_PROTOCOL_HOST_COUNT_PARAM "hostcount" 411 #define GLOBUS_GRAM_PROTOCOL_DRY_RUN_PARAM "dryrun" 412 #define GLOBUS_GRAM_PROTOCOL_MIN_MEMORY_PARAM "minmemory" 413 #define GLOBUS_GRAM_PROTOCOL_MAX_MEMORY_PARAM "maxmemory" 414 #define GLOBUS_GRAM_PROTOCOL_START_TIME_PARAM "starttime" 415 #define GLOBUS_GRAM_PROTOCOL_RESERVATION_HANDLE_PARAM "reservationhandle" 416 #define GLOBUS_GRAM_PROTOCOL_STDOUT_POSITION_PARAM "stdoutposition" 417 #define GLOBUS_GRAM_PROTOCOL_STDERR_POSITION_PARAM "stderrposition" 418 #define GLOBUS_GRAM_PROTOCOL_SAVE_STATE_PARAM "savestate" 419 #define GLOBUS_GRAM_PROTOCOL_RESTART_PARAM "restart" 420 #define GLOBUS_GRAM_PROTOCOL_TWO_PHASE_COMMIT_PARAM "twophase" 421 #define GLOBUS_GRAM_PROTOCOL_REMOTE_IO_URL_PARAM "remoteiourl" 422 #define GLOBUS_GRAM_PROTOCOL_FILE_STAGE_IN_PARAM "filestagein" 423 #define GLOBUS_GRAM_PROTOCOL_FILE_STAGE_IN_SHARED_PARAM "filestageinshared" 424 #define GLOBUS_GRAM_PROTOCOL_FILE_STAGE_OUT_PARAM "filestageout" 425 #define GLOBUS_GRAM_PROTOCOL_FILE_CLEANUP_PARAM "filecleanup" 426 #define GLOBUS_GRAM_PROTOCOL_SCRATCHDIR_PARAM "scratchdir" 427 #define GLOBUS_GRAM_PROTOCOL_GASS_CACHE_PARAM "gasscache" 428 #define GLOBUS_GRAM_PROTOCOL_PROXY_TIMEOUT_PARAM "proxytimeout" 429 #define GLOBUS_GRAM_PROTOCOL_USER_NAME "username" 431 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_STDIN "/dev/null" 432 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_STDOUT "/dev/null" 433 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_STDERR "/dev/null" 434 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_MYJOB "collective" 435 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_JOBTYPE "multiple" 436 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_DRYRUN "no" 437 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_START_TIME "none" 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.
Definition: globus_gram_protocol_frame.c:92
struct globus_gram_protocol_hash_entry_s globus_gram_protocol_extension_t
GRAM protocol extension attribute-value pair.
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.
Definition: globus_gram_protocol_pack.c:201
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.
Definition: globus_gram_protocol_pack.c:417
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.
Definition: globus_gram_protocol_frame.c:222
void globus_gram_protocol_hash_destroy(globus_hashtable_t *message_hash)
Definition: globus_gram_protocol_pack.c:1988
int globus_gram_protocol_pack_status_request(const char *status_request, globus_byte_t **query, globus_size_t *querysize)
Pack a GRAM query message.
Definition: globus_gram_protocol_pack.c:824
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
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.
Definition: globus_gram_protocol_pack.c:535
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.
Definition: globus_gram_protocol_pack.c:1516
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.
Definition: globus_gram_protocol_io.c:894
unsigned long globus_gram_protocol_handle_t
Unique GRAM protocol identifier.
Definition: globus_gram_protocol.h:72
int globus_gram_protocol_setup_attr(globus_io_attr_t *attr)
Create default I/O attribute for GRAM.
Definition: globus_gram_protocol.c:223
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.
Definition: globus_gram_protocol.c:308
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.
Definition: globus_gram_protocol_io.c:745
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.
Definition: globus_gram_protocol_pack.c:1081
int globus_gram_protocol_pack_version_request(char **request, size_t *requestsize)
Pack a GRAM version request message.
Definition: globus_gram_protocol_pack.c:2264
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.
Definition: globus_gram_protocol_pack.c:1653
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.
Definition: globus_gram_protocol_pack.c:1004
int globus_gram_protocol_unpack_status_request(const globus_byte_t *query, globus_size_t querysize, char **status_requst)
Unpack a GRAM query message.
Definition: globus_gram_protocol_pack.c:892
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.
Definition: globus_gram_protocol_pack.c:1304
size_t globus_size_t
Standard size of memory objectThe globus_size_t is the size of a memory object. It is identical to si...
Definition: globus_types.h:48
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.
Definition: globus_gram_protocol_pack.c:1176
unsigned char globus_byte_t
Unsigned byte datatypeThis is used for byte-addressable arrays of arbitrary data which is not subject...
Definition: globus_types.h:85
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.
Definition: globus_gram_protocol_io.c:535
const char * globus_gram_protocol_error_string(int error_code)
Get a description of a a GRAM error code.
Definition: globus_gram_protocol_error.c:238
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.
Definition: globus_gram_protocol_pack.c:1758
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...
Definition: globus_gram_protocol_io.c:827
int globus_gram_protocol_callback_disallow(char *url)
Stop a GASS protocol listener from handling new requests.
Definition: globus_gram_protocol_io.c:400
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.
Definition: globus_gram_protocol_pack.c:338
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.
Definition: globus_gram_protocol_pack.c:689
void globus_gram_protocol_error_7_hack_replace_message(const char *message)
Replace the error message associated with error 7 with a custom message.
Definition: globus_gram_protocol_error.c:297
globus_gram_protocol_extension_t * globus_gram_protocol_create_extension(const char *attribute, const char *format,...)
Definition: globus_gram_protocol_pack.c:2025
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.
Definition: globus_gram_protocol_pack.c:1435
void globus_gram_protocol_error_10_hack_replace_message(const char *message)
Replace the error message associated with error 10 with a custom message.
Definition: globus_gram_protocol_error.c:335
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.
Definition: globus_gram_protocol_io.c:667
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.
Definition: globus_gram_protocol_pack.c:116
int globus_gram_protocol_allow_attach(char **url, globus_gram_protocol_callback_t callback, void *callback_arg)
Create a GRAM protocol service listener.
Definition: globus_gram_protocol_io.c:258
Module Descriptor.
Definition: globus_module.h:69