Service Support
[CONNECT]

Collaboration diagram for Service Support:


Classes

struct  SHEAP_Block
struct  SHINFO_Params
struct  SSERV_NcbidInfo
struct  SSERV_StandaloneInfo
struct  SSERV_HttpInfo
struct  SSERV_FirewallInfo
struct  SSERV_DnsInfo
union  USERV_Info
struct  SSERV_Info

Defines

#define SERV_DEFAULT_FLAG   fSERV_Regular
#define SERV_LOCALHOST   ((unsigned int)(~0UL))
#define SERV_ANYHOST   0

Typedefs

typedef SHEAP_tagHEAP
typedef void *(* FHEAP_Resize )(void *old_base, TNCBI_Size new_size, void *arg)
typedef SHostInfoTagHOST_INFO
typedef SSERV_IterTagSERV_ITER
typedef unsigned int TSERV_Type
typedef const SSERV_InfoSSERV_InfoCPtr

Enumerations

enum  ESERV_Type {
  fSERV_Ncbid = 0x01, fSERV_Standalone = 0x02, fSERV_HttpGet = 0x04, fSERV_HttpPost = 0x08,
  fSERV_Http = fSERV_HttpGet | fSERV_HttpPost, fSERV_Firewall = 0x10, fSERV_Dns = 0x20
}
enum  ESERV_Flag { fSERV_Regular = 0x0, fSERV_Blast = 0x1 }
enum  ESERV_SpecialType {
  fSERV_Any = 0, fSERV_All = 0x0000FFFF, fSERV_Stateless = 0x00100000, fSERV_Reserved_1 = 0x00200000,
  fSERV_ReverseDns = 0x00800000, fSERV_Reserved_2 = 0x10000000, fSERV_IncludeDown = 0x20000000, fSERV_IncludeSuppressed = 0x40000000,
  fSERV_Promiscuous = 0x60000000
}

Functions

HEAP HEAP_Create (void *base, TNCBI_Size size, TNCBI_Size chunk_size, FHEAP_Resize resize, void *arg)
HEAP HEAP_Attach (const void *base, int serial)
HEAP HEAP_AttachFast (const void *base, TNCBI_Size size, int serial)
SHEAP_BlockHEAP_Alloc (HEAP heap, TNCBI_Size size)
SHEAP_BlockHEAP_AllocFast (HEAP heap, TNCBI_Size size)
void HEAP_Free (HEAP heap, SHEAP_Block *ptr)
void HEAP_FreeFast (HEAP heap, SHEAP_Block *ptr, const SHEAP_Block *prev)
SHEAP_BlockHEAP_Walk (const HEAP heap, const SHEAP_Block *prev)
HEAP HEAP_Trim (HEAP heap)
HEAP HEAP_Copy (const HEAP orig, size_t extra, int serial)
void HEAP_AddRef (HEAP heap)
void HEAP_Detach (HEAP heap)
void HEAP_Destroy (HEAP heap)
void * HEAP_Base (const HEAP heap)
TNCBI_Size HEAP_Size (const HEAP heap)
int HEAP_Serial (const HEAP heap)
void HEAP_Options (ESwitch fast, ESwitch newalk)
unsigned int HINFO_HostAddr (const HOST_INFO host_info)
int HINFO_CpuCount (const HOST_INFO host_info)
int HINFO_CpuUnits (const HOST_INFO host_info)
double HINFO_CpuClock (const HOST_INFO host_info)
int HINFO_TaskCount (const HOST_INFO host_info)
int HINFO_Memusage (const HOST_INFO host_info, double memusage[5])
int HINFO_MachineParams (const HOST_INFO host_info, SHINFO_Params *p)
int HINFO_LoadAverage (const HOST_INFO host_info, double lavg[2])
int HINFO_Status (const HOST_INFO host_info, double status[2])
const char * HINFO_Environment (const HOST_INFO host_info)
const char * HINFO_AffinityArgument (const HOST_INFO host_info)
const char * HINFO_AffinityArgvalue (const HOST_INFO host_info)
const char * SERV_TypeStr (ESERV_Type type)
const char * SERV_ReadType (const char *str, ESERV_Type *type)
SSERV_InfoSERV_CreateNcbidInfo (unsigned int host, unsigned short port, const char *args)
SSERV_InfoSERV_CreateStandaloneInfo (unsigned int host, unsigned short port)
SSERV_InfoSERV_CreateHttpInfo (ESERV_Type type, unsigned int host, unsigned short port, const char *path, const char *args)
SSERV_InfoSERV_CreateFirewallInfo (unsigned int host, unsigned short port, ESERV_Type type)
SSERV_InfoSERV_CreateDnsInfo (unsigned int host)
char * SERV_WriteInfo (const SSERV_Info *info)
SSERV_InfoSERV_ReadInfo (const char *info_str)
SSERV_InfoSERV_CopyInfo (const SSERV_Info *info)
size_t SERV_SizeOfInfo (const SSERV_Info *info)
int SERV_EqualInfo (const SSERV_Info *info1, const SSERV_Info *info2)
SERV_ITER SERV_OpenSimple (const char *service)
SERV_ITER SERV_OpenEx (const char *service, TSERV_Type types, unsigned int preferred_host, const SConnNetInfo *net_info, const SSERV_InfoCPtr skip[], size_t n_skip)
SERV_ITER SERV_Open (const char *service, TSERV_Type types, unsigned int preferred_host, const SConnNetInfo *net_info)
const SSERV_InfoSERV_GetNextInfoEx (SERV_ITER iter, HOST_INFO *host_info)
const SSERV_InfoSERV_GetNextInfo (SERV_ITER iter)
SSERV_InfoSERV_GetInfoEx (const char *service, TSERV_Type types, unsigned int preferred_host, const SConnNetInfo *net_info, const SSERV_InfoCPtr skip[], size_t n_skip, HOST_INFO *host_info)
SSERV_InfoSERV_GetInfo (const char *service, TSERV_Type types, unsigned int preferred_host, const SConnNetInfo *net_info)
int SERV_Penalize (SERV_ITER iter, double fine)
int SERV_Rerate (SERV_ITER iter, double rate)
void SERV_Reset (SERV_ITER iter)
void SERV_Close (SERV_ITER iter)
unsigned short SERV_ServerPort (const char *name, unsigned int host)


Define Documentation

#define SERV_ANYHOST   0
 

Definition at line 94 of file ncbi_service.h.

#define SERV_DEFAULT_FLAG   fSERV_Regular
 

Definition at line 77 of file ncbi_server_info.h.

Referenced by SERV_CreateDnsInfoEx(), SERV_CreateFirewallInfoEx(), SERV_CreateHttpInfoEx(), SERV_CreateNcbidInfoEx(), and SERV_CreateStandaloneInfoEx().

#define SERV_LOCALHOST   ((unsigned int)(~0UL))
 

Definition at line 93 of file ncbi_service.h.

Referenced by SNetServiceImpl::DiscoverServers(), s_Open(), s_OpenDispatcher(), and SERV_ServerPort().


Typedef Documentation

typedef void*(* FHEAP_Resize)(void *old_base,TNCBI_Size new_size,void *arg)
 

Definition at line 80 of file ncbi_heapmgr.h.

typedef struct SHEAP_tag* HEAP
 

Definition at line 53 of file ncbi_heapmgr.h.

typedef struct SHostInfoTag* HOST_INFO
 

Definition at line 58 of file ncbi_host_info.h.

typedef struct SSERV_IterTag* SERV_ITER
 

Definition at line 59 of file ncbi_service.h.

typedef const SSERV_Info* SSERV_InfoCPtr
 

Definition at line 116 of file ncbi_service.h.

typedef unsigned int TSERV_Type
 

Definition at line 113 of file ncbi_service.h.


Enumeration Type Documentation

enum ESERV_Flag
 

Enumerator:
fSERV_Regular 
fSERV_Blast 

Definition at line 72 of file ncbi_server_info.h.

enum ESERV_SpecialType
 

Enumerator:
fSERV_Any 
fSERV_All 
fSERV_Stateless 
fSERV_Reserved_1 
fSERV_ReverseDns 
fSERV_Reserved_2 
fSERV_IncludeDown 
fSERV_IncludeSuppressed 
fSERV_Promiscuous 

Definition at line 98 of file ncbi_service.h.

enum ESERV_Type
 

Enumerator:
fSERV_Ncbid 
fSERV_Standalone 
fSERV_HttpGet 
fSERV_HttpPost 
fSERV_Http 
fSERV_Firewall 
fSERV_Dns 

Definition at line 58 of file ncbi_server_info.h.


Function Documentation

void HEAP_AddRef HEAP  heap  ) 
 

Definition at line 903 of file ncbi_heapmgr.c.

References SHEAP_tag::base, SHEAP_tag::refc, and SHEAP_tag::size.

SHEAP_Block* HEAP_Alloc HEAP  heap,
TNCBI_Size  size
 

Definition at line 529 of file ncbi_heapmgr.c.

References s_HEAP_Alloc().

SHEAP_Block* HEAP_AllocFast HEAP  heap,
TNCBI_Size  size
 

Definition at line 535 of file ncbi_heapmgr.c.

References s_HEAP_Alloc().

HEAP HEAP_Attach const void *  base,
int  serial
 

Definition at line 253 of file ncbi_heapmgr.c.

References CORE_LOGF_X, eLOG_Error, SHEAP_Block::flag, SHEAP_HeapBlock::head, HEAP_INDEX, HEAP_ISFREE, HEAP_ISLAST, HEAP_ISUSED, HEAP_NEXT, size, and SHEAP_Block::size.

HEAP HEAP_AttachFast const void *  base,
TNCBI_Size  size,
int  serial
 

Definition at line 229 of file ncbi_heapmgr.c.

References _HEAP_ALIGN, _HEAP_ALIGNMENT, _HEAP_ALIGNSHIFT, calloc(), CORE_LOGF_X, eLOG_Warning, and HEAP_ALIGN.

void* HEAP_Base const HEAP  heap  ) 
 

Definition at line 943 of file ncbi_heapmgr.c.

References SHEAP_tag::base, and SHEAP_tag::size.

HEAP HEAP_Copy const HEAP  orig,
size_t  extra,
int  serial
 

Definition at line 874 of file ncbi_heapmgr.c.

References _HEAP_ALIGN, _HEAP_ALIGNSHIFT, SHEAP_tag::base, malloc(), size, and SHEAP_tag::size.

HEAP HEAP_Create void *  base,
TNCBI_Size  size,
TNCBI_Size  chunk_size,
FHEAP_Resize  resize,
void *  arg
 

Definition at line 185 of file ncbi_heapmgr.c.

References _HEAP_ALIGN, _HEAP_ALIGNMENT, _HEAP_ALIGNSHIFT, CORE_LOGF_X, eLOG_Error, eLOG_Warning, SHEAP_Block::flag, SHEAP_HeapBlock::head, HEAP_ALIGN, HEAP_FREE, HEAP_LAST, malloc(), SHEAP_HeapBlock::nextfree, SHEAP_HeapBlock::prevfree, and SHEAP_Block::size.

void HEAP_Destroy HEAP  heap  ) 
 

Definition at line 927 of file ncbi_heapmgr.c.

References SHEAP_tag::arg, SHEAP_tag::base, SHEAP_tag::chunk, CORE_LOGF_X, eLOG_Error, HEAP_Detach(), SHEAP_tag::refc, SHEAP_tag::resize, s_HEAP_Id(), SHEAP_tag::size, and verify.

void HEAP_Detach HEAP  heap  ) 
 

Definition at line 915 of file ncbi_heapmgr.c.

References SHEAP_tag::base, free(), SHEAP_tag::refc, and SHEAP_tag::size.

Referenced by HEAP_Destroy().

void HEAP_Free HEAP  heap,
SHEAP_Block ptr
 

Definition at line 610 of file ncbi_heapmgr.c.

References SHEAP_tag::base, SHEAP_tag::chunk, CORE_LOG_X, CORE_LOGF_X, eLOG_Error, eLOG_Warning, SHEAP_HeapBlock::head, HEAP_INDEX, HEAP_ISFREE, HEAP_ISUSED, HEAP_NEXT, s_HEAP_Free(), s_HEAP_Id(), and SHEAP_tag::size.

Referenced by HEAP_FreeFast().

void HEAP_FreeFast HEAP  heap,
SHEAP_Block ptr,
const SHEAP_Block prev
 

Definition at line 656 of file ncbi_heapmgr.c.

References SHEAP_tag::base, SHEAP_tag::chunk, CORE_LOG_X, CORE_LOGF_X, eLOG_Error, eLOG_Warning, HEAP_Free(), HEAP_INDEX, HEAP_ISFREE, HEAP_NEXT, s_HEAP_fast, s_HEAP_Free(), s_HEAP_Id(), and SHEAP_tag::size.

void HEAP_Options ESwitch  fast,
ESwitch  newalk
 

Definition at line 970 of file ncbi_heapmgr.c.

References eOff, eOn, s_HEAP_fast, and s_HEAP_newalk.

int HEAP_Serial const HEAP  heap  ) 
 

Definition at line 961 of file ncbi_heapmgr.c.

References SHEAP_tag::base, SHEAP_tag::serial, and SHEAP_tag::size.

TNCBI_Size HEAP_Size const HEAP  heap  ) 
 

Definition at line 952 of file ncbi_heapmgr.c.

References _HEAP_ALIGNSHIFT, SHEAP_tag::base, and SHEAP_tag::size.

HEAP HEAP_Trim HEAP  heap  ) 
 

Definition at line 806 of file ncbi_heapmgr.c.

References _HEAP_ALIGN, _HEAP_ALIGNMENT, _HEAP_ALIGNSHIFT, SHEAP_tag::arg, SHEAP_tag::base, SHEAP_tag::chunk, CORE_LOGF_X, eLOG_Error, eLOG_Warning, f(), SHEAP_tag::free, HEAP_INDEX, HEAP_ISFREE, HEAP_ISLAST, HEAP_ISUSED, HEAP_LAST, SHEAP_tag::last, SHEAP_tag::resize, s_HEAP_Collect(), s_HEAP_Id(), size, and SHEAP_tag::size.

SHEAP_Block* HEAP_Walk const HEAP  heap,
const SHEAP_Block prev
 

Definition at line 787 of file ncbi_heapmgr.c.

References SHEAP_tag::base, CORE_LOG_X, eLOG_Warning, SHEAP_HeapBlock::head, HEAP_NEXT, s_HEAP_fast, s_HEAP_Walk(), and SHEAP_tag::size.

const char* HINFO_AffinityArgument const HOST_INFO  host_info  ) 
 

Definition at line 167 of file ncbi_host_info.c.

References SHostInfoTag::arg, HINFO_MAGIC, and SHostInfoTag::pad.

const char* HINFO_AffinityArgvalue const HOST_INFO  host_info  ) 
 

Definition at line 175 of file ncbi_host_info.c.

References HINFO_MAGIC, SHostInfoTag::pad, and SHostInfoTag::val.

double HINFO_CpuClock const HOST_INFO  host_info  ) 
 

Definition at line 108 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_CpuClock(), and SHostInfoTag::pad.

int HINFO_CpuCount const HOST_INFO  host_info  ) 
 

Definition at line 92 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_CpuCount(), and SHostInfoTag::pad.

int HINFO_CpuUnits const HOST_INFO  host_info  ) 
 

Definition at line 100 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_CpuUnits(), and SHostInfoTag::pad.

const char* HINFO_Environment const HOST_INFO  host_info  ) 
 

Definition at line 159 of file ncbi_host_info.c.

References SHostInfoTag::env, HINFO_MAGIC, and SHostInfoTag::pad.

unsigned int HINFO_HostAddr const HOST_INFO  host_info  ) 
 

Definition at line 84 of file ncbi_host_info.c.

References SHostInfoTag::addr, HINFO_MAGIC, and SHostInfoTag::pad.

int HINFO_LoadAverage const HOST_INFO  host_info,
double  lavg[2]
 

Definition at line 141 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_LoadAverage(), and SHostInfoTag::pad.

int HINFO_MachineParams const HOST_INFO  host_info,
SHINFO_Params p
 

Definition at line 132 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_MachineParams(), and SHostInfoTag::pad.

int HINFO_Memusage const HOST_INFO  host_info,
double  memusage[5]
 

Definition at line 123 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_Memusage(), and SHostInfoTag::pad.

int HINFO_Status const HOST_INFO  host_info,
double  status[2]
 

Definition at line 150 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_Status(), and SHostInfoTag::pad.

int HINFO_TaskCount const HOST_INFO  host_info  ) 
 

Definition at line 115 of file ncbi_host_info.c.

References HINFO_MAGIC, LBSM_HINFO_TaskCount(), and SHostInfoTag::pad.

void SERV_Close SERV_ITER  iter  ) 
 

Definition at line 522 of file ncbi_service.c.

References SSERV_VTable::Close, free(), SSERV_IterTag::n_skip, SSERV_IterTag::op, SERV_Reset(), and SSERV_IterTag::skip.

Referenced by SNetServiceImpl::DiscoverServers(), s_CloseDispatcher(), s_GetInfo(), and s_Open().

SSERV_Info* SERV_CopyInfo const SSERV_Info info  ) 
 

Definition at line 388 of file ncbi_server_info.c.

References SERV_CopyInfoEx().

Referenced by CReaderServiceConnector::RememberIfBad().

SSERV_Info* SERV_CreateDnsInfo unsigned int  host  ) 
 

Definition at line 831 of file ncbi_server_info.c.

References SERV_CreateDnsInfoEx().

SSERV_Info* SERV_CreateFirewallInfo unsigned int  host,
unsigned short  port,
ESERV_Type  type
 

Definition at line 771 of file ncbi_server_info.c.

References SERV_CreateFirewallInfoEx().

SSERV_Info* SERV_CreateHttpInfo ESERV_Type  type,
unsigned int  host,
unsigned short  port,
const char *  path,
const char *  args
 

Definition at line 695 of file ncbi_server_info.c.

References SERV_CreateHttpInfoEx().

SSERV_Info* SERV_CreateNcbidInfo unsigned int  host,
unsigned short  port,
const char *  args
 

Definition at line 508 of file ncbi_server_info.c.

References SERV_CreateNcbidInfoEx().

SSERV_Info* SERV_CreateStandaloneInfo unsigned int  host,
unsigned short  port
 

Definition at line 572 of file ncbi_server_info.c.

References SERV_CreateStandaloneInfoEx().

int SERV_EqualInfo const SSERV_Info info1,
const SSERV_Info info2
 

Definition at line 411 of file ncbi_server_info.c.

References SSERV_Info_VTable::Equal, SSERV_Info::host, SSERV_Info::port, s_GetAttrByType(), SSERV_Info::type, SSERV_Info::u, and SSERV_Attr::vtable.

Referenced by s_AddServerInfo(), s_AddSkipInfo(), s_GetNextInfo(), and SServerScanInfo::SkipServer().

SSERV_Info* SERV_GetInfo const char *  service,
TSERV_Type  types,
unsigned int  preferred_host,
const SConnNetInfo net_info
 

Definition at line 418 of file ncbi_service.c.

References s_GetInfo().

SSERV_Info* SERV_GetInfoEx const char *  service,
TSERV_Type  types,
unsigned int  preferred_host,
const SConnNetInfo net_info,
const SSERV_InfoCPtr  skip[],
size_t  n_skip,
HOST_INFO host_info
 

Definition at line 431 of file ncbi_service.c.

References s_GetInfo(), and skip.

const SSERV_Info* SERV_GetNextInfo SERV_ITER  iter  ) 
 

Definition at line 475 of file ncbi_service.c.

References SSERV_IterTag::op, and s_GetNextInfo().

Referenced by s_GetNextInfo(), and s_ScanInfoGetNextInfo().

const SSERV_Info* SERV_GetNextInfoEx SERV_ITER  iter,
HOST_INFO host_info
 

Definition at line 468 of file ncbi_service.c.

References SSERV_IterTag::op, and s_GetNextInfo().

Referenced by SNetServiceImpl::DiscoverServers().

SERV_ITER SERV_Open const char *  service,
TSERV_Type  types,
unsigned int  preferred_host,
const SConnNetInfo net_info
 

Definition at line 282 of file ncbi_service.c.

References s_Open().

Referenced by SERV_OpenSimple().

SERV_ITER SERV_OpenEx const char *  service,
TSERV_Type  types,
unsigned int  preferred_host,
const SConnNetInfo net_info,
const SSERV_InfoCPtr  skip[],
size_t  n_skip
 

Definition at line 295 of file ncbi_service.c.

References s_Open(), and skip.

Referenced by s_OpenDispatcher().

SERV_ITER SERV_OpenSimple const char *  service  ) 
 

Definition at line 273 of file ncbi_service.c.

References ConnNetInfo_Create(), ConnNetInfo_Destroy(), fSERV_Any, and SERV_Open().

int SERV_Penalize SERV_ITER  iter,
double  fine
 

Definition at line 494 of file ncbi_service.c.

References SSERV_VTable::Feedback, SSERV_IterTag::last, and SSERV_IterTag::op.

SSERV_Info* SERV_ReadInfo const char *  info_str  ) 
 

Definition at line 362 of file ncbi_server_info.c.

References SERV_ReadInfoEx().

const char* SERV_ReadType const char *  str,
ESERV_Type type
 

Definition at line 102 of file ncbi_server_info.c.

References s_GetAttrByTag(), SSERV_Attr::tag_len, and SSERV_Attr::type.

Referenced by s_Firewall_Read(), and SERV_ReadInfoEx().

int SERV_Rerate SERV_ITER  iter,
double  rate
 

Definition at line 502 of file ncbi_service.c.

References SSERV_VTable::Feedback, SSERV_IterTag::last, and SSERV_IterTag::op.

void SERV_Reset SERV_ITER  iter  ) 
 

Definition at line 510 of file ncbi_service.c.

References SSERV_IterTag::last, SSERV_IterTag::op, SSERV_VTable::Reset, s_SkipSkip(), and SSERV_IterTag::time.

Referenced by SERV_Close().

unsigned short SERV_ServerPort const char *  name,
unsigned int  host
 

Definition at line 760 of file ncbi_service.c.

References eDefault, free(), fSERV_Promiscuous, fSERV_Standalone, SSERV_Info::host, SSERV_Info::port, s_GetInfo(), SERV_LOCALHOST, and SOCK_GetLocalHostAddress().

size_t SERV_SizeOfInfo const SSERV_Info info  ) 
 

Definition at line 403 of file ncbi_server_info.c.

References s_GetAttrByType(), SSERV_Info_VTable::SizeOf, SSERV_Info::type, SSERV_Info::u, and SSERV_Attr::vtable.

Referenced by SERV_CopyInfoEx(), and SERV_NameOfInfo().

const char* SERV_TypeStr ESERV_Type  type  ) 
 

Definition at line 93 of file ncbi_server_info.c.

References s_GetAttrByType(), and SSERV_Attr::tag.

Referenced by s_Firewall_Write(), and SERV_Print().

char* SERV_WriteInfo const SSERV_Info info  ) 
 

Definition at line 117 of file ncbi_server_info.c.

References SSERV_Info::coef, SSERV_Info::flag, fSERV_Dns, fSERV_Http, SSERV_Info::host, k_FlagTag, SSERV_Info::locl, MAX_CONTENT_TYPE_LEN, MAX_IP_ADDR_LEN, memmove, MIME_ComposeContentTypeEx(), SSERV_Info::mime_e, SSERV_Info::mime_s, SSERV_Info::mime_t, SSERV_Info::port, SSERV_Info::quorum, SSERV_Info::rate, s_GetAttrByType(), SSERV_Info::sful, SOCK_HostPortToString(), SSERV_Attr::tag, SSERV_Attr::tag_len, SSERV_Info::time, SSERV_Info::type, SSERV_Info::u, SSERV_Attr::vtable, and SSERV_Info_VTable::Write.


Generated on Wed Dec 9 08:13:45 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:20:18 2009 by modify_doxy.py rev. 173732