35 #include <arpa/inet.h> 42 #if !defined(CAS_FOR_ORACLE) && !defined(CAS_FOR_MYSQL) 137 value =
htonl (value);
152 if (net_buf->
data ==
NULL || offset < 0)
156 value =
htonl (value);
184 #if defined (ENABLE_UNUSED_FUNCTION) 188 if (net_buf->
data ==
NULL || offset < 0)
233 value =
htons (value);
254 #if !defined(CAS_FOR_ORACLE) && !defined(CAS_FOR_MYSQL) 282 #ifndef LIBCAS_FOR_JSP 283 #if defined(CAS_CUBRID) || defined(CAS_FOR_MYSQL) || defined(CAS_FOR_ORACLE) 287 size_t err_msg_len = 0;
293 #ifndef LIBCAS_FOR_JSP 294 #if defined(CAS_CUBRID) || defined(CAS_FOR_MYSQL) || defined(CAS_FOR_ORACLE) 319 sprintf (msg_buf,
"%s:%d ", file, line);
324 if (err_msg_len == 0)
334 #ifndef BYTE_ORDER_BIG_ENDIAN 431 int extra, new_alloc_size;
456 *size =
ntohl (tmp_i);
459 #if defined(CAS_FOR_ORACLE) || defined(CAS_FOR_MYSQL) 490 *value =
ntohl (tmp_i);
501 *value =
ntohs (tmp_s);
531 char *cur_p = (
char *) arg;
534 *size =
ntohl (tmp_i);
554 *year =
ntohs (tmp_s);
557 *mon =
ntohs (tmp_s);
560 *day =
ntohs (tmp_s);
591 *mon =
ntohs (tmp_s);
594 *day =
ntohs (tmp_s);
612 char *cur_p = (
char *) arg;
625 net_arg_get_datetime (
short *yr,
short *mon,
short *day,
short *hh,
short *mm,
short *ss,
short *ms,
void *arg)
634 *mon =
ntohs (tmp_s);
637 *day =
ntohs (tmp_s);
655 int *tz_size,
void *arg)
658 char *cur_p = (
char *) arg;
702 #if !defined(CAS_FOR_ORACLE) && !defined(CAS_FOR_MYSQL) 724 *pageid =
ntohl (tmp_i);
727 *slotid =
ntohs (tmp_s);
730 *volid =
ntohs (tmp_s);
784 cur_p = (
char *) (arg);
789 put_value =
htonl (*value);
799 #if !defined(LIBCAS_FOR_JSP) && !defined(CUB_PROXY) 808 snprintf (err_buf, buf_size,
"%s", err_msg);
825 strncpy (err_buf, err_msg, buf_size - 1);
829 err_buf[buf_size - 1] =
'\0';
850 unsigned char cas_net_first_byte, cas_net_second_byte;
857 cas_net_first_byte = cas_type & CCI_CODE_COLLECTION;
859 cas_net_first_byte |= charset & 0x07;
863 cas_net_second_byte = CCI_GET_COLLECTION_DOMAIN (cas_type);
static int net_buf_realloc(T_NET_BUF *net_buf, int size)
void net_arg_get_datetime(short *yr, short *mon, short *day, short *hh, short *mm, short *ss, short *ms, void *arg)
T_BROKER_VERSION client_version
void net_buf_error_msg_set(T_NET_BUF *net_buf, int err_indicator, int err_code, char *err_str, const char *file, int line)
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)
int net_buf_cp_str(T_NET_BUF *net_buf, const char *buf, int size)
DB_OBJECT * db_object(DB_IDENTIFIER *oid)
#define CAS_CONV_ERROR_TO_OLD(V)
unsigned int htonl(unsigned int from)
T_BROKER_VERSION clt_version
#define NET_SIZE_DATETIME
INT64 net_htoni64(INT64 from)
void net_arg_get_lob_handle(T_LOB_HANDLE *lob, void *arg)
#define MAX_SHARD_INFO_LENGTH
#define CAS_TYPE_FIRST_BYTE_PROTOCOL_MASK
void net_arg_get_cci_object(int *pageid, short *slotid, short *volid, void *arg)
#define CAS_MAKE_VER(MAJOR, MINOR, PATCH)
void net_buf_clear(T_NET_BUF *net_buf)
int net_buf_cp_float(T_NET_BUF *net_buf, float value)
int db_make_elo(DB_VALUE *value, DB_TYPE type, const DB_ELO *elo)
void net_arg_get_int(int *value, void *arg)
double net_htond(double from)
int net_buf_cp_cas_type_and_charset(T_NET_BUF *net_buf, unsigned char cas_type, unsigned char charset)
void net_buf_init(T_NET_BUF *net_buf, T_BROKER_VERSION client_version)
int net_buf_cp_int(T_NET_BUF *net_buf, int value, int *begin_offset)
void net_arg_get_timestamp(short *yr, short *mon, short *day, short *hh, short *mm, short *ss, void *arg)
#define DOES_CLIENT_MATCH_THE_PROTOCOL(CLIENT, MATCH)
char driver_info[SRV_CON_CLIENT_INFO_SIZE]
void net_buf_overwrite_int(T_NET_BUF *net_buf, int offset, int value)
char * db_private_strdup(THREAD_ENTRY *thrd, const char *s)
int net_buf_cp_short(T_NET_BUF *net_buf, short value)
void net_arg_get_short(short *value, void *arg)
#define NET_BUF_FREE_SIZE(n)
void net_arg_get_time(short *hh, short *mm, short *ss, void *arg)
void net_arg_get_str(char **value, int *size, void *arg)
#define CAS_ERROR_INDICATOR
float net_htonf(float from)
void net_buf_destroy(T_NET_BUF *net_buf)
unsigned short htons(unsigned short from)
void net_arg_get_lob_value(DB_VALUE *db_lob, void *arg)
void net_arg_get_bigint(DB_BIGINT *value, void *arg)
void net_arg_get_size(int *size, void *arg)
need_clear_type need_clear
UINT64 ntohi64(UINT64 from)
void net_arg_get_cache_time(void *ct, void *arg)
int net_buf_cp_double(T_NET_BUF *net_buf, double value)
void net_arg_put_int(void *arg, int *value)
#define NET_BUF_HEADER_SIZE
unsigned short ntohs(unsigned short from)
#define NET_SIZE_TIMESTAMP
T_APPL_SERVER_INFO * as_info
#define DOES_CLIENT_UNDERSTAND_THE_PROTOCOL(CLIENT, REQUIRE)
void elo_init_structure(DB_ELO *elo)
#define ALLOC_COPY(PTR, STR)
void net_arg_get_timestamptz(short *yr, short *mon, short *day, short *hh, short *mm, short *ss, char **tz, int *tz_size, void *arg)
#define NET_BUF_CURR_PTR(n)
void net_arg_get_object(T_OBJECT *obj, void *arg)
unsigned int ntohl(unsigned int from)
int net_buf_cp_lob_handle(T_NET_BUF *net_buf, T_LOB_HANDLE *lob)
void net_arg_get_dbobject(DB_OBJECT **obj, void *arg)
void net_arg_get_double(double *value, void *arg)
int net_buf_cp_bigint(T_NET_BUF *net_buf, DB_BIGINT value, int *begin_offset)
#define NET_BUF_EXTRA_SIZE
void net_arg_get_date(short *year, short *mon, short *day, void *arg)
int net_buf_cp_object(T_NET_BUF *net_buf, T_OBJECT *oid)
void net_arg_get_float(float *value, void *arg)
char * ut_trim(char *str)
int net_buf_cp_byte(T_NET_BUF *net_buf, char ch)
int net_buf_cp_post_send_file(T_NET_BUF *net_buf, int size, char *filename)
size_t net_error_append_shard_info(char *err_buf, const char *err_msg, int buf_size)
#define REALLOC(PTR, SIZE)
void net_buf_column_info_set(T_NET_BUF *net_buf, char ut, short scale, int prec, char charset, const char *name)