CUBRID Engine
latest
|
#include <arpa/inet.h>
#include "cas_protocol.h"
#include "cas_network.h"
#include "cas.h"
#include "dbtype_def.h"
Go to the source code of this file.
Classes | |
struct | t_net_buf |
Typedefs | |
typedef struct t_net_buf | T_NET_BUF |
Functions | |
void | net_buf_init (T_NET_BUF *net_buf, T_BROKER_VERSION client_version) |
void | net_buf_clear (T_NET_BUF *net_buf) |
void | net_buf_destroy (T_NET_BUF *net_buf) |
int | net_buf_cp_post_send_file (T_NET_BUF *net_buf, int, char *str) |
int | net_buf_cp_byte (T_NET_BUF *net_buf, char ch) |
int | net_buf_cp_str (T_NET_BUF *net_buf, const char *buf, int size) |
int | net_buf_cp_int (T_NET_BUF *net_buf, int value, int *begin_offset) |
void | net_buf_overwrite_int (T_NET_BUF *net_buf, int offset, int value) |
int | net_buf_cp_bigint (T_NET_BUF *net_buf, DB_BIGINT value, int *begin_offset) |
int | net_buf_cp_float (T_NET_BUF *net_buf, float value) |
int | net_buf_cp_double (T_NET_BUF *net_buf, double value) |
int | net_buf_cp_short (T_NET_BUF *net_buf, short value) |
int | net_buf_cp_object (T_NET_BUF *net_buf, T_OBJECT *oid) |
int | net_buf_cp_lob_handle (T_NET_BUF *net_buf, T_LOB_HANDLE *lob) |
void | net_buf_error_msg_set (T_NET_BUF *net_buf, int errindicator, int errcode, char *errstr, const char *file, int line) |
INT64 | net_htoni64 (INT64 from) |
float | net_htonf (float from) |
double | net_htond (double from) |
void | net_buf_column_info_set (T_NET_BUF *net_buf, char ut, short scale, int prec, char charset, const char *name) |
void | net_arg_get_size (int *size, void *arg) |
void | net_arg_get_bigint (DB_BIGINT *value, void *arg) |
void | net_arg_get_int (int *value, void *arg) |
void | net_arg_get_short (short *value, void *arg) |
void | net_arg_get_float (float *value, void *arg) |
void | net_arg_get_double (double *value, void *arg) |
void | net_arg_get_str (char **value, int *size, void *arg) |
void | net_arg_get_date (short *year, short *mon, short *day, void *arg) |
void | net_arg_get_time (short *hh, short *mm, short *ss, void *arg) |
void | net_arg_get_timestamp (short *yr, short *mon, short *day, short *hh, short *mm, short *ss, void *arg) |
void | net_arg_get_timestamptz (short *yr, short *mon, short *day, short *hh, short *mm, short *ss, char **tz, int *tz_size, void *arg) |
void | net_arg_get_datetime (short *yr, short *mon, short *day, short *hh, short *mm, short *ss, short *ms, void *arg) |
void | net_arg_get_datetimetz (short *yr, short *mon, short *day, short *hh, short *mm, short *ss, short *ms, char **tz, int *tz_size, void *arg) |
void | net_arg_get_object (T_OBJECT *obj, void *arg) |
void | net_arg_get_cache_time (void *ct, void *arg) |
void | net_arg_get_dbobject (DB_OBJECT **obj, void *arg) |
void | net_arg_get_cci_object (int *pageid, short *slotid, short *volid, void *arg) |
void | net_arg_get_lob_handle (T_LOB_HANDLE *lob, void *arg) |
void | net_arg_get_lob_value (DB_VALUE *db_lob, void *arg) |
void | net_arg_put_int (void *arg, int *value) |
size_t | net_error_append_shard_info (char *err_buf, const char *err_msg, int buf_size) |
int | net_buf_cp_cas_type_and_charset (T_NET_BUF *net_buf, unsigned char cas_type, unsigned char charset) |
#define CHECK_NET_BUF_SIZE | ( | n, | |
size | |||
) | (NET_BUF_CURR_SIZE(n) < (size) ? 1 : 0) |
Definition at line 85 of file cas_net_buf.h.
Referenced by fetch_result().
#define net_arg_get_char | ( | value, | |
arg | |||
) | ((value)= *((char *) (arg) + NET_SIZE_INT)); |
Definition at line 146 of file cas_net_buf.h.
Referenced by bind_value_log(), fn_close_req_handle(), fn_collection(), fn_cursor(), fn_end_tran(), fn_execute_array(), fn_execute_batch(), fn_execute_internal(), fn_fetch(), fn_get_class_num_objs(), fn_get_db_version(), fn_get_query_info(), fn_next_result(), fn_oid(), fn_prepare_internal(), fn_proxy_client_get_db_version(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_savepoint(), fn_schema_info(), fn_xa_end_tran(), netval_to_dbval(), and proxy_get_range_by_param().
#define NET_BUF_ALLOC_SIZE (NET_BUF_SIZE + NET_BUF_EXTRA_SIZE) |
Definition at line 74 of file cas_net_buf.h.
Referenced by cas_main().
#define NET_BUF_CURR_PTR | ( | n | ) | ((n)->data + NET_BUF_CURR_SIZE(n)) |
Definition at line 83 of file cas_net_buf.h.
Referenced by net_buf_cp_bigint(), net_buf_cp_byte(), net_buf_cp_double(), net_buf_cp_float(), net_buf_cp_int(), net_buf_cp_short(), net_buf_cp_str(), and ux_lob_read().
#define NET_BUF_CURR_SIZE | ( | n | ) | (((n)->alloc_size > 0) ? (NET_BUF_HEADER_SIZE + (n)->data_size) : 0) |
Definition at line 79 of file cas_net_buf.h.
Referenced by process_request().
#define NET_BUF_ERROR_MSG_SET | ( | NET_BUF, | |
ERR_INDICATOR, | |||
ERR_CODE, | |||
ERR_MSG | |||
) | net_buf_error_msg_set(NET_BUF, ERR_INDICATOR, ERR_CODE, ERR_MSG, __FILE__, __LINE__) |
Definition at line 67 of file cas_net_buf.h.
#define NET_BUF_EXTRA_SIZE (64 * NET_BUF_KBYTE) |
Definition at line 73 of file cas_net_buf.h.
Referenced by net_buf_realloc().
#define NET_BUF_FREE_SIZE | ( | n | ) | ((n)->alloc_size - NET_BUF_CURR_SIZE(n)) |
Definition at line 81 of file cas_net_buf.h.
Referenced by net_buf_cp_bigint(), net_buf_cp_byte(), net_buf_cp_cas_type_and_charset(), net_buf_cp_double(), net_buf_cp_float(), net_buf_cp_int(), net_buf_cp_lob_handle(), net_buf_cp_object(), net_buf_cp_short(), net_buf_cp_str(), net_buf_realloc(), and ux_lob_read().
#define NET_BUF_HEADER_MSG_SIZE (NET_SIZE_INT) |
Definition at line 77 of file cas_net_buf.h.
Referenced by process_request(), and proxy_init_net_buf().
#define NET_BUF_HEADER_SIZE (NET_BUF_HEADER_MSG_SIZE + cas_info_size) |
Definition at line 78 of file cas_net_buf.h.
Referenced by net_buf_cp_bigint(), net_buf_overwrite_int(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
#define NET_BUF_KBYTE 1024 |
Definition at line 70 of file cas_net_buf.h.
#define NET_BUF_SIZE (16 * NET_BUF_KBYTE) |
Definition at line 72 of file cas_net_buf.h.
Referenced by fetch_result().
#define NET_BUF_TYPE_SIZE | ( | net_buf | ) |
Definition at line 88 of file cas_net_buf.h.
Referenced by add_res_data_bigint(), add_res_data_bytes(), add_res_data_date(), add_res_data_datetime(), add_res_data_datetimetz(), add_res_data_double(), add_res_data_float(), add_res_data_int(), add_res_data_lob_handle(), add_res_data_object(), add_res_data_short(), add_res_data_string(), add_res_data_time(), add_res_data_timestamp(), and add_res_data_timestamptz().
#define net_ntohd | ( | X | ) | net_htond(X) |
Definition at line 64 of file cas_net_buf.h.
Referenced by net_arg_get_double().
#define net_ntohf | ( | X | ) | net_htonf(X) |
Definition at line 63 of file cas_net_buf.h.
Referenced by net_arg_get_float().
#define net_ntohi64 | ( | X | ) | net_htoni64(X) |
Definition at line 62 of file cas_net_buf.h.
#define SHARD_NET_BUF_ALLOC_SIZE (SHARD_NET_BUF_SIZE + NET_BUF_EXTRA_SIZE) |
Definition at line 75 of file cas_net_buf.h.
Referenced by proxy_io_make_close_req_handle_ok(), proxy_io_make_end_tran_request(), proxy_io_make_error_msg(), proxy_io_make_ex_get_int(), proxy_io_make_get_db_version(), and shard_cas_main().
#define SHARD_NET_BUF_SIZE (512 * NET_BUF_KBYTE) |
Definition at line 71 of file cas_net_buf.h.
Referenced by fetch_result().
Definition at line 91 of file cas_net_buf.h.
void net_arg_get_bigint | ( | DB_BIGINT * | value, |
void * | arg | ||
) |
Definition at line 472 of file cas_net_buf.c.
References NET_SIZE_BIGINT, NET_SIZE_INT, and ntohi64().
Referenced by bind_value_print(), fn_lob_read(), fn_lob_write(), net_arg_get_size(), netval_to_dbval(), and proxy_get_range_by_param().
void net_arg_get_cache_time | ( | void * | ct, |
void * | arg | ||
) |
Definition at line 688 of file cas_net_buf.c.
References NET_SIZE_INT, ntohl(), cache_time::sec, and cache_time::usec.
Referenced by fn_execute_internal().
void net_arg_get_cci_object | ( | int * | pageid, |
short * | slotid, | ||
short * | volid, | ||
void * | arg | ||
) |
Definition at line 717 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, ntohl(), and ntohs().
Referenced by bind_value_print(), and fn_oid_get().
void net_arg_get_date | ( | short * | year, |
short * | mon, | ||
short * | day, | ||
void * | arg | ||
) |
Definition at line 548 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, and ntohs().
Referenced by netval_to_dbval().
void net_arg_get_datetime | ( | short * | yr, |
short * | mon, | ||
short * | day, | ||
short * | hh, | ||
short * | mm, | ||
short * | ss, | ||
short * | ms, | ||
void * | arg | ||
) |
Definition at line 625 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, and ntohs().
Referenced by bind_value_print(), net_arg_get_datetimetz(), and netval_to_dbval().
void net_arg_get_datetimetz | ( | short * | yr, |
short * | mon, | ||
short * | day, | ||
short * | hh, | ||
short * | mm, | ||
short * | ss, | ||
short * | ms, | ||
char ** | tz, | ||
int * | tz_size, | ||
void * | arg | ||
) |
Definition at line 654 of file cas_net_buf.c.
References net_arg_get_datetime(), NET_SIZE_DATETIME, NET_SIZE_INT, and ntohl().
Referenced by bind_value_print(), and netval_to_dbval().
void net_arg_get_dbobject | ( | DB_OBJECT ** | obj, |
void * | arg | ||
) |
Definition at line 704 of file cas_net_buf.c.
References db_object(), net_arg_get_object(), t_object::pageid, db_identifier::pageid, t_object::slotid, db_identifier::slotid, t_object::volid, and db_identifier::volid.
Referenced by fn_collection(), fn_oid(), netval_to_dbval(), ux_oid_get(), and ux_oid_put().
void net_arg_get_double | ( | double * | value, |
void * | arg | ||
) |
Definition at line 517 of file cas_net_buf.c.
References net_ntohd, NET_SIZE_DOUBLE, and NET_SIZE_INT.
Referenced by bind_value_print(), and netval_to_dbval().
void net_arg_get_float | ( | float * | value, |
void * | arg | ||
) |
Definition at line 506 of file cas_net_buf.c.
References net_ntohf, NET_SIZE_FLOAT, and NET_SIZE_INT.
Referenced by bind_value_print(), and netval_to_dbval().
void net_arg_get_int | ( | int * | value, |
void * | arg | ||
) |
Definition at line 484 of file cas_net_buf.c.
References NET_SIZE_INT, and ntohl().
Referenced by bind_value_print(), fn_close_req_handle(), fn_collection(), fn_cursor(), fn_cursor_close(), fn_cursor_update(), fn_execute_array(), fn_execute_batch(), fn_execute_internal(), fn_fetch(), fn_get_db_parameter(), fn_get_generated_keys(), fn_get_query_info(), fn_lob_new(), fn_lob_read(), fn_make_out_rs(), fn_next_result(), fn_parameter_info(), fn_prepare_and_execute(), fn_prepare_internal(), fn_proxy_client_close_req_handle(), fn_proxy_client_cursor(), fn_proxy_client_cursor_close(), fn_proxy_client_execute(), fn_proxy_client_execute_array(), fn_proxy_client_fetch(), fn_proxy_client_get_db_parameter(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_proxy_client_schema_info(), fn_proxy_client_set_db_parameter(), fn_schema_info(), fn_set_cas_change_mode(), fn_set_db_parameter(), netval_to_dbval(), proxy_client_execute_internal(), proxy_get_range_by_param(), proxy_send_request_to_cas_with_new_event(), and ux_cursor_update().
void net_arg_get_lob_handle | ( | T_LOB_HANDLE * | lob, |
void * | arg | ||
) |
Definition at line 735 of file cas_net_buf.c.
References t_lob_handle::db_type, t_lob_handle::lob_size, t_lob_handle::locator, t_lob_handle::locator_size, NET_SIZE_INT, NET_SIZE_INT64, ntohi64(), ntohl(), and NULL.
Referenced by net_arg_get_lob_value(), and netval_to_dbval().
void net_arg_get_lob_value | ( | DB_VALUE * | db_lob, |
void * | arg | ||
) |
Definition at line 762 of file cas_net_buf.c.
References db_make_elo(), db_private_strdup(), t_lob_handle::db_type, ELO_FBO, elo_init_structure(), t_lob_handle::lob_size, t_lob_handle::locator, db_elo::locator, db_value::need_clear, net_arg_get_lob_handle(), NULL, db_elo::size, and db_elo::type.
Referenced by bind_value_print(), fn_lob_read(), and fn_lob_write().
void net_arg_get_object | ( | T_OBJECT * | obj, |
void * | arg | ||
) |
Definition at line 670 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, ntohl(), ntohs(), t_object::pageid, t_object::slotid, and t_object::volid.
Referenced by net_arg_get_dbobject().
void net_arg_get_short | ( | short * | value, |
void * | arg | ||
) |
Definition at line 495 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, and ntohs().
Referenced by bind_value_print(), netval_to_dbval(), and proxy_get_range_by_param().
void net_arg_get_size | ( | int * | size, |
void * | arg | ||
) |
Definition at line 451 of file cas_net_buf.c.
References net_arg_get_bigint(), NET_SIZE_BIGINT, NET_SIZE_INT, ntohi64(), and ntohl().
Referenced by bind_value_print(), netval_to_dbval(), and proxy_get_range_by_param().
void net_arg_get_str | ( | char ** | value, |
int * | size, | ||
void * | arg | ||
) |
Definition at line 528 of file cas_net_buf.c.
References NET_SIZE_INT, ntohl(), and NULL.
Referenced by bind_value_print(), fn_check_cas(), fn_collection(), fn_execute_internal(), fn_get_attr_type_str(), fn_get_class_num_objs(), fn_get_query_info(), fn_lob_write(), fn_prepare_internal(), fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_savepoint(), fn_schema_info(), get_attr_name_from_argv(), netval_to_dbval(), proxy_get_range_by_param(), shard_stmt_save_prepare_request(), ux_execute_batch(), and ux_oid_put().
void net_arg_get_time | ( | short * | hh, |
short * | mm, | ||
short * | ss, | ||
void * | arg | ||
) |
Definition at line 565 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, and ntohs().
Referenced by netval_to_dbval().
void net_arg_get_timestamp | ( | short * | yr, |
short * | mon, | ||
short * | day, | ||
short * | hh, | ||
short * | mm, | ||
short * | ss, | ||
void * | arg | ||
) |
Definition at line 582 of file cas_net_buf.c.
References NET_SIZE_INT, NET_SIZE_SHORT, and ntohs().
Referenced by net_arg_get_timestamptz(), and netval_to_dbval().
void net_arg_get_timestamptz | ( | short * | yr, |
short * | mon, | ||
short * | day, | ||
short * | hh, | ||
short * | mm, | ||
short * | ss, | ||
char ** | tz, | ||
int * | tz_size, | ||
void * | arg | ||
) |
Definition at line 608 of file cas_net_buf.c.
References net_arg_get_timestamp(), NET_SIZE_INT, NET_SIZE_SHORT, NET_SIZE_TIMESTAMP, and ntohl().
Referenced by netval_to_dbval().
void net_arg_put_int | ( | void * | arg, |
int * | value | ||
) |
Definition at line 778 of file cas_net_buf.c.
References htonl(), and NET_SIZE_INT.
Referenced by fn_proxy_client_close_req_handle(), fn_proxy_client_cursor(), fn_proxy_client_cursor_close(), fn_proxy_client_fetch(), proxy_client_execute_internal(), and proxy_send_request_to_cas_with_new_event().
void net_buf_clear | ( | T_NET_BUF * | net_buf | ) |
Definition at line 66 of file cas_net_buf.c.
References t_net_buf::data_size, t_net_buf::err_code, FREE_MEM, t_net_buf::post_file_size, and t_net_buf::post_send_file.
Referenced by cas_main(), net_buf_destroy(), net_buf_error_msg_set(), process_request(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
void net_buf_column_info_set | ( | T_NET_BUF * | net_buf, |
char | ut, | ||
short | scale, | ||
int | prec, | ||
char | charset, | ||
const char * | name | ||
) |
Definition at line 396 of file cas_net_buf.c.
References ALLOC_COPY, FREE_MEM, net_buf_cp_byte(), net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_short(), net_buf_cp_str(), NULL, strlen, and ut_trim().
Referenced by oid_attr_info_set(), prepare_column_info_set(), schema_attr_meta(), schema_attrpriv_meta(), schema_classpriv_meta(), schema_constraint_meta(), schema_directsuper_meta(), schema_fk_info_meta(), schema_method_meta(), schema_methodfile_meta(), schema_primarykey_meta(), schema_query_spec_meta(), schema_superclasss_meta(), schema_table_meta(), schema_trigger_meta(), and ux_col_get().
Definition at line 161 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data, t_net_buf::data_size, NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, NET_BUF_HEADER_SIZE, net_buf_realloc(), net_htoni64(), NET_SIZE_BIGINT, and NULL.
Referenced by add_res_data_bigint(), and net_buf_cp_lob_handle().
int net_buf_cp_byte | ( | T_NET_BUF * | net_buf, |
char | ch | ||
) |
Definition at line 97 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data_size, NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, net_buf_realloc(), and NET_SIZE_BYTE.
Referenced by add_res_data_datetimetz(), add_res_data_string(), add_res_data_timestamptz(), dbval_to_net_buf(), execute_info_set(), fetch_attribute(), fetch_call(), fetch_class(), fetch_constraint(), fetch_foreign_keys(), fetch_methfile(), fetch_method(), fetch_privilege(), fetch_result(), fetch_trigger(), fn_get_query_info(), net_buf_column_info_set(), net_buf_cp_cas_type_and_charset(), net_buf_error_msg_set(), prepare_column_info_set(), prepare_column_list_info_set(), proxy_io_make_check_cas(), proxy_io_make_end_tran_request(), proxy_io_make_get_db_version(), ux_col_get(), ux_execute(), ux_execute_all(), ux_execute_batch(), ux_execute_call(), ux_get_attr_type_str(), ux_get_db_version(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), ux_get_parameter_info(), ux_get_query_info(), ux_make_out_rs(), ux_next_result(), ux_oid_get(), and ux_prepare().
int net_buf_cp_cas_type_and_charset | ( | T_NET_BUF * | net_buf, |
unsigned char | cas_type, | ||
unsigned char | charset | ||
) |
Definition at line 846 of file cas_net_buf.c.
References assert, CAS_ER_NO_MORE_MEMORY, CAS_TYPE_FIRST_BYTE_PROTOCOL_MASK, t_net_buf::client_version, DOES_CLIENT_UNDERSTAND_THE_PROTOCOL, net_buf_cp_byte(), NET_BUF_FREE_SIZE, net_buf_realloc(), NET_SIZE_BYTE, NET_SIZE_SHORT, and PROTOCOL_V7.
Referenced by add_res_data_bigint(), add_res_data_bytes(), add_res_data_date(), add_res_data_datetime(), add_res_data_datetimetz(), add_res_data_double(), add_res_data_float(), add_res_data_int(), add_res_data_lob_handle(), add_res_data_object(), add_res_data_short(), add_res_data_string(), add_res_data_time(), add_res_data_timestamp(), add_res_data_timestamptz(), dbval_to_net_buf(), net_buf_column_info_set(), and ux_get_parameter_info().
int net_buf_cp_double | ( | T_NET_BUF * | net_buf, |
double | value | ||
) |
Definition at line 213 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data_size, NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, net_buf_realloc(), net_htond(), and NET_SIZE_DOUBLE.
Referenced by add_res_data_double().
int net_buf_cp_float | ( | T_NET_BUF * | net_buf, |
float | value | ||
) |
Definition at line 199 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data_size, NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, net_buf_realloc(), net_htonf(), and NET_SIZE_FLOAT.
Referenced by add_res_data_float().
int net_buf_cp_int | ( | T_NET_BUF * | net_buf, |
int | value, | ||
int * | begin_offset | ||
) |
Definition at line 126 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data_size, htonl(), NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, net_buf_realloc(), and NET_SIZE_INT.
Referenced by add_res_data_bigint(), add_res_data_bytes(), add_res_data_date(), add_res_data_datetime(), add_res_data_datetimetz(), add_res_data_double(), add_res_data_float(), add_res_data_int(), add_res_data_lob_handle(), add_res_data_object(), add_res_data_short(), add_res_data_string(), add_res_data_time(), add_res_data_timestamp(), add_res_data_timestamptz(), dbval_to_net_buf(), execute_info_set(), fetch_attribute(), fetch_call(), fetch_class(), fetch_constraint(), fetch_foreign_keys(), fetch_methfile(), fetch_method(), fetch_privilege(), fetch_result(), fetch_trigger(), fn_close_req_handle(), fn_con_close(), fn_deprecated(), fn_end_session(), fn_end_tran(), fn_execute_array(), fn_get_db_parameter(), fn_lob_new(), fn_lob_read(), fn_lob_write(), fn_oid(), fn_savepoint(), fn_set_db_parameter(), fn_xa_end_tran(), fn_xa_prepare(), fn_xa_recover(), net_buf_column_info_set(), net_buf_cp_lob_handle(), net_buf_cp_object(), net_buf_cp_xid(), net_buf_error_msg_set(), prepare_column_info_set(), prepare_column_list_info_set(), proxy_io_make_close_req_handle_ok(), proxy_io_make_end_tran_request(), proxy_io_make_error_msg(), proxy_io_make_ex_get_int(), proxy_io_make_get_db_version(), proxy_io_make_shard_info(), sch_attr_info(), sch_attr_priv(), sch_class_info(), sch_class_priv(), sch_constraint(), sch_direct_super_class(), sch_exported_keys_or_cross_reference(), sch_imported_keys(), sch_methfile_info(), sch_method_info(), sch_primary_key(), sch_queryspec(), sch_superclass(), sch_trigger(), schema_attr_meta(), schema_attrpriv_meta(), schema_classpriv_meta(), schema_constraint_meta(), schema_directsuper_meta(), schema_fk_info_meta(), schema_method_meta(), schema_methodfile_meta(), schema_primarykey_meta(), schema_query_spec_meta(), schema_superclasss_meta(), schema_table_meta(), schema_trigger_meta(), ux_col_get(), ux_col_seq_drop(), ux_col_seq_insert(), ux_col_seq_put(), ux_col_set_add(), ux_col_set_drop(), ux_col_size(), ux_cursor(), ux_cursor_update(), ux_execute(), ux_execute_all(), ux_execute_array(), ux_execute_batch(), ux_execute_call(), ux_fetch(), ux_get_attr_type_str(), ux_get_class_num_objs(), ux_get_db_version(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), ux_get_last_insert_id(), ux_get_parameter_info(), ux_get_query_info(), ux_get_row_count(), ux_lob_new(), ux_lob_read(), ux_lob_write(), ux_make_out_rs(), ux_next_result(), ux_oid_get(), ux_oid_put(), ux_prepare(), ux_schema_info(), and ux_set_cas_change_mode().
int net_buf_cp_lob_handle | ( | T_NET_BUF * | net_buf, |
T_LOB_HANDLE * | lob | ||
) |
Definition at line 256 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_lob_handle::db_type, t_lob_handle::lob_size, t_lob_handle::locator, t_lob_handle::locator_size, net_buf_cp_bigint(), net_buf_cp_int(), net_buf_cp_str(), NET_BUF_FREE_SIZE, net_buf_realloc(), NET_SIZE_INT, NET_SIZE_INT64, and NULL.
Referenced by add_res_data_lob_handle(), and ux_lob_new().
Definition at line 241 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, net_buf_cp_int(), net_buf_cp_short(), NET_BUF_FREE_SIZE, net_buf_realloc(), NET_SIZE_OBJECT, NULL, t_object::pageid, t_object::slotid, and t_object::volid.
Referenced by add_res_data_object(), execute_info_set(), fetch_attribute(), fetch_call(), fetch_class(), fetch_constraint(), fetch_foreign_keys(), fetch_methfile(), fetch_method(), fetch_privilege(), fetch_result(), fetch_trigger(), ux_execute_array(), ux_execute_batch(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
int net_buf_cp_post_send_file | ( | T_NET_BUF * | net_buf, |
int | , | ||
char * | str | ||
) |
Definition at line 83 of file cas_net_buf.c.
References ALLOC_COPY, CAS_ER_NO_MORE_MEMORY, t_net_buf::err_code, FREE_MEM, NULL, t_net_buf::post_file_size, and t_net_buf::post_send_file.
int net_buf_cp_short | ( | T_NET_BUF * | net_buf, |
short | value | ||
) |
Definition at line 227 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data_size, htons(), NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, net_buf_realloc(), and NET_SIZE_SHORT.
Referenced by add_res_data_date(), add_res_data_datetime(), add_res_data_datetimetz(), add_res_data_short(), add_res_data_time(), add_res_data_timestamp(), add_res_data_timestamptz(), net_buf_column_info_set(), net_buf_cp_object(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), and ux_get_parameter_info().
Definition at line 110 of file cas_net_buf.c.
References CAS_ER_NO_MORE_MEMORY, t_net_buf::data_size, NET_BUF_CURR_PTR, NET_BUF_FREE_SIZE, and net_buf_realloc().
Referenced by add_res_data_bytes(), add_res_data_datetimetz(), add_res_data_string(), add_res_data_timestamptz(), fn_oid(), net_buf_column_info_set(), net_buf_cp_lob_handle(), net_buf_cp_xid(), net_buf_error_msg_set(), prepare_column_info_set(), proxy_io_make_error_msg(), proxy_io_make_get_db_version(), proxy_io_make_shard_info(), ux_execute_array(), ux_execute_batch(), ux_get_attr_type_str(), ux_get_db_version(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), ux_get_query_info(), and ux_oid_get().
void net_buf_destroy | ( | T_NET_BUF * | net_buf | ) |
Definition at line 75 of file cas_net_buf.c.
References t_net_buf::alloc_size, t_net_buf::data, FREE_MEM, and net_buf_clear().
Referenced by cas_main(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
void net_buf_error_msg_set | ( | T_NET_BUF * | net_buf, |
int | errindicator, | ||
int | errcode, | ||
char * | errstr, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 277 of file cas_net_buf.c.
References as_info, assert, CAS_CONV_ERROR_TO_OLD, cas_di_understand_renewed_error_code(), CAS_ER_NOT_AUTHORIZED_CLIENT, CAS_ERROR_INDICATOR, CAS_MAKE_VER, t_appl_server_info::clt_version, DOES_CLIENT_MATCH_THE_PROTOCOL, t_appl_server_info::driver_info, ERR_MSG_LENGTH, net_buf_clear(), net_buf_cp_byte(), net_buf_cp_int(), net_buf_cp_str(), net_error_append_shard_info(), NO_ERROR, NULL, PROTOCOL_V2, and strlen.
Referenced by err_msg_set().
void net_buf_init | ( | T_NET_BUF * | net_buf, |
T_BROKER_VERSION | client_version | ||
) |
Definition at line 54 of file cas_net_buf.c.
References t_net_buf::alloc_size, t_net_buf::client_version, t_net_buf::data, t_net_buf::data_size, t_net_buf::err_code, NULL, t_net_buf::post_file_size, and t_net_buf::post_send_file.
Referenced by cas_main(), proxy_make_net_buf(), shard_cas_main(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
void net_buf_overwrite_int | ( | T_NET_BUF * | net_buf, |
int | offset, | ||
int | value | ||
) |
Definition at line 150 of file cas_net_buf.c.
References t_net_buf::data, htonl(), NET_BUF_HEADER_SIZE, NET_SIZE_INT, and NULL.
Referenced by dbval_to_net_buf(), fetch_attribute(), fetch_class(), fetch_constraint(), fetch_foreign_keys(), fetch_methfile(), fetch_method(), fetch_privilege(), fetch_result(), fetch_trigger(), prepare_column_list_info_set(), ux_execute_array(), ux_execute_batch(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().
size_t net_error_append_shard_info | ( | char * | err_buf, |
const char * | err_msg, | ||
int | buf_size | ||
) |
Definition at line 795 of file cas_net_buf.c.
References assert, cas_shard_flag, MAX_SHARD_INFO_LENGTH, NULL, ON, shm_shard_cas_id, shm_shard_id, and strlen.
Referenced by net_buf_error_msg_set(), and net_write_error().
double net_htond | ( | double | from | ) |
Definition at line 374 of file cas_net_buf.c.
References p.
Referenced by net_buf_cp_double().
float net_htonf | ( | float | from | ) |
Definition at line 357 of file cas_net_buf.c.
References p.
Referenced by net_buf_cp_float().
INT64 net_htoni64 | ( | INT64 | from | ) |
Definition at line 336 of file cas_net_buf.c.
References p.
Referenced by net_buf_cp_bigint().