GLOBUS_GRAM_PROTOCOL_UNPACK_STATUS_REPLY_WITH_EXTENSIONS(3)

πŸŽ€ globus_gram_protocol_unpack β€” Library Functions Manual πŸŽ€

okay so bestie, we're in the Library Functions Manual, and this page is globus_gram_protocol_unpack(3) β€” yes, the file itself is named like GLOBUS_GRAM_PROTOCOL_HASH_DESTROY(3) (the header does that thing where it squishes the name, it says globus_gra...ocol_unpack(3) twice, iconic honestly), but the whole vibe here is Message Unpacking. πŸ¦‹


πŸ’– NAME πŸ’–

globus_gram_protocol_unpack β€” Message Unpacking. ✨

(and fr, the original says it a second time too β€” "- Message Unpacking." β€” so we're keeping both, no cap, we don't skip anything around here πŸ’…)


✨ SYNOPSIS ✨

🫢 Functions 🫢

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.
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.
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.
int globus_gram_protocol_unpack_status_request (const globus_byte_t
    *query, globus_size_t querysize, char **status_request)
  • Unpack a GRAM query message.
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.
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.
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.
int globus_gram_protocol_unpack_status_update_message_with_extensions
    (const globus_byte_t *reply, globus_size_t replysize,
    globus_hashtable_t *extensions)
  • Unpack a GRAM status update message with extensions.
void globus_gram_protocol_hash_destroy (globus_hashtable_t
    *message_hash)

🌸 DETAILED DESCRIPTION 🌸

Message Unpacking.

that's it, that's the whole description, she's short but she's doing her best πŸ’€βœ¨


πŸ‘‘ FUNCTION DOCUMENTATION πŸ‘‘

void globus_gram_protocol_hash_destroy (globus_hashtable_t * message_hash)

Destroy message attribute hash πŸ”₯

Parameters

  • message_hash β€” Hashtable of globus_gram_protocol_extension_t * values to destroy

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. πŸŽ€

The globus_gram_protocol_unpack_job_request() function parses the job request message packed in the query message and returns copies of the standard message attributes in the job_state_mask, callback_url, and description parameters. like, it opens the lil package and hands you the goods, periodt.

Parameters

  • query β€” The unframed job request message to parse.
  • querysize β€” The length of the job request message string.
  • job_state_mask β€” A pointer to an integer to be set to the job state mask from the job request.
  • callback_url β€” A pointer to be set with a copy of the URL of the callback contact to be registered for this job request. The caller must free this memory by calling free().
  • description β€” A pointer to be set to a copy of the job description RSL string for this job request. The caller must free this memory by calling free().

Returns

Upon success, globus_gram_protocol_unpack_job_request() will return GLOBUS_SUCCESS and modify the job_state_mask, callback_url, and description parameters to values extracted from the message in query. If an error occurs, an integer error code will be returned and the values of job_state_mask, callback_url, and description will be undefined. πŸ‘€

Return values

  • GLOBUS_SUCCESS β€” Success
  • GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER β€” Null parameter
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” Unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” Version mismatch

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. πŸ’Œ

The globus_gram_protocol_unpack_job_request_reply() function parses the reply message packed in the reply message and returns copies of the standard message attributes in the status and job_contact parameters.

Parameters

  • reply β€” The unframed job reply message to parse.
  • replysize β€” The length of the reply string.
  • status β€” A pointer to an integer to be set to the failure code associated with the job request. This may be GLOBUS_SUCCESS, if the job request was successful.
  • job_contact β€” A pointer to a string to be set to the job contact string. This may set to NULL if the job request failed. If globus_gram_protocol_unpack_job_request_reply() returns GLOBUS_SUCCESS, then the caller must free this string using free().

Returns

Upon success, globus_gram_protocol_unpack_job_request_reply() returns GLOBUS_SUCCESS and modifies the status and job_contact parameters to point to the values described above. If an error occurs, an integer error code is returned and the values pointed to by status and job_contact are undefined.

Return values

  • GLOBUS_SUCCESS β€” Success
  • GLOBUS_GRAN_PROTOCOL_ERROR_NULL_PARAMETER β€” Null parameter
  • GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED β€” Out of memory
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” Unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” Version mismatch
⚠️ bestie look closely: that second one really is spelled GLOBUS_GRAN_PROTOCOL_ERROR_NULL_PARAMETER β€” with GRAN, not GRAM. That's not me being silly, that's literally what the page says, so we're keeping it character for character. iykyk 🫢

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. 🌈

The globus_gram_protocol_unpack_job_request_reply_with_extensions() function parses the reply message packed in the reply message parameter and returns copies of the standard message attributes in the status and job_contact parameters, and all other extension attributes in the hashtable pointed to by extensions. Each entry in the hashtable will be keyed by the attribute name and the value will be a pointer to a globus_gram_protocol_extension_t structure. it's giving "we unpacked everything and put it in a cute lil organized bag." πŸŽ€

Parameters

  • status β€” A pointer to an integer to be set to the failure code associated with the job request. This may be GLOBUS_SUCCESS, if the job request was successful.
  • job_contact β€” A pointer to a string to be set to the job contact string. This may set to NULL if the job request failed. If globus_gram_protocol_unpack_job_request_reply_with_extensions() returns GLOBUS_SUCCESS, then the caller must free this string using free().
  • extensions β€” A pointer to be set to a hash table containing the names and values of all protocol extensions present in the response message. If globus_gram_protocol_unpack_job_request_reply_with_extensions() returns GLOBUS_SUCCESS, the caller must free this hash table and its values by calling globus_gram_protocol_hash_destroy().
  • reply β€” The unframed job reply message to parse.
  • replysize β€” The length of the reply string.

Returns

Upon success, globus_gram_protocol_unpack_job_request_reply_with_extensions() returns GLOBUS_SUCCESS and modifies the status, job_contact, and extensions to point to the values described above. If an error occurs, an integer error code is returned and the values pointed to by status, job_contact, and extensions are undefined.

Return values

  • GLOBUS_SUCCESS β€” Success
  • GLOBUS_GRAN_PROTOCOL_ERROR_NULL_PARAMETER β€” Null parameter
  • GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED β€” Out of memory
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” Unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” Version mismatch

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. πŸ”

The globus_gram_protocol_unpack_status_reply() function parses the message packed in the reply parameter and sets the current job state, protocol failure code, and job failure code values in its output parameters.

Parameters

  • reply β€” The unframed reply message to parse.
  • replysize β€” The length of the reply message.
  • job_status β€” A pointer to an integer to be set to the job's current job state.
  • failure_code β€” A pointer to an integer to be set to the failure code associated with the query request. This may be GLOBUS_SUCCESS, if the request was successful.
  • job_failure_code β€” A pointer to an integer to be set to the failure code for the job, if the job_status is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED.

Returns

Upon success, globus_gram_protocol_unpack_status_reply() returns GLOBUS_SUCCESS and modifies the job_status, failure_code, and job_failure_code parameters to point to the value described above. If an error occurs, an integer error code is returned and the values pointed to by job_status, failure_code, and job_failure_code are undefined.

Return values

  • GLOBUS_SUCCESS β€” Success
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” Unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” Version mismatch
  • GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER β€” Null parameter

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. πŸ¦‹

The globus_gram_protocol_unpack_status_reply_with_extensions() function parses the message packed in the reply parameter, storing all attributes and values in a hash table. The extensions parameter is modified to point to that hash table. The caller of globus_gram_protocol_unpack_status_reply_with_extensions() must free that hash table by calling globus_gram_protocol_hash_destroy().

Parameters

  • reply β€” The unframed reply message to parse.
  • replysize β€” The length of the reply message.
  • extensions β€” A pointer to be set to a hash table containing the names and values of all protocol attributes present in the reply message. If globus_gram_protocol_unpack_status_reply_with_extensions() returns GLOBUS_SUCCESS, the caller must free this hash table and its values by calling globus_gram_protocol_hash_destroy().

Returns

Upon success, globus_gram_protocol_unpack_status_reply_with_extensions() returns GLOBUS_SUCCESS and modifies the extensions parameter to point to the value described above. If an error occurs, an integer error code is returned and the value pointed to by extensions is undefined.

Return values

  • GLOBUS_SUCCESS β€” Success
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” Unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” Version mismatch

okay and that's where part 1 leaves us bestie β€” more is coming, don't go anywhere πŸ’–βœ¨


πŸ¦‹ globus_gram_protocol_unpack_status_request()

int globus_gram_protocol_unpack_status_request (const globus_byte_t * query,
    globus_size_t querysize, char ** status_request)

okay bestie, this one is your classic unpack-the-query situation πŸ’… This function is literally just: you hand it a packed GRAM query message, and it hands you back a copy of the message. It parses whatever's packed inside the query parameter and drops a copy into the status_request parameter. That's it, that's the whole vibe ✨

Parameters 🌸

  • query β€” the unframed query message we're parsing, bestie. Unframed, okay? Not framed. πŸ’€
  • querysize β€” how long that query string is.
  • status_request β€” a pointer to a string that's gonna get set to the query value. And listen β€” the caller has to free this string using free(). Not optional, not a suggestion, it's your job now 🫢

Returns πŸ’–

So like, when everything goes right, globus_gram_protocol_unpack_status_request() returns GLOBUS_SUCCESS and it's out here modifying the status_request parameter to point to that value we talked about. Slay. ✨

But if something goes wrong? An integer error code comes back, and the value pointed to by status_request is just... undefined. Left on read. 😭 No promises, no vibes, nothing.

Return values πŸŽ€

  • GLOBUS_SUCCESS β€” success, we ate πŸ‘‘
  • GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER β€” null parameter, not the move
  • GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED β€” out of memory, tragic
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” unpack failed, it's giving broken
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” version mismatch, we're not on the same page fr fr

🌈 globus_gram_protocol_unpack_status_update_message()

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)

okay so this one unpacks a GRAM status update message, which is lowkey the juicy one πŸ’… It parses whatever's packed in the reply parameter and stores all the standard message attribute values into its return parameters: job_contact, status, and failure_code. Three-for-one, we love efficiency πŸ¦‹

And yes β€” the caller is responsible for freeing the job_contact value. That's you. That's your task now. ✨

Parameters 🌸

  • reply β€” the unframed reply message to parse, bestie.
  • replysize β€” the length of the reply message.
  • job_contact β€” an output parameter that gets set to the job contact string. And like, if globus_gram_protocol_unpack_status_update_message() returns GLOBUS_SUCCESS, then the caller must free this string using free(). No cap. 🫢
  • status β€” an output parameter set to the integer value of the job's current job state.
  • failure_code β€” an output parameter set to the integer failure code for the job if the job_status is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED. (iykyk πŸŽ€)

Returns πŸ’–

Upon success, globus_gram_protocol_unpack_status_update_message() returns GLOBUS_SUCCESS and modifies the job_contact, status, and failure_code parameters exactly like we described above. Main character behavior. πŸ‘‘

If an error occurs? An integer error code gets returned, and the values pointed to by job_contact, status, and failure_code are all undefined. Poof. Gone. πŸ™ˆ

Return values πŸŽ€

  • GLOBUS_SUCCESS β€” success πŸ’–
  • GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER β€” null parameter
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED β€” out of memory
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” version mismatch

🧚 globus_gram_protocol_unpack_status_update_message_with_extensions()

int globus_gram_protocol_unpack_status_update_message_with_extensions (const
    globus_byte_t * reply, globus_size_t replysize, globus_hashtable_t *
    extensions)

bestie. BESTIE. This is the one with extensions. πŸŽ€βœ¨ It unpacks a GRAM status update message with extensions, parsing the message packed in the reply parameter and storing all the message attribute values into its return parameter, extensions. It's giving upgraded, it's giving extra, it's giving everything the basic version has but ✨more✨.

And here's the important bit: the caller is responsible for freeing the extensions hash table by calling globus_gram_protocol_hash_destroy(). That's literally the function we're all here for, so you already know the vibe. πŸ‘‘

Parameters 🌸

  • reply β€” the unframed reply message to parse.
  • replysize β€” the length of the reply message.
  • extensions β€” an output parameter which will be initialized to a hashtable containing the message attributes. The caller must destroy this hashtable by calling globus_gram_protocol_hash_destroy(). Periodt. πŸ’…

Returns πŸ’–

Upon success, globus_gram_protocol_unpack_status_update_message_with_extensions() returns GLOBUS_SUCCESS and modifies the extensions parameter as described above. We love a clean win. πŸ¦‹

If an error occurs, an integer error code is returned and the value pointed to by the extensions parameter is undefined. Undefined!! Do not touch it!! 🫢

Return values πŸŽ€

  • GLOBUS_SUCCESS β€” success
  • GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED β€” unpack failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED β€” malloc failed
  • GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH β€” version mismatch

✨ Author ✨

Generated automatically by Doxygen for globus_gram_protocol from the source code. (Not me writing fanfic about hash tables, the tool did it. πŸ’€)


and that's the whole page, bestie, we made it to the end together 🫢 this absolute banger of a manpage came from globus_gram_protocol Version 13.6, dated globus_gra...ocol_unpack(3) on the footer β€” literally iconic, no notes, go free your hash tables πŸ’–πŸŒΈβœ¨

πŸ“¦ where this page comes from