NCBI C++ ToolKit
Macros | Functions
ct.c File Reference
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#include "ctpublic.h"
#include "ctlib.h"
#include <freetds/string.h>
#include <freetds/enum_cap.h>
#include <freetds/data.h>
#include "replacements.h"
+ Include dependency graph for ct.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define CONV_CAP(ct, tds)   case ct: idx=tds; break;
 

Functions

static const char * ct_describe_cmd_state (CS_INT state)
 
static int _ct_fetch_cursor (CS_COMMAND *cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT *rows_read)
 Read a row of data. More...
 
static int _ct_fetchable_results (CS_COMMAND *cmd)
 
static TDSRET _ct_process_return_status (TDSSOCKET *tds)
 
static int _ct_fill_param (CS_INT cmd_type, CS_PARAM *param, CS_DATAFMT *datafmt, CS_VOID *data, CS_INT *datalen, CS_SMALLINT *indicator, CS_BYTE byvalue)
 
void _ctclient_msg (CS_CONNECTION *con, const char *funcname, int layer, int origin, int severity, int number, const char *fmt,...)
 
int _ct_bind_data (CS_CONTEXT *ctx, TDSRESULTINFO *resinfo, TDSRESULTINFO *bindinfo, CS_INT offset)
 
static void _ct_initialise_cmd (CS_COMMAND *cmd)
 
static CS_RETCODE _ct_cancel_cleanup (CS_COMMAND *cmd)
 
static CS_INT _ct_map_compute_op (CS_INT comp_op)
 
static CS_INT ct_diag_storeclientmsg (CS_CONTEXT *context, CS_CONNECTION *conn, CS_CLIENTMSG *message)
 
static CS_INT ct_diag_storeservermsg (CS_CONTEXT *context, CS_CONNECTION *conn, CS_SERVERMSG *message)
 
static CS_INT ct_diag_countmsg (CS_CONTEXT *context, CS_INT type, CS_INT *count)
 
static CS_INT ct_diag_getclientmsg (CS_CONTEXT *context, CS_INT idx, CS_CLIENTMSG *message)
 
static CS_INT ct_diag_getservermsg (CS_CONTEXT *context, CS_INT idx, CS_SERVERMSG *message)
 
static void rpc_clear (CSREMOTE_PROC *rpc)
 
static void param_clear (CS_PARAM *pparam)
 recursively erase the parameter list More...
 
static TDSPARAMINFOparaminfoalloc (TDSSOCKET *tds, CS_PARAM *first_param)
 Allocate memory and copy the rpc information into a TDSPARAMINFO structure. More...
 
static CS_DYNAMIC_ct_allocate_dynamic (CS_CONNECTION *con, char *id, int idlen)
 
static CS_INT _ct_deallocate_dynamic (CS_CONNECTION *con, CS_DYNAMIC *dyn)
 
static CS_DYNAMIC_ct_locate_dynamic (CS_CONNECTION *con, char *id, int idlen)
 
static const char * _ct_get_layer (int layer)
 
static const char * _ct_get_origin (int origin)
 
static const char * _ct_get_user_api_layer_error (int error)
 
static char * _ct_get_msgstr (const char *funcname, int layer, int origin, int severity, int number)
 
static CS_RETCODE ct_set_command_state (CS_COMMAND *cmd, CS_INT state)
 
CS_RETCODE ct_exit (CS_CONTEXT *ctx, CS_INT unused)
 
CS_RETCODE ct_init (CS_CONTEXT *ctx, CS_INT version)
 
CS_RETCODE ct_con_alloc (CS_CONTEXT *ctx, CS_CONNECTION **con)
 
CS_RETCODE ct_callback (CS_CONTEXT *ctx, CS_CONNECTION *con, CS_INT action, CS_INT type, CS_VOID *func)
 
CS_RETCODE ct_con_props (CS_CONNECTION *con, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *out_len)
 
CS_RETCODE ct_connect (CS_CONNECTION *con, CS_CHAR *servername, CS_INT snamelen)
 
CS_RETCODE ct_cmd_alloc (CS_CONNECTION *con, CS_COMMAND **pcmd)
 
CS_RETCODE ct_command (CS_COMMAND *cmd, CS_INT type, const CS_VOID *buffer, CS_INT buflen, CS_INT option)
 
CS_RETCODE ct_send (CS_COMMAND *cmd)
 
CS_RETCODE ct_results (CS_COMMAND *cmd, CS_INT *result_type)
 
CS_RETCODE ct_bind (CS_COMMAND *cmd, CS_INT item, CS_DATAFMT *datafmt, CS_VOID *buffer, CS_INT *copied, CS_SMALLINT *indicator)
 
CS_RETCODE ct_fetch (CS_COMMAND *cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT *prows_read)
 
CS_RETCODE ct_cmd_drop (CS_COMMAND *cmd)
 
CS_RETCODE ct_close (CS_CONNECTION *con, CS_INT option)
 
CS_RETCODE ct_con_drop (CS_CONNECTION *con)
 
int _ct_get_client_type (CS_CONTEXT *ctx, TDSCOLUMN *col)
 
TDS_SERVER_TYPE _ct_get_server_type (TDSSOCKET *tds, int datatype)
 
CS_RETCODE ct_cancel (CS_CONNECTION *conn, CS_COMMAND *cmd, CS_INT type)
 
CS_RETCODE ct_describe (CS_COMMAND *cmd, CS_INT item, CS_DATAFMT *datafmt)
 
CS_RETCODE ct_res_info (CS_COMMAND *cmd, CS_INT type, CS_VOID *buffer, CS_INT buflen, CS_INT *out_len)
 
CS_RETCODE ct_config (CS_CONTEXT *ctx, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
 
CS_RETCODE ct_cmd_props (CS_COMMAND *cmd, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
 
CS_RETCODE ct_compute_info (CS_COMMAND *cmd, CS_INT type, CS_INT colnum, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
 
CS_RETCODE ct_get_data (CS_COMMAND *cmd, CS_INT item, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
 
CS_RETCODE ct_send_data (CS_COMMAND *cmd, CS_VOID *buffer, CS_INT buflen)
 
CS_RETCODE ct_data_info (CS_COMMAND *cmd, CS_INT action, CS_INT colnum, CS_IODESC *iodesc)
 
CS_RETCODE ct_capability (CS_CONNECTION *con, CS_INT action, CS_INT type, CS_INT capability, CS_VOID *value)
 
CS_RETCODE ct_dynamic (CS_COMMAND *cmd, CS_INT type, CS_CHAR *id, CS_INT idlen, CS_CHAR *buffer, CS_INT buflen)
 
CS_RETCODE ct_param (CS_COMMAND *cmd, CS_DATAFMT *datafmt, CS_VOID *data, CS_INT datalen, CS_SMALLINT indicator)
 
CS_RETCODE ct_setparam (CS_COMMAND *cmd, CS_DATAFMT *datafmt, CS_VOID *data, CS_INT *datalen, CS_SMALLINT *indicator)
 
CS_RETCODE ct_options (CS_CONNECTION *con, CS_INT action, CS_INT option, CS_VOID *param, CS_INT paramlen, CS_INT *outlen)
 
CS_RETCODE ct_poll (CS_CONTEXT *ctx, CS_CONNECTION *connection, CS_INT milliseconds, CS_CONNECTION **compconn, CS_COMMAND **compcmd, CS_INT *compid, CS_INT *compstatus)
 
static int str_icmp (char *s1, char *s2, int len)
 
static char * get_next_tok (char *str, char *delimiter, char **ptrptr)
 
CS_RETCODE ct_cursor (CS_COMMAND *cmd, CS_INT type, CS_CHAR *name, CS_INT namelen, CS_CHAR *text, CS_INT tlen, CS_INT option)
 
static const unsigned char * paramrowalloc (TDSPARAMINFO *params, TDSCOLUMN *curcol, int param_num, void *value, int size)
 
CS_RETCODE ct_diag (CS_CONNECTION *conn, CS_INT operation, CS_INT type, CS_INT idx, CS_VOID *buffer)
 
CS_INT _ct_diag_clearmsg (CS_CONTEXT *context, CS_INT type)
 

Macro Definition Documentation

◆ CONV_CAP

#define CONV_CAP (   ct,
  tds 
)    case ct: idx=tds; break;

Function Documentation

◆ _ct_allocate_dynamic()

static CS_DYNAMIC * _ct_allocate_dynamic ( CS_CONNECTION con,
char *  id,
int  idlen 
)
static

◆ _ct_bind_data()

int _ct_bind_data ( CS_CONTEXT ctx,
TDSRESULTINFO resinfo,
TDSRESULTINFO bindinfo,
CS_INT  offset 
)

◆ _ct_cancel_cleanup()

static CS_RETCODE _ct_cancel_cleanup ( CS_COMMAND cmd)
static

◆ _ct_deallocate_dynamic()

static CS_INT _ct_deallocate_dynamic ( CS_CONNECTION con,
CS_DYNAMIC dyn 
)
static

◆ _ct_diag_clearmsg()

CS_INT _ct_diag_clearmsg ( CS_CONTEXT context,
CS_INT  type 
)

◆ _ct_fetch_cursor()

static CS_RETCODE _ct_fetch_cursor ( CS_COMMAND cmd,
CS_INT  type,
CS_INT  offset,
CS_INT  option,
CS_INT rows_read 
)
static

◆ _ct_fetchable_results()

static int _ct_fetchable_results ( CS_COMMAND cmd)
static

◆ _ct_fill_param()

static int _ct_fill_param ( CS_INT  cmd_type,
CS_PARAM param,
CS_DATAFMT datafmt,
CS_VOID data,
CS_INT datalen,
CS_SMALLINT indicator,
CS_BYTE  byvalue 
)
static

◆ _ct_get_client_type()

int _ct_get_client_type ( CS_CONTEXT ctx,
TDSCOLUMN col 
)

◆ _ct_get_layer()

static const char* _ct_get_layer ( int  layer)
static

Definition at line 88 of file ct.c.

References TDS_DBG_FUNC, and tdsdump_log.

Referenced by _ct_get_msgstr().

◆ _ct_get_msgstr()

static char* _ct_get_msgstr ( const char *  funcname,
int  layer,
int  origin,
int  severity,
int  number 
)
static

◆ _ct_get_origin()

static const char* _ct_get_origin ( int  origin)
static

Definition at line 106 of file ct.c.

References origin, TDS_DBG_FUNC, and tdsdump_log.

Referenced by _ct_get_msgstr().

◆ _ct_get_server_type()

TDS_SERVER_TYPE _ct_get_server_type ( TDSSOCKET tds,
int  datatype 
)

◆ _ct_get_user_api_layer_error()

static const char* _ct_get_user_api_layer_error ( int  error)
static

Definition at line 136 of file ct.c.

References TDS_DBG_FUNC, and tdsdump_log.

Referenced by _ct_get_msgstr().

◆ _ct_initialise_cmd()

static void _ct_initialise_cmd ( CS_COMMAND cmd)
static

◆ _ct_locate_dynamic()

static CS_DYNAMIC * _ct_locate_dynamic ( CS_CONNECTION con,
char *  id,
int  idlen 
)
static

◆ _ct_map_compute_op()

static CS_INT _ct_map_compute_op ( CS_INT  comp_op)
static

◆ _ct_process_return_status()

static TDSRET _ct_process_return_status ( TDSSOCKET tds)
static

◆ _ctclient_msg()

void _ctclient_msg ( CS_CONNECTION con,
const char *  funcname,
int  layer,
int  origin,
int  severity,
int  number,
const char *  fmt,
  ... 
)

◆ ct_bind()

CS_RETCODE ct_bind ( CS_COMMAND cmd,
CS_INT  item,
CS_DATAFMT datafmt,
CS_VOID buffer,
CS_INT copied,
CS_SMALLINT indicator 
)

◆ ct_callback()

CS_RETCODE ct_callback ( CS_CONTEXT ctx,
CS_CONNECTION con,
CS_INT  action,
CS_INT  type,
CS_VOID func 
)

◆ ct_cancel()

CS_RETCODE ct_cancel ( CS_CONNECTION conn,
CS_COMMAND cmd,
CS_INT  type 
)

◆ ct_capability()

CS_RETCODE ct_capability ( CS_CONNECTION con,
CS_INT  action,
CS_INT  type,
CS_INT  capability,
CS_VOID value 
)

Definition at line 3127 of file ct.c.

References assert, tds_login::capabilities, CONV_CAP, CS_CAP_REQUEST, CS_CAP_RESPONSE, CS_CON_INBAND, CS_CON_LOGICAL, CS_CON_NOINBAND, CS_CON_NOOOB, CS_CON_OOB, CS_CSR_ABS, CS_CSR_FIRST, CS_CSR_LAST, CS_CSR_MULTI, CS_CSR_PREV, CS_CSR_REL, CS_DATA_BIN, CS_DATA_BIT, CS_DATA_BITN, CS_DATA_BOUNDARY, CS_DATA_CHAR, CS_DATA_DATE4, CS_DATA_DATE8, CS_DATA_DATETIMEN, CS_DATA_DEC, CS_DATA_FLT4, CS_DATA_FLT8, CS_DATA_FLTN, CS_DATA_IMAGE, CS_DATA_INT1, CS_DATA_INT2, CS_DATA_INT4, CS_DATA_INT8, CS_DATA_INTN, CS_DATA_LBIN, CS_DATA_LCHAR, CS_DATA_MNY4, CS_DATA_MNY8, CS_DATA_MONEYN, CS_DATA_NOBIN, CS_DATA_NOBIT, CS_DATA_NOBOUNDARY, CS_DATA_NOCHAR, CS_DATA_NODATE4, CS_DATA_NODATE8, CS_DATA_NODATETIMEN, CS_DATA_NODEC, CS_DATA_NOFLT4, CS_DATA_NOFLT8, CS_DATA_NOIMAGE, CS_DATA_NOINT1, CS_DATA_NOINT2, CS_DATA_NOINT4, CS_DATA_NOINT8, CS_DATA_NOINTN, CS_DATA_NOLBIN, CS_DATA_NOLCHAR, CS_DATA_NOMNY4, CS_DATA_NOMNY8, CS_DATA_NOMONEYN, CS_DATA_NONUM, CS_DATA_NOSENSITIVITY, CS_DATA_NOTEXT, CS_DATA_NOVBIN, CS_DATA_NOVCHAR, CS_DATA_NUM, CS_DATA_SENSITIVITY, CS_DATA_TEXT, CS_DATA_VBIN, CS_DATA_VCHAR, CS_DATA_VOID, CS_FAIL, CS_FALSE, CS_GET, CS_PROTO_BULK, CS_PROTO_DYNAMIC, CS_PROTO_DYNPROC, CS_PROTO_NOBULK, CS_PROTO_NOTEXT, CS_PROTO_TEXT, CS_REQ_BCP, CS_REQ_CURSOR, CS_REQ_DYN, CS_REQ_LANG, CS_REQ_MSG, CS_REQ_MSTMT, CS_REQ_NOTIF, CS_REQ_PARAM, CS_REQ_RPC, CS_REQ_URGNOTIF, CS_RES_NOEED, CS_RES_NOMSG, CS_RES_NOPARAM, CS_RES_NOSTRIPBLANKS, CS_RES_NOTDSDEBUG, CS_SET, CS_SUCCEED, CS_TRUE, login, NULL, tds, TDS_DBG_FUNC, TDS_DBG_SEVERE, _cs_connection::tds_login, TDS_REQ_BCP, TDS_REQ_CON_INBAND, TDS_REQ_CON_LOGICAL, TDS_REQ_CON_OOB, TDS_REQ_CSR_ABS, TDS_REQ_CSR_FIRST, TDS_REQ_CSR_LAST, TDS_REQ_CSR_MULTI, TDS_REQ_CSR_PREV, TDS_REQ_CSR_REL, TDS_REQ_CURSOR, TDS_REQ_DATA_BIN, TDS_REQ_DATA_BIT, TDS_REQ_DATA_BITN, TDS_REQ_DATA_BOUNDARY, TDS_REQ_DATA_CHAR, TDS_REQ_DATA_DATE4, TDS_REQ_DATA_DATE8, TDS_REQ_DATA_DATETIMEN, TDS_REQ_DATA_DEC, TDS_REQ_DATA_FLT4, TDS_REQ_DATA_FLT8, TDS_REQ_DATA_FLTN, TDS_REQ_DATA_IMAGE, TDS_REQ_DATA_INT1, TDS_REQ_DATA_INT2, TDS_REQ_DATA_INT4, TDS_REQ_DATA_INT8, TDS_REQ_DATA_INTN, TDS_REQ_DATA_LBIN, TDS_REQ_DATA_LCHAR, TDS_REQ_DATA_MNY4, TDS_REQ_DATA_MNY8, TDS_REQ_DATA_MONEYN, TDS_REQ_DATA_NUM, TDS_REQ_DATA_SENSITIVITY, TDS_REQ_DATA_TEXT, TDS_REQ_DATA_VBIN, TDS_REQ_DATA_VCHAR, TDS_REQ_DATA_VOID, TDS_REQ_DYNF, TDS_REQ_EVT, TDS_REQ_LANG, TDS_REQ_MSG, TDS_REQ_MSTMT, TDS_REQ_PARAM, TDS_REQ_PROTO_BULK, TDS_REQ_PROTO_DYNAMIC, TDS_REQ_PROTO_DYNPROC, TDS_REQ_PROTO_TEXT, TDS_REQ_RPC, TDS_REQ_URGEVT, TDS_RES_CON_NOINBAND, TDS_RES_CON_NOOOB, TDS_RES_DATA_INTN, TDS_RES_DATA_NOBIN, TDS_RES_DATA_NOBIT, TDS_RES_DATA_NOBOUNDARY, TDS_RES_DATA_NOCHAR, TDS_RES_DATA_NODATE4, TDS_RES_DATA_NODATE8, TDS_RES_DATA_NODATETIMEN, TDS_RES_DATA_NODEC, TDS_RES_DATA_NOFLT4, TDS_RES_DATA_NOFLT8, TDS_RES_DATA_NOIMAGE, TDS_RES_DATA_NOINT1, TDS_RES_DATA_NOINT2, TDS_RES_DATA_NOINT4, TDS_RES_DATA_NOINT8, TDS_RES_DATA_NOLBIN, TDS_RES_DATA_NOLCHAR, TDS_RES_DATA_NOMNY4, TDS_RES_DATA_NOMNY8, TDS_RES_DATA_NOMONEYN, TDS_RES_DATA_NONUM, TDS_RES_DATA_NOSENSITIVITY, TDS_RES_DATA_NOTEXT, TDS_RES_DATA_NOVBIN, TDS_RES_DATA_NOVCHAR, TDS_RES_NOEED, TDS_RES_NOMSG, TDS_RES_NOPARAM, TDS_RES_NOSTRIPBLANKS, TDS_RES_NOTDSDEBUG, TDS_RES_PROTO_NOBULK, TDS_RES_PROTO_NOTEXT, tdsdump_log, tds_capabilities::types, value, and tds_capability_type::values.

◆ ct_close()

CS_RETCODE ct_close ( CS_CONNECTION con,
CS_INT  option 
)

◆ ct_cmd_alloc()

CS_RETCODE ct_cmd_alloc ( CS_CONNECTION con,
CS_COMMAND **  pcmd 
)

◆ ct_cmd_drop()

CS_RETCODE ct_cmd_drop ( CS_COMMAND cmd)

◆ ct_cmd_props()

CS_RETCODE ct_cmd_props ( CS_COMMAND cmd,
CS_INT  action,
CS_INT  property,
CS_VOID buffer,
CS_INT  buflen,
CS_INT outlen 
)

◆ ct_command()

CS_RETCODE ct_command ( CS_COMMAND cmd,
CS_INT  type,
const CS_VOID buffer,
CS_INT  buflen,
CS_INT  option 
)

◆ ct_compute_info()

CS_RETCODE ct_compute_info ( CS_COMMAND cmd,
CS_INT  type,
CS_INT  colnum,
CS_VOID buffer,
CS_INT  buflen,
CS_INT outlen 
)

◆ ct_con_alloc()

CS_RETCODE ct_con_alloc ( CS_CONTEXT ctx,
CS_CONNECTION **  con 
)

◆ ct_con_drop()

CS_RETCODE ct_con_drop ( CS_CONNECTION con)

◆ ct_con_props()

CS_RETCODE ct_con_props ( CS_CONNECTION con,
CS_INT  action,
CS_INT  property,
CS_VOID buffer,
CS_INT  buflen,
CS_INT out_len 
)

Definition at line 351 of file ct.c.

References _cs_locale_copy(), _cs_locale_copy_inplace(), _cs_locale_free(), tds_login::app_name, tds_login::block_size, tds_env::block_size, buffer, tds_login::bulk_copy, tds_login::client_host_name, tds_socket::conn, tds_login::connect_timeout, CS_APPNAME, CS_BULK_LOGIN, CS_CON_STATUS, CS_CONSTAT_CONNECTED, CS_CONSTAT_DEAD, CS_FAIL, CS_FALSE, CS_GET, CS_HOSTNAME, CS_LOC_PROP, CS_LOGIN_TIMEOUT, CS_NO_LIMIT, CS_NULLTERM, CS_PACKETSIZE, CS_PARENT_HANDLE, CS_PASSWORD, CS_PORT, CS_SERVERADDR, CS_SERVERNAME, CS_SET, CS_SUCCEED, CS_TDS_40, CS_TDS_42, CS_TDS_46, CS_TDS_495, CS_TDS_50, CS_TDS_70, CS_TDS_71, CS_TDS_72, CS_TDS_73, CS_TDS_74, CS_TDS_VERSION, CS_TIMEOUT, CS_TRUE, CS_UNUSED, CS_USERDATA, CS_USERNAME, _cs_connection::ctx, tds_connection::env, free(), if(), int, IS_TDSDEAD, _cs_connection::locale, malloc(), NULL, tds_login::password, tds_login::query_timeout, tds_socket::query_timeout, _cs_connection::server_addr, tds_login::server_name, tds_socket::state, strdup, strlcpy, strtok_r, tds, TDS_DBG_ERROR, TDS_DBG_FUNC, TDS_DBG_INFO2, TDS_DEAD, tds_dstr_cstr(), tds_dstr_len(), _cs_connection::tds_login, tds_set_app, tds_set_bulk, tds_set_host, tds_set_packet, tds_set_passwd, tds_set_port, tds_set_user, tds_set_version, _cs_connection::tds_socket, tds_strndup, tds_connection::tds_version, tdsdump_log, tds_login::user_name, _cs_connection::userdata, and _cs_connection::userdata_len.

Referenced by CTL_Connection::Abort(), CTL_Connection::Close(), continue_logging_in(), CTL_Connection::CTL_Connection(), CTLibContext::CTLIB_cterr_handler(), CTLibContext::CTLIB_srverr_handler(), CTL_Connection::GetTimeout(), HandleConnStatus(), insert_test(), ctlib::Connection::IsAlive(), ctlib::Connection::IsOpen_native(), main(), ctlib::Connection::Open(), and CTL_Connection::SetTimeout().

◆ ct_config()

CS_RETCODE ct_config ( CS_CONTEXT ctx,
CS_INT  action,
CS_INT  property,
CS_VOID buffer,
CS_INT  buflen,
CS_INT outlen 
)

◆ ct_connect()

CS_RETCODE ct_connect ( CS_CONNECTION con,
CS_CHAR servername,
CS_INT  snamelen 
)

◆ ct_cursor()

CS_RETCODE ct_cursor ( CS_COMMAND cmd,
CS_INT  type,
CS_CHAR name,
CS_INT  namelen,
CS_CHAR text,
CS_INT  tlen,
CS_INT  option 
)

◆ ct_data_info()

CS_RETCODE ct_data_info ( CS_COMMAND cmd,
CS_INT  action,
CS_INT  colnum,
CS_IODESC iodesc 
)

◆ ct_describe()

CS_RETCODE ct_describe ( CS_COMMAND cmd,
CS_INT  item,
CS_DATAFMT datafmt 
)

◆ ct_describe_cmd_state()

static const char * ct_describe_cmd_state ( CS_INT  state)
static

◆ ct_diag()

CS_RETCODE ct_diag ( CS_CONNECTION conn,
CS_INT  operation,
CS_INT  type,
CS_INT  idx,
CS_VOID buffer 
)

◆ ct_diag_countmsg()

static CS_INT ct_diag_countmsg ( CS_CONTEXT context,
CS_INT  type,
CS_INT count 
)
static

◆ ct_diag_getclientmsg()

static CS_INT ct_diag_getclientmsg ( CS_CONTEXT context,
CS_INT  idx,
CS_CLIENTMSG message 
)
static

◆ ct_diag_getservermsg()

static CS_INT ct_diag_getservermsg ( CS_CONTEXT context,
CS_INT  idx,
CS_SERVERMSG message 
)
static

◆ ct_diag_storeclientmsg()

static CS_INT ct_diag_storeclientmsg ( CS_CONTEXT context,
CS_CONNECTION conn,
CS_CLIENTMSG message 
)
static

◆ ct_diag_storeservermsg()

static CS_INT ct_diag_storeservermsg ( CS_CONTEXT context,
CS_CONNECTION conn,
CS_SERVERMSG message 
)
static

◆ ct_dynamic()

CS_RETCODE ct_dynamic ( CS_COMMAND cmd,
CS_INT  type,
CS_CHAR id,
CS_INT  idlen,
CS_CHAR buffer,
CS_INT  buflen 
)

◆ ct_exit()

CS_RETCODE ct_exit ( CS_CONTEXT ctx,
CS_INT  unused 
)

Definition at line 252 of file ct.c.

References CS_SUCCEED, ctx, TDS_DBG_FUNC, and tdsdump_log.

Referenced by CTLibContext::CTLibContext(), main(), try_ctlogout(), and CTLibContext::x_Close().

◆ ct_fetch()

CS_RETCODE ct_fetch ( CS_COMMAND cmd,
CS_INT  type,
CS_INT  offset,
CS_INT  option,
CS_INT prows_read 
)

◆ ct_get_data()

CS_RETCODE ct_get_data ( CS_COMMAND cmd,
CS_INT  item,
CS_VOID buffer,
CS_INT  buflen,
CS_INT outlen 
)

◆ ct_init()

CS_RETCODE ct_init ( CS_CONTEXT ctx,
CS_INT  version 
)

◆ ct_options()

CS_RETCODE ct_options ( CS_CONNECTION con,
CS_INT  action,
CS_INT  option,
CS_VOID param,
CS_INT  paramlen,
CS_INT outlen 
)

Definition at line 3612 of file ct.c.

References assert, tds_option_arg::c, CS_CLEAR, CS_FAIL, CS_FALSE, CS_GET, CS_OPT_ANSINULL, CS_OPT_ANSIPERM, CS_OPT_ARITHABORT, CS_OPT_ARITHIGNORE, CS_OPT_AUTHOFF, CS_OPT_AUTHON, CS_OPT_CHAINXACTS, CS_OPT_CURCLOSEONXACT, CS_OPT_DATEFIRST, CS_OPT_DATEFORMAT, CS_OPT_FIPSFLAG, CS_OPT_FMTDMY, CS_OPT_FMTDYM, CS_OPT_FMTMDY, CS_OPT_FMTMYD, CS_OPT_FMTYDM, CS_OPT_FMTYMD, CS_OPT_FORCEPLAN, CS_OPT_FORMATONLY, CS_OPT_FRIDAY, CS_OPT_GETDATA, CS_OPT_ISOLATION, CS_OPT_LEVEL0, CS_OPT_LEVEL1, CS_OPT_LEVEL2, CS_OPT_LEVEL3, CS_OPT_MONDAY, CS_OPT_NOCOUNT, CS_OPT_NOEXEC, CS_OPT_PARSEONLY, CS_OPT_QUOTED_IDENT, CS_OPT_RESTREES, CS_OPT_SATURDAY, CS_OPT_SHOWPLAN, CS_OPT_STATS_IO, CS_OPT_STATS_TIME, CS_OPT_STR_RTRUNC, CS_OPT_SUNDAY, CS_OPT_TEXTSIZE, CS_OPT_THURSDAY, CS_OPT_TRUNCIGNORE, CS_OPT_TUESDAY, CS_OPT_WEDNESDAY, CS_SET, CS_SUCCEED, CS_TRUE, tds_option_arg::i, i, NULL, option, tds_socket::option_value, switch(), tds, TDS_DBG_FUNC, TDS_FAILED, TDS_OPT_ANSINULL, TDS_OPT_ARITHABORTON, TDS_OPT_ARITHIGNOREON, TDS_OPT_AUTHOFF, TDS_OPT_AUTHON, TDS_OPT_CHAINXACTS, TDS_OPT_CURCLOSEONXACT, TDS_OPT_DATEFIRST, TDS_OPT_DATEFORMAT, TDS_OPT_DEFAULT, TDS_OPT_FIPSFLAG, TDS_OPT_FMTDMY, TDS_OPT_FMTDYM, TDS_OPT_FMTMDY, TDS_OPT_FMTMYD, TDS_OPT_FMTYDM, TDS_OPT_FMTYMD, TDS_OPT_FORCEPLAN, TDS_OPT_FORMATONLY, TDS_OPT_FRIDAY, TDS_OPT_GETDATA, TDS_OPT_ISOLATION, TDS_OPT_LEVEL0, TDS_OPT_LEVEL1, TDS_OPT_LEVEL2, TDS_OPT_LEVEL3, TDS_OPT_LIST, TDS_OPT_MONDAY, TDS_OPT_NOCOUNT, TDS_OPT_NOEXEC, TDS_OPT_PARSEONLY, TDS_OPT_QUOTED_IDENT, TDS_OPT_RESTREES, TDS_OPT_SATURDAY, TDS_OPT_SET, TDS_OPT_SHOWPLAN, TDS_OPT_STAT_IO, TDS_OPT_STAT_TIME, TDS_OPT_SUNDAY, TDS_OPT_TEXTSIZE, TDS_OPT_THURSDAY, TDS_OPT_TRUNCABORT, TDS_OPT_TUESDAY, TDS_OPT_WEDNESDAY, _cs_connection::tds_socket, tds_submit_optioncmd, TDS_VECTOR_SIZE, tdsdump_log, and tds_option_arg::ti.

Referenced by main().

◆ ct_param()

CS_RETCODE ct_param ( CS_COMMAND cmd,
CS_DATAFMT datafmt,
CS_VOID data,
CS_INT  datalen,
CS_SMALLINT  indicator 
)

◆ ct_poll()

CS_RETCODE ct_poll ( CS_CONTEXT ctx,
CS_CONNECTION connection,
CS_INT  milliseconds,
CS_CONNECTION **  compconn,
CS_COMMAND **  compcmd,
CS_INT compid,
CS_INT compstatus 
)

Definition at line 3904 of file ct.c.

References CS_FAIL, ctx, TDS_DBG_FUNC, and tdsdump_log.

◆ ct_res_info()

CS_RETCODE ct_res_info ( CS_COMMAND cmd,
CS_INT  type,
CS_VOID buffer,
CS_INT  buflen,
CS_INT out_len 
)

◆ ct_results()

CS_RETCODE ct_results ( CS_COMMAND cmd,
CS_INT result_type 
)

Definition at line 1172 of file ct.c.

References _CS_CANCEL_NOCANCEL, _CS_CANCEL_PENDING, _CS_COMMAND_READY, _CS_RES_CMD_DONE, _CS_RES_CMD_SUCCEED, _CS_RES_DESCRIBE_RESULT, _CS_RES_END_RESULTS, _CS_RES_INIT, _CS_RES_NONE, _CS_RES_RESULTSET_EMPTY, _CS_RES_RESULTSET_ROWS, _CS_RES_STATUS, _ct_cancel_cleanup(), _ct_deallocate_dynamic(), _ct_process_return_status(), _cs_command::bind_count, _cs_command::cancel_state, cmd, _cs_command::command_type, _cs_command::con, _cs_context::config, CS_CANCELED, CS_CMD_DONE, CS_CMD_FAIL, CS_CMD_SUCCEED, CS_COMPUTE_RESULT, CS_COMPUTEFMT_RESULT, CS_CUR_CMD, CS_CURSOR_RESULT, CS_DEALLOC, CS_DESCRIBE_INPUT, CS_DESCRIBE_OUTPUT, CS_DESCRIBE_RESULT, CS_DYNAMIC_CMD, CS_END_RESULTS, _cs_config::cs_expose_formats, CS_FAIL, CS_LANG_CMD, CS_PREPARE, CS_ROW_RESULT, CS_ROWFMT_RESULT, CS_RPC_CMD, CS_SUCCEED, CS_UNUSED, ct_set_command_state(), _cs_connection::ctx, _cs_command::curr_result_type, _cs_command::dyn, _cs_command::dynamic_cmd, NULL, tds_socket::res_info, _cs_command::results_state, _cs_command::row_prefetched, tds_socket::rows_affected, tds, TDS_CANCELLED, TDS_COMPUTE_RESULT, TDS_DBG_FUNC, TDS_DESCRIBE_RESULT, TDS_DONE_ERROR, TDS_DONE_RESULT, TDS_DONEINPROC_RESULT, TDS_DONEPROC_RESULT, TDS_NO_COUNT, TDS_NO_MORE_RESULTS, TDS_PARAM_RESULT, tds_process_tokens, TDS_RETURN_COMPUTE, TDS_RETURN_COMPUTEFMT, TDS_RETURN_DONE, TDS_RETURN_PROC, TDS_RETURN_ROW, TDS_RETURN_ROWFMT, TDS_ROW_RESULT, tds_set_current_results, _cs_connection::tds_socket, TDS_STATUS_RESULT, TDS_STOPAT_COMPUTE, TDS_STOPAT_DONE, TDS_STOPAT_ROW, TDS_STOPAT_ROWFMT, TDS_SUCCESS, TDS_TOKEN_RESULTS, and tdsdump_log.

Referenced by do_results(), ex_display_results(), ctlib::Command::GetResults(), insert_test(), main(), CTL_LRCmd::MakeResultInternal(), CTL_CursorCmd::OpenCursor(), CTL_CursorCmd::ProcessResults(), run_command(), sp_who(), update_second_table(), CTL_LRCmd::x_Cancel(), CTL_Connection::x_SendData(), and CTL_CursorResult::~CTL_CursorResult().

◆ ct_send()

CS_RETCODE ct_send ( CS_COMMAND cmd)

Definition at line 913 of file ct.c.

References _CS_CANCEL_PENDING, _CS_COMMAND_IDLE, _CS_COMMAND_SENT, _CS_CURS_TYPE_REQUESTED, _CS_CURS_TYPE_SENT, _CS_RES_DESCRIBE_RESULT, _CS_RES_END_RESULTS, _CS_RES_INIT, _CS_RES_NONE, _ct_cancel_cleanup(), _ctclient_msg(), _cs_command::cancel_state, tds_cursor_status::close, cmd, _cs_command::command_state, _cs_command::command_type, _cs_command::con, CS_CANCELED, CS_CUR_CMD, CS_DEALLOC, CS_DESCRIBE_INPUT, CS_DESCRIBE_OUTPUT, CS_DYNAMIC_CMD, CS_EXECUTE, CS_FAIL, CS_LANG_CMD, CS_PREPARE, CS_RPC_CMD, CS_SEND_DATA_CMD, CS_SUCCEED, ct_set_command_state(), tds_socket::cur_dyn, _cs_command::cursor, tds_cursor::cursor_name, tds_cursor_status::cursor_row, tds_cursor_status::dealloc, tds_cursor_status::declare, _cs_command::dyn, _cs_command::dynamic_cmd, _cs_dynamic::id, _cs_command::input_params, _csremote_proc::name, NULL, tds_cursor_status::open, tds_socket::param_info, _csremote_proc::param_list, _cs_dynamic::param_list, paraminfoalloc(), tds_dynamic::params, _cs_command::query, tds_cursor::query, tds_dynamic::res_info, tds_socket::res_info, _cs_command::results_state, _cs_command::rpc, tds_cursor::status, _cs_dynamic::stmt, tds, tds_cursor_close, tds_cursor_dealloc, tds_cursor_declare, tds_cursor_open, tds_cursor_setrows, TDS_CURSOR_STATE_REQUESTED, TDS_CURSOR_STATE_SENT, TDS_DBG_FUNC, TDS_DBG_INFO1, TDS_DBG_INFO2, TDS_DBG_WARN, TDS_FAIL, TDS_FAILED, tds_flush_packet, tds_free_all_results, tds_free_input_params, tds_free_param_results, TDS_PENDING, tds_release_cursor, tds_set_current_results, tds_set_state, _cs_connection::tds_socket, tds_submit_execute, tds_submit_prepare, tds_submit_query, tds_submit_query_params, tds_submit_rpc, tds_submit_unprepare, TDS_SUCCEED, tds_writetext_end, tdsdump_log, and _cs_dynamic::tdsdyn.

Referenced by CTL_CursorCmd::CloseCursor(), CTL_CursorCmd::CloseForever(), CTL_CursorCmd::Delete(), insert_test(), main(), CTL_CursorCmd::OpenCursor(), run_command(), ctlib::Command::Send(), CTL_SendDataCmd::SendChunk(), CTL_LRCmd::SendInternal(), sp_who(), test(), CTL_CursorCmd::Update(), update_second_table(), and CTL_Connection::x_SendData().

◆ ct_send_data()

CS_RETCODE ct_send_data ( CS_COMMAND cmd,
CS_VOID buffer,
CS_INT  buflen 
)

◆ ct_set_command_state()

static CS_RETCODE ct_set_command_state ( CS_COMMAND cmd,
CS_INT  state 
)
static

◆ ct_setparam()

CS_RETCODE ct_setparam ( CS_COMMAND cmd,
CS_DATAFMT datafmt,
CS_VOID data,
CS_INT datalen,
CS_SMALLINT indicator 
)

◆ get_next_tok()

static char* get_next_tok ( char *  str,
char *  delimiter,
char **  ptrptr 
)
static

Definition at line 3947 of file ct.c.

References delimiter, NULL, result, and str().

Referenced by ct_cursor().

◆ param_clear()

static void param_clear ( CSREMOTE_PROC_PARAM pparam)
static

◆ paraminfoalloc()

static TDSPARAMINFO * paraminfoalloc ( TDSSOCKET tds,
CS_PARAM first_param 
)
static

◆ paramrowalloc()

static const unsigned char* paramrowalloc ( TDSPARAMINFO params,
TDSCOLUMN curcol,
int  param_num,
void *  value,
int  size 
)
static

◆ rpc_clear()

static void rpc_clear ( CSREMOTE_PROC rpc)
static

◆ str_icmp()

static int str_icmp ( char *  s1,
char *  s2,
int  len 
)
static

Definition at line 3916 of file ct.c.

References i, and len.

Referenced by ct_cursor().

Modified on Fri Mar 01 10:06:57 2024 by modify_doxy.py rev. 669887