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)(
94 globus_gram_protocol_handle_t handle,
95 globus_byte_t * message,
96 globus_size_t msgsize,
100 typedef void (*globus_gram_protocol_delegation_callback_t)(
102 globus_gram_protocol_handle_t handle,
103 gss_cred_id_t credential,
105 #define GLOBUS_GRAM_PROTOCOL_MODULE (&globus_i_gram_protocol_module)
107 extern globus_module_descriptor_t 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);
159 globus_gram_protocol_handle_t * handle,
160 globus_io_attr_t * attr,
161 globus_byte_t * message,
162 globus_size_t message_size,
163 globus_gram_protocol_callback_t callback,
164 void * callback_arg);
172 globus_gram_protocol_handle_t * handle,
173 globus_io_attr_t * attr,
174 globus_byte_t * message,
175 globus_size_t message_size,
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);
187 globus_gram_protocol_handle_t handle,
189 globus_byte_t * message,
190 globus_size_t message_size);
201 globus_gram_protocol_handle_t handle,
202 gss_OID_set restriction_oids,
203 gss_buffer_set_t restriction_bufers,
206 globus_gram_protocol_delegation_callback_t
213 const globus_byte_t * msg,
214 globus_size_t msgsize,
215 globus_byte_t ** framedmsg,
216 globus_size_t * framedsize);
222 const globus_byte_t * msg,
223 globus_size_t msgsize,
224 globus_byte_t ** framedmsg,
225 globus_size_t * framedsize);
232 const char * callback_url,
234 globus_byte_t ** query,
235 globus_size_t * querysize);
240 const globus_byte_t * query,
241 globus_size_t querysize,
242 int * job_state_mask,
243 char ** callback_url,
244 char ** description);
250 const char * job_contact,
251 globus_byte_t ** reply,
252 globus_size_t * replysize);
257 const globus_byte_t * reply,
258 globus_size_t replysize,
260 char ** job_contact);
265 const char * job_contact,
266 globus_hashtable_t * extensions,
267 globus_byte_t ** reply,
268 globus_size_t * replysize);
273 const globus_byte_t * reply,
274 globus_size_t replysize,
277 globus_hashtable_t * extensions);
281 const char * status_request,
282 globus_byte_t ** query,
283 globus_size_t * querysize);
288 const globus_byte_t * query,
289 globus_size_t querysize,
290 char ** status_requst);
297 int job_failure_code,
298 globus_byte_t ** reply,
299 globus_size_t * replysize);
305 int job_failure_code,
306 globus_hashtable_t * extensions,
307 globus_byte_t ** reply,
308 globus_size_t * replysize);
312 const globus_byte_t * reply,
313 globus_size_t replysize,
316 int * job_failure_code);
320 const globus_byte_t * reply,
321 globus_size_t replysize,
322 globus_hashtable_t * extensions);
329 globus_byte_t ** reply,
330 globus_size_t * replysize);
335 const globus_byte_t * reply,
336 globus_size_t replysize,
346 globus_hashtable_t * extensions,
347 globus_byte_t ** reply,
348 globus_size_t * replysize);
352 const globus_byte_t * reply,
353 globus_size_t replysize,
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,
379 globus_gram_protocol_handle_t handle,
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"