File cas_net_buf.h¶
FileList > broker > cas_net_buf.h
Go to the source code of this file
#include <arpa/inet.h>#include "cas_protocol.h"#include "dbtype_def.h"#include "cas_common_vars.h"
Classes¶
| Type | Name |
|---|---|
| struct | t_net_buf |
Public Types¶
| Type | Name |
|---|---|
| typedef struct t_net_buf | T_NET_BUF |
Public Functions¶
Macros¶
| Type | Name |
|---|---|
| define | CHECK_NET_BUF_SIZE (n, size) ([**NET\_BUF\_CURR\_SIZE**](cas__net__buf_8h.md#define-net_buf_curr_size)(n) < (size) ? 1 : 0) |
| define | INT_DEFAULE_NET_BUF_SIZE (16 \* [**NET\_BUF\_KBYTE**](cas__net__buf_8h.md#define-net_buf_kbyte)) |
| define | MAX_SHARD_INFO_LENGTH (30) |
| define | NET_BUF_ALLOC_SIZE ([**NET\_BUF\_SIZE**](cas__net__buf_8h.md#define-net_buf_size) + [**NET\_BUF\_EXTRA\_SIZE**](cas__net__buf_8h.md#define-net_buf_extra_size)) |
| define | NET_BUF_CURR_PTR (n) ((n)->data + [**NET\_BUF\_CURR\_SIZE**](cas__net__buf_8h.md#define-net_buf_curr_size)(n)) |
| define | NET_BUF_CURR_SIZE (n) (((n)->alloc\_size > 0) ? ([**NET\_BUF\_HEADER\_SIZE**](cas__net__buf_8h.md#define-net_buf_header_size) + (n)->data\_size) : 0) |
| define | NET_BUF_ERROR_MSG_SET (NET_BUF, ERR_INDICATOR, ERR_CODE, ERR_MSG) [**net\_buf\_error\_msg\_set**](cas__net__buf_8c.md#function-net_buf_error_msg_set)([**NET\_BUF**](broker__monitor_8c.md#function-timeout), [**ERR\_INDICATOR**](broker__monitor_8c.md#function-timeout), [**ERR\_CODE**](broker__monitor_8c.md#function-timeout), [**ERR\_MSG**](broker__monitor_8c.md#function-timeout), [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout)) |
| define | NET_BUF_EXTRA_SIZE (64 \* [**NET\_BUF\_KBYTE**](cas__net__buf_8h.md#define-net_buf_kbyte)) |
| define | NET_BUF_FREE_SIZE (n) ((n)->alloc\_size - [**NET\_BUF\_CURR\_SIZE**](cas__net__buf_8h.md#define-net_buf_curr_size)(n)) |
| define | NET_BUF_HEADER_MSG_SIZE ([**NET\_SIZE\_INT**](cas__net__buf_8h.md#define-net_size_int)) |
| define | NET_BUF_HEADER_SIZE ([**NET\_BUF\_HEADER\_MSG\_SIZE**](cas__net__buf_8h.md#define-net_buf_header_msg_size) + [**cas\_info\_size**](cas__common__vars_8c.md#variable-cas_info_size)) |
| define | NET_BUF_KBYTE 1024 |
| define | NET_BUF_SIZE ([**get\_net\_buf\_size**](cas__net__buf_8c.md#function-get_net_buf_size) ()) |
| define | NET_BUF_TYPE_SIZE (net_buf) /* multi line expression */ |
| define | NET_SIZE_BIGINT [**NET\_SIZE\_INT64**](cas__net__buf_8h.md#define-net_size_int64) |
| define | NET_SIZE_BYTE (([**int**](broker__monitor_8c.md#function-timeout)) [**sizeof**](broker__monitor_8c.md#function-timeout)([**char**](broker__monitor_8c.md#function-timeout))) |
| define | NET_SIZE_DATE ([**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) + [**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) + [**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short)) |
| define | NET_SIZE_DATETIME ([**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) \* 7) |
| define | NET_SIZE_DOUBLE (([**int**](broker__monitor_8c.md#function-timeout)) [**sizeof**](broker__monitor_8c.md#function-timeout)([**double**](broker__monitor_8c.md#function-timeout))) |
| define | NET_SIZE_FLOAT (([**int**](broker__monitor_8c.md#function-timeout)) [**sizeof**](broker__monitor_8c.md#function-timeout)([**float**](broker__monitor_8c.md#function-timeout))) |
| define | NET_SIZE_INT (([**int**](broker__monitor_8c.md#function-timeout)) [**sizeof**](broker__monitor_8c.md#function-timeout)([**int**](broker__monitor_8c.md#function-timeout))) |
| define | NET_SIZE_INT64 (([**int**](broker__monitor_8c.md#function-timeout)) [**sizeof**](broker__monitor_8c.md#function-timeout)([**INT64**](broker__monitor_8c.md#function-timeout))) |
| define | NET_SIZE_OBJECT ([**NET\_SIZE\_INT**](cas__net__buf_8h.md#define-net_size_int) + [**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) + [**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short)) |
| define | NET_SIZE_SHORT (([**int**](broker__monitor_8c.md#function-timeout)) [**sizeof**](broker__monitor_8c.md#function-timeout)([**short**](broker__monitor_8c.md#function-timeout))) |
| define | NET_SIZE_TIME ([**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) + [**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) + [**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short)) |
| define | NET_SIZE_TIMESTAMP ([**NET\_SIZE\_SHORT**](cas__net__buf_8h.md#define-net_size_short) \* 6) |
| define | SHARD_NET_BUF_ALLOC_SIZE ([**SHARD\_NET\_BUF\_SIZE**](cas__net__buf_8h.md#define-shard_net_buf_size) + [**NET\_BUF\_EXTRA\_SIZE**](cas__net__buf_8h.md#define-net_buf_extra_size)) |
| define | SHARD_NET_BUF_SIZE (512 \* [**NET\_BUF\_KBYTE**](cas__net__buf_8h.md#define-net_buf_kbyte)) |
| define | net_arg_get_char (value, arg) ((value)= \*(([**char**](broker__monitor_8c.md#function-timeout) \*) (arg) + [**NET\_SIZE\_INT**](cas__net__buf_8h.md#define-net_size_int))); |
| define | net_ntohd (X) [**net\_htond**](cas__net__buf_8c.md#function-net_htond)([**X**](broker__monitor_8c.md#function-timeout)) |
| define | net_ntohf (X) [**net\_htonf**](cas__net__buf_8c.md#function-net_htonf)([**X**](broker__monitor_8c.md#function-timeout)) |
| define | net_ntohi64 (X) [**net\_htoni64**](cas__net__buf_8c.md#function-net_htoni64)([**X**](broker__monitor_8c.md#function-timeout)) |
Public Types Documentation¶
typedef T_NET_BUF¶
Public Functions Documentation¶
function get_net_buf_size¶
function net_arg_get_bigint¶
function net_arg_get_cache_time¶
function net_arg_get_cci_object¶
function net_arg_get_date¶
function net_arg_get_datetime¶
void net_arg_get_datetime (
short * yr,
short * mon,
short * day,
short * hh,
short * mm,
short * ss,
short * ms,
void * arg
)
function net_arg_get_datetimetz¶
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
)
function net_arg_get_dbobject¶
function net_arg_get_double¶
function net_arg_get_float¶
function net_arg_get_int¶
function net_arg_get_lob_handle¶
function net_arg_get_lob_value¶
function net_arg_get_object¶
function net_arg_get_short¶
function net_arg_get_size¶
function net_arg_get_str¶
function net_arg_get_time¶
function net_arg_get_timestamp¶
void net_arg_get_timestamp (
short * yr,
short * mon,
short * day,
short * hh,
short * mm,
short * ss,
void * arg
)
function net_arg_get_timestamptz¶
void net_arg_get_timestamptz (
short * yr,
short * mon,
short * day,
short * hh,
short * mm,
short * ss,
char ** tz,
int * tz_size,
void * arg
)
function net_arg_put_int¶
function net_buf_clear¶
function net_buf_column_info_set¶
void net_buf_column_info_set (
T_NET_BUF * net_buf,
char ut,
short scale,
int prec,
char charset,
const char * name
)
function net_buf_cp_bigint¶
function net_buf_cp_byte¶
function net_buf_cp_cas_type_and_charset¶
int net_buf_cp_cas_type_and_charset (
T_NET_BUF * net_buf,
unsigned char cas_type,
unsigned char charset
)
function net_buf_cp_double¶
function net_buf_cp_float¶
function net_buf_cp_int¶
function net_buf_cp_lob_handle¶
function net_buf_cp_object¶
function net_buf_cp_post_send_file¶
function net_buf_cp_short¶
function net_buf_cp_str¶
function net_buf_destroy¶
function net_buf_error_msg_set¶
void net_buf_error_msg_set (
T_NET_BUF * net_buf,
int errindicator,
int errcode,
char * errstr,
const char * file,
int line
)
function net_buf_init¶
function net_buf_overwrite_bigint¶
function net_buf_overwrite_int¶
function net_error_append_shard_info¶
function net_htond¶
function net_htonf¶
function net_htoni64¶
function set_net_buf_size¶
Macro Definition Documentation¶
define CHECK_NET_BUF_SIZE¶
define INT_DEFAULE_NET_BUF_SIZE¶
define MAX_SHARD_INFO_LENGTH¶
define NET_BUF_ALLOC_SIZE¶
define NET_BUF_CURR_PTR¶
define NET_BUF_CURR_SIZE¶
#define NET_BUF_CURR_SIZE (
n
) `(((n)->alloc_size > 0) ? ( NET_BUF_HEADER_SIZE + (n)->data_size) : 0)`
define NET_BUF_ERROR_MSG_SET¶
#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__ )`
define NET_BUF_EXTRA_SIZE¶
define NET_BUF_FREE_SIZE¶
define NET_BUF_HEADER_MSG_SIZE¶
define NET_BUF_HEADER_SIZE¶
define NET_BUF_KBYTE¶
define NET_BUF_SIZE¶
define NET_BUF_TYPE_SIZE¶
define NET_SIZE_BIGINT¶
define NET_SIZE_BYTE¶
define NET_SIZE_DATE¶
define NET_SIZE_DATETIME¶
define NET_SIZE_DOUBLE¶
define NET_SIZE_FLOAT¶
define NET_SIZE_INT¶
define NET_SIZE_INT64¶
define NET_SIZE_OBJECT¶
define NET_SIZE_SHORT¶
define NET_SIZE_TIME¶
define NET_SIZE_TIMESTAMP¶
define SHARD_NET_BUF_ALLOC_SIZE¶
define SHARD_NET_BUF_SIZE¶
define net_arg_get_char¶
define net_ntohd¶
define net_ntohf¶
define net_ntohi64¶
The documentation for this class was generated from the following file cubrid/src/broker/cas_net_buf.h