NCBI C++ ToolKit
|
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | SSERV_VTable |
struct | SSERV_IterTag |
Macros | |
#define | SERV_IfSuppressed(i) |
#define | SERV_IsActive(i) ( (i)->time && (i)->rate > 0.0) |
#define | SERV_IsStandby(i) ( (i)->time && (i)->rate < 0.0) |
#define | SERV_IsReserved(i) ( !(i)->time && (i)->rate) |
#define | SERV_IsDown(i) ( !(i)->rate) |
#define | SERV_IsUp(i) (SERV_IsActive(i) && !SERV_IfSuppressed(i)) |
#define SERV_IfSuppressed | ( | i | ) |
Definition at line 58 of file ncbi_servicep.h.
Definition at line 60 of file ncbi_servicep.h.
Definition at line 63 of file ncbi_servicep.h.
Definition at line 62 of file ncbi_servicep.h.
Definition at line 61 of file ncbi_servicep.h.
#define SERV_IsUp | ( | i | ) | (SERV_IsActive(i) && !SERV_IfSuppressed(i)) |
Definition at line 66 of file ncbi_servicep.h.
SConnNetInfo* ConnNetInfo_CloneInternal | ( | const SConnNetInfo * | info | ) |
Definition at line 2042 of file ncbi_connutil.c.
References SConnNetInfo::client_host, CONN_NET_INFO_MAGIC, SConnNetInfo::credentials, SConnNetInfo::debug_printout, SConnNetInfo::external, SConnNetInfo::firewall, SConnNetInfo::host, SConnNetInfo::http_proxy_host, SConnNetInfo::http_proxy_leak, SConnNetInfo::http_proxy_mask, SConnNetInfo::http_proxy_pass, SConnNetInfo::http_proxy_port, SConnNetInfo::http_proxy_skip, SConnNetInfo::http_proxy_user, SConnNetInfo::http_push_auth, SConnNetInfo::http_referer, SConnNetInfo::http_user_header, SConnNetInfo::http_version, info, SConnNetInfo::lb_disable, SConnNetInfo::magic, malloc(), SConnNetInfo::max_try, SConnNetInfo::pass, SConnNetInfo::path, SConnNetInfo::port, SConnNetInfo::req_method, SConnNetInfo::reserved, s_InfoIsValid(), SConnNetInfo::scheme, SConnNetInfo::stateless, SConnNetInfo::svc, SConnNetInfo::timeout, SConnNetInfo::tmo, SConnNetInfo::unused, and SConnNetInfo::user.
Referenced by ConnNetInfo_Clone(), s_CallAdjust(), and x_SetupHttpProxy().
SConnNetInfo* ConnNetInfo_CreateInternal | ( | const char * | service | ) |
Definition at line 760 of file ncbi_connutil.c.
References assert, CONN_NET_INFO_MAGIC, CONN_PATH_LEN, ConnNetInfo_Boolean(), CORE_LOGF_X, DEF_CONN_ARGS, DEF_CONN_DEBUG_PRINTOUT, DEF_CONN_EXTERNAL, DEF_CONN_FIREWALL, DEF_CONN_HOST, DEF_CONN_HTTP_PROXY_HOST, DEF_CONN_HTTP_PROXY_LEAK, DEF_CONN_HTTP_PROXY_PASS, DEF_CONN_HTTP_PROXY_PORT, DEF_CONN_HTTP_PROXY_SKIP, DEF_CONN_HTTP_PROXY_USER, DEF_CONN_HTTP_PUSH_AUTH, DEF_CONN_HTTP_USER_HEADER, DEF_CONN_HTTP_VERSION, DEF_CONN_LB_DISABLE, DEF_CONN_MAX_TRY, DEF_CONN_PASS, DEF_CONN_PATH, DEF_CONN_PORT, DEF_CONN_REQ_METHOD, DEF_CONN_STATELESS, DEF_CONN_USER, eDebugPrintout_Data, eDebugPrintout_None, eDebugPrintout_Some, eLOG_Error, eLOG_Warning, eReqMethod_Any, eReqMethod_Get, eReqMethod_Post, eURL_Unspec, fProxy_None, g_NcbiDefConnTimeout, info, int, kInfiniteTimeout, len, malloc(), NCBI_HasSpaces(), NCBI_simple_atof(), REG_CONN_ARGS, REG_CONN_DEBUG_PRINTOUT, REG_CONN_EXTERNAL, REG_CONN_FIREWALL, REG_CONN_HOST, REG_CONN_HTTP_PROXY_HOST, REG_CONN_HTTP_PROXY_LEAK, REG_CONN_HTTP_PROXY_PASS, REG_CONN_HTTP_PROXY_PORT, REG_CONN_HTTP_PROXY_SKIP, REG_CONN_HTTP_PROXY_USER, REG_CONN_HTTP_PUSH_AUTH, REG_CONN_HTTP_USER_HEADER, REG_CONN_HTTP_VERSION, REG_CONN_LB_DISABLE, REG_CONN_MAX_TRY, REG_CONN_PASS, REG_CONN_PATH, REG_CONN_PORT, REG_CONN_REQ_METHOD, REG_CONN_STATELESS, REG_CONN_TIMEOUT, REG_CONN_USER, REG_VALUE, str(), strcasecmp, strncasecmp, val, x_DestroyNetInfo(), x_GetReferer(), x_ParseFirewall(), x_SetArgs(), x_SetupSystemHttpProxy(), and x_StrcatCRLF().
Referenced by ConnNetInfo_Create(), NcbiOpenURL(), s_CreateConnector(), s_CreateHttpConnector(), s_HttpConnectorBuilder(), and SERVICE_CreateConnectorEx().
const char* ConnNetInfo_GetValueInternal | ( | const char * | service, |
const char * | param, | ||
char * | value, | ||
size_t | value_size, | ||
const char * | def_value | ||
) |
Definition at line 338 of file ncbi_connutil.c.
References assert, NCBI_HasSpaces(), s_GetValue(), util::strncmp(), and rapidjson::value.
Referenced by SGetHttpDefaultRetries::operator()(), s_LoadLocalIPs(), s_MbedTlsInit(), SERV_LBDNS_Open(), x_ErrorHeaderOnly(), CConnTest::x_GetFirewallConfiguration(), x_IsMapperConfigured(), x_NcbiSetupTls(), x_Sendmail_InitEnv(), and x_UnsafeRedirectOK().
const char* ConnNetInfo_GetValueService | ( | const char * | service, |
const char * | param, | ||
char * | value, | ||
size_t | value_size, | ||
const char * | def_value | ||
) |
Definition at line 355 of file ncbi_connutil.c.
References assert, NCBI_HasSpaces(), s_GetValue(), util::strncmp(), and rapidjson::value.
Referenced by x_Namespace(), and x_SetupConnectionParams().
void ConnNetInfo_ResetHttpProxyInternal | ( | void | ) |
Definition at line 983 of file ncbi_connutil.c.
References x_SetupSystemHttpProxy().
int SERV_AddFirewallPort | ( | unsigned short | port | ) |
Definition at line 3426 of file ncbi_connutil.c.
References n, s_FWPorts, and SizeOf.
Referenced by CConnTest::CheckFWConnections(), and x_ParseFirewall().
Definition at line 950 of file ncbi_service.c.
References SSERV_IterTag::last, SSERV_IterTag::name, and SERV_NameOfInfo().
Referenced by s_Feedback().
Definition at line 1333 of file ncbi_service.c.
ESERV_Type SERV_GetImplicitServerTypeDefault | ( | void | ) |
Definition at line 1313 of file ncbi_service.c.
References fSERV_Http.
ESERV_Type SERV_GetImplicitServerTypeInternal | ( | const char * | service | ) |
Definition at line 1305 of file ncbi_service.c.
Referenced by s_ParseResponse(), and s_Resolve().
SSERV_Info* SERV_GetInfoP | ( | const char * | service, |
TSERV_Type | types, | ||
unsigned int | preferred_host, | ||
unsigned short | preferred_port, | ||
double | preference, | ||
const SConnNetInfo * | net_info, | ||
SSERV_InfoCPtr | skip[], | ||
size_t | n_skip, | ||
int | external, | ||
const char * | arg, | ||
const char * | val, | ||
HOST_INFO * | hinfo | ||
) |
Definition at line 903 of file ncbi_service.c.
References assert, info, s_Open(), SERV_Close(), types, and val.
Referenced by DBLB_GetServer(), SERV_GetInfo(), SERV_GetInfoEx(), SERV_GetInfoSimple(), and SERV_ServerPort().
void SERV_InitFirewallPorts | ( | void | ) |
Definition at line 3420 of file ncbi_connutil.c.
References s_FWPorts.
Referenced by CConnTest::CheckFWConnections().
int SERV_IsFirewallPort | ( | unsigned short | port | ) |
Definition at line 3441 of file ncbi_connutil.c.
References n, s_FWPorts, and SizeOf.
Referenced by s_Open(), and CConnTest::x_GetFirewallConfiguration().
Definition at line 247 of file ncbi_service.c.
References ncbi::grid::netcache::search::fields::key, and s_IsMapperConfigured.
Referenced by x_SetupConnectionParams().
Definition at line 943 of file ncbi_service.c.
References assert, SSERV_VTable::mapper, and SSERV_IterTag::op.
Referenced by s_VT_Open(), CConnTest::ServiceOkay(), and x_SetDefaultReferer().
SERV_ITER SERV_OpenP | ( | const char * | service, |
TSERV_Type | types, | ||
unsigned int | preferred_host, | ||
unsigned short | preferred_port, | ||
double | preference, | ||
const SConnNetInfo * | net_info, | ||
SSERV_InfoCPtr | skip[], | ||
size_t | n_skip, | ||
int | external, | ||
const char * | arg, | ||
const char * | val | ||
) |
Definition at line 837 of file ncbi_service.c.
References s_Open(), types, and val.
Referenced by CServiceDiscovery::DiscoverImpl().
int SERV_PenalizeEx | ( | SERV_ITER | iter, |
double | fine, | ||
TNCBI_Time | time | ||
) |
Definition at line 957 of file ncbi_service.c.
References assert, SSERV_VTable::Feedback, SSERV_IterTag::last, and SSERV_IterTag::op.
Referenced by SERV_Penalize().
char* SERV_Print | ( | SERV_ITER | iter, |
const SConnNetInfo * | net_info, | ||
int | but_last | ||
) |
Definition at line 1055 of file ncbi_service.c.
References SSERV_IterTag::arg, SSERV_IterTag::arglen, assert, buf, BUF_Destroy(), BUF_Read(), BUF_Size(), BUF_Write(), buffer, eFWMode_Legacy, SSERV_IterTag::external, SConnNetInfo::firewall, free(), fSERV_All, fSERV_Any, fSERV_Firewall, SSERV_IterTag::host, i, SSERV_IterTag::last, malloc(), SSERV_IterTag::n_skip, NCBI_EXTERNAL, NCBI_simple_ftoa(), SSERV_IterTag::port, SSERV_IterTag::pref, s_SkipSkip(), SERV_CLIENT_REVISION_MAJOR, SERV_CLIENT_REVISION_MINOR, SERV_NameOfInfo(), SERV_PrintFirewallPorts(), SERV_TypeStr(), SERV_WriteInfo(), SSERV_IterTag::skip, SOCK_HostPortToString(), str(), t, SSERV_IterTag::time, SSERV_IterTag::types, types, SSERV_IterTag::val, and SSERV_IterTag::vallen.
Referenced by s_Adjust(), s_Open(), and s_Resolve().
void SERV_PrintFirewallPorts | ( | char * | buf, |
size_t | bufsize, | ||
EFWMode | mode | ||
) |
Definition at line 3456 of file ncbi_connutil.c.
References assert, buf, bufsize, eFWMode_Firewall, eFWMode_Legacy, len, mask, n, s_FWPorts, and SizeOf.
Referenced by CConnTest::CheckFWConnections(), CConnTest::GetFWConnections(), and SERV_Print().
char* SERV_ServiceName | ( | const char * | service | ) |
Definition at line 186 of file ncbi_service.c.
References dummy, and s_ServiceName().
Referenced by ConnNetInfo_Create(), ConnNetInfo_GetValue(), NcbiOpenURL(), s_LoadServices(), SERV_SetImplicitServerType(), SERVICE_CreateConnectorEx(), CConnTest::ServiceOkay(), and CConnTest::StatefulOkay().
Definition at line 1014 of file ncbi_service.c.
References free(), info, isdigit(), len, malloc(), SSERV_IterTag::op, s_AddSkipInfo(), SERV_ReadInfoEx(), strncasecmp, text(), SSERV_IterTag::time, and SSERV_VTable::Update.
Referenced by s_ParseHeader().