globus_gram_protocol.h(3)

🌸 globus_gram_protocol.h β€” the GRAM Protocol API 🌸

okay so bestie. this is globus_gram_protocol.h(3), straight out of the Library Functions Manual, and it's literally the entire GRAM Protocol API in one header. it's giving backbone-of-the-grid. it's giving "yes i talk to GRAM servers and i look cute doing it." there are thirty-three functions on this page so hydrate first, we're doing this properly. πŸ“


✨ NAME ✨

globus_gram_protocol.h β€” GRAM Protocol API. short, iconic, no notes. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include 'globus_io.h'
#include 'globus_gram_protocol_constants.h'

πŸŽ€ Typedefs

  • typedef unsigned long globus_gram_protocol_handle_t β€” a unique GRAM protocol identifier. it's your lil name tag for a protocol session, and honestly she's doing so much for us.
  • typedef struct globus_gram_protocol_hash_entry_s globus_gram_protocol_extension_t β€” a GRAM protocol extension attribute-value pair. a key and a value, holding hands. adorable. 🫢

πŸ’« Functions

  • int globus_gram_protocol_setup_attr (globus_io_attr_t *attr) β€” builds the default I/O attribute for GRAM. your starter pack, fr.
  • globus_bool_t globus_gram_protocol_authorize_self (gss_ctx_id_t context) β€” figures out whether a GSSAPI context has the same source and target identities. it's a vibe check on identity, basically.
  • int globus_gram_protocol_allow_attach (char **url, globus_gram_protocol_callback_t callback, void *callback_arg) β€” creates a GRAM protocol service listener. this is the "come thru, i'm listening" function.
  • int globus_gram_protocol_callback_disallow (char *url) β€” stops a GASS protocol listener from handling new requests. (yes it says GASS in the source, we don't edit, we only serve πŸ’€)
  • 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) β€” posts a GRAM protocol request to a GRAM server. the main-character move.
  • 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) β€” posts a GRAM protocol delegation request to a GRAM server. yes she's long, she's worth it.
  • int globus_gram_protocol_reply (globus_gram_protocol_handle_t handle, int code, globus_byte_t *message, globus_size_t message_size) β€” replies to a GRAM protocol message. text back, bestie.
  • 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) β€” does the server-side of the GSSAPI delegation handshake to receive a brand new delegated credential. (and yes, restriction_bufers is spelled exactly like that, we are not touching it πŸ”₯)
  • 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) β€” makes an HTTP-framed copy of a GRAM request. little outfit change, same request.
  • 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) β€” makes an HTTP-framed copy of a GRAM reply. matching set. ✨
  • 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) β€” packs a GRAM Job Request.
  • 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) β€” unpacks a GRAM Job Request.
  • int globus_gram_protocol_pack_job_request_reply (int status, const char *job_contact, globus_byte_t **reply, globus_size_t *replysize) β€” packs a GRAM reply message.
  • int globus_gram_protocol_unpack_job_request_reply (const globus_byte_t *reply, globus_size_t replysize, int *status, char **job_contact) β€” unpacks a GRAM reply message.
  • 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) β€” packs a GRAM reply message with extension attributes. extra, in the best way.
  • 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) β€” unpacks a GRAM reply message and parses all the extensions. all of them. every last one.
  • int globus_gram_protocol_pack_status_request (const char *status_request, globus_byte_t **query, globus_size_t *querysize) β€” packs a GRAM query message.
  • int globus_gram_protocol_unpack_status_request (const globus_byte_t *query, globus_size_t querysize, char **status_requst) β€” unpacks a GRAM query message. (yep, status_requst, typo and all, we keep her safe here πŸ™ˆ)
  • 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) β€” packs a GRAM query reply message.
  • 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) β€” packs a GRAM query reply message, but make it extensions.
  • 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) β€” unpacks 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) β€” unpacks a GRAM query reply with extensions.
  • int globus_gram_protocol_pack_status_update_message (char *job_contact, int status, int failure_code, globus_byte_t **reply, globus_size_t *replysize) β€” packs a GRAM 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) β€” unpacks a GRAM status update message.
  • 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) β€” packs a GRAM status update message with extensions. the deluxe edition.
  • int globus_gram_protocol_unpack_status_update_message_with_extensions (const globus_byte_t *reply, globus_size_t replysize, globus_hashtable_t *message_hash) β€” unpacks a GRAM status update message with extensions.
  • int globus_gram_protocol_pack_version_request (char **request, size_t *requestsize) β€” packs a GRAM version request message.
  • void globus_gram_protocol_hash_destroy (globus_hashtable_t *message_hash) β€” the source gives her no one-liner. she simply destroys the hash. mysterious. πŸ™ˆ
  • globus_gram_protocol_extension_t * globus_gram_protocol_create_extension (const char *attribute, const char *format,...) β€” no one-liner either, but she gets a whole documentation section below, so she's fine.
  • int globus_gram_protocol_get_sec_context (globus_gram_protocol_handle_t handle, gss_ctx_id_t *context) β€” gets a reference to the GSSAPI security context that's associated with a GRAM protocol handle.
  • const char * globus_gram_protocol_error_string (int error_code) β€” gets a description of a a GRAM error code. (two "a"s, canon, love that for her πŸ’œ)
  • void globus_gram_protocol_error_7_hack_replace_message (const char *message) β€” replaces the error message associated with error 7 with a custom message.
  • void globus_gram_protocol_error_10_hack_replace_message (const char *message) β€” replaces the error message associated with error 10 with a custom message.

πŸ“š DETAILED DESCRIPTION πŸ“š

GRAM Protocol API. that's it. that's the whole detailed description. she said "the title is the description" and honestly? periodt. πŸ‘‘


πŸ”¬ FUNCTION DOCUMENTATION πŸ”¬

globus_gram_protocol_extension_t * globus_gram_protocol_create_extension (const char * attribute, const char * format, ...)

Create a GRAM5 protocol extension entry.

Allocates a brand new GRAM5 protocol extension entry holding an attribute-value pair. the attribute parameter gets copied into the extension, and the format parameter is a printf-style format string that's used to construct the value of the extension.

the caller is responsible for freeing the extension when they're done with it. yes you, bestie, it's your extension, you clean it up. ✨

and listen β€” the quoting rules described in GRAM Protocol have to be implemented by the caller in the format string. that's on you, not on her.

Parameters

  • attribute β€” name of the extension attribute.
  • format β€” printf-style format string used along with the varargs to construct the extension's value string.

Return values

  • a new GRAM5 extension structure, or NULL if a malloc error occurred. if you get NULL, something went wrong with malloc, so maybe go check on that. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for globus_gram_protocol from the source code. she didn't write herself, she was born. πŸ’–


and that's the whole page bestie!! this was globus_gram_protocol.h(3) from globus_gram_protocol, Version 13.6 β€” you read all thirty-three of those functions and i'm so proud of you. go pack a job request or something. slay, hydrate, bye πŸŽ€πŸŒˆπŸ’…

πŸ“¦ where this page comes from