__STDC_FORMAT_MACROS
◆ CONN_CONTENT_TYPE_LEN ◆ ConnNetInfo_PostOverrideUserHeader ◆ CORE_CURRENT_FUNCTION #define CORE_CURRENT_FUNCTION 0 ◆ CORE_LOGFILE_CUTOFF_LEVEL ◆ DEF_CONN_ARGS ◆ DEF_CONN_DEBUG_PRINTOUT ◆ DEF_CONN_EXTERNAL ◆ DEF_CONN_FIREWALL ◆ DEF_CONN_HOST #define DEF_CONN_HOST "www.ncbi.nlm.nih.gov"Definition at line 247 of file ncbi_connutil.h.
◆ 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_REFERER ◆ DEF_CONN_HTTP_USER_HEADER ◆ DEF_CONN_HTTP_VERSION ◆ DEF_CONN_LB_DISABLE ◆ DEF_CONN_LOCAL_IPS ◆ DEF_CONN_LOCAL_IPS_DISABLE ◆ DEF_CONN_MAX_TRY ◆ DEF_CONN_PASS ◆ DEF_CONN_PATH #define DEF_CONN_PATH "/Service/dispd.cgi"Definition at line 253 of file ncbi_connutil.h.
◆ DEF_CONN_PORT ◆ DEF_CONN_REG_SECTION ◆ DEF_CONN_REQ_METHOD ◆ DEF_CONN_STATELESS ◆ DEF_CONN_TIMEOUT ◆ DEF_CONN_USER ◆ EIO_N_STATUSconnection is / has been closed, EOF condition
Definition at line 141 of file ncbi_core.h.
◆ fLOG_Full ◆ fLOG_Short ◆ kDefaultTimeout ◆ kInfiniteTimeout ◆ LOG_DATA Value:__FILE__, __LINE__, message,
data,
size)
#define THIS_MODULE
Default for THIS_MODULE.
#define CORE_CURRENT_FUNCTION
Get current function name.
void LOG_Write(LOG lg, int code, int subcode, ELOG_Level level, const char *module, const char *func, const char *file, int line, const char *message, const void *raw_data, size_t raw_size)
Upon having filled SLOG_Message data from parameters, write a message (perhaps with raw data attached...
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins lg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Definition at line 150 of file ncbi_util.h.
◆ LOG_WRITE #define LOG_WRITE ( lg, code, subcode, level, message ) Value:__FILE__, __LINE__, message, 0, 0)
Auxiliary plain macros to write message (maybe, with raw data) to the log.
Definition at line 141 of file ncbi_util.h.
◆ MAX_CONTENT_TYPE_LEN ◆ MT_LOCK_DoCall "lk->handler(lk->data, how)".
Definition at line 270 of file ncbi_core.h.
◆ NCBI_BIGCOUNT_FORMAT_SPEC ◆ NCBI_BIGCOUNT_FORMAT_SPEC_HEX ◆ NCBI_BIGCOUNT_FORMAT_SPEC_HEX_X ◆ NCBI_CONNUTIL_DEPRECATED ◆ NCBI_EOWNERSHIP_DEFINED #define NCBI_EOWNERSHIP_DEFINED ◆ NCBI_ESWITCH_DEFINED #define NCBI_ESWITCH_DEFINEDDefinition at line 96 of file ncbi_types.h.
◆ NCBI_TIME_INFINITE ◆ REG_CONN_ARGS ◆ REG_CONN_DEBUG_PRINTOUT #define REG_CONN_DEBUG_PRINTOUT "DEBUG_PRINTOUT"Definition at line 300 of file ncbi_connutil.h.
◆ REG_CONN_DISPD_DISABLE #define REG_CONN_DISPD_DISABLE "DISPD_DISABLE"Definition at line 316 of file ncbi_connutil.h.
◆ REG_CONN_EXTERNAL ◆ REG_CONN_FIREWALL ◆ REG_CONN_HOST ◆ REG_CONN_HTTP_PROXY_HOST #define REG_CONN_HTTP_PROXY_HOST "HTTP_PROXY_HOST"Definition at line 258 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_PROXY_LEAK #define REG_CONN_HTTP_PROXY_LEAK "HTTP_PROXY_LEAK"Definition at line 270 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_PROXY_PASS #define REG_CONN_HTTP_PROXY_PASS "HTTP_PROXY_PASS"Definition at line 267 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_PROXY_PORT #define REG_CONN_HTTP_PROXY_PORT "HTTP_PROXY_PORT"Definition at line 261 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_PROXY_SKIP #define REG_CONN_HTTP_PROXY_SKIP "HTTP_PROXY_SKIP"Definition at line 273 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_PROXY_USER #define REG_CONN_HTTP_PROXY_USER "HTTP_PROXY_USER"Definition at line 264 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_PUSH_AUTH #define REG_CONN_HTTP_PUSH_AUTH "HTTP_PUSH_AUTH"Definition at line 276 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_REFERER #define REG_CONN_HTTP_REFERER "HTTP_REFERER"Definition at line 306 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_USER_HEADER #define REG_CONN_HTTP_USER_HEADER "HTTP_USER_HEADER"Definition at line 303 of file ncbi_connutil.h.
◆ REG_CONN_HTTP_VERSION #define REG_CONN_HTTP_VERSION "HTTP_VERSION"Definition at line 297 of file ncbi_connutil.h.
◆ REG_CONN_IMPLICIT_SERVER_TYPE #define REG_CONN_IMPLICIT_SERVER_TYPE "IMPLICIT_SERVER_TYPE"Definition at line 328 of file ncbi_connutil.h.
◆ REG_CONN_LB_DISABLE ◆ REG_CONN_LBDNS_ENABLE #define REG_CONN_LBDNS_ENABLE "LBDNS_ENABLE"Definition at line 313 of file ncbi_connutil.h.
◆ REG_CONN_LBNULL_ENABLE #define REG_CONN_LBNULL_ENABLE "LBNULL_ENABLE"Definition at line 311 of file ncbi_connutil.h.
◆ REG_CONN_LBSMD_DISABLE #define REG_CONN_LBSMD_DISABLE "LBSMD_DISABLE"Definition at line 312 of file ncbi_connutil.h.
◆ REG_CONN_LINKERD_ENABLE #define REG_CONN_LINKERD_ENABLE "LINKERD_ENABLE"Definition at line 314 of file ncbi_connutil.h.
◆ REG_CONN_LOCAL_ENABLE #define REG_CONN_LOCAL_ENABLE "LOCAL_ENABLE"Definition at line 310 of file ncbi_connutil.h.
◆ REG_CONN_LOCAL_IPS ◆ REG_CONN_LOCAL_SERVER ◆ REG_CONN_LOCAL_SERVICES ◆ REG_CONN_MAX_TRY ◆ REG_CONN_NAMERD_ENABLE #define REG_CONN_NAMERD_ENABLE "NAMERD_ENABLE"Definition at line 315 of file ncbi_connutil.h.
◆ REG_CONN_PASS ◆ REG_CONN_PATH ◆ REG_CONN_PORT ◆ REG_CONN_REQ_METHOD ◆ REG_CONN_SERVICE_NAME ◆ REG_CONN_STATELESS ◆ REG_CONN_TIMEOUT ◆ REG_CONN_USER ◆ THIS_MODULE ◆ UTIL_PRINTABLE_WIDTH #define UTIL_PRINTABLE_WIDTH 130 /** Default printable width for data */Definition at line 723 of file ncbi_util.h.
◆ UTIL_PRINTABLE_WIDTH_MIN #define UTIL_PRINTABLE_WIDTH_MIN 80 /** Default minimum printable width */Definition at line 722 of file ncbi_util.h.
◆ UTIL_PrintableString ◆ UTIL_ReleaseBuffer #define UTIL_ReleaseBuffer ( x ) /*void*/Definition at line 818 of file ncbi_util.h.
◆ UTIL_TcharToUtf8 #define UTIL_TcharToUtf8 ( x ) (x)Definition at line 816 of file ncbi_util.h.
◆ UTIL_TcharToUtf8OnHeap #define UTIL_TcharToUtf8OnHeap ( x ) (x) ◆ UTIL_Utf8ToTchar #define UTIL_Utf8ToTchar ( x ) (x)Definition at line 817 of file ncbi_util.h.
◆ EBDebugPrintout ◆ EBFWMode ◆ EBProxyType ◆ EBURLScheme ◆ EOwnershipOwnership relations between objects.
Can be used to define or transfer ownership of objects. For example, specify if a CSocket object owns its underlying SOCK object.
◆ ESwitch ◆ FLOG_Cleanup typedef void(* FLOG_Cleanup) (void *data) ◆ FLOG_Handler ◆ FMT_LOCK_Cleanup typedef void(* FMT_LOCK_Cleanup) (void *data) ◆ FMT_LOCK_HandlerMT locking callback (operates like a [recursive] mutex or RW-lock).
Definition at line 204 of file ncbi_core.h.
◆ FREG_Cleanup typedef void(* FREG_Cleanup) (void *data)Registry cleanup callback.
Definition at line 603 of file ncbi_core.h.
◆ FREG_GetRegistry getter callback.
Copy registry value stored in "section" under "name" to the "value" buffer. Look for a matching entry first in the transient storage, and then in the persistent storage.
Definition at line 561 of file ncbi_core.h.
◆ FREG_SetRegistry setter callback.
Store the "value" in the registry "section" under the "name" key, and according to "storage".
Definition at line 588 of file ncbi_core.h.
◆ LOG ◆ MT_LOCK ◆ NCBI_BLOWFISHOpaque encryption / decryption context type.
Definition at line 56 of file ncbi_blowfish.h.
◆ REG ◆ STimeout ◆ TConnectInitFlags ◆ TLOG_FormatFlagsbitwise OR of "ELOG_FormatFlag"
Definition at line 300 of file ncbi_util.h.
◆ TMark ◆ TNCBI_BigCountBig unsigned integer for file size and position.
Definition at line 163 of file ncbi_types.h.
◆ TNCBI_SizeFixed-size analogs of size_t and time_t (mainly for IPC)
NCBI_EOWNERSHIP_DEFINED
Definition at line 143 of file ncbi_types.h.
◆ TNCBI_Time ◆ TReqMethod ◆ TUTIL_PrintableFlagsBitwise "OR" of EUTIL_PrintableFlags.
Definition at line 732 of file ncbi_util.h.
◆ EConnectInitFlagCONNECT_Init flags: which parameters to own / initialize.
Original ownership gets retained.
eConnectInit_OwnRegistryRegistry ownership gets passed.
eConnectInit_OwnLockLock ownership gets passed.
eConnectInit_NoSSLDo NOT init secure socket layer (SSL)
Definition at line 115 of file ncbi_core_cxx.hpp.
◆ ECORE_UsernameSelect which username is the most preferable to obtain from the system.
Enumerator eCORE_UsernameCurrentprocess UID
eCORE_UsernameLoginlogin UID
eCORE_UsernameRealreal UID
Definition at line 463 of file ncbi_util.h.
◆ EDebugPrintout Enumerator eDebugPrintout_None eDebugPrintout_Some eDebugPrintout_DataDefinition at line 162 of file ncbi_connutil.h.
◆ EFWMode Enumerator eFWMode_LegacyRelay, no firewall.
eFWMode_AdaptiveRegular firewall ports first, then fallback.
eFWMode_FirewallRegular firewall ports only, no fallback.
eFWMode_FallbackFallback ports only (w/o trying any regular)
Definition at line 152 of file ncbi_connutil.h.
◆ EIO_EventI/O event (or direction).
also serves as no-event indicator in SOCK_Poll
eIO_Readread
eIO_Writewrite
eIO_ReadWriteeIO_Read | eIO_Write (also, eCONN_OnFlush)
eIO_Closealso serves as an error indicator in SOCK_Poll
Definition at line 118 of file ncbi_core.h.
◆ EIO_ReadMethodI/O read method.
do eIO_ReadPlain but leave data in input queue
eIO_ReadPlain but don't discard data read from CONN, the peek'ed data get extracted from CONNECTOR but stored internally in the CONN buffer, a non-peek read takes data (if any) from that buffer first; *
eIO_ReadPlainread readily available data only, wait if none
Read up to "size" bytes from connection to the buffer pointed to by "buf".
Return the number of actually read bytes in "*n_read". May not return eIO_Success if no data at all can be read before either the read timeout expires or an error occurs. Parameter "how" modifies the read behavior: * return immediately after having read as many as just 1 byte from connection (return eIO_Success), or if an error has occurred (and "*n_read == 0"); *
eIO_ReadPersistread exactly as much as requested, w/waits
return only after having filled full "buf" with data (exactly "size" bytes, eIO_Success), or if an error has occurred (fewer bytes, non-eIO_Success).
Definition at line 88 of file ncbi_core.h.
◆ EIO_StatusI/O status.
everything is fine, no error occurred
eIO_Timeouttimeout expired before any I/O succeeded
eIO_Reservedreserved status code – DO NOT USE!
eIO_Interruptsignal arrival prevented any I/O to succeed
eIO_InvalidArgbad argument / parameter value(s) supplied
eIO_NotSupportedoperation is not supported or is not available
eIO_Unknownunknown I/O error (likely fatal but can retry)
Definition at line 132 of file ncbi_core.h.
◆ EIO_WriteMethodI/O write method.
invalid reserved opcode, not for use!
eIO_WritePlainwrite as much as possible, report back how much
Write up to "size" bytes from the buffer "buf" to the connection.
Return the number of actually written bytes in "*n_written". May not return eIO_Success if no data at all can be written before either the write timeout expires or an error occurs. Parameter "how" modifies the write behavior: * return immediately after having written as little as 1 byte of data (return eIO_Success), or if an error has occurred (and "*n_written == 0"); *
eIO_WritePersistwrite exactly as much as specified, w/waits
return only after having written all of the data from "buf" (return eIO_Success), or if an error has occurred (fewer bytes written, non-eIO_Success).
write out-of-band chunk of urgent data (if supp)
Definition at line 99 of file ncbi_core.h.
◆ ELOG_FormatFlagLOG formatting flags: what parts of the message to actually appear.
fLOG_Short if NDEBUG, else fLOG_Full
fLOG_Level fLOG_Module fLOG_FileLine fLOG_DateTime fLOG_Function fLOG_FullOctaldo not do reduction in octal data bytes
fLOG_OmitNoteLeveldo not add "NOTE" if level is eLOG_Note
fLOG_Nonenothing but spec'd parts, msg and data
Definition at line 289 of file ncbi_util.h.
◆ ELOG_LevelLog severity level.
Enumerator eLOG_Trace eLOG_Note eLOG_InfoIn C++ Toolkit "Info" is used, not "Note".
eLOG_Warning eLOG_Error eLOG_Critical eLOG_FatalDefinition at line 292 of file ncbi_core.h.
◆ EMIME_Encoding Enumerator eENCOD_None eENCOD_Url eENCOD_UnknownDefinition at line 1060 of file ncbi_connutil.h.
◆ EMIME_SubType Enumerator eMIME_Undefined eMIME_Dispatch eMIME_AsnText eMIME_AsnBinary eMIME_Fasta eMIME_WwwForm eMIME_Html eMIME_Plain eMIME_Xml eMIME_XmlSoap eMIME_OctetStream eMIME_UnknownDefinition at line 1040 of file ncbi_connutil.h.
◆ EMIME_Type Enumerator eMIME_T_Undefined eMIME_T_NcbiData eMIME_T_Text eMIME_T_Application eMIME_T_UnknownDefinition at line 1028 of file ncbi_connutil.h.
◆ EMT_LockSet the lock/unlock callback function and its data for MT critical section.
lock critical section
eMT_LockReadlock critical section for reading
eMT_Unlockunlock critical section
eMT_TryLocktry to lock, return immediately
eMT_TryLockReadtry to lock for reading, return immediately
Definition at line 180 of file ncbi_core.h.
◆ ENcbiOwnershipOwnership relations between objects.
Can be used to define or transfer ownership of objects. For example, specify if a CSocket object owns its underlying SOCK object.
Enumerator eNoOwnershipNo ownership is assumed.
eTakeOwnershipAn object can take ownership of another.
eNoOwnership eTakeOwnershipNo ownership assumed.
An object can take ownership of another
Definition at line 133 of file ncbi_types.h.
◆ ENcbiRequestIDNCBI request ID enumerator.
Enumerator eNcbiRequestID_None eNcbiRequestID_HitIDNCBI Hit ID.
eNcbiRequestID_SIDNCBI Session ID.
eNcbiTraceStateOpenTelemetry tracestate header.
eNcbiTraceParentOpenTelemetry traceparent header.
Definition at line 444 of file ncbi_util.h.
◆ ENcbiSwitchAux.
enum to set/unset/default various features.
Enumerator eOff eOn eDefault eOff eOn eDefaultDefinition at line 108 of file ncbi_types.h.
◆ EProxyType Enumerator fProxy_NoneNo $http_proxy / $https_proxy used.
fProxy_Http$http_proxy used
fProxy_Https$https_proxy used
Definition at line 171 of file ncbi_connutil.h.
◆ EREG_StorageTransient/Persistent storage.
only in-memory storage while program runs
eREG_Persistenthard-copy storage across program runs
Definition at line 528 of file ncbi_core.h.
◆ EReqMethod Enumerator eReqMethod_Any eReqMethod_Get eReqMethod_Post eReqMethod_Head eReqMethod_Connect eReqMethod_v1 eReqMethod_Any11 eReqMethod_Get11 eReqMethod_Post11 eReqMethod_Head11 eReqMethod_Connect11 eReqMethod_Put eReqMethod_Patch eReqMethod_Trace eReqMethod_Delete eReqMethod_OptionsDefinition at line 117 of file ncbi_connutil.h.
◆ EURLScheme Enumerator eURL_Unspec eURL_Https eURL_File eURL_Http eURL_FtpDefinition at line 141 of file ncbi_connutil.h.
◆ EUTIL_PrintableFlags Enumerator fUTIL_PrintableFullOctalNo contactions in octals \ooo.
eUTIL_PrintableFullOctaldeprecated
fUTIL_PrintableNoNewLineDo not include graphical newlines.
eUTIL_PrintableNoNewLinedeprecated
Definition at line 726 of file ncbi_util.h.
◆ BUF_StripToPattern() EIO_Status BUF_StripToPattern ( BUF buffer, const void * pattern, size_t pattern_size, BUF * discard, size_t * n_discarded ) ◆ CConnIniter() CConnIniter::CConnIniter ( void ) protected ◆ CONN_StripToPattern() EIO_Status CONN_StripToPattern ( CONN conn, const void * pattern, size_t pattern_size, BUF * discard, size_t * n_discarded )Discard all input data before (and including) the first occurrence of a "pattern".
If "discard" is not NULL then add the stripped data (including the "pattern") to it. If "n_discarded" is not NULL then "*n_discarded" will get the number of actually stripped bytes. If there was some excess read, push it back to the original source (and not count as discarded). NOTE: If "pattern_size" == 0, then "pattern" is ignored (and is assumed to be NULL), and the stripping continues until EOF; if "pattern" is NULL and "pattern_size" is not 0, then exactly "pattern_size" bytes will have attempted to be stripped (unless an I/O error occurs prematurely).
Definition at line 3019 of file ncbi_connutil.c.
References conn, s_CONN_IO(), and s_StripToPattern().
◆ CONNECT_Init()Init [X]CONNECT library with the specified "reg" and "lock" (ownership for either or both can be detailed in the "flag" parameter).
Definition at line 783 of file ncbi_core_cxx.cpp.
References _TRACE, eConnectInit_Explicit, eConnectInit_NoSSL, g_CORE_Set, NCBI_CATCH_ALL_X, NcbiSetupTls(), NStr::PtrToString(), s_Init(), and NStr::UIntToString().
Referenced by CBsDiffApp::CBsDiffApp(), CDemoApp::Init(), NCBITEST_AUTO_INIT(), CSrcChkApp::Run(), CAnnotWriterApp::Run(), CAsn2FastaApp::Run(), CAsn2FlatApp::Run(), CCleanupApp::Run(), CNCBIwxApplication::Run(), CAgpValidateApplication::Run(), CId2FetchApp::Run(), CAlnBuildApp::Run(), CPairwiseAlnApp::Run(), CSampleAlnmgrApplication::Run(), CEditBioseqSampleApp::Run(), CSampleObjmgrApplication::Run(), and CTbl2AsnApp::Setup().
◆ ConnNetInfo_AddPath() ◆ ConnNetInfo_AppendArg() ◆ ConnNetInfo_AppendUserHeader() ◆ ConnNetInfo_Boolean() int ConnNetInfo_Boolean ( const char * str )Definition at line 405 of file ncbi_connutil.c.
References CORE_LOGF_X, eLOG_Warning, str(), strcasecmp, strnlen, and toupper().
Referenced by ConnNetInfo_CreateInternal(), SERV_LBDNS_Open(), SERV_LBNULL_Open(), x_ErrorHeaderOnly(), x_IsMapperConfigured(), x_NcbiSetupTls(), x_ParseFirewall(), and x_UnsafeRedirectOK().
◆ ConnNetInfo_Clone()Definition at line 2111 of file ncbi_connutil.c.
References assert, ConnNetInfo_CloneInternal(), ConnNetInfo_Destroy(), SConnNetInfo::http_referer, SConnNetInfo::http_user_header, info, s_InfoIsValid(), and strdup.
Referenced by s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_FtpConnectorBuilder(), s_HttpConnectorBuilder(), s_ServiceConnectorBuilder(), s_SocketConnectorBuilder(), s_VT_Open(), SERV_DISPD_Open(), SERV_LINKERD_Open(), SERV_NAMERD_Open(), and SERVICE_CreateConnectorEx().
◆ ConnNetInfo_Create()Definition at line 986 of file ncbi_connutil.c.
References assert, ConnNetInfo_CreateInternal(), free(), and SERV_ServiceName().
Referenced by CRPCClient< TRequest, TReply >::AsyncConnect(), CReaderServiceConnector::Connect(), DBLB_GetServer(), CServiceDiscovery::DiscoverImpl(), CEUtils_Request::GetBaseURL(), CFtpUtils::GetDirContent(), CDBLB_ServiceMapper::GetServerOptions(), CDBLB_ServiceMapper::GetServersList(), CTaxon1::Init(), s_LoadLocalIPs(), LbsmLookup::s_Resolve(), s_ServiceConnectorBuilder(), SERV_GetInfoSimple(), SERV_GetServers(), SERV_OpenSimple(), SFileTrackAPI::StartUpload(), CRPCClient< TRequest, TReply >::x_Connect(), CRPCClient< TRequest, TReply >::x_ConnectURL(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), CEutilsClient::x_GetHostName(), CBlastHitMatrixCGIApplication::x_GetSeqAnnot(), CHttpRequest::x_InitConnection(), x_IsUrlAccessible(), CDBLBClientApp::x_RunWhatIs(), and CDBLBClientApp::x_RunWhereIs().
◆ ConnNetInfo_DeleteAllArgs() ◆ ConnNetInfo_DeleteArg() ◆ ConnNetInfo_DeleteUserHeader() ◆ ConnNetInfo_Destroy()Definition at line 2478 of file ncbi_connutil.c.
References info, and x_DestroyNetInfo().
Referenced by ConnNetInfo_Clone(), DBLB_GetServer(), SCNIDeleter::Delete(), Deleter< SConnNetInfo >::Delete(), ConnInfoDeleter2::Delete(), ConnNetInfoDeleter::Delete(), CServiceDiscovery::DiscoverImpl(), CEUtils_Request::GetBaseURL(), CFtpUtils::GetDirContent(), CDBLB_ServiceMapper::GetServerOptions(), CDBLB_ServiceMapper::GetServersList(), CTaxon1::Init(), s_CallAdjust(), s_Close(), s_Connect(), s_CreateHttpConnector(), s_Destroy(), s_DestroyHttpConnector(), s_FtpConnectorBuilder(), s_LoadLocalIPs(), s_VT_Open(), SERV_GetInfoSimple(), SERV_OpenSimple(), SERVICE_CreateConnectorEx(), SFileTrackAPI::StartUpload(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), CEutilsClient::x_GetHostName(), CHttpRequest::x_InitConnection(), x_IsUrlAccessible(), and x_SetupHttpProxy().
◆ ConnNetInfo_ExtendUserHeader() ◆ ConnNetInfo_GetArgs() ◆ ConnNetInfo_GetValue() const char* ConnNetInfo_GetValue ( const char * service, const char * param, char * value, size_t value_size, const char * def_value ) ◆ ConnNetInfo_Log()Definition at line 2301 of file ncbi_connutil.c.
References assert, buf, eDebugPrintout_Data, eDebugPrintout_None, eDebugPrintout_Some, eLOG_Error, eLOG_Fatal, eReqMethod_v1, free(), info, len, lg(), LOG_WRITE, LOG_Write(), malloc(), NCBI_C_ERRCODE_X, s_InfoIsValid(), s_SaveBool(), s_SaveKeyval(), s_SaveString(), s_SaveULong(), s_SaveUserHeader(), strcat, UTIL_PrintableStringSize(), x_BadMagic(), x_CredInfo(), x_Firewall(), x_Num(), x_Port(), x_ProxyStr(), x_ReqMethod(), and x_Scheme().
Referenced by NcbiOpenURL(), s_Connect(), s_SocketConnectorBuilder(), and s_VT_Open().
◆ ConnNetInfo_OverrideUserHeader()Definition at line 1272 of file ncbi_connutil.c.
References eUserHeaderOp_Override, info, and s_ModifyUserHeader().
Referenced by CConnTest::GetFWConnections(), s_Adjust(), s_Connect(), s_CreateHttpConnector(), s_HttpConnectorBuilder(), s_Open(), s_ReadHeader(), s_Resolve(), s_ServiceConnectorBuilder(), CHttpRequest::sx_Adjust(), x_Authenticate(), CRPCClient< TRequest, TReply >::x_FillConnNetInfo(), x_FixupUserHeader(), CHttpRequest::x_InitConnection(), x_SetHostPort(), and x_SetupConnectionParams().
◆ ConnNetInfo_ParseURL()Definition at line 1347 of file ncbi_connutil.c.
References assert, eReqMethod_Connect, eReqMethod_v1, eURL_File, eURL_Http, eURL_Https, eURL_Unspec, if(), info, len, memmove, memrchr, NCBI_HasSpaces(), s_InfoIsValid(), strncasecmp, x_ParseHostPort(), and x_ParseScheme().
Referenced by CFtpUtils::GetDirContent(), NcbiOpenURL(), s_HttpConnectorBuilder(), CConn_HttpStream::sx_Adjust(), CHttpRequest::sx_Adjust(), CRPCClient< TRequest, TReply >::x_ConnectURL(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), x_Redirect(), and x_SetupHttpProxy().
◆ ConnNetInfo_PostOverrideArg() ◆ ConnNetInfo_PreOverrideArg() ◆ ConnNetInfo_PreOverrideUserHeader() ◆ ConnNetInfo_PrependArg() ◆ ConnNetInfo_PrependUserHeader() ◆ ConnNetInfo_SetArgs() ◆ ConnNetInfo_SetFrag() ◆ ConnNetInfo_SetPath() ◆ ConnNetInfo_SetTimeout() ◆ ConnNetInfo_SetupStandardArgs()Definition at line 2010 of file ncbi_connutil.c.
References ConnNetInfo_DeleteArg(), ConnNetInfo_ExtendUserHeader(), ConnNetInfo_PreOverrideArg(), CORE_GetAppName(), CORE_GetPlatform(), free(), info, s_InfoIsValid(), SOCK_gethostbyaddr(), SOCK_gethostname(), and x_ClientAddress().
Referenced by CConnTest::DispatcherOkay(), CConnTest::GetFWConnections(), s_AdjustNetParams(), s_LoadLocalIPs(), SERV_DISPD_Open(), and SERV_NAMERD_Open().
◆ ConnNetInfo_SetUserHeader() ◆ ConnNetInfo_URL()Definition at line 2417 of file ncbi_connutil.c.
References assert, eReqMethod_Connect, eReqMethod_v1, info, len, malloc(), s_InfoIsValid(), strlwr, and x_Scheme().
Referenced by s_Adjust(), s_Connect(), s_ConnectAndSend(), s_Read(), s_ReadData(), s_ReadHeader(), s_Resolve(), s_VT_Descr(), s_VT_Open(), s_VT_Write(), CHttpRequest::sx_Adjust(), x_ReadChunkHead(), x_ReadChunkTail(), and x_SetDefaultReferer().
◆ CORE_GetAppName() const char* CORE_GetAppName ( void )Obtain current application name (toolkit dependent).
NOTE that setting an application name concurrently with this call can cause undefined behavior or a stale pointer returned.
Definition at line 716 of file ncbi_util.c.
References g_CORE_GetAppName.
Referenced by ConnNetInfo_SetupStandardArgs(), and x_FixupUserHeader().
◆ CORE_GetLOCK()Get the lock handle that is to be used by the core internals.
Definition at line 115 of file ncbi_util.c.
References g_CORE_MT_Lock.
Referenced by x_InitLocking().
◆ CORE_GetLOG() ◆ CORE_GetNcbiRequestID()Obtain current NCBI request ID (if known, per thread).
Definition at line 743 of file ncbi_util.c.
References assert, CORE_LOCK_READ, CORE_UNLOCK, eNcbiRequestID_HitID, eNcbiRequestID_SID, eNcbiTraceParent, eNcbiTraceState, g_CORE_GetRequestID, out(), strdup, and x_getenv.
Referenced by x_SetRequestIDs().
◆ CORE_GetPlatform() const char* CORE_GetPlatform ( void ) ◆ CORE_GetREG() ◆ CORE_GetUsername() const char* CORE_GetUsername ( char * buf, size_t bufsize ) ◆ CORE_GetUsernameEx()Obtain and store in the buffer provided, the best (as possible) user name that matches the requested username selector.
Both "buf" and "bufsize" must not be zeros.
Definition at line 807 of file ncbi_util.c.
References assert, buf, bufsize, CORE_LOCK_READ, CORE_LOCK_WRITE, CORE_UNLOCK, eCORE_UsernameCurrent, eCORE_UsernameLogin, eCORE_UsernameReal, login, ncbi::grid::netcache::search::fields::size, st(), STDIN_FILENO, UTIL_ReleaseBuffer, UTIL_TcharToUtf8, x_getenv, and x_SaveStr().
Referenced by CORE_GetUsername(), and s_MakeFrom().
◆ CORE_GetVMPageSize() size_t CORE_GetVMPageSize ( void ) ◆ CORE_Msdelay() void CORE_Msdelay ( unsigned long ms ) ◆ CORE_SetLOCK()Set the MT critical section lock/unlock handler – to be used by the core internals for protection of internal static variables and other MT-sensitive code from being accessed/changed by several threads simultaneously.
It is also to fully protect the core log handler and core regirsty, including their setup, as well as callback and cleanup functions.
Definition at line 104 of file ncbi_util.c.
References CORE_TRACEF, eCORE_SetLOCK, g_CORE_MT_Lock, g_CORE_Set, and MT_LOCK_Delete().
Referenced by CMergeyApp::Run(), s_Fini(), and s_Init().
◆ CORE_SetLOG() void CORE_SetLOG ( LOG lg )Set the log handle (no logging if "lg" is passed zero) – to be used by the core internals (CORE LOG).
NCBI_CXX_TOOLKIT &&_DEBUG && !NDEBUG If there is an active log handler set already, and it is different from the new one, then LOG_Delete is called internally for the old logger (that is, the one being replaced).
Definition at line 127 of file ncbi_util.c.
References CORE_DEBUG_ARG, CORE_LOCK_WRITE, CORE_TRACEF, CORE_UNLOCK, eCORE_SetLOG, g_CORE_Log, g_CORE_Set, lg(), and LOG_Delete().
Referenced by CORE_SetLOGFILE_Ex(), s_Fini(), s_Init(), CBiosampleChkApp::Setup(), CTAbleValApp::Setup(), and CTLSApp::Setup().
◆ CORE_SetLOGFILE() void CORE_SetLOGFILE ( FILE * fp, int auto_close ) ◆ CORE_SetLOGFILE_Ex() ◆ CORE_SetLOGFILE_NAME() int CORE_SetLOGFILE_NAME ( const char * logfile ) ◆ CORE_SetLOGFILE_NAME_Ex()Same as CORE_SetLOGFILE_Ex(fopen(logfile, "a"), cut_off, fatal_err, TRUE).
Definition at line 168 of file ncbi_util.c.
References CORE_LOGF_ERRNO_X, CORE_SetLOGFILE_Ex(), eLOG_Error, and fp.
Referenced by CORE_SetLOGFILE_NAME().
◆ CORE_SetLOGFormatFlags() ◆ CORE_SetREG() void CORE_SetREG ( REG rg )Set the registry (no registry if "rg" is passed zero) – to be used by the core internals.
If there is an active registry set already, and it is different from the new one, then REG_Delete() is called for the old(replaced) registry.
Definition at line 692 of file ncbi_util.c.
References CORE_LOCK_WRITE, CORE_UNLOCK, eCORE_SetREG, g_CORE_Registry, g_CORE_Set, and REG_Delete().
Referenced by GetAsnDataViaHTTP(), s_Fini(), s_Init(), CBiosampleChkApp::Setup(), CTAbleValApp::Setup(), and CTLSApp::Setup().
◆ CRateMonitor() CRateMonitor::CRateMonitor ( double minspan =0.5
, double maxspan = 10.0
, double weight = 0.5
, double precision = 0.95
) inline
Monitor position progressing in time, calculate speed and estimate time to complete the job (when the final size is known).
Definition at line 73 of file ncbi_misc.hpp.
◆ CSERV_Info() ◆ g_CTimeoutToSTimeout()CTimeout/STimeout adapters.
Definition at line 203 of file ncbi_core_cxx.hpp.
References CTimeout::Get(), CTimeout::IsDefault(), CTimeout::IsInfinite(), kDefaultTimeout, kInfiniteTimeout, STimeoutTag::sec, and STimeoutTag::usec.
Referenced by CEUtils_Request::Connect(), SNetServerPoolImpl::Init(), CNetCacheWriter::TransmitImpl(), CEutilsClient::x_CountOnce(), CEutilsClient::x_FetchOnce(), CCDDClientPool::x_GetClient(), CEutilsClient::x_GetOnce(), CHttpRequest::x_InitConnection(), CEutilsClient::x_LinkOnce(), CEutilsClient::x_LinkOnceT(), CEutilsClient::x_LinkOutOnce(), CEutilsClient::x_SearchOnce(), and CEutilsClient::x_SummaryOnce().
◆ g_STimeoutToCTimeout() ◆ GetETA() double CRateMonitor::GetETA ( void ) const ◆ GetHost() string CSERV_Info::GetHost ( void ) const inline ◆ GetPace() double CRateMonitor::GetPace ( void ) const inline ◆ GetPort() unsigned short CSERV_Info::GetPort ( void ) const inline ◆ GetPos() Uint8 CRateMonitor::GetPos ( void ) const inline ◆ GetRate() [1/2] double CRateMonitor::GetRate ( void ) constHow fast the recent rate has been, in positions per time unit, using the weighted formula.
Definition at line 108 of file ncbi_misc.cpp.
References _ASSERT, _DEBUG_ARG, CRateMonitor::GetPace(), CRateMonitor::kSpan, CRateMonitor::kWeight, CRateMonitor::m_Data, CRateMonitor::m_Rate, n, next(), prev(), and weight.
Referenced by CRateMonitor::GetETA().
◆ GetRate() [2/2] double CSERV_Info::GetRate ( void ) const inline ◆ GetSize() Uint8 CRateMonitor::GetSize ( void ) const inline ◆ GetTime() double CRateMonitor::GetTime ( void ) const inline ◆ GetTimeRemaining() double CRateMonitor::GetTimeRemaining ( void ) const ◆ GetType() ◆ IO_StatusStr()Get the text form of an enum status value.
Definition at line 56 of file ncbi_core.c.
References assert, EIO_N_STATUS, eIO_Success, and int.
Referenced by SNetServerImpl::ConnectImpl(), CORE_SendMailEx(), CPipe::CPipe(), CPipe::ExecWait(), CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), IServer_MessageHandler::OnRead(), CServer_ConnectionPool::PingControlConnection(), CConnTest::PostCheck(), s_ApproveCallback(), s_Connect_(), s_ConnectAndSend(), s_FTPCommandEx(), s_FTPReply(), s_Init(), s_InitAPI_(), s_Open(), s_Read(), s_ReadFullResponse(), s_ReadHeader(), s_ReadSocket(), s_Resolve(), s_Shutdown(), s_ThrowIoStatus(), s_VT_Open(), s_WritePending(), s_WriteToSocket(), SNetScheduleNotificationReceiver::SNetScheduleNotificationReceiver(), CNetCacheReader::SocketRead(), URL_ConnectEx(), SNetServerConnectionImpl::WriteLine(), CWindowMaskerJob::x_CreateProjectItems(), CServer::x_DoRun(), x_ErrorToStatus(), x_FTPCloseData(), x_FTPPassive(), x_FTPPollCntl(), x_FTPXfer(), CNetScheduleHandler::x_HandleSocketErrorOnResponse(), CConn_Streambuf::x_Message(), CNetStorageHandler::x_OnSocketWriteError(), x_ReadChunkHead(), and x_StatusToError().
◆ LOG_AddRef() ◆ LOG_ComposeMessage()Compose a message using the "call_data" info.
Full log record format: mm/dd/yy HH:MM:SS "<file>", line <line>: [<module>::<function>] <level>: <message>
#################### [BEGIN] Raw Data (<raw_size> byte[s]):
<raw_data>
#################### [_END_] Raw Data
Definition at line 430 of file ncbi_util.c.
References assert, CORE_LOCK_WRITE, CORE_UNLOCK, eLOG_Note, eLOG_Trace, SLOG_Message::file, flags, fLOG_DateTime, fLOG_Default, fLOG_FileLine, fLOG_Full, fLOG_FullOctal, fLOG_Function, fLOG_Level, fLOG_Module, fLOG_None, fLOG_OmitNoteLevel, fLOG_Short, SLOG_Message::func, fUTIL_PrintableFullOctal, isspace(), kOutOfMemory, SLOG_Message::level, SLOG_Message::line, LOG_LevelStr(), malloc(), SLOG_Message::message, message_len(), SLOG_Message::module, SLOG_Message::raw_data, SLOG_Message::raw_size, str(), util::strncmp(), UTIL_PRINTABLE_WIDTH, UTIL_PrintableStringEx(), and UTIL_PrintableStringSize().
Referenced by s_LOG_FileHandler().
◆ LOG_Create()Create a new LOG (with an internal reference count set to 1).
Definition at line 312 of file ncbi_core.c.
References cleanup(), data, kLOG_magic, lg(), LOG_tag::lock, malloc(), and MT_LOCK_AddRef().
Referenced by CORE_SetLOGFILE_Ex(), and LOG_cxx2c().
◆ LOG_cxx2c() ◆ LOG_Delete()Decrement internal reference count by 1, and if it reaches 0, then call "lg->cleanup(lg->data)", destroy the handle, and return NULL; otherwise (if reference count is still > 0), return "lg".
Definition at line 365 of file ncbi_core.c.
References free(), lg(), LOG_LOCK_WRITE, LOG_Reset(), LOG_UNLOCK, LOG_VALID, and MT_LOCK_Delete().
Referenced by CORE_SetLOG().
◆ LOG_LevelStr() ◆ LOG_Reset() ◆ LOG_ToFILE() void LOG_ToFILE ( LOG lg, FILE * fp, int auto_close ) ◆ LOG_ToFILE_Ex()LOG_Reset specialized to log to a "FILE*" stream using LOG_ComposeMessage.
Definition at line 649 of file ncbi_util.c.
References SFILELogData::auto_close, SFILELogData::cut_off, eLOG_Fatal, SFILELogData::fatal_err, SFILELogData::fp, fp, lg(), LOG_Reset(), malloc(), s_LOG_FileCleanup(), and s_LOG_FileHandler().
Referenced by CORE_SetLOGFILE_Ex(), and LOG_ToFILE().
◆ LOG_Write() void LOG_Write ( LOG lg, int code, int subcode, ELOG_Level level, const char * module, const char * func, const char * file, int line, const char * message, const void * raw_data, size_t raw_size )Upon having filled SLOG_Message data from parameters, write a message (perhaps with raw data attached) to the log by calling LOG_WriteInternal().
Definition at line 423 of file ncbi_core.c.
References SLOG_Message::dynamic, SLOG_Message::err_code, SLOG_Message::err_subcode, SLOG_Message::file, file, SLOG_Message::func, SLOG_Message::level, lg(), SLOG_Message::line, LOG_WriteInternal(), SLOG_Message::message, SLOG_Message::module, SLOG_Message::raw_data, and SLOG_Message::raw_size.
Referenced by ConnNetInfo_Log().
◆ LOG_WriteInternal()Write message (perhaps with raw data attached) to the log by calling "lg->handler(lg->data, mess)".
Definition at line 391 of file ncbi_core.c.
References abort(), assert, SLOG_Message::dynamic, eLOG_Fatal, free(), SLOG_Message::level, lg(), LOG_LOCK_READ, LOG_UNLOCK, LOG_VALID, SLOG_Message::message, SLOG_Message::raw_data, and SLOG_Message::raw_size.
Referenced by LOG_Write().
◆ Mark() void CRateMonitor::Mark ( Uint8 pos, double time ) ◆ MIME_ComposeContentTypeEx()Definition at line 3315 of file ncbi_connutil.c.
References assert, buf, bufsize, CONN_CONTENT_TYPE_LEN, eENCOD_Unknown, eMIME_T_Undefined, eMIME_T_Unknown, eMIME_Undefined, eMIME_Unknown, kContentType, kMIME_Encoding, kMIME_SubType, kMIME_Type, len, strncpy0(), and type.
Referenced by CSoapHttpClient::Invoke(), s_AdjustNetParams(), s_IsContentTypeDefined(), and SERV_WriteInfo().
◆ MIME_ParseContentTypeEx()Definition at line 3367 of file ncbi_connutil.c.
References eENCOD_None, eENCOD_Unknown, eMIME_T_Undefined, eMIME_T_Unknown, eMIME_Undefined, eMIME_Unknown, free(), i, int, kMIME_Encoding, kMIME_SubType, kMIME_Type, len, malloc(), str(), util::strcmp(), strlwr, and x_size().
Referenced by s_IsContentTypeDefined(), and SERV_ReadInfoEx().
◆ MT_LOCK_AddRef() ◆ MT_LOCK_Create()Create a new MT lock (with an internal reference count set to 1).
Definition at line 198 of file ncbi_core.c.
References MT_LOCK_tag::cleanup, cleanup(), MT_LOCK_tag::count, MT_LOCK_tag::data, data, MT_LOCK_tag::handler, kMT_LOCK_magic, MT_LOCK_tag::magic, and malloc().
Referenced by Blast_CMT_LOCKInit(), and MT_LOCK_cxx2c().
◆ MT_LOCK_cxx2c() ◆ MT_LOCK_Delete()Decrement internal reference count by 1, and if it reaches 0, then destroy the handle, call "lk->cleanup(lk->data)", and return NULL; otherwise (if the reference count is still > 0), return "lk".
Definition at line 234 of file ncbi_core.c.
References MT_LOCK_tag::cleanup, MT_LOCK_tag::count, count, MT_LOCK_tag::data, eMT_Lock, eMT_Unlock, free(), g_CORE_MT_Lock_default, MT_LOCK_tag::handler, MT_LOCK_tag::magic, MT_LOCK_VALID, and verify.
Referenced by Blast_DiagnosticsFree(), BlastHSPStreamClose(), BlastHSPStreamFree(), BlastHSPStreamMappingClose(), BlastHSPStreamRegisterMTLock(), BlastHSPStreamSimpleClose(), CORE_SetLOCK(), LOG_Delete(), and REG_Delete().
◆ MT_LOCK_DoInternal() ◆ NcbiBlowfishDecrypt() ◆ NcbiBlowfishEncrypt() ◆ NcbiBlowfishFini() ◆ NcbiBlowfishInit()Init the cipher context with a key of the specified length.
Note that Blowfish limits the key to be 448 bits (56 bytes) long, so the remainder of a longer key (if so provided) is ignored. A shorter key gets cyclically repeated as necessary to fill up the 56 bytes. To specify a shorter key explicitly pad with zero bits up to 448. Return 0 on memory allocation error.
Definition at line 302 of file ncbi_blowfish.c.
References assert, data, i, kBFInit, ncbi::grid::netcache::search::fields::key, malloc(), MAXKEYLEN, n, NcbiBlowfishEncrypt(), SNcbiBlowfish::P, SNcbiBlowfish::S, and SizeOf.
◆ NcbiMessagePlusError()Add current "error" (and maybe its description) to the message: <message>[ {error=[[<error>][,]][<descr>]}].
Definition at line 338 of file ncbi_util.c.
References buf, free(), isspace(), kOutOfMemory, malloc(), NCBI_OS_MSWIN, s_WinStrerror(), strerror(), strncasecmp, UTIL_ReleaseBuffer, UTIL_ReleaseBufferOnHeap(), and UTIL_TcharToUtf8.
Referenced by s_HttpConnectorBuilder(), s_ServiceConnectorBuilder(), and x_FormatError().
◆ NcbiMsToTimeout() ◆ NcbiTimeoutToMs()Definition at line 40 of file ncbi_types.c.
References STimeoutTag::sec, and STimeoutTag::usec.
Referenced by CPipe::ExecWait(), CNamedPipeHandle::Listen(), CNamedPipeHandle::Open(), CPipeHandle::Read(), SNetServerConnectionImpl::ReadCmdOutputLine(), s_Close(), CNamedPipeHandle::Write(), CPipeHandle::Write(), CPipeHandle::x_Poll(), and CNamedPipeHandle::x_WaitForRead().
◆ REG_AddRef() ◆ REG_Create()Create a new registry (with an internal reference count set to 1).
Definition at line 483 of file ncbi_core.c.
References REG_tag::cleanup, cleanup(), REG_tag::count, REG_tag::data, data, REG_tag::get, kREG_magic, REG_tag::lock, REG_tag::magic, malloc(), MT_LOCK_AddRef(), and REG_tag::set.
Referenced by REG_cxx2c().
◆ REG_cxx2c() [1/2]Convert a C++ Toolkit read-only registry object to a REG registry.
Definition at line 217 of file ncbi_core_cxx.cpp.
References _TRACE, CObject::AddReference(), NStr::PtrToString(), REG_Create(), s_REG_Cleanup(), s_REG_Get(), and s_TraceReg.
◆ REG_cxx2c() [2/2]Convert a C++ Toolkit registry object to a REG registry.
Definition at line 203 of file ncbi_core_cxx.cpp.
References _TRACE, CObject::AddReference(), NStr::PtrToString(), REG_Create(), s_REG_Cleanup(), s_REG_Get(), s_REG_Set(), and s_TraceReg.
Referenced by GetAsnDataViaHTTP(), s_Init(), CBiosampleChkApp::Setup(), CTAbleValApp::Setup(), and CTLSApp::Setup().
◆ REG_Delete()Decrement internal reference count by 1, and if it reaches 0, then call "rg->cleanup(rg->data)", destroy the handle, and return NULL; otherwise (if the reference count is still > 0), return "rg".
Definition at line 540 of file ncbi_core.c.
References REG_tag::count, free(), REG_tag::lock, REG_tag::magic, MT_LOCK_Delete(), REG_LOCK_WRITE, REG_Reset(), REG_UNLOCK, and REG_VALID.
Referenced by CORE_SetREG().
◆ REG_Get() const char* REG_Get ( REG rg, const char * section, const char * name, char * value, size_t value_size, const char * def_value )Copy the registry value stored in "section" under name "name" to buffer "value"; if the entry is found in both transient and persistent storages, then copy the one from the transient storage.
If the specified entry is not found in the registry (or if there is no registry defined), and "def_value" is not NULL, then copy "def_value" to "value" (although, only up to "value_size" characters).
Definition at line 566 of file ncbi_core.c.
References REG_tag::data, REG_tag::get, len, REG_LOCK_READ, REG_UNLOCK, REG_VALID, strncpy0(), and rapidjson::value.
Referenced by g_CORE_RegistryGET().
◆ REG_Reset()Reset the registry handle to use the new "data", "set", "get", and "cleanup".
Definition at line 505 of file ncbi_core.c.
References REG_tag::cleanup, cleanup(), REG_tag::data, data, REG_tag::get, REG_LOCK_WRITE, REG_UNLOCK, REG_VALID, and REG_tag::set.
Referenced by REG_Delete().
◆ REG_Set() ◆ SERV_GetServers()Get the servers for a given service.
Definition at line 76 of file ncbi_service_cxx.cpp.
References _TRACE, ConnNetInfo_Create(), eUnknown, fSERV_All, fSERV_Any, fSERV_Firewall, AutoPtr< X, Del >::get(), hex(), info, kEmptyStr, msg(), NCBI_THROW, NcbiIsEmptyIPv6(), NcbiIsIPv4(), NStr::NumericToString(), SERV_AddrOfInfo(), SERV_ANYHOST, SERV_Close(), SERV_GetNextInfo(), SERV_Open(), SERV_TypeStr(), types, and x_HostOfInfo().
◆ SetSize() void CRateMonitor::SetSize ( Uint8 size ) inline ◆ SOCK_StripToPattern() EIO_Status SOCK_StripToPattern ( SOCK sock, const void * pattern, size_t pattern_size, BUF * discard, size_t * n_discarded ) ◆ URL_Connect() SOCK URL_Connect ( const char * host, unsigned short port, const char * path, const char * args, EReqMethod req_method, size_t content_length, const STimeout * o_timeout, const STimeout * rw_timeout, const char * user_header, int encode_args, TSOCK_Flags flags )Definition at line 2736 of file ncbi_connutil.c.
References assert, CORE_LOG, CORE_LOG_X, CORE_LOGF_ERRNO_X, CORE_Once, eIO_Success, eLOG_Error, eLOG_Warning, eReqMethod_Connect, eReqMethod_v1, flags, free(), kHost, malloc(), ncbi::grid::netcache::search::fields::size, strncasecmp, URL_ConnectEx(), URL_Encode(), verify, and x_StrcatCRLF().
◆ URL_ConnectEx() EIO_Status URL_ConnectEx ( const char * host, unsigned short port, const char * path, const char * args, TReqMethod req_method, size_t content_length, const STimeout * o_timeout, const STimeout * rw_timeout, const char * user_header, SURLExtra * extra, TSOCK_Flags flags, SOCK * sock )Definition at line 2501 of file ncbi_connutil.c.
References assert, buf, BUF_Destroy(), BUF_Read(), BUF_Size(), BUF_Write(), CONN_PORT_HTTP, CONN_PORT_HTTPS, CORE_LOG_X, CORE_LOGF_ERRNO_X, CORE_LOGF_X, SURLExtra::cred, eIO_InvalidArg, eIO_NotSupported, eIO_ReadWrite, eIO_Success, eIO_Timeout, eIO_Unknown, eLOG_Critical, eLOG_Error, eLOG_Warning, eReqMethod_Any, eReqMethod_Connect, eReqMethod_Get, eReqMethod_Head, eReqMethod_Post, eReqMethod_Put, eReqMethod_v1, flags, free(), fSOCK_Secure, SURLExtra::host, init(), IO_StatusStr(), isspace(), malloc(), STimeoutTag::sec, SOCK_CreateInternal(), SOCK_CreateOnTopInternal(), SOCK_Destroy, SOCK_DisableOSSendDelay(), SOCK_SetTimeout(), str(), tmp, STimeoutTag::usec, verify, x_ReqMethod(), and x_URLConnectErrorReturn().
Referenced by s_Connect(), and URL_Connect().
◆ URL_Decode() int URL_Decode ( const void * src_buf, size_t src_size, size_t * src_read, void * dst_buf, size_t dst_size, size_t * dst_written ) ◆ URL_DecodeEx() int URL_DecodeEx ( const void * src_buf, size_t src_size, size_t * src_read, void * dst_buf, size_t dst_size, size_t * dst_written, const char * allow_symbols ) ◆ URL_Encode() void URL_Encode ( const void * src_buf, size_t src_size, size_t * src_read, void * dst_buf, size_t dst_size, size_t * dst_written ) ◆ URL_EncodeEx() void URL_EncodeEx ( const void * src_buf, size_t src_size, size_t * src_read, void * dst_buf, size_t dst_size, size_t * dst_written, const char * allow_symbols ) ◆ UTIL_Adler32_Update() unsigned int UTIL_Adler32_Update ( unsigned int checksum, const void * ptr, size_t len )Calculate/Update Adler-32 checksum NB: Initial checksum is "1".
Definition at line 1180 of file ncbi_util.c.
References a, ADJUST_ADLER, b, data, FINALIZE_ADLER, i, len, and MAXLEN_ADLER.
Referenced by s_VerifyChecksum().
◆ UTIL_CRC32_Update() unsigned int UTIL_CRC32_Update ( unsigned int checksum, const void * ptr, size_t len )Calculate/Update CRC-32 checksum NB: Initial checksum is "0".
Definition at line 1155 of file ncbi_util.c.
References data, i, len, and s_CRC32Table.
Referenced by s_VerifyChecksum().
◆ UTIL_GenerateHMAC()Generate an RFC2401 digest (HMAC).
Definition at line 1226 of file ncbi_util.c.
References ctx, free(), i, ncbi::grid::netcache::search::fields::key, malloc(), pad(), text(), and tmp.
◆ UTIL_HelpRequested() int UTIL_HelpRequested ( int argc, char ** argv )Given the main()'s argc and argv return non-zero (true) if the arguments specify that only a help option was requested.
Return 0 (false), otherwise.
Definition at line 1422 of file ncbi_util.c.
References strcasecmp, and util::strcmp().
◆ UTIL_MatchesMask() ◆ UTIL_MatchesMaskEx() int UTIL_MatchesMaskEx ( const char * text, const char * mask, int ignore_case )Match a given text with a given pattern mask.
Very similar to fnmatch(3), but there are differences (see also glob(7)). There's no special treatment for a slash character '/' in this call.
Definition at line 1377 of file ncbi_util.c.
References mask, text(), and x_MatchesMask().
Referenced by UTIL_MatchesMask().
◆ UTIL_NcbiLocalHostName() char* UTIL_NcbiLocalHostName ( char * hostname )Cut off well-known NCBI domain suffix out of the passed "hostname".
Definition at line 1390 of file ncbi_util.c.
References assert, i, len, and strncasecmp.
Referenced by x_ClientAddress().
◆ UTIL_PrintableStringEx()Create a printable representation of a block of data of the specified size (or, if size is 0, strlen(data)), and return the buffer pointer past the last stored character (non '\0'-terminated).
Non-printable characters can be represented in a reduced octal form as long as the result is unambiguous (unless "full" passed true (non-zero), in which case all non-printable characters get represented by full octal tetrads).
Definition at line 223 of file ncbi_util.c.
References flags, fUTIL_PrintableFullOctal, fUTIL_PrintableNoNewLine, isprint(), ncbi::grid::netcache::search::fields::size, and UTIL_PRINTABLE_WIDTH_MIN.
Referenced by LOG_ComposeMessage(), and s_LOG_Handler().
◆ UTIL_PrintableStringSize() size_t UTIL_PrintableStringSize ( const char * data, size_t size ) ◆ UTIL_ReleaseBufferOnHeap() ◆ UTIL_Timezone() time_t UTIL_Timezone ( void )Return timezone offset (in seconds West of UTC) for the current time zone.
Must be called after either mktime() or localtime() or tzset() to return a valid result. On platforms that do not provide TZ information, the result is cached internally for the life of the application.
Definition at line 1437 of file ncbi_util.c.
References assert, CORE_LOCK_WRITE, CORE_UNLOCK, and timezone.
Referenced by x_FTPParseMdtm(), and x_ParseExpires().
◆ block_len size_t SHASH_Descriptor::block_lenDefinition at line 580 of file ncbi_util.h.
◆ client_host char SConnNetInfo::client_host[255+1] ◆ cred ◆ credentials ◆ debug_printout ◆ digest_len size_t SHASH_Descriptor::digest_lenDefinition at line 581 of file ncbi_util.h.
◆ dynamic int SLOG_Message::dynamic ◆ err_code int SLOG_Message::err_code ◆ err_subcode int SLOG_Message::err_subcode ◆ external unsigned SConnNetInfo::external ◆ file const char* SLOG_Message::file ◆ fini void(* SHASH_Descriptor::fini) (void *ctx, void *digest)Definition at line 585 of file ncbi_util.h.
◆ firewallDefinition at line 200 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Adjust(), s_Connect(), s_Open(), s_Resolve(), s_SocketConnectorBuilder(), s_VT_Open(), SERV_Print(), SERVICE_CreateConnectorEx(), CConnTest::x_GetFirewallConfiguration(), and x_Open().
◆ func const char* SLOG_Message::func ◆ host [1/2] char SConnNetInfo::host[255+1]Definition at line 212 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), CFtpUtils::GetDirContent(), s_Adjust(), s_CallAdjust(), s_Connect(), s_CreateConnector(), s_Open(), s_Resolve(), s_SocketConnectorBuilder(), s_VT_Open(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), x_FTPCloseCntl(), x_FTPLogin(), x_Redirect(), x_SetHostPort(), x_SetHttpHostTag(), x_SetupConnectionParams(), and x_SetupHttpProxy().
◆ host [2/2] const char* SURLExtra::host ◆ http_proxy_host char SConnNetInfo::http_proxy_host[255+1]Definition at line 215 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_CallAdjust(), s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_SocketConnectorBuilder(), s_VT_Open(), x_Authenticate(), x_SetHostPort(), CHttpRequest::x_SetProxy(), and x_SetupConnectionParams().
◆ http_proxy_leak unsigned SConnNetInfo::http_proxy_leak ◆ http_proxy_mask ◆ http_proxy_pass char SConnNetInfo::http_proxy_pass[63+1] ◆ http_proxy_port unsigned short SConnNetInfo::http_proxy_portDefinition at line 216 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_CallAdjust(), s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_SocketConnectorBuilder(), s_VT_Open(), x_Authenticate(), x_SetHostPort(), CHttpRequest::x_SetProxy(), and x_SetupConnectionParams().
◆ http_proxy_skip unsigned SConnNetInfo::http_proxy_skip ◆ http_proxy_user char SConnNetInfo::http_proxy_user[63+1] ◆ http_push_auth unsigned SConnNetInfo::http_push_auth ◆ http_referer const char* SConnNetInfo::http_referer ◆ http_user_header const char* SConnNetInfo::http_user_header ◆ http_version unsigned SConnNetInfo::http_version ◆ init ◆ kMaxSpan const double CRateMonitor::kMaxSpan protected ◆ kMinSpan const double CRateMonitor::kMinSpan protected ◆ kSpan const double CRateMonitor::kSpan protected ◆ kWeight const double CRateMonitor::kWeight protected ◆ lb_disable unsigned SConnNetInfo::lb_disable ◆ level ◆ line ◆ m_Data list<TMark> CRateMonitor::m_Data protected ◆ m_Host ◆ m_Port unsigned short CSERV_Info::m_Port private ◆ m_Rate [1/2] double CRateMonitor::m_Rate mutableprotected ◆ m_Rate [2/2] double CSERV_Info::m_Rate private ◆ m_Size Uint8 CRateMonitor::m_Size protected ◆ m_Type ◆ magic unsigned int SConnNetInfo::magic ◆ max_try unsigned short SConnNetInfo::max_try ◆ message const char* SLOG_Message::message ◆ module const char* SLOG_Message::module ◆ pass char SConnNetInfo::pass[63+1] ◆ path char SConnNetInfo::path[4095+1]Definition at line 214 of file ncbi_connutil.h.
Referenced by CConn_FTPDownloadStream::CConn_FTPDownloadStream(), CConn_FTPUploadStream::CConn_FTPUploadStream(), ConnNetInfo_CloneInternal(), CFtpUtils::GetDirContent(), s_Adjust(), s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_FTPDir(), s_Resolve(), s_SocketConnectorBuilder(), s_VT_Open(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), x_FTPDir(), x_SetDefaultReferer(), and x_SetupHttpProxy().
◆ port unsigned short SConnNetInfo::portDefinition at line 213 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Adjust(), s_CallAdjust(), s_Connect(), s_CreateConnector(), s_Open(), s_Resolve(), s_SocketConnectorBuilder(), s_VT_Open(), x_FTPCloseCntl(), x_FTPLogin(), x_Redirect(), x_SetHostPort(), x_SetHttpHostTag(), x_SetupConnectionParams(), and x_SetupHttpProxy().
◆ raw_data const void* SLOG_Message::raw_data ◆ raw_size size_t SLOG_Message::raw_size ◆ req_methodDefinition at line 197 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Adjust(), s_AdjustNetParams(), s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_Open(), s_Read(), s_ReadHeader(), s_Resolve(), s_SocketConnectorBuilder(), s_VT_Write(), x_Redirect(), x_SetDefaultReferer(), x_SetupConnectionParams(), x_SetupFromNamerd(), and x_SetupHttpProxy().
◆ reserved unsigned SConnNetInfo::reserved ◆ schemeDefinition at line 198 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), CFtpUtils::GetDirContent(), s_Adjust(), s_CallAdjust(), s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_Open(), s_Resolve(), s_SocketConnectorBuilder(), SERV_LINKERD_Open(), x_Authenticate(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), x_Redirect(), x_SetDefaultReferer(), x_SetHttpHostTag(), x_SetupConnectionParams(), x_SetupFromNamerd(), and x_SetupHttpProxy().
◆ sec unsigned int STimeoutTag::secseconds
Definition at line 76 of file ncbi_types.h.
Referenced by CONN_Wait(), CRemoteAppLauncher::CRemoteAppLauncher(), CExecute::Exec(), CConnTest::ExtraCheckOnFailure(), CConn_Streambuf::Fetch(), g_CTimeoutToSTimeout(), g_STimeoutToCTimeout(), CGencollSvc::GetGenCollService(), CSeqUtils::GetGiPlacements(), CUrlUtils::GetLastModified(), CSeqUtils::GetLocPlacements(), CServer_ConnectionPool::GetPollAndTimerVec(), CSocket::GetTimeout(), SNetServerImpl::SConnectDeadline::IsExpired(), CConnTestThread::Main(), SNetServerImpl::SConnectDeadline::Min(), NcbiMsToTimeout(), NcbiTimeoutToMs(), operator<(), operator>(), CId1FetchApp::Run(), CNetScheduleDApp::Run(), CNetStorageDApp::Run(), s_Close(), s_CONN_Read(), s_CONN_Write(), s_Connect_(), s_ConnectAndSend(), s_GetGeneWeight(), s_PreRead(), s_ReadHeader(), s_SetTimeout(), s_to2tv(), s_tv2to(), CTaxon3::SendRequest(), CConn_Streambuf::showmanyc(), SNetScheduleNotificationReceiver::SNetScheduleNotificationReceiver(), URL_ConnectEx(), CNetScheduleNotificationHandler::WaitForNotification(), CId1Reader::x_ConnectAtSlot(), CId2Reader::x_ConnectAtSlot(), x_DrainData(), CId2FetchApp::x_InitConnection(), CSFTranslationJob::x_InitGeneticCode(), x_IsLongerTimeout(), CConn_Streambuf::x_Message(), x_Sendmail_InitEnv(), CReaderServiceConnector::x_SetTimeoutTo(), x_StoreTimeoutNormalized(), CConnTest::x_TimeoutMsg(), and CServer_ConnectionPool::x_UpdateExpiration().
◆ stateless unsigned SConnNetInfo::stateless ◆ svc const char SConnNetInfo::svc[1] ◆ timeout ◆ tmo ◆ unused unsigned short SConnNetInfo::unused ◆ update ◆ usec unsigned int STimeoutTag::usecmicroseconds (modulo 1,000,000)
Definition at line 77 of file ncbi_types.h.
Referenced by CONN_Wait(), CRemoteAppLauncher::CRemoteAppLauncher(), CExecute::Exec(), CConnTest::ExtraCheckOnFailure(), CConn_Streambuf::Fetch(), g_CTimeoutToSTimeout(), g_STimeoutToCTimeout(), CGencollSvc::GetGenCollService(), CSeqUtils::GetGiPlacements(), CUrlUtils::GetLastModified(), CSeqUtils::GetLocPlacements(), CServer_ConnectionPool::GetPollAndTimerVec(), CSocket::GetTimeout(), SNetServerImpl::SConnectDeadline::IsExpired(), CConnTestThread::Main(), SNetServerImpl::SConnectDeadline::Min(), NcbiMsToTimeout(), NcbiTimeoutToMs(), operator<(), operator>(), CId1FetchApp::Run(), CNetScheduleDApp::Run(), CNetStorageDApp::Run(), s_Close(), s_CONN_Read(), s_CONN_Write(), s_Connect_(), s_ConnectAndSend(), s_GetGeneWeight(), s_PreRead(), s_ReadHeader(), s_SetTimeout(), s_to2tv(), s_tv2to(), CTaxon3::SendRequest(), CConn_Streambuf::showmanyc(), SNetScheduleNotificationReceiver::SNetScheduleNotificationReceiver(), URL_ConnectEx(), CNetScheduleNotificationHandler::WaitForNotification(), CId1Reader::x_ConnectAtSlot(), CId2Reader::x_ConnectAtSlot(), x_DrainData(), CId2FetchApp::x_InitConnection(), CSFTranslationJob::x_InitGeneticCode(), x_IsLongerTimeout(), CConn_Streambuf::x_Message(), x_Sendmail_InitEnv(), CReaderServiceConnector::x_SetTimeoutTo(), x_StoreTimeoutNormalized(), CConnTest::x_TimeoutMsg(), and CServer_ConnectionPool::x_UpdateExpiration().
◆ user char SConnNetInfo::user[63+1]RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4