NCBI C++ ToolKit
ncbi_dblb.c File Reference
#include "../ncbi_ansi_ext.h"
#include "../ncbi_assert.h"
#include "../ncbi_servicep.h"
#include <connect/ext/ncbi_dblb.h>
#include <ctype.h>
#include <stdlib.h>
+ Include dependency graph for ncbi_dblb.c:

Go to the source code of this file.

Go to the SVN repository for this file.


const char * DBLB_GetServerName (const char *lb_name, char *server_name_buf, size_t server_name_buflen, const char *const skip_servers[], char *errmsg_buf, size_t errmsg_buflen)
const char * DBLB_StatusStr (EDBLB_Status status)
static int s_IsSkipHost (unsigned int host, unsigned int skip_host)
static void s_AddSkip (SSERV_InfoCPtr **skip, size_t *a_skip, size_t *n_skip, SSERV_Info *info)
const char * DBLB_GetServer (const char *lb_name, TDBLB_Flags flags, const SDBLB_Preference *preference, const char *const skip_servers[], SDBLB_ConnPoint *conn_point, char *server_name_buf, size_t server_name_buflen, EDBLB_Status *result)

Function Documentation

◆ DBLB_GetServer()

const char* DBLB_GetServer ( const char *  lb_name,
TDBLB_Flags  flags,
const SDBLB_Preference preference,
const char *const  skip_servers[],
SDBLB_ConnPoint conn_point,
char *  server_name_buf,
size_t  server_name_buflen,
EDBLB_Status result 

◆ DBLB_GetServerName()

const char* DBLB_GetServerName ( const char *  lb_name,
char *  server_name_buf,
size_t  server_name_buflen,
const char *const  skip_servers[],
char *  errmsg_buf,
size_t  errmsg_buflen 

Definition at line 45 of file ncbi_dblb.c.

References assert, DBLB_GetServer(), DBLB_StatusStr(), fDBLB_None, result, and strncpy0().

◆ DBLB_StatusStr()

const char* DBLB_StatusStr ( EDBLB_Status  status)

Definition at line 68 of file ncbi_dblb.c.

References i.

Referenced by DBLB_GetServerName().

◆ s_AddSkip()

static void s_AddSkip ( SSERV_InfoCPtr **  skip,
size_t *  a_skip,
size_t *  n_skip,
SSERV_Info info 

Definition at line 90 of file ncbi_dblb.c.

References assert, free(), info, and malloc().

Referenced by DBLB_GetServer().

◆ s_IsSkipHost()

static int s_IsSkipHost ( unsigned int  host,
unsigned int  skip_host 

Definition at line 82 of file ncbi_dblb.c.

References eDefault, SERV_LOCALHOST, and SOCK_GetLocalHostAddress().

Referenced by DBLB_GetServer().

Modified on Sat Mar 02 10:53:35 2024 by rev. 669887