GLOBUS_GRAM_PROTOCOL_PACK_STATUS_REQUEST(3)
π NAME π
okay so bestie, welcome to globus_gram_protocol_pack(3) β that's section 3, Library Functions Manual, in case the vibe check needed receipts π¦
globus_gram_protocol_pack β Message Packing.
- Message Packing. (yes it says it twice, the page is just that committed to the bit π )
β¨ SYNOPSIS β¨
π Functions π
no cap, here's the whole lineup, signatures verbatim so you can copy-paste without me gaslighting you:
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)
int globus_gram_protocol_pack_job_request_reply (int status, const char
*job_contact, globus_byte_t **reply, globus_size_t *replysize)
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)
int globus_gram_protocol_pack_status_request (const char
*status_request, globus_byte_t **query, globus_size_t *querysize)
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)
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)
int globus_gram_protocol_pack_status_update_message (char *job_contact,
int status, int failure_code, globus_byte_t **reply, globus_size_t
*replysize)
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)
int globus_gram_protocol_pack_version_request (char **request, size_t
*requestsize)
and what each one is giving:
globus_gram_protocol_pack_job_request()β Pack a GRAM Job Request. πglobus_gram_protocol_pack_job_request_reply()β Pack a GRAM reply message.globus_gram_protocol_pack_job_request_reply_with_extensions()β Pack a GRAM reply message with extension attributes. β¨globus_gram_protocol_pack_status_request()β Pack a GRAM query message.globus_gram_protocol_pack_status_reply()β Pack a GRAM query reply message.globus_gram_protocol_pack_status_reply_with_extensions()β Pack a GRAM query reply message with extensions.globus_gram_protocol_pack_status_update_message()β Pack a GRAM status update message.globus_gram_protocol_pack_status_update_message_with_extensions()β Pack a GRAM status update message with extensions.globus_gram_protocol_pack_version_request()β Pack a GRAM version request message.
π Detailed Description π
Message Packing.
that's it. that's the whole detailed description. iconic minimalism honestly π
π Function Documentation π
π 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.
so the way that globus_gram_protocol_pack_job_request() works is it combines its parameters into a GRAM job request message body. then you (the caller) can frame and send that message by calling globus_gram_protocol_post(), or you can just frame it by calling globus_gram_protocol_frame_request() and then send it some other way, your choice, main character energy β¨
globus_gram_protocol_pack_job_request() hands you the packed message by modifying the query parameter so it points to a new string containing the message. and bestie β the caller is responsible for freeing that string π«Ά don't forget, fr fr.
Parameters
job_state_maskβ the bitwise-or of the GRAM job states which the client would like to register for job state change callbacks.callback_urlβ a callback contact string which will be contacted when a job state change which matches thejob_state_maskoccurs. this may beNULLif the client does not wish to register a callback contact with this job request. typically, this value is returned in theurlparameter toglobus_gram_protocol_allow_attach().rslβ an RSL string which contains the job request. this will be processed on the server side.queryβ an output parameter which will be set to a new string containing the packed job request message. the caller must free this memory by callingfree()πΈquerysizeβ an output parameter which will be populated with the length of the job request message returned inquery.
Returns
upon success, globus_gram_protocol_pack_job_request() returns GLOBUS_SUCCESS and modifies the query and querysize parameters to point to the values described above. π
Return values
GLOBUS_SUCCESSβ SuccessGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETERβ Null parameter
π 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.
globus_gram_protocol_pack_job_request_reply() combines its parameters into a GRAM reply message body. you can frame and send the resulting message by calling globus_gram_protocol_reply(), or just frame it by calling globus_gram_protocol_frame_reply() and send it by some other mechanism, whatever slays π¦
the function returns the packed message by modifying the reply parameter to point to a new string containing the message. and yup β the caller is responsible for freeing that string π
Parameters
statusβ the job's failure code if the job failed, or0if the job request was processed successfully.job_contactβ a string containing the job contact string. this may beNULLif the job request was not successful.replyβ a pointer which will be set to the packed reply string. the caller must free this string by callingfree()π«Άreplysizeβ a pointer which will be set to the length of the reply string.
Returns
upon success, globus_gram_protocol_pack_job_request_reply() returns GLOBUS_SUCCESS and modifies the reply and replysize parameters to point to the values described above. if an error occurs, an integer error code is returned and the values pointed to by reply and replysize are undefined. π
Return values
GLOBUS_SUCCESSβ SuccessGLOBUS_GRAM_PROTOCOL_MALLOC_FAILEDβ Out of memory
π 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.
same energy as the one above, but with extensions, because we're extra and we know it β¨ globus_gram_protocol_pack_job_request_reply_with_extensions() combines its parameters into a GRAM reply message body. you can frame and send the result by calling globus_gram_protocol_reply(), or just frame it by calling globus_gram_protocol_frame_reply() and ship it some other way.
it returns the packed message by modifying the reply parameter to point to a new string containing the message. the caller is responsible for freeing that string πΈ
Parameters
statusβ the job's failure code if the job failed, or0if the job request was processed successfully.job_contactβ a string containing the job contact string. this may beNULLif the job request was not successful.extensionsβ a pointer to a hash table keyed on a string attribute name, with the hash values being pointers toglobus_gram_protocol_extension_tstructures. these will be encoded in the reply message after the standard attributes.replyβ a pointer which will be set to the packed reply string. the caller must free this string by callingfree()π«Άreplysizeβ a pointer which will be set to the length of the reply string.
Returns
upon success, globus_gram_protocol_pack_job_request_reply_with_extensions() returns GLOBUS_SUCCESS and modifies the reply and replysize parameters to point to the values described above. if an error occurs, an integer error code is returned and the values pointed to by reply and replysize are undefined. π
Return values
GLOBUS_SUCCESSβ SuccessGLOBUS_GRAM_PROTOCOL_MALLOC_FAILEDβ Out of memory
ngl the docs here just hop straight from that one to the status reply β globus_gram_protocol_pack_status_request() is chilling up in the synopsis without its own write-up on this page. iykyk, we move on bestie π
π 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.
globus_gram_protocol_pack_status_reply() combines its parameters into a GRAM status reply message body. you can frame and send the resulting message by calling globus_gram_protocol_reply(), or just frame it by calling globus_gram_protocol_frame_reply() and send it by some other mechanism.
the function returns the packed message by modifying the reply parameter to point to a new string containing the message. the caller is responsible for freeing that string π
Parameters
job_statusβ the job's current job state.failure_codeβ the error code generated by the query. this may beGLOBUS_SUCCESSif the query succeeded.job_failure_codeβ the error code associated with the job if it has failed. this may beGLOBUS_SUCCESSif the job has not failed.replyβ an output parameter which will be set to a new string containing the packed reply message.replysizeβ an output parameter which will be set to the length of the reply message returned inreply.
Returns
upon success, globus_gram_protocol_pack_status_reply() returns GLOBUS_SUCCESS and modifies the reply and replysize parameters to point to the values described above. if an error occurs, an integer error code is returned and the values pointed to by reply and replysize are undefined. π
Return values
GLOBUS_SUCCESSβ SuccessGLOBUS_GRAM_PROTOCOL_MALLOC_FAILEDβ Out of memory
π 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.
you guessed it β same deal, but now with extensions π globus_gram_protocol_pack_status_reply_with_extensions() combines its parameters into a GRAM status reply message body. you can frame and send the resulting message by calling globus_gram_protocol_reply(), or just frame it by calling globus_gram_protocol_frame_reply() and send it by some other mechanism.
it returns the packed message by modifying the reply parameter to point to a new string containing the message. the caller is responsible for freeing that string πΈ
Parameters
job_statusβ the job's current job state.failure_codeβ the error code generated by the query. this may beGLOBUS_SUCCESSif the query succeeded.job_failure_codeβ the error code associated with the job if it has failed. this may beGLOBUS_SUCCESSif the job has not failed.extensionsβ a pointer to a hash table containing the names and values of the protocol extensions to add to this message.replyβ an output parameter which will be set to a new string containing the packed reply message.replysizeβ an output parameter which will be set to the length of the reply message returned inreply.
β¨ Returns β¨
If everything goes right, globus_gram_protocol_pack_status_reply_with_extensions() hands you back GLOBUS_SUCCESS and rewrites the reply and replysize parameters so they point at the values we just described. If something goes sideways, you get an integer error code back instead, and whatever reply and replysize were pointing at is undefined β don't go touching it, bestie, it's giving mystery meat. π
π Return values π
GLOBUS_SUCCESSβ Success, we ate πGLOBUS_GRAM_PROTOCOL_MALLOC_FAILEDβ Out of memory π
int globus_gram_protocol_pack_status_request (const char * status_request, globus_byte_t ** query, globus_size_t * querysize)
Pack a GRAM query message. So globus_gram_protocol_pack_status_request() takes all its parameters and smooshes them together into a GRAM status query message body. Then you've got options, queen: you can frame and send the resulting message by calling globus_gram_protocol_post(), or you can just frame it with globus_gram_protocol_frame_request() and ship it off some other way entirely. Your call, your vibe. β¨
The function hands you the packed message by rewriting the query parameter so it points at a brand new string holding the message. That string is yours now β the caller is responsible for freeing it. No leaving it lying around, that's not the energy we're bringing to this codebase. π§
πΈ Parameters πΈ
status_requestβ A string with the type of query message you want to send, including any query parameters. The valid strings that GRAM in GT5 supports are:statusregisterunregistersignalrenewcancel
queryβ An output parameter, and it gets set to a new string containing the packed job query message.querysizeβ An output parameter, set to the length of the job query message that came back inquery.
β¨ Returns β¨
On success, globus_gram_protocol_pack_status_request() returns GLOBUS_SUCCESS and modifies the query and querysize parameters to point at the values described above. If an error happens, you get an integer error code back, and the values pointed to by query and querysize are undefined. π
π Return values π
GLOBUS_SUCCESSβ Success, slay πGLOBUS_GRAM_PROTOCOL_MALLOC_FAILEDβ Out of memory π
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. This one combines its parameters into a GRAM status update message body. Same deal as always: frame and send with globus_gram_protocol_post(), or just frame with globus_gram_protocol_frame_request() and send it however else you like. The function returns the packed message by rewriting the reply parameter to point at a new string containing the message β and yes, the caller is responsible for freeing that string. π«Ά
πΈ Parameters πΈ
job_contactβ The job contact string associated with the job.statusβ The job's current job state.failure_codeβ The error associated with this job request if thestatusvalue isGLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED.replyβ An output parameter that gets set to a new string containing the packed status message. The caller must free this memory by callingfree(). Not optional, bestie.replysizeβ An output parameter set to the length of the status message returned inreply.
β¨ Returns β¨
On success, globus_gram_protocol_pack_status_update_message() returns GLOBUS_SUCCESS and modifies reply and replysize as described above. On error, you get an integer error code, and the values pointed to by reply and replysize are undefined.
π Return values π
GLOBUS_SUCCESSβ Success πGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILEDβ Out of memory π
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. It's the status update message, but make it β¨extraβ¨. The function combines its parameters into a GRAM status update message body, and just like its sibling you can frame and send with globus_gram_protocol_post(), or just frame with globus_gram_protocol_frame_request() and send it some other way. The packed message comes back via the reply parameter pointing at a new string containing the message. Caller frees that string. Every time. No cap. π¦
πΈ Parameters πΈ
job_contactβ The job contact string associated with the job.statusβ The job's current job state.failure_codeβ The error associated with this job request if thestatusvalue isGLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED.extensionsβ A pointer to a hash table keyed by extension attribute names, with the values being pointers toglobus_gram_protocol_extension_tstructures.replyβ An output parameter that gets set to a new string containing the packed status message. The caller must free this memory by callingfree().replysizeβ An output parameter set to the length of the status message returned inreply.
β¨ Returns β¨
On success, globus_gram_protocol_pack_status_update_message_with_extensions() returns GLOBUS_SUCCESS and modifies reply and replysize as described above. On error, you get an integer error code and the values pointed to by reply and replysize are undefined. Periodt.
π Return values π
GLOBUS_SUCCESSβ Success βGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILEDβ Out of memory π
int globus_gram_protocol_pack_version_request (char ** request, size_t * requestsize)
Pack a GRAM version request message. The globus_gram_protocol_pack_job_request() function creates a copy of the GRAM version request. (Yes, the docs really say globus_gram_protocol_pack_job_request() right there in the middle of the version-request function. We're just reporting what it says, iykyk. π) Then, as per usual: frame and send the resulting message with globus_gram_protocol_post(), or just frame it with globus_gram_protocol_frame_request() and send it by some other mechanism. globus_gram_protocol_pack_version_request() returns the packed message by modifying the request parameter to point at a new string containing the message. The caller is responsible for freeing that string. π
πΈ Parameters πΈ
requestβ An output parameter set to a new string containing the packed version request message. The caller must free this memory by callingfree().requestsizeβ An output parameter that gets populated with the length of the version request message returned inquery.
β¨ Returns β¨
On success, globus_gram_protocol_pack_job_request() returns GLOBUS_SUCCESS and modifies the request and requestsize parameters to point at the values described above. If an error occurs, globus_gram_protocol_pack_version_request() returns an integer error code and the values pointed to by request and requestsize are undefined.
π Return values π
GLOBUS_SUCCESSβ Success πGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETERβ Null parameter πGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILEDβ Out of memory π
π Author π
Generated automatically by Doxygen for globus_gram_protocol from the source code. The robots wrote it, I just gave it main character energy. π
And that's a wrap on globus_gram_protocol_pack(3) bestie!! πβ¨ Quick receipts for the vibe check: this page is from globus_gram_protocol, Version 13.6, and the source page name is globus_gra...otocol_pack(3). Now go free your strings, goblin. π¦π
πΈ
π¦ where this page comes from
- fedora 43: globus-gram-protocol-doc 13.6-10.fc43 Β· Apache-2.0
- fedora 44: globus-gram-protocol-doc 13.6-11.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-gram-protocol-doc 13.6-3build2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms