Functions | |
static int | hex2num (char *hex) |
static int | hexdigit (char c) |
static int | parse_server_name_for_port (TDSCONNECTION *connection, TDSLOGIN *login) |
Check the server name to find port info first Warning: connection-> & login-> are all modified when needed. | |
static int | search_interface_file (TDSCONNECTION *connection, const char *dir, const char *file, const char *host) |
Open and read the file 'file' searching for a logical server by the name of 'host'. | |
static int | tds_config_boolean (const char *value) |
static void | tds_config_env_tdsdump (TDSCONNECTION *connection) |
static void | tds_config_env_tdshost (TDSCONNECTION *connection) |
static void | tds_config_env_tdsport (TDSCONNECTION *connection) |
static void | tds_config_env_tdsquery (TDSCONNECTION *connection) |
static void | tds_config_env_tdsver (TDSCONNECTION *connection) |
static void | tds_config_login (TDSCONNECTION *connection, TDSLOGIN *login) |
void | tds_config_verstr (const char *tdsver, TDSCONNECTION *connection) |
Set TDS version from given string. | |
void | tds_fix_connection (TDSCONNECTION *connection) |
Fix configuration after reading it. | |
const TDS_COMPILETIME_SETTINGS * | tds_get_compiletime_settings (void) |
Return a structure capturing the compile-time settings provided to the configure script. | |
static char * | tds_get_home_file (const char *file) |
Return filename from HOME directory. | |
void | tds_lookup_host (const char *servername, char *ip) |
Given a servername and port name or number, lookup the hostname and service. | |
static int | tds_lookup_port (const char *portname) |
static void | tds_parse_conf_section (const char *option, const char *value, void *param) |
int | tds_read_conf_file (TDSCONNECTION *connection, const char *server) |
Read configuration info for given server return 0 on error. | |
int | tds_read_conf_section (FILE *in, const char *section, TDSCONFPARSE tds_conf_parse, void *param) |
Read a section of configuration file (INI style file). | |
static int | tds_read_conf_sections (FILE *in, const char *server, TDSCONNECTION *connection) |
TDSCONNECTION * | tds_read_config_info (TDSSOCKET *tds, TDSLOGIN *login, TDSLOCALE *locale) |
tds_read_config_info() will fill the tds connection structure based on configuration information gathered in the following order: 1) Program specified in TDSLOGIN structure 2) The environment variables TDSVER, TDSDUMP, TDSPORT, TDSQUERY, TDSHOST 3) A config file with the following search order: a) a readable file specified by environment variable FREETDSCONF b) a readable file in ~/.freetds.conf c) a readable file in $prefix/etc/freetds.conf 3) ~/.interfaces if exists 4) $SYBASE/interfaces if exists 5) TDS_DEF_* default values | |
static void | tds_read_interfaces (const char *server, TDSCONNECTION *connection) |
Try to find the IP number and port for a (possibly) logical server name. | |
int | tds_set_interfaces_file_loc (const char *interf) |
Set the full name of interface file. | |
static int | tds_try_conf_file (const char *path, const char *how, const char *server, TDSCONNECTION *connection) |
|
Check the server name to find port info first Warning: connection-> & login-> are all modified when needed.
|
|
Open and read the file 'file' searching for a logical server by the name of 'host'. If one is found then lookup the IP address and port number and store them in 'connection'
|
|
Set TDS version from given string.
|
|
Fix configuration after reading it. Currently this read some environment variables and replace some options. |
|
Return filename from HOME directory.
|
|
Given a servername and port name or number, lookup the hostname and service. The server ip will be stored in the string 'servername' in dotted-decimal notation. The service port number will be stored in string form in the 'port' parameter. If we can't determine both the IP address and port number then 'ip' and 'port' will be set to empty strings. |
|
Read configuration info for given server return 0 on error.
|
|
Read a section of configuration file (INI style file).
|
|
tds_read_config_info() will fill the tds connection structure based on configuration information gathered in the following order: 1) Program specified in TDSLOGIN structure 2) The environment variables TDSVER, TDSDUMP, TDSPORT, TDSQUERY, TDSHOST 3) A config file with the following search order: a) a readable file specified by environment variable FREETDSCONF b) a readable file in ~/.freetds.conf c) a readable file in $prefix/etc/freetds.conf 3) ~/.interfaces if exists 4) $SYBASE/interfaces if exists 5) TDS_DEF_* default values .tdsrc and freetds.conf have been added to make the package easier to integration with various Linux and *BSD distributions. |
|
Try to find the IP number and port for a (possibly) logical server name.
|
|
Set the full name of interface file.
|