17 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
24 #include "globus_common.h"
26 #include "globus_io.h"
34 #define CRLF "\015\012"
35 #define GLOBUS_GRAM_HTTP_REQUEST_LINE \
36 "POST %s HTTP/1.1" CRLF
38 #define GLOBUS_GRAM_HTTP_HOST_LINE \
41 #define GLOBUS_GRAM_HTTP_CONTENT_TYPE_LINE \
42 "Content-Type: application/x-globus-gram" CRLF
44 #define GLOBUS_GRAM_HTTP_CONTENT_LENGTH_LINE \
45 "Content-Length: %ld" CRLF
47 #define GLOBUS_GRAM_HTTP_REPLY_LINE \
48 "HTTP/1.1 %3d %s" CRLF
49 #define GLOBUS_GRAM_HTTP_PARSE_REPLY_LINE \
50 "HTTP/1.1 %3d %[^" CRLF "]" CRLF
51 #define GLOBUS_GRAM_HTTP_CONNECTION_LINE \
52 "Connection: Close" CRLF
54 #define GLOBUS_GRAM_HTTP_PACK_PROTOCOL_VERSION_LINE \
55 "protocol-version: %d" CRLF
57 #define GLOBUS_GRAM_HTTP_PACK_JOB_STATE_MASK_LINE \
58 "job-state-mask: %d" CRLF
60 #define GLOBUS_GRAM_HTTP_PACK_CALLBACK_URL_LINE \
61 "callback-url: %s" CRLF
63 #define GLOBUS_GRAM_HTTP_PACK_STATUS_LINE \
66 #define GLOBUS_GRAM_HTTP_PACK_FAILURE_CODE_LINE \
67 "failure-code: %d" CRLF
69 #define GLOBUS_GRAM_HTTP_PACK_JOB_FAILURE_CODE_LINE \
70 "job-failure-code: %d" CRLF
72 #define GLOBUS_GRAM_HTTP_PACK_JOB_MANAGER_URL_LINE \
73 "job-manager-url: %s" CRLF
75 #define GLOBUS_GRAM_HTTP_PACK_CLIENT_REQUEST_LINE \
78 #define GLOBUS_GRAM_ATTR_PROTOCOL_VERSION "protocol-version"
79 #define GLOBUS_GRAM_ATTR_JOB_STATE_MASK "job-state-mask"
80 #define GLOBUS_GRAM_ATTR_CALLBACK_URL "callback-url"
81 #define GLOBUS_GRAM_ATTR_RSL "rsl"
82 #define GLOBUS_GRAM_ATTR_STATUS "status"
83 #define GLOBUS_GRAM_ATTR_JOB_MANAGER_URL "job-manager-url"
84 #define GLOBUS_GRAM_ATTR_FAILURE_CODE "failure-code"
87 GLOBUS_GRAM_PROTOCOL_REQUEST,
88 GLOBUS_GRAM_PROTOCOL_REPLY
90 globus_gram_protocol_read_type_t;
95 globus_bool_t allow_attach;
96 globus_io_handle_t * handle;
97 globus_gram_protocol_callback_t callback;
99 volatile int connection_count;
101 globus_bool_t listen_registered;
103 globus_i_gram_protocol_listener_t;
107 globus_bool_t got_header;
108 globus_bool_t accepting;
110 globus_size_t bufsize;
111 globus_gram_protocol_read_type_t read_type;
112 globus_size_t payload_length;
113 globus_size_t n_read;
114 globus_gram_protocol_callback_t callback;
116 globus_byte_t * replybuf;
117 globus_size_t replybufsize;
119 globus_io_handle_t * io_handle;
121 globus_i_gram_protocol_listener_t * listener;
126 globus_bool_t keep_open;
127 globus_size_t token_length;
128 globus_gram_protocol_delegation_callback_t
130 OM_uint32 delegation_major_status;
131 OM_uint32 delegation_minor_status;
132 void * delegation_arg;
133 gss_cred_id_t delegation_cred;
134 gss_OID_set delegation_restriction_oids;
135 gss_buffer_set_t delegation_restriction_buffers;
136 OM_uint32 delegation_req_flags;
137 OM_uint32 delegation_time_req;
138 gss_buffer_desc delegation_input_token;
139 gss_buffer_desc delegation_output_token;
143 gss_ctx_id_t context;
145 globus_i_gram_protocol_connection_t;
148 globus_i_gram_protocol_callback_disallow(
149 globus_i_gram_protocol_listener_t * listener);
152 globus_i_gram_protocol_error_hack_replace_message(
154 const char * message);
157 globus_i_gram_protocol_error_destroy(
160 extern globus_mutex_t globus_i_gram_protocol_mutex;
161 extern globus_cond_t globus_i_gram_protocol_cond;
163 extern globus_list_t * globus_i_gram_protocol_listeners;
164 extern globus_list_t * globus_i_gram_protocol_connections;
165 extern globus_list_t * globus_i_gram_protocol_old_creds;
166 extern globus_bool_t globus_i_gram_protocol_shutdown_called;
167 extern globus_io_attr_t globus_i_gram_protocol_default_attr;
168 extern int globus_i_gram_protocol_num_connects;
169 extern int globus_i_gram_protocol_max_concurrency;
171 extern globus_thread_key_t globus_i_gram_protocol_error_key;
unsigned long globus_gram_protocol_handle_t
Unique GRAM protocol identifier.
Definition: globus_gram_protocol.h:73