Mercury
|
#include "mercury_types.h"
Go to the source code of this file.
Classes | |
struct | hg_header_request |
struct | hg_header_response |
Macros | |
#define | HG_IDENTIFIER (('H' << 1) | ('G')) /* 0xD7 */ |
#define | HG_PROTOCOL_VERSION 0x00000002 |
#define | HG_GET_MAJOR(value) ((value >> 24) & 0xFF) |
#define | HG_GET_MINOR(value) ((value >> 16) & 0xFF) |
#define | HG_GET_PATCH(value) (value & 0xFFFF) |
#define | HG_VERSION |
#define | HG_PROC_HEADER_INLINE HG_INLINE |
Functions | |
HG_EXPORT HG_PROC_HEADER_INLINE size_t | hg_proc_header_request_get_size (void) |
Get size reserved for request header (separate user data stored in payload). More... | |
HG_EXPORT HG_PROC_HEADER_INLINE size_t | hg_proc_header_response_get_size (void) |
Get size reserved for response header (separate user data stored in payload). More... | |
HG_EXPORT void | hg_proc_header_request_init (hg_id_t id, hg_bulk_t extra_buf_handle, struct hg_header_request *header) |
Initialize RPC request header. More... | |
HG_EXPORT void | hg_proc_header_response_init (struct hg_header_response *header) |
Initialize RPC response header. More... | |
HG_EXPORT hg_return_t | hg_proc_header_request (void *buf, size_t buf_size, struct hg_header_request *header, hg_proc_op_t op) |
Process private information for sending/receiving RPC request. More... | |
HG_EXPORT hg_return_t | hg_proc_header_response (void *buf, size_t buf_size, struct hg_header_response *header, hg_proc_op_t op) |
Process private information for sending/receiving response. More... | |
HG_EXPORT hg_return_t | hg_proc_header_request_verify (struct hg_header_request header) |
Verify private information from request header. More... | |
HG_EXPORT hg_return_t | hg_proc_header_response_verify (struct hg_header_response header) |
Verify private information from response header. More... | |
#define HG_IDENTIFIER (('H' << 1) | ('G')) /* 0xD7 */ |
Definition at line 52 of file mercury_proc_header.h.
#define HG_PROTOCOL_VERSION 0x00000002 |
Definition at line 55 of file mercury_proc_header.h.
#define HG_GET_MAJOR | ( | value | ) | ((value >> 24) & 0xFF) |
Definition at line 58 of file mercury_proc_header.h.
#define HG_GET_MINOR | ( | value | ) | ((value >> 16) & 0xFF) |
Definition at line 59 of file mercury_proc_header.h.
#define HG_GET_PATCH | ( | value | ) | (value & 0xFFFF) |
Definition at line 60 of file mercury_proc_header.h.
#define HG_VERSION |
Definition at line 61 of file mercury_proc_header.h.
#define HG_PROC_HEADER_INLINE HG_INLINE |
Definition at line 68 of file mercury_proc_header.h.
HG_PROC_HEADER_INLINE size_t hg_proc_header_request_get_size | ( | void | ) |
Get size reserved for request header (separate user data stored in payload).
Definition at line 85 of file mercury_proc_header.h.
HG_PROC_HEADER_INLINE size_t hg_proc_header_response_get_size | ( | void | ) |
Get size reserved for response header (separate user data stored in payload).
Definition at line 97 of file mercury_proc_header.h.
HG_EXPORT void hg_proc_header_request_init | ( | hg_id_t | id, |
hg_bulk_t | extra_buf_handle, | ||
struct hg_header_request * | header | ||
) |
Initialize RPC request header.
id | [IN] registered function ID |
extra_buf_handle | [IN] extra bulk handle |
header | [IN/OUT] pointer to request header structure |
HG_EXPORT void hg_proc_header_response_init | ( | struct hg_header_response * | header | ) |
Initialize RPC response header.
header | [IN/OUT] pointer to response header structure |
HG_EXPORT hg_return_t hg_proc_header_request | ( | void * | buf, |
size_t | buf_size, | ||
struct hg_header_request * | header, | ||
hg_proc_op_t | op | ||
) |
Process private information for sending/receiving RPC request.
buf | [IN/OUT] buffer |
buf_size | [IN] buffer size |
header | [IN/OUT] pointer to header structure |
op | [IN] operation type: HG_ENCODE / HG_DECODE |
HG_EXPORT hg_return_t hg_proc_header_response | ( | void * | buf, |
size_t | buf_size, | ||
struct hg_header_response * | header, | ||
hg_proc_op_t | op | ||
) |
Process private information for sending/receiving response.
buf | [IN/OUT] buffer |
buf_size | [IN] buffer size |
header | [IN/OUT] pointer to header structure |
op | [IN] operation type: HG_ENCODE / HG_DECODE |
HG_EXPORT hg_return_t hg_proc_header_request_verify | ( | struct hg_header_request | header | ) |
Verify private information from request header.
header | [IN] request header structure |
HG_EXPORT hg_return_t hg_proc_header_response_verify | ( | struct hg_header_response | header | ) |
Verify private information from response header.
header | [IN] response header structure |