17 #if !defined(GLOBUS_GRAM_PROTOCOL_H) 18 #define GLOBUS_GRAM_PROTOCOL_H 25 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET 50 #include "globus_io.h" 57 enum { GLOBUS_GRAM_PROTOCOL_VERSION = 2 };
58 enum { GLOBUS_GRAM_PROTOCOL_MAX_MSG_SIZE = 64000 };
59 enum { GLOBUS_GRAM_PROTOCOL_PARAM_SIZE = 1024 };
84 typedef struct globus_gram_protocol_hash_entry_s
93 typedef void (*globus_gram_protocol_callback_t)(
101 typedef void (*globus_gram_protocol_delegation_callback_t)(
104 gss_cred_id_t credential,
106 #define GLOBUS_GRAM_PROTOCOL_MODULE (&globus_i_gram_protocol_module) 110 extern gss_cred_id_t globus_i_gram_protocol_credential;
118 globus_io_attr_t * attr);
128 gss_ctx_id_t context);
135 globus_gram_protocol_set_credentials(gss_cred_id_t new_credentials);
145 globus_gram_protocol_callback_t callback,
146 void * callback_arg);
161 globus_io_attr_t * attr,
164 globus_gram_protocol_callback_t callback,
165 void * callback_arg);
174 globus_io_attr_t * attr,
177 gss_cred_id_t cred_handle,
178 gss_OID_set restriction_oids,
179 gss_buffer_set_t restriction_buffers,
182 globus_gram_protocol_callback_t callback,
183 void * callback_arg);
203 gss_OID_set restriction_oids,
204 gss_buffer_set_t restriction_bufers,
207 globus_gram_protocol_delegation_callback_t
233 const char * callback_url,
243 int * job_state_mask,
244 char ** callback_url,
245 char ** description);
251 const char * job_contact,
261 char ** job_contact);
266 const char * job_contact,
267 globus_hashtable_t * extensions,
278 globus_hashtable_t * extensions);
282 const char * status_request,
291 char ** status_requst);
298 int job_failure_code,
306 int job_failure_code,
307 globus_hashtable_t * extensions,
317 int * job_failure_code);
323 globus_hashtable_t * extensions);
347 globus_hashtable_t * extensions,
355 globus_hashtable_t * message_hash);
358 globus_gram_protocol_unpack_message(
359 const char * message,
360 size_t message_length,
361 globus_hashtable_t * message_attributes);
366 size_t * requestsize);
370 globus_hashtable_t * message_hash);
374 const char * attribute,
381 gss_ctx_id_t * context);
395 #define GLOBUS_GRAM_PROTOCOL_EXECUTABLE_PARAM "executable" 396 #define GLOBUS_GRAM_PROTOCOL_ARGUMENTS_PARAM "arguments" 397 #define GLOBUS_GRAM_PROTOCOL_ENVIRONMENT_PARAM "environment" 398 #define GLOBUS_GRAM_PROTOCOL_DIR_PARAM "directory" 399 #define GLOBUS_GRAM_PROTOCOL_COUNT_PARAM "count" 400 #define GLOBUS_GRAM_PROTOCOL_STDIN_PARAM "stdin" 401 #define GLOBUS_GRAM_PROTOCOL_STDOUT_PARAM "stdout" 402 #define GLOBUS_GRAM_PROTOCOL_STDERR_PARAM "stderr" 403 #define GLOBUS_GRAM_PROTOCOL_MAX_WALL_TIME_PARAM "maxwalltime" 404 #define GLOBUS_GRAM_PROTOCOL_MAX_CPU_TIME_PARAM "maxcputime" 405 #define GLOBUS_GRAM_PROTOCOL_MAX_TIME_PARAM "maxtime" 406 #define GLOBUS_GRAM_PROTOCOL_PARADYN_PARAM "paradyn" 407 #define GLOBUS_GRAM_PROTOCOL_JOB_TYPE_PARAM "jobtype" 408 #define GLOBUS_GRAM_PROTOCOL_MYJOB_PARAM "grammyjob" 409 #define GLOBUS_GRAM_PROTOCOL_QUEUE_PARAM "queue" 410 #define GLOBUS_GRAM_PROTOCOL_PROJECT_PARAM "project" 411 #define GLOBUS_GRAM_PROTOCOL_HOST_COUNT_PARAM "hostcount" 412 #define GLOBUS_GRAM_PROTOCOL_DRY_RUN_PARAM "dryrun" 413 #define GLOBUS_GRAM_PROTOCOL_MIN_MEMORY_PARAM "minmemory" 414 #define GLOBUS_GRAM_PROTOCOL_MAX_MEMORY_PARAM "maxmemory" 415 #define GLOBUS_GRAM_PROTOCOL_START_TIME_PARAM "starttime" 416 #define GLOBUS_GRAM_PROTOCOL_RESERVATION_HANDLE_PARAM "reservationhandle" 417 #define GLOBUS_GRAM_PROTOCOL_STDOUT_POSITION_PARAM "stdoutposition" 418 #define GLOBUS_GRAM_PROTOCOL_STDERR_POSITION_PARAM "stderrposition" 419 #define GLOBUS_GRAM_PROTOCOL_SAVE_STATE_PARAM "savestate" 420 #define GLOBUS_GRAM_PROTOCOL_RESTART_PARAM "restart" 421 #define GLOBUS_GRAM_PROTOCOL_TWO_PHASE_COMMIT_PARAM "twophase" 422 #define GLOBUS_GRAM_PROTOCOL_REMOTE_IO_URL_PARAM "remoteiourl" 423 #define GLOBUS_GRAM_PROTOCOL_FILE_STAGE_IN_PARAM "filestagein" 424 #define GLOBUS_GRAM_PROTOCOL_FILE_STAGE_IN_SHARED_PARAM "filestageinshared" 425 #define GLOBUS_GRAM_PROTOCOL_FILE_STAGE_OUT_PARAM "filestageout" 426 #define GLOBUS_GRAM_PROTOCOL_FILE_CLEANUP_PARAM "filecleanup" 427 #define GLOBUS_GRAM_PROTOCOL_SCRATCHDIR_PARAM "scratchdir" 428 #define GLOBUS_GRAM_PROTOCOL_GASS_CACHE_PARAM "gasscache" 429 #define GLOBUS_GRAM_PROTOCOL_PROXY_TIMEOUT_PARAM "proxytimeout" 430 #define GLOBUS_GRAM_PROTOCOL_USER_NAME "username" 432 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_STDIN "/dev/null" 433 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_STDOUT "/dev/null" 434 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_STDERR "/dev/null" 435 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_MYJOB "collective" 436 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_JOBTYPE "multiple" 437 #define GLOBUS_GRAM_PROTOCOL_DEFAULT_DRYRUN "no" 438 #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:93
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:202
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:418
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:223
void globus_gram_protocol_hash_destroy(globus_hashtable_t *message_hash)
Definition: globus_gram_protocol_pack.c:1989
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:825
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:536
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:1517
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:895
unsigned long globus_gram_protocol_handle_t
Unique GRAM protocol identifier.
Definition: globus_gram_protocol.h:73
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:746
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:1082
int globus_gram_protocol_pack_version_request(char **request, size_t *requestsize)
Pack a GRAM version request message.
Definition: globus_gram_protocol_pack.c:2265
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:1654
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:1005
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:893
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:1305
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:1177
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:536
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:239
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:1759
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:828
int globus_gram_protocol_callback_disallow(char *url)
Stop a GASS protocol listener from handling new requests.
Definition: globus_gram_protocol_io.c:401
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:339
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:690
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:298
globus_gram_protocol_extension_t * globus_gram_protocol_create_extension(const char *attribute, const char *format,...)
Definition: globus_gram_protocol_pack.c:2026
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:1436
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:336
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:668
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:117
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:259
Module Descriptor.
Definition: globus_module.h:71