NCBI C++ ToolKit
|
Classes | |
struct | SConnNetInfo |
struct | SURLExtra |
Extra URL_ConnectEx() parameters. More... | |
struct | SLOG_Message |
Message and miscellaneous data to pass to log post callback FLOG_Handler. More... | |
class | CConnIniter |
Helper hook-up class that installs default logging/registry/locking (but only if they have not yet been installed explicitly by the user) as if by calling CONNECT_Init(&CNcbiApplication::GetConfig()) automagically. More... | |
class | CRateMonitor |
class | CSERV_Info |
Attributes of a given service. More... | |
struct | STimeoutTag |
Timeout structure. More... | |
struct | SHASH_Descriptor |
Typedefs | |
typedef const struct SNcbiBlowfish * | NCBI_BLOWFISH |
Opaque encryption / decryption context type. More... | |
typedef unsigned | TReqMethod |
typedef unsigned | EBURLScheme |
typedef unsigned | EBFWMode |
typedef unsigned | EBDebugPrintout |
typedef unsigned | EBProxyType |
typedef struct MT_LOCK_tag * | MT_LOCK |
typedef int(* | FMT_LOCK_Handler) (void *data, EMT_Lock how) |
MT locking callback (operates like a [recursive] mutex or RW-lock). More... | |
typedef void(* | FMT_LOCK_Cleanup) (void *data) |
MT lock cleanup callback. More... | |
typedef struct LOG_tag * | LOG |
typedef void(* | FLOG_Handler) (void *data, const SLOG_Message *mess) |
Log post callback. More... | |
typedef void(* | FLOG_Cleanup) (void *data) |
Log cleanup callback. More... | |
typedef struct REG_tag * | REG |
typedef int(* | FREG_Get) (void *data, const char *section, const char *name, char *value, size_t value_size) |
Registry getter callback. More... | |
typedef int(* | FREG_Set) (void *data, const char *section, const char *name, const char *value, EREG_Storage storage) |
Registry setter callback. More... | |
typedef void(* | FREG_Cleanup) (void *data) |
Registry cleanup callback. More... | |
typedef unsigned int | TConnectInitFlags |
Bitwise OR of EConnectInitFlag. More... | |
typedef pair< Uint8, double > | CRateMonitor::TMark |
typedef struct STimeoutTag | STimeout |
Timeout structure. More... | |
typedef enum ENcbiSwitch | ESwitch |
Aux. More... | |
typedef enum ENcbiOwnership | EOwnership |
Ownership relations between objects. More... | |
typedef unsigned int | TNCBI_Size |
Fixed-size analogs of size_t and time_t (mainly for IPC) More... | |
typedef unsigned int | TNCBI_Time |
typedef uint64_t | TNCBI_BigCount |
Big unsigned integer for file size and position. More... | |
typedef unsigned int | TLOG_FormatFlags |
bitwise OR of "ELOG_FormatFlag" More... | |
typedef int | TUTIL_PrintableFlags |
Bitwise "OR" of EUTIL_PrintableFlags. More... | |
Functions | |
NCBI_BLOWFISH | NcbiBlowfishInit (const void *key, size_t keylen) |
Init the cipher context with a key of the specified length. More... | |
void | NcbiBlowfishEncrypt (NCBI_BLOWFISH ctx, Uint8 *text) |
Encrypt a 64-bit block of data pointed to by "text" with an encrypted scrambled cipher data stored back at the same location. More... | |
void | NcbiBlowfishDecrypt (NCBI_BLOWFISH ctx, Uint8 *data) |
Decrypt a 64-bit of cipher data pointed to by "data" back into the clear text stored at the same location. More... | |
void | NcbiBlowfishFini (NCBI_BLOWFISH ctx) |
Destroy the context created by NcbiBlowfishInit(). More... | |
const char * | ConnNetInfo_GetValue (const char *service, const char *param, char *value, size_t value_size, const char *def_value) |
int | ConnNetInfo_Boolean (const char *str) |
SConnNetInfo * | ConnNetInfo_Create (const char *service) |
SConnNetInfo * | ConnNetInfo_Clone (const SConnNetInfo *net_info) |
int | ConnNetInfo_SetPath (SConnNetInfo *net_info, const char *path) |
int | ConnNetInfo_AddPath (SConnNetInfo *net_info, const char *path) |
int | ConnNetInfo_SetArgs (SConnNetInfo *net_info, const char *args) |
int | ConnNetInfo_SetFrag (SConnNetInfo *net_info, const char *frag) |
const char * | ConnNetInfo_GetArgs (const SConnNetInfo *net_info) |
int | ConnNetInfo_AppendArg (SConnNetInfo *net_info, const char *arg, const char *val) |
int | ConnNetInfo_PrependArg (SConnNetInfo *net_info, const char *arg, const char *val) |
int | ConnNetInfo_DeleteArg (SConnNetInfo *net_info, const char *arg) |
void | ConnNetInfo_DeleteAllArgs (SConnNetInfo *net_info, const char *args) |
int | ConnNetInfo_PreOverrideArg (SConnNetInfo *net_info, const char *arg, const char *val) |
int | ConnNetInfo_PostOverrideArg (SConnNetInfo *net_info, const char *arg, const char *val) |
int | ConnNetInfo_SetupStandardArgs (SConnNetInfo *net_info, const char *service) |
int | ConnNetInfo_SetUserHeader (SConnNetInfo *net_info, const char *header) |
int | ConnNetInfo_AppendUserHeader (SConnNetInfo *net_info, const char *header) |
int | ConnNetInfo_PrependUserHeader (SConnNetInfo *net_info, const char *header) |
int | ConnNetInfo_OverrideUserHeader (SConnNetInfo *net_info, const char *header) |
int | ConnNetInfo_PreOverrideUserHeader (SConnNetInfo *net_info, const char *header) |
int | ConnNetInfo_ExtendUserHeader (SConnNetInfo *net_info, const char *header) |
void | ConnNetInfo_DeleteUserHeader (SConnNetInfo *net_info, const char *header) |
int | ConnNetInfo_SetTimeout (SConnNetInfo *net_info, const STimeout *timeout) |
int | ConnNetInfo_ParseURL (SConnNetInfo *net_info, const char *url) |
char * | ConnNetInfo_URL (const SConnNetInfo *net_info) |
void | ConnNetInfo_Log (const SConnNetInfo *net_info, ELOG_Level sev, LOG log) |
void | ConnNetInfo_Destroy (SConnNetInfo *net_info) |
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) |
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) |
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". More... | |
EIO_Status | SOCK_StripToPattern (SOCK sock, const void *pattern, size_t pattern_size, BUF *discard, size_t *n_discarded) |
EIO_Status | BUF_StripToPattern (BUF buffer, const void *pattern, size_t pattern_size, BUF *discard, size_t *n_discarded) |
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) |
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) |
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) |
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) |
char * | MIME_ComposeContentTypeEx (EMIME_Type type, EMIME_SubType subtype, EMIME_Encoding encoding, char *buf, size_t bufsize) |
int | MIME_ParseContentTypeEx (const char *str, EMIME_Type *type, EMIME_SubType *subtype, EMIME_Encoding *encoding) |
const char * | IO_StatusStr (EIO_Status status) |
Get the text form of an enum status value. More... | |
MT_LOCK | MT_LOCK_Create (void *data, FMT_LOCK_Handler handler, FMT_LOCK_Cleanup cleanup) |
Create a new MT lock (with an internal reference count set to 1). More... | |
MT_LOCK | MT_LOCK_AddRef (MT_LOCK lk) |
Increment internal reference count by 1, then return "lk". More... | |
MT_LOCK | MT_LOCK_Delete (MT_LOCK lk) |
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". More... | |
int | MT_LOCK_DoInternal (MT_LOCK lk, EMT_Lock how) |
const char * | LOG_LevelStr (ELOG_Level level) |
Obtain verbal representation of an enum level value. More... | |
LOG | LOG_Create (void *data, FLOG_Handler handler, FLOG_Cleanup cleanup, MT_LOCK lock) |
Create a new LOG (with an internal reference count set to 1). More... | |
LOG | LOG_Reset (LOG lg, void *data, FLOG_Handler handler, FLOG_Cleanup cleanup) |
Reset the "lg" to use the new "data", "handler" and "cleanup". More... | |
LOG | LOG_AddRef (LOG lg) |
Increment internal reference count by 1, then return "lg". More... | |
LOG | LOG_Delete (LOG lg) |
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". More... | |
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(). More... | |
void | LOG_WriteInternal (LOG lg, const SLOG_Message *mess) |
Write message (perhaps with raw data attached) to the log by calling "lg->handler(lg->data, mess)". More... | |
REG | REG_Create (void *data, FREG_Get get, FREG_Set set, FREG_Cleanup cleanup, MT_LOCK lock) |
Create a new registry (with an internal reference count set to 1). More... | |
void | REG_Reset (REG rg, void *data, FREG_Get get, FREG_Set set, FREG_Cleanup cleanup, int do_cleanup) |
Reset the registry handle to use the new "data", "set", "get", and "cleanup". More... | |
REG | REG_AddRef (REG rg) |
Increment internal reference count by 1, then return "rg". More... | |
REG | REG_Delete (REG rg) |
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". More... | |
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. More... | |
int | REG_Set (REG rg, const char *section, const char *name, const char *value, EREG_Storage storage) |
Store the "value" into the registry section "section" under the key "name", and according to "storage". More... | |
REG | REG_cxx2c (IRWRegistry *reg, bool pass_ownership=false) |
Convert a C++ Toolkit registry object to a REG registry. More... | |
REG | REG_cxx2c (const IRWRegistry *reg, bool pass_ownership=false) |
Convert a C++ Toolkit read-only registry object to a REG registry. More... | |
LOG | LOG_cxx2c (void) |
Create LOG on top of C++ Toolkit CNcbiDiag. More... | |
MT_LOCK | MT_LOCK_cxx2c (CRWLock *lock=0, bool pass_ownership=false) |
Convert a C++ Toolkit lock object to an MT_LOCK lock. More... | |
void | CONNECT_Init (const IRWRegistry *reg=0, CRWLock *lock=0, TConnectInitFlags flag=eConnectInit_OwnNothing, FSSLSetup ssl=0) |
Init [X]CONNECT library with the specified "reg" and "lock" (ownership for either or both can be detailed in the "flag" parameter). More... | |
CConnIniter::CConnIniter (void) | |
const STimeout * | g_CTimeoutToSTimeout (const CTimeout &cto, STimeout &sto) |
CTimeout/STimeout adapters. More... | |
CTimeout | g_STimeoutToCTimeout (const STimeout *sto) |
Convert STimeout to CTimeout. More... | |
CRateMonitor::CRateMonitor (double minspan=0.5, double maxspan=10.0, double weight=0.5, double precision=0.95) | |
Monitor position progressing in time, calculate speed and estimate time to complete the job (when the final size is known). More... | |
void | CRateMonitor::SetSize (Uint8 size) |
Set size of the anticipated job, clear all prior measurements. More... | |
Uint8 | CRateMonitor::GetSize (void) const |
Get size previously set. More... | |
Uint8 | CRateMonitor::GetPos (void) const |
Get current progress position (position 0 when job starts) More... | |
double | CRateMonitor::GetTime (void) const |
Get current time (time 0.0 when job starts) More... | |
void | CRateMonitor::Mark (Uint8 pos, double time) |
Submit a mark of the job progress. More... | |
double | CRateMonitor::GetRate (void) const |
How fast the recent rate has been, in positions per time unit, using the weighted formula. More... | |
double | CRateMonitor::GetPace (void) const |
How fast the average pace has been so far, in positions per time unit. More... | |
double | CRateMonitor::GetETA (void) const |
How long it will take to complete, at the current rate. More... | |
double | CRateMonitor::GetTimeRemaining (void) const |
How long it will take to complete, at the average pace. More... | |
CSERV_Info::CSERV_Info (const string &host, unsigned short port, double rate, ESERV_Type type) | |
string | CSERV_Info::GetHost (void) const |
unsigned short | CSERV_Info::GetPort (void) const |
double | CSERV_Info::GetRate (void) const |
ESERV_Type | CSERV_Info::GetType (void) const |
vector< CSERV_Info > | SERV_GetServers (const string &service, TSERV_TypeOnly types=fSERV_Any) |
Get the servers for a given service. More... | |
unsigned long | NcbiTimeoutToMs (const STimeout *timeout) |
STimeout * | NcbiMsToTimeout (STimeout *timeout, unsigned long ms) |
void | CORE_SetLOCK (MT_LOCK lk) |
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. More... | |
MT_LOCK | CORE_GetLOCK (void) |
Get the lock handle that is to be used by the core internals. More... | |
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). More... | |
LOG | CORE_GetLOG (void) |
Get the log handle that is to be used by the core internals (CORE LOG). More... | |
void | CORE_SetLOGFILE_Ex (FILE *fp, ELOG_Level cut_off, ELOG_Level fatal_err, int auto_close) |
Standard logging (CORE LOG) to the specified file stream. More... | |
void | CORE_SetLOGFILE (FILE *fp, int auto_close) |
Same as CORE_SetLOGFILE_Ex(fp, CORE_LOGFILE_CUTOFF_LEVEL, eLOG_Fatal, auto_close). More... | |
int | CORE_SetLOGFILE_NAME_Ex (const char *logfile, ELOG_Level cut_off, ELOG_Level fatal_err) |
Same as CORE_SetLOGFILE_Ex(fopen(logfile, "a"), cut_off, fatal_err, TRUE). More... | |
int | CORE_SetLOGFILE_NAME (const char *logfile) |
Same as CORE_SetLOGFILE_NAME_Ex(logfile, CORE_LOGFILE_CUTOFF_LEVEL, eLOG_Fatal). More... | |
TLOG_FormatFlags | CORE_SetLOGFormatFlags (TLOG_FormatFlags) |
char * | LOG_ComposeMessage (const SLOG_Message *mess, TLOG_FormatFlags flags) |
Compose a message using the "call_data" info. More... | |
void | LOG_ToFILE_Ex (LOG lg, FILE *fp, ELOG_Level cut_off, ELOG_Level fatal_err, int auto_close) |
LOG_Reset specialized to log to a "FILE*" stream using LOG_ComposeMessage. More... | |
void | LOG_ToFILE (LOG lg, FILE *fp, int auto_close) |
Same as LOG_ToFILEx(lg, fp, eLOG_Trace, eLOG_Fatal, auto_close). More... | |
const char * | NcbiMessagePlusError (int *dynamic, const char *message, int error, const char *descr) |
Add current "error" (and maybe its description) to the message: <message>[ {error=[[<error>][,]][<descr>]}]. More... | |
void | CORE_SetREG (REG rg) |
Set the registry (no registry if "rg" is passed zero) – to be used by the core internals. More... | |
REG | CORE_GetREG (void) |
Get the registry that is to be used by the core internals. More... | |
const char * | CORE_GetAppName (void) |
Obtain current application name (toolkit dependent). More... | |
const char * | CORE_GetPlatform (void) |
Return NCBI platrofm ID (if known). More... | |
char * | CORE_GetNcbiRequestID (ENcbiRequestID reqid) |
Obtain current NCBI request ID (if known, per thread). More... | |
const char * | CORE_GetUsernameEx (char *buf, size_t bufsize, ECORE_Username username) |
Obtain and store in the buffer provided, the best (as possible) user name that matches the requested username selector. More... | |
const char * | CORE_GetUsername (char *buf, size_t bufsize) |
Equivalent to CORE_GetUsernameEx(buf, bufsize, eNCBI_UsernameLogin) except that it always returns non-empty "buf" when successful, or NULL otherwise (i.e. More... | |
size_t | CORE_GetVMPageSize (void) |
Obtain virtual memory page size. More... | |
void | CORE_Msdelay (unsigned long ms) |
Delay execution of the current thread by the specified number of milliseconds. More... | |
unsigned int | UTIL_CRC32_Update (unsigned int checksum, const void *ptr, size_t len) |
Calculate/Update CRC-32 checksum NB: Initial checksum is "0". More... | |
unsigned int | UTIL_Adler32_Update (unsigned int checksum, const void *ptr, size_t len) |
Calculate/Update Adler-32 checksum NB: Initial checksum is "1". More... | |
void * | UTIL_GenerateHMAC (const SHASH_Descriptor *hash, const void *text, size_t text_len, const void *key, size_t key_len, void *digest) |
Generate an RFC2401 digest (HMAC). More... | |
int | UTIL_MatchesMaskEx (const char *text, const char *mask, int ignore_case) |
Match a given text with a given pattern mask. More... | |
int | UTIL_MatchesMask (const char *text, const char *mask) |
Shortcut for UTIL_MatchesMaskEx(text, mask, 1), that is matching is done case-insensitively for the letters (a-z). More... | |
char * | UTIL_NcbiLocalHostName (char *hostname) |
Cut off well-known NCBI domain suffix out of the passed "hostname". More... | |
size_t | UTIL_PrintableStringSize (const char *data, size_t size) |
Calculate size of buffer needed to store printable representation of the block of data of the specified size (or, if size is 0, strlen(data)) but without the '\0' terminator. More... | |
char * | UTIL_PrintableStringEx (const char *data, size_t size, char *buf, TUTIL_PrintableFlags flags, int width) |
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). More... | |
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. More... | |
void | UTIL_ReleaseBufferOnHeap (const void *ptr) |
__STDC_FORMAT_MACROS
#define CONN_CONTENT_TYPE_LEN 63 |
Definition at line 1070 of file ncbi_connutil.h.
#define ConnNetInfo_PostOverrideUserHeader ConnNetInfo_OverrideUserHeader |
Definition at line 640 of file ncbi_connutil.h.
#define CORE_CURRENT_FUNCTION 0 |
Get current function name.
Definition at line 179 of file ncbi_util.h.
#define CORE_LOGFILE_CUTOFF_LEVEL eLOG_Note |
Default CORE LOG cut off log level.
Definition at line 190 of file ncbi_util.h.
#define DEF_CONN_ARGS "" |
Definition at line 255 of file ncbi_connutil.h.
#define DEF_CONN_DEBUG_PRINTOUT "" |
Definition at line 300 of file ncbi_connutil.h.
#define DEF_CONN_EXTERNAL "" |
Definition at line 285 of file ncbi_connutil.h.
#define DEF_CONN_FIREWALL "" |
Definition at line 288 of file ncbi_connutil.h.
#define DEF_CONN_HOST "www.ncbi.nlm.nih.gov" |
Definition at line 246 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PROXY_HOST "" |
Definition at line 258 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PROXY_LEAK "" |
Definition at line 270 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PROXY_PASS "" |
Definition at line 267 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PROXY_PORT "" |
Definition at line 261 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PROXY_SKIP "" |
Definition at line 273 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PROXY_USER "" |
Definition at line 264 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_PUSH_AUTH "" |
Definition at line 276 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_REFERER 0 |
Definition at line 306 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_USER_HEADER "" |
Definition at line 303 of file ncbi_connutil.h.
#define DEF_CONN_HTTP_VERSION 0 |
Definition at line 297 of file ncbi_connutil.h.
#define DEF_CONN_LB_DISABLE "" |
Definition at line 294 of file ncbi_connutil.h.
#define DEF_CONN_LOCAL_IPS "LOCAL_IPS" |
Definition at line 334 of file ncbi_connutil.h.
#define DEF_CONN_LOCAL_IPS_DISABLE "NONE" |
Definition at line 336 of file ncbi_connutil.h.
#define DEF_CONN_MAX_TRY 3 |
Definition at line 282 of file ncbi_connutil.h.
#define DEF_CONN_PASS "" |
Definition at line 243 of file ncbi_connutil.h.
#define DEF_CONN_PATH "/Service/dispd.cgi" |
Definition at line 252 of file ncbi_connutil.h.
#define DEF_CONN_PORT 0/*default*/ |
Definition at line 249 of file ncbi_connutil.h.
#define DEF_CONN_REG_SECTION "CONN" |
Definition at line 234 of file ncbi_connutil.h.
#define DEF_CONN_REQ_METHOD "ANY" |
Definition at line 237 of file ncbi_connutil.h.
#define DEF_CONN_STATELESS "" |
Definition at line 291 of file ncbi_connutil.h.
#define DEF_CONN_TIMEOUT 30.0 |
Definition at line 279 of file ncbi_connutil.h.
#define DEF_CONN_USER "" |
Definition at line 240 of file ncbi_connutil.h.
#define EIO_N_STATUS 8 |
connection is / has been closed, EOF condition
Definition at line 141 of file ncbi_core.h.
#define fLOG_Full (fLOG_Level | fLOG_Module | fLOG_FileLine) |
Definition at line 299 of file ncbi_util.h.
#define fLOG_Short fLOG_Level |
Definition at line 298 of file ncbi_util.h.
Definition at line 81 of file ncbi_types.h.
Definition at line 82 of file ncbi_types.h.
Definition at line 147 of file ncbi_util.h.
Auxiliary plain macros to write message (maybe, with raw data) to the log.
Definition at line 138 of file ncbi_util.h.
#define MAX_CONTENT_TYPE_LEN (CONN_CONTENT_TYPE_LEN+1) |
Definition at line 1072 of file ncbi_connutil.h.
#define MT_LOCK_Do | ( | lk, | |
how | |||
) | ((lk) ? MT_LOCK_DoInternal((lk), (how)) : -1) |
Call "lk->handler(lk->data, how)".
lk | A handle previously obtained from MT_LOCK_Create |
how | Whether to lock (and how: read, write) or to unlock |
Definition at line 270 of file ncbi_core.h.
#define NCBI_BIGCOUNT_FORMAT_SPEC PRIu64 |
Definition at line 165 of file ncbi_types.h.
#define NCBI_BIGCOUNT_FORMAT_SPEC_HEX PRIx64 |
Definition at line 166 of file ncbi_types.h.
#define NCBI_BIGCOUNT_FORMAT_SPEC_HEX_X PRIX64 |
Definition at line 167 of file ncbi_types.h.
#define NCBI_CONNUTIL_DEPRECATED NCBI_DEPRECATED |
Definition at line 862 of file ncbi_connutil.h.
#define NCBI_EOWNERSHIP_DEFINED |
NCBI_ESWITCH_DEFINED
Definition at line 119 of file ncbi_types.h.
#define NCBI_ESWITCH_DEFINED |
Definition at line 97 of file ncbi_types.h.
#define NCBI_TIME_INFINITE ((TNCBI_Time)(-1)) |
Definition at line 147 of file ncbi_types.h.
#define REG_CONN_ARGS "ARGS" |
Definition at line 254 of file ncbi_connutil.h.
#define REG_CONN_DEBUG_PRINTOUT "DEBUG_PRINTOUT" |
Definition at line 299 of file ncbi_connutil.h.
#define REG_CONN_DISPD_DISABLE "DISPD_DISABLE" |
Definition at line 314 of file ncbi_connutil.h.
#define REG_CONN_EXTERNAL "EXTERNAL" |
Definition at line 284 of file ncbi_connutil.h.
#define REG_CONN_FIREWALL "FIREWALL" |
Definition at line 287 of file ncbi_connutil.h.
#define REG_CONN_HOST "HOST" |
Definition at line 245 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PROXY_HOST "HTTP_PROXY_HOST" |
Definition at line 257 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PROXY_LEAK "HTTP_PROXY_LEAK" |
Definition at line 269 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PROXY_PASS "HTTP_PROXY_PASS" |
Definition at line 266 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PROXY_PORT "HTTP_PROXY_PORT" |
Definition at line 260 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PROXY_SKIP "HTTP_PROXY_SKIP" |
Definition at line 272 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PROXY_USER "HTTP_PROXY_USER" |
Definition at line 263 of file ncbi_connutil.h.
#define REG_CONN_HTTP_PUSH_AUTH "HTTP_PUSH_AUTH" |
Definition at line 275 of file ncbi_connutil.h.
#define REG_CONN_HTTP_REFERER "HTTP_REFERER" |
Definition at line 305 of file ncbi_connutil.h.
#define REG_CONN_HTTP_USER_HEADER "HTTP_USER_HEADER" |
Definition at line 302 of file ncbi_connutil.h.
#define REG_CONN_HTTP_VERSION "HTTP_VERSION" |
Definition at line 296 of file ncbi_connutil.h.
#define REG_CONN_IMPLICIT_SERVER_TYPE "IMPLICIT_SERVER_TYPE" |
Definition at line 317 of file ncbi_connutil.h.
#define REG_CONN_LB_DISABLE "LB_DISABLE" |
Definition at line 293 of file ncbi_connutil.h.
#define REG_CONN_LBDNS_DEBUG DEF_CONN_REG_SECTION "_" "LBDNS_DEBUG" |
Definition at line 328 of file ncbi_connutil.h.
#define REG_CONN_LBDNS_DOMAIN DEF_CONN_REG_SECTION "_" "LBDNS_DOMAIN" |
Definition at line 327 of file ncbi_connutil.h.
#define REG_CONN_LBDNS_ENABLE "LBDNS_ENABLE" |
Definition at line 311 of file ncbi_connutil.h.
#define REG_CONN_LBDNS_HOST DEF_CONN_REG_SECTION "_" "LBDNS_HOST" |
Definition at line 329 of file ncbi_connutil.h.
#define REG_CONN_LBDNS_PORT DEF_CONN_REG_SECTION "_" "LBDNS_PORT" |
Definition at line 330 of file ncbi_connutil.h.
#define REG_CONN_LBSMD_DISABLE "LBSMD_DISABLE" |
Definition at line 310 of file ncbi_connutil.h.
#define REG_CONN_LINKERD_ENABLE "LINKERD_ENABLE" |
Definition at line 312 of file ncbi_connutil.h.
#define REG_CONN_LOCAL_ENABLE "LOCAL_ENABLE" |
Definition at line 309 of file ncbi_connutil.h.
#define REG_CONN_LOCAL_IPS DEF_CONN_REG_SECTION "_" DEF_CONN_LOCAL_IPS |
Definition at line 335 of file ncbi_connutil.h.
#define REG_CONN_LOCAL_SERVER DEF_CONN_REG_SECTION "_" "LOCAL_SERVER" |
Definition at line 324 of file ncbi_connutil.h.
#define REG_CONN_LOCAL_SERVICES DEF_CONN_REG_SECTION "_" "LOCAL_SERVICES" |
Definition at line 323 of file ncbi_connutil.h.
#define REG_CONN_MAX_TRY "MAX_TRY" |
Definition at line 281 of file ncbi_connutil.h.
#define REG_CONN_NAMERD_ENABLE "NAMERD_ENABLE" |
Definition at line 313 of file ncbi_connutil.h.
#define REG_CONN_PASS "PASS" |
Definition at line 242 of file ncbi_connutil.h.
#define REG_CONN_PATH "PATH" |
Definition at line 251 of file ncbi_connutil.h.
#define REG_CONN_PORT "PORT" |
Definition at line 248 of file ncbi_connutil.h.
#define REG_CONN_REQ_METHOD "REQ_METHOD" |
Definition at line 236 of file ncbi_connutil.h.
#define REG_CONN_SERVICE_NAME DEF_CONN_REG_SECTION "_" "SERVICE_NAME" |
Definition at line 320 of file ncbi_connutil.h.
#define REG_CONN_STATELESS "STATELESS" |
Definition at line 290 of file ncbi_connutil.h.
#define REG_CONN_TIMEOUT "TIMEOUT" |
Definition at line 278 of file ncbi_connutil.h.
#define REG_CONN_USER "USER" |
Definition at line 239 of file ncbi_connutil.h.
#define THIS_MODULE 0 |
Default for THIS_MODULE.
Definition at line 155 of file ncbi_util.h.
Definition at line 718 of file ncbi_util.h.
#define UTIL_PRINTABLE_WIDTH_MIN 80 /** Default minimum printable width */ |
Definition at line 717 of file ncbi_util.h.
#define UTIL_PrintableString | ( | d, | |
s, | |||
b, | |||
f | |||
) | UTIL_PrintableStringEx((d),(s),(b),(f),0) |
Same as UTIL_PrintableStringEx(..., 0) – i.e.
w/o width restrictions.
Definition at line 777 of file ncbi_util.h.
#define UTIL_ReleaseBuffer | ( | x | ) | /*void*/ |
Definition at line 805 of file ncbi_util.h.
#define UTIL_TcharToUtf8 | ( | x | ) | (x) |
Definition at line 803 of file ncbi_util.h.
#define UTIL_TcharToUtf8OnHeap | ( | x | ) | (x) |
Conversion from Unicode to UTF8, and back.
MSWIN-specific and internal.
Definition at line 802 of file ncbi_util.h.
#define UTIL_Utf8ToTchar | ( | x | ) | (x) |
Definition at line 804 of file ncbi_util.h.
typedef unsigned EBDebugPrintout |
Definition at line 167 of file ncbi_connutil.h.
typedef unsigned EBFWMode |
Definition at line 158 of file ncbi_connutil.h.
typedef unsigned EBProxyType |
Definition at line 176 of file ncbi_connutil.h.
typedef unsigned EBURLScheme |
Definition at line 148 of file ncbi_connutil.h.
typedef enum ENcbiOwnership EOwnership |
Ownership 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.
typedef enum ENcbiSwitch ESwitch |
Aux.
enum to set/unset/default various features.
typedef void(* FLOG_Cleanup) (void *data) |
Log cleanup callback.
data | Unspeficied data as passed to LOG_Create() or LOG_Reset() |
Definition at line 374 of file ncbi_core.h.
typedef void(* FLOG_Handler) (void *data, const SLOG_Message *mess) |
Log post callback.
data | Unspeficied data as passed to LOG_Create() or LOG_Reset() |
mess | Composed from arguments passed to LOG_WriteInternal() |
Definition at line 361 of file ncbi_core.h.
typedef void(* FMT_LOCK_Cleanup) (void *data) |
MT lock cleanup callback.
data | See "data" in MT_LOCK_Create() |
Definition at line 215 of file ncbi_core.h.
MT locking callback (operates like a [recursive] mutex or RW-lock).
data | See "data" in MT_LOCK_Create() |
how | As passed to MT_LOCK_Do() |
Definition at line 204 of file ncbi_core.h.
typedef void(* FREG_Cleanup) (void *data) |
Registry cleanup callback.
data | Unspecified data as passed to REG_Create or REG_Reset |
Definition at line 603 of file ncbi_core.h.
typedef int(* FREG_Get) (void *data, const char *section, const char *name, char *value, size_t value_size) |
Registry 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.
data | Unspecified data as passed to REG_Create or REG_Reset |
section | Section name to search |
name | Key name to search within the section |
value | Empty value passed in, found (if any) value out |
value_size | Size of "value" storage, must be greater than 0 |
Definition at line 561 of file ncbi_core.h.
typedef int(* FREG_Set) (void *data, const char *section, const char *name, const char *value, EREG_Storage storage) |
Registry setter callback.
Store the "value" in the registry "section" under the "name" key, and according to "storage".
data | Unspecified data as passed to REG_Create or REG_Reset |
section | Section name to add the key to |
name | Key name to add to the section |
value | Key value to associate with the key (NULL to deassociate, i.e. unset) |
storage | How to store the new setting, temporarily or permanently |
Definition at line 588 of file ncbi_core.h.
Definition at line 287 of file ncbi_core.h.
typedef struct MT_LOCK_tag* MT_LOCK |
Definition at line 171 of file ncbi_core.h.
typedef const struct SNcbiBlowfish* NCBI_BLOWFISH |
Opaque encryption / decryption context type.
Definition at line 56 of file ncbi_blowfish.h.
Definition at line 521 of file ncbi_core.h.
typedef struct STimeoutTag STimeout |
Timeout structure.
typedef unsigned int TConnectInitFlags |
Bitwise OR of EConnectInitFlag.
Definition at line 121 of file ncbi_core_cxx.hpp.
typedef unsigned int TLOG_FormatFlags |
bitwise OR of "ELOG_FormatFlag"
Definition at line 297 of file ncbi_util.h.
typedef pair<Uint8, double> CRateMonitor::TMark |
Definition at line 58 of file ncbi_misc.hpp.
typedef uint64_t TNCBI_BigCount |
Big unsigned integer for file size and position.
Definition at line 164 of file ncbi_types.h.
typedef unsigned int TNCBI_Size |
Fixed-size analogs of size_t and time_t (mainly for IPC)
NCBI_EOWNERSHIP_DEFINED
Definition at line 144 of file ncbi_types.h.
typedef unsigned int TNCBI_Time |
Definition at line 145 of file ncbi_types.h.
typedef unsigned TReqMethod |
Definition at line 137 of file ncbi_connutil.h.
typedef int TUTIL_PrintableFlags |
Bitwise "OR" of EUTIL_PrintableFlags.
Definition at line 727 of file ncbi_util.h.
enum EConnectInitFlag |
CONNECT_Init flags: which parameters to own / initialize.
Definition at line 115 of file ncbi_core_cxx.hpp.
enum ECORE_Username |
Select which username is the most preferable to obtain from the system.
Enumerator | |
---|---|
eCORE_UsernameCurrent | process UID |
eCORE_UsernameLogin | login UID |
eCORE_UsernameReal | real UID |
Definition at line 458 of file ncbi_util.h.
enum EDebugPrintout |
Enumerator | |
---|---|
eDebugPrintout_None | |
eDebugPrintout_Some | |
eDebugPrintout_Data |
Definition at line 161 of file ncbi_connutil.h.
enum EFWMode |
Definition at line 151 of file ncbi_connutil.h.
enum EIO_Event |
I/O event (or direction).
Definition at line 118 of file ncbi_core.h.
enum EIO_ReadMethod |
I/O read method.
Enumerator | |
---|---|
eIO_ReadPeek | 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_ReadPlain | read 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_ReadPersist | read 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.
enum EIO_Status |
I/O status.
Definition at line 132 of file ncbi_core.h.
enum EIO_WriteMethod |
I/O write method.
Enumerator | |
---|---|
eIO_WriteNone | invalid reserved opcode, not for use! |
eIO_WritePlain | write 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_WritePersist | write 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).
|
eIO_WriteOutOfBand | write out-of-band chunk of urgent data (if supp) |
Definition at line 99 of file ncbi_core.h.
enum ELOG_FormatFlag |
LOG formatting flags: what parts of the message to actually appear.
Definition at line 286 of file ncbi_util.h.
enum ELOG_Level |
Log severity level.
Enumerator | |
---|---|
eLOG_Trace | |
eLOG_Note | |
eLOG_Info | In C++ Toolkit "Info" is used, not "Note". |
eLOG_Warning | |
eLOG_Error | |
eLOG_Critical | |
eLOG_Fatal |
Definition at line 292 of file ncbi_core.h.
enum EMIME_Encoding |
Enumerator | |
---|---|
eENCOD_None | |
eENCOD_Url | |
eENCOD_Unknown |
Definition at line 1062 of file ncbi_connutil.h.
enum 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_Unknown |
Definition at line 1042 of file ncbi_connutil.h.
enum EMIME_Type |
Enumerator | |
---|---|
eMIME_T_Undefined | |
eMIME_T_NcbiData | |
eMIME_T_Text | |
eMIME_T_Application | |
eMIME_T_Unknown |
Definition at line 1030 of file ncbi_connutil.h.
enum EMT_Lock |
Set the lock/unlock callback function and its data for MT critical section.
Definition at line 180 of file ncbi_core.h.
enum ENcbiOwnership |
Ownership 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 | |
---|---|
eNoOwnership | No ownership is assumed. |
eTakeOwnership | An object can take ownership of another. |
eNoOwnership | |
eTakeOwnership | No ownership assumed. An object can take ownership of another |
Definition at line 134 of file ncbi_types.h.
enum ENcbiRequestID |
NCBI request ID enumerator.
Enumerator | |
---|---|
eNcbiRequestID_None | |
eNcbiRequestID_HitID | NCBI Hit ID. |
eNcbiRequestID_SID | NCBI Session ID. |
Definition at line 441 of file ncbi_util.h.
enum ENcbiSwitch |
Aux.
enum to set/unset/default various features.
Enumerator | |
---|---|
eOff | |
eOn | |
eDefault | |
eOff | |
eOn | |
eDefault |
Definition at line 109 of file ncbi_types.h.
enum EProxyType |
Enumerator | |
---|---|
fProxy_None | No $http_proxy / $https_proxy used. |
fProxy_Http | $http_proxy used |
fProxy_Https | $https_proxy used |
Definition at line 170 of file ncbi_connutil.h.
enum EREG_Storage |
Transient/Persistent storage.
Enumerator | |
---|---|
eREG_Transient | only in-memory storage while program runs |
eREG_Persistent | hard-copy storage across program runs |
Definition at line 528 of file ncbi_core.h.
enum EReqMethod |
Definition at line 116 of file ncbi_connutil.h.
enum EURLScheme |
Enumerator | |
---|---|
eURL_Unspec | |
eURL_Https | |
eURL_File | |
eURL_Http | |
eURL_Ftp |
Definition at line 140 of file ncbi_connutil.h.
enum EUTIL_PrintableFlags |
Enumerator | |
---|---|
fUTIL_PrintableFullOctal | No contactions in octals \ooo. |
eUTIL_PrintableFullOctal | deprecated |
fUTIL_PrintableNoNewLine | Do not include graphical newlines. |
eUTIL_PrintableNoNewLine | deprecated |
Definition at line 721 of file ncbi_util.h.
EIO_Status BUF_StripToPattern | ( | BUF | buffer, |
const void * | pattern, | ||
size_t | pattern_size, | ||
BUF * | discard, | ||
size_t * | n_discarded | ||
) |
Definition at line 3063 of file ncbi_connutil.c.
References buffer, s_BUF_IO(), and s_StripToPattern().
|
protected |
Definition at line 787 of file ncbi_core_cxx.cpp.
References eConnectInit_Intact, eConnectInit_OwnRegistry, CNcbiApplicationAPI::GetConfig(), CNcbiApplicationAPI::InstanceGuard(), NCBI_CATCH_ALL_X, NcbiSetupTls(), s_ConnectInit, and s_Init().
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 2997 of file ncbi_connutil.c.
References conn, s_CONN_IO(), and s_StripToPattern().
void CONNECT_Init | ( | const IRWRegistry * | reg = 0 , |
CRWLock * | lock = 0 , |
||
TConnectInitFlags | flag = eConnectInit_OwnNothing , |
||
FSSLSetup | ssl = 0 |
||
) |
Init [X]CONNECT library with the specified "reg" and "lock" (ownership for either or both can be detailed in the "flag" parameter).
reg | Registry to use, non-modifiable (none if NULL) |
lock | Lock to use (new lock will get created if NULL) |
flag | Ownership / initialization control |
ssl | TLS provider to use for SSL (ignored if eConnectInit_NoSSL; 0 selects the default provider) |
Definition at line 766 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().
int ConnNetInfo_AddPath | ( | SConnNetInfo * | net_info, |
const char * | path | ||
) |
Definition at line 1595 of file ncbi_connutil.c.
References assert, info, memmove, memrchr, s_InfoIsValid(), and x_SepAndLen().
Referenced by x_SetupConnectionParams().
int ConnNetInfo_AppendArg | ( | SConnNetInfo * | net_info, |
const char * | arg, | ||
const char * | val | ||
) |
Definition at line 1790 of file ncbi_connutil.c.
References info, s_InfoIsValid(), val, and x_AppendArg().
Referenced by CRPCClient< TRequest, TReply >::x_FillConnNetInfo().
int ConnNetInfo_AppendUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1023 of file ncbi_connutil.c.
References info, s_InfoIsValid(), and x_StrcatCRLF().
Referenced by s_ModifyUserHeader(), and x_FixupUserHeader().
Definition at line 408 of file ncbi_connutil.c.
References CORE_LOGF_X, eLOG_Warning, str(), strcasecmp, strnlen, and toupper().
Referenced by ConnNetInfo_CreateInternal(), SERV_LBDNS_Open(), x_ErrorHeaderOnly(), x_IsMapperConfigured(), x_NcbiSetupTls(), x_ParseFirewall(), and x_UnsafeRedirectOK().
SConnNetInfo* ConnNetInfo_Clone | ( | const SConnNetInfo * | net_info | ) |
Definition at line 2092 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().
SConnNetInfo* ConnNetInfo_Create | ( | const char * | service | ) |
Definition at line 989 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().
void ConnNetInfo_DeleteAllArgs | ( | SConnNetInfo * | net_info, |
const char * | args | ||
) |
Definition at line 1910 of file ncbi_connutil.c.
References info, s_InfoIsValid(), and x_DeleteAllArgs().
int ConnNetInfo_DeleteArg | ( | SConnNetInfo * | net_info, |
const char * | arg | ||
) |
Definition at line 1887 of file ncbi_connutil.c.
References info, s_InfoIsValid(), and x_DeleteArg().
Referenced by ConnNetInfo_SetupStandardArgs().
void ConnNetInfo_DeleteUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1296 of file ncbi_connutil.c.
References eUserHeaderOp_Delete, info, s_ModifyUserHeader(), and verify.
Referenced by s_Adjust(), s_CreateHttpConnector(), s_Open(), s_Resolve(), x_FixupUserHeader(), and x_SetRequestIDs().
void ConnNetInfo_Destroy | ( | SConnNetInfo * | net_info | ) |
Definition at line 2456 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(), SFileTrackAPI::StartUpload(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), CEutilsClient::x_GetHostName(), CHttpRequest::x_InitConnection(), x_IsUrlAccessible(), and x_SetupHttpProxy().
int ConnNetInfo_ExtendUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1289 of file ncbi_connutil.c.
References eUserHeaderOp_Extend, info, and s_ModifyUserHeader().
Referenced by ConnNetInfo_SetupStandardArgs(), s_Connect(), s_Open(), SERV_DISPD_Open(), SERV_NAMERD_Open(), and x_FixupUserHeader().
const char* ConnNetInfo_GetArgs | ( | const SConnNetInfo * | net_info | ) |
Definition at line 1725 of file ncbi_connutil.c.
References info, and s_InfoIsValid().
Referenced by s_Adjust(), s_Connect(), and x_UpdateDtabInArgs().
const char* ConnNetInfo_GetValue | ( | const char * | service, |
const char * | param, | ||
char * | value, | ||
size_t | value_size, | ||
const char * | def_value | ||
) |
Definition at line 374 of file ncbi_connutil.c.
References free(), NCBI_HasSpaces(), s_GetValue(), SERV_ServiceName(), strncasecmp, rapidjson::value, and verify.
Referenced by CEUtils_Request::GetBaseURL(), s_LoadServices(), s_LoadSingleService(), and CEutilsClient::x_GetHostName().
void ConnNetInfo_Log | ( | const SConnNetInfo * | net_info, |
ELOG_Level | sev, | ||
LOG | log | ||
) |
Definition at line 2282 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().
int ConnNetInfo_OverrideUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1275 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().
int ConnNetInfo_ParseURL | ( | SConnNetInfo * | net_info, |
const char * | url | ||
) |
Definition at line 1303 of file ncbi_connutil.c.
References assert, eReqMethod_Connect, eReqMethod_v1, eURL_File, eURL_Http, eURL_Https, eURL_Unspec, if(), info, isdigit(), kDigits, len, memmove, memrchr, NCBI_HasSpaces(), s_InfoIsValid(), strncasecmp, 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().
int ConnNetInfo_PostOverrideArg | ( | SConnNetInfo * | net_info, |
const char * | arg, | ||
const char * | val | ||
) |
Definition at line 1933 of file ncbi_connutil.c.
References info, s_InfoIsValid(), val, x_AppendArg(), and x_DeleteAllArgs().
Referenced by CRPCClient< TRequest, TReply >::x_FillConnNetInfo(), x_SetupFromNamerd(), and x_UpdateDtabInArgs().
int ConnNetInfo_PreOverrideArg | ( | SConnNetInfo * | net_info, |
const char * | arg, | ||
const char * | val | ||
) |
Definition at line 1918 of file ncbi_connutil.c.
References info, s_InfoIsValid(), val, x_DeleteAllArgs(), and x_PrependArg().
Referenced by ConnNetInfo_SetupStandardArgs(), s_AdjustNetParams(), and x_SetupConnectionParams().
int ConnNetInfo_PreOverrideUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1282 of file ncbi_connutil.c.
References eUserHeaderOp_PreOverride, info, and s_ModifyUserHeader().
Referenced by x_SetHttpHostTag().
int ConnNetInfo_PrependArg | ( | SConnNetInfo * | net_info, |
const char * | arg, | ||
const char * | val | ||
) |
Definition at line 1844 of file ncbi_connutil.c.
References info, s_InfoIsValid(), val, and x_PrependArg().
int ConnNetInfo_PrependUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1032 of file ncbi_connutil.c.
References info, s_InfoIsValid(), and x_StrcatCRLF().
Referenced by s_ModifyUserHeader().
int ConnNetInfo_SetArgs | ( | SConnNetInfo * | net_info, |
const char * | args | ||
) |
Definition at line 1694 of file ncbi_connutil.c.
References info, s_InfoIsValid(), and x_SetArgs().
Referenced by CConnTest::HttpOkay(), s_AdjustNetParams(), s_CreateConnector(), s_HttpConnectorBuilder(), s_Open(), and x_Redirect().
int ConnNetInfo_SetFrag | ( | SConnNetInfo * | net_info, |
const char * | frag | ||
) |
Definition at line 1700 of file ncbi_connutil.c.
References info, and s_InfoIsValid().
Referenced by s_CreateHttpConnector().
int ConnNetInfo_SetPath | ( | SConnNetInfo * | net_info, |
const char * | path | ||
) |
Definition at line 1556 of file ncbi_connutil.c.
References info, memmove, s_InfoIsValid(), and x_SepAndLen().
Referenced by s_AdjustNetParams(), s_HttpConnectorBuilder(), x_SetupConnectionParams(), and x_SetupFromNamerd().
int ConnNetInfo_SetTimeout | ( | SConnNetInfo * | net_info, |
const STimeout * | timeout | ||
) |
Definition at line 2442 of file ncbi_connutil.c.
References info, kDefaultTimeout, kInfiniteTimeout, and s_InfoIsValid().
Referenced by CTaxon1::Init(), and CHttpRequest::x_InitConnection().
int ConnNetInfo_SetupStandardArgs | ( | SConnNetInfo * | net_info, |
const char * | service | ||
) |
Definition at line 1991 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().
int ConnNetInfo_SetUserHeader | ( | SConnNetInfo * | net_info, |
const char * | header | ||
) |
Definition at line 1009 of file ncbi_connutil.c.
References free(), info, s_InfoIsValid(), and x_StrcatCRLF().
Referenced by CConnTest::HttpOkay(), NcbiOpenURL(), s_Connect(), s_CreateConnector(), and s_SocketConnectorBuilder().
char* ConnNetInfo_URL | ( | const SConnNetInfo * | net_info | ) |
Definition at line 2398 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().
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 720 of file ncbi_util.c.
References g_CORE_GetAppName.
Referenced by ConnNetInfo_SetupStandardArgs(), and x_FixupUserHeader().
MT_LOCK CORE_GetLOCK | ( | void | ) |
Get the lock handle that is to be used by the core internals.
Definition at line 111 of file ncbi_util.c.
References g_CORE_MT_Lock.
Referenced by x_InitLocking().
LOG CORE_GetLOG | ( | void | ) |
Get the log handle that is to be used by the core internals (CORE LOG).
Definition at line 138 of file ncbi_util.c.
References g_CORE_Log.
Referenced by NcbiOpenURL(), s_Connect(), s_DoLog(), s_SocketConnectorBuilder(), and s_VT_Open().
char* CORE_GetNcbiRequestID | ( | ENcbiRequestID | reqid | ) |
Obtain current NCBI request ID (if known, per thread).
Definition at line 747 of file ncbi_util.c.
References assert, CORE_LOCK_READ, CORE_UNLOCK, eNcbiRequestID_HitID, eNcbiRequestID_SID, g_CORE_GetRequestID, out(), strdup, and x_getenv.
Referenced by x_SetRequestIDs().
const char* CORE_GetPlatform | ( | void | ) |
Return NCBI platrofm ID (if known).
Definition at line 732 of file ncbi_util.c.
References HOST.
Referenced by ConnNetInfo_SetupStandardArgs().
REG CORE_GetREG | ( | void | ) |
Get the registry that is to be used by the core internals.
Definition at line 709 of file ncbi_util.c.
References g_CORE_Registry.
Referenced by GetAsnDataViaHTTP().
const char* CORE_GetUsername | ( | char * | buf, |
size_t | bufsize | ||
) |
Equivalent to CORE_GetUsernameEx(buf, bufsize, eNCBI_UsernameLogin) except that it always returns non-empty "buf" when successful, or NULL otherwise (i.e.
when the username cannot be either obtained or stored).
Definition at line 966 of file ncbi_util.c.
References buf, bufsize, CORE_GetUsernameEx(), and eCORE_UsernameLogin.
Referenced by s_GetUsername(), and SetDiagUserAndHost().
const char* CORE_GetUsernameEx | ( | char * | buf, |
size_t | bufsize, | ||
ECORE_Username | username | ||
) |
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.
buf | Pointer to buffer to store the user name at |
bufsize | Size of buffer in bytes |
username | Selects which username to get (most preferably) |
Definition at line 805 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().
size_t CORE_GetVMPageSize | ( | void | ) |
Obtain virtual memory page size.
Definition at line 979 of file ncbi_util.c.
References NCBI_DEFAULT_PAGE_SIZE, NCBI_OS_UNIX, and si.
Referenced by LBSM_Shmem_Create().
void CORE_Msdelay | ( | unsigned long | ms | ) |
Delay execution of the current thread by the specified number of milliseconds.
Definition at line 1023 of file ncbi_util.c.
Referenced by s_CORE_MT_Lock_default_handler(), s_Shmem_Lock(), s_Shmem_TryWLock(), and s_Shmem_WLock().
void CORE_SetLOCK | ( | MT_LOCK | lk | ) |
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.
lk | MT-Lock as created by MT_LOCK_Create (NULL "lk" drops the internal MT-Lock) |
Definition at line 100 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().
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).
lg | LOG handle as returned by LOG_Create, or NULL to stop logging |
Definition at line 123 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().
void CORE_SetLOGFILE | ( | FILE * | fp, |
int | auto_close | ||
) |
Same as CORE_SetLOGFILE_Ex(fp, CORE_LOGFILE_CUTOFF_LEVEL, eLOG_Fatal, auto_close).
Definition at line 156 of file ncbi_util.c.
References CORE_LOGFILE_CUTOFF_LEVEL, CORE_SetLOGFILE_Ex(), eLOG_Fatal, and fp.
void CORE_SetLOGFILE_Ex | ( | FILE * | fp, |
ELOG_Level | cut_off, | ||
ELOG_Level | fatal_err, | ||
int | auto_close | ||
) |
Standard logging (CORE LOG) to the specified file stream.
fp | The file stream to log to |
cut_off | Do not post messages with severity levels lower than specified |
fatal_err | Severity greater than or equal to the specified level always posts to log, and then aborts the application |
auto_close | Whether to call "fclose(fp)" when the CORE LOG is reset/destroyed |
Definition at line 144 of file ncbi_util.c.
References CORE_SetLOG(), fp, lg(), LOG_Create(), and LOG_ToFILE_Ex().
Referenced by CORE_SetLOGFILE(), and CORE_SetLOGFILE_NAME_Ex().
Same as CORE_SetLOGFILE_NAME_Ex(logfile, CORE_LOGFILE_CUTOFF_LEVEL, eLOG_Fatal).
Definition at line 180 of file ncbi_util.c.
References CORE_LOGFILE_CUTOFF_LEVEL, CORE_SetLOGFILE_NAME_Ex(), and eLOG_Fatal.
int CORE_SetLOGFILE_NAME_Ex | ( | const char * | logfile, |
ELOG_Level | cut_off, | ||
ELOG_Level | fatal_err | ||
) |
Same as CORE_SetLOGFILE_Ex(fopen(logfile, "a"), cut_off, fatal_err, TRUE).
logile | Filename to write the log into |
cut_off | Do not post messages with severity levels lower than specified |
fatal_err | Severity greater than or equal to the specified level always posts to log, and then aborts the application |
Definition at line 164 of file ncbi_util.c.
References CORE_LOGF_ERRNO_X, CORE_SetLOGFILE_Ex(), eLOG_Error, and fp.
Referenced by CORE_SetLOGFILE_NAME().
TLOG_FormatFlags CORE_SetLOGFormatFlags | ( | TLOG_FormatFlags | flags | ) |
Definition at line 190 of file ncbi_util.c.
References flags, and s_LogFormatFlags.
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.
rg | Registry handle as returned by REG_Create() |
Definition at line 696 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().
|
inline |
Monitor position progressing in time, calculate speed and estimate time to complete the job (when the final size is known).
minspan | minimal time distance between marks (must be greater than 0) |
maxspan | maximal time span covered by measurements (older marks popped out) |
weight | for weighted rate calculations (current:remaining ratio), must be within the interval (0, 1) (excluding both ends); a value close to one (e.g. 0.9) makes recent marks more significant |
precision | fraction of minspan to consider sufficient to add a next mark, must be within the interval (0, 1] (excluding 0 but including 1) |
Definition at line 73 of file ncbi_misc.hpp.
|
inline |
Definition at line 55 of file ncbi_service.hpp.
CTimeout/STimeout adapters.
cto | Timeout value to convert. |
sto | Variable to receive a numeric timeout value. |
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().
Definition at line 215 of file ncbi_core_cxx.hpp.
References CTimeout::eDefault, CTimeout::eInfinite, kDefaultTimeout, kInfiniteTimeout, STimeoutTag::sec, and STimeoutTag::usec.
Referenced by s_ConnectToNamedPipe(), and CNetCacheWriter::TransmitImpl().
double CRateMonitor::GetETA | ( | void | ) | const |
How long it will take to complete, at the current rate.
Definition at line 163 of file ncbi_misc.cpp.
References CRateMonitor::GetPos(), CRateMonitor::GetRate(), CRateMonitor::kMinSpan, and CRateMonitor::m_Size.
|
inline |
Definition at line 60 of file ncbi_service.hpp.
References CSERV_Info::m_Host.
|
inline |
How fast the average pace has been so far, in positions per time unit.
Definition at line 153 of file ncbi_misc.hpp.
References CRateMonitor::GetTime(), and CRateMonitor::m_Data.
Referenced by CRateMonitor::GetRate().
|
inline |
Definition at line 61 of file ncbi_service.hpp.
References CSERV_Info::m_Port.
|
inline |
Get current progress position (position 0 when job starts)
Definition at line 141 of file ncbi_misc.hpp.
References CRateMonitor::m_Data.
Referenced by CRateMonitor::GetETA(), and CRateMonitor::GetTimeRemaining().
double CRateMonitor::GetRate | ( | void | ) | const |
How 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().
|
inline |
Definition at line 62 of file ncbi_service.hpp.
References CSERV_Info::m_Rate.
|
inline |
Get size previously set.
Definition at line 85 of file ncbi_misc.hpp.
References CRateMonitor::m_Size.
|
inline |
Get current time (time 0.0 when job starts)
Definition at line 147 of file ncbi_misc.hpp.
References CRateMonitor::m_Data.
Referenced by CRateMonitor::GetPace().
double CRateMonitor::GetTimeRemaining | ( | void | ) | const |
How long it will take to complete, at the average pace.
Definition at line 180 of file ncbi_misc.cpp.
References CRateMonitor::GetPos(), CRateMonitor::kMinSpan, CRateMonitor::m_Data, and CRateMonitor::m_Size.
|
inline |
Definition at line 63 of file ncbi_service.hpp.
References CSERV_Info::m_Type.
const char* IO_StatusStr | ( | EIO_Status | status | ) |
Get the text form of an enum status value.
status | An enum value to get the text form for |
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().
Increment internal reference count by 1, then return "lg".
lg | A log handle previously obtained from LOG_Create |
Definition at line 353 of file ncbi_core.c.
References lg(), LOG_LOCK_WRITE, LOG_UNLOCK, and LOG_VALID.
char* LOG_ComposeMessage | ( | const SLOG_Message * | mess, |
TLOG_FormatFlags | flags | ||
) |
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
mess | Broken down message |
flags | Which fields of "mess" to use |
Definition at line 426 of file ncbi_util.c.
References assert, 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(), t, UTIL_PRINTABLE_WIDTH, UTIL_PrintableStringEx(), and UTIL_PrintableStringSize().
Referenced by s_LOG_FileHandler().
LOG LOG_Create | ( | void * | data, |
FLOG_Handler | handler, | ||
FLOG_Cleanup | cleanup, | ||
MT_LOCK | lock | ||
) |
Create a new LOG (with an internal reference count set to 1).
data | Unspecified data to call "handler" and "cleanup" with |
handler | Log post callback |
cleanup | Cleanup callback |
lock | Protective MT lock (may be NULL) |
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 LOG_cxx2c | ( | void | ) |
Create LOG on top of C++ Toolkit CNcbiDiag.
Definition at line 349 of file ncbi_core_cxx.cpp.
References _TRACE, LOG_Create(), s_LOG_Handler(), and s_TraceLog.
Referenced by s_Init(), CBiosampleChkApp::Setup(), CTAbleValApp::Setup(), and CTLSApp::Setup().
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".
lg | A log handle previously obtained from LOG_Create |
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().
const char* LOG_LevelStr | ( | ELOG_Level | level | ) |
Obtain verbal representation of an enum level value.
level | An enum value to get the text form for |
Definition at line 294 of file ncbi_core.c.
References assert, eLOG_Fatal, and eLOG_Trace.
Referenced by LOG_ComposeMessage().
LOG LOG_Reset | ( | LOG | lg, |
void * | data, | ||
FLOG_Handler | handler, | ||
FLOG_Cleanup | cleanup | ||
) |
Reset the "lg" to use the new "data", "handler" and "cleanup".
lg | A log handle previously obtained from LOG_Create |
data | New user data |
handler | New log post callback |
cleanup | New cleanup callback |
Definition at line 332 of file ncbi_core.c.
References cleanup(), data, lg(), LOG_LOCK_WRITE, LOG_UNLOCK, and LOG_VALID.
Referenced by LOG_Delete(), and LOG_ToFILE_Ex().
Same as LOG_ToFILEx(lg, fp, eLOG_Trace, eLOG_Fatal, auto_close).
Definition at line 681 of file ncbi_util.c.
References eLOG_Fatal, eLOG_Trace, fp, lg(), and LOG_ToFILE_Ex().
void LOG_ToFILE_Ex | ( | LOG | lg, |
FILE * | fp, | ||
ELOG_Level | cut_off, | ||
ELOG_Level | fatal_err, | ||
int | auto_close | ||
) |
LOG_Reset specialized to log to a "FILE*" stream using LOG_ComposeMessage.
lg | Created by LOG_Create |
fp | The file stream to log to |
cut_off | Do not post messages with severity levels lower than specified |
fatal_err | Severity greater or equal to "fatal_err" always logs and aborts the program |
auto_close | Whether to call "fclose(fp)" when the LOG is reset/destroyed |
Definition at line 653 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().
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().
code | Error code of the message |
subcode | Error subcode of the message |
level | The message severity |
module | Module name (can be NULL) |
func | Function name (can be NULL) |
file | Source file name (can be NULL) |
line | Source line within the file (can be 0 to omit the line number) |
message | Message content |
raw_data | Raw data to log (can be NULL) |
raw_size | Size of the raw data (can be zero) |
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().
void LOG_WriteInternal | ( | LOG | lg, |
const SLOG_Message * | mess | ||
) |
Write message (perhaps with raw data attached) to the log by calling "lg->handler(lg->data, mess)".
lg | A log handle previously obtained from LOG_Create |
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().
void CRateMonitor::Mark | ( | Uint8 | pos, |
double | time | ||
) |
Submit a mark of the job progress.
pos | current position (0-based) |
time | time spent from the beginning of the job (since time 0.0) |
Definition at line 71 of file ncbi_misc.cpp.
References CRateMonitor::kMaxSpan, CRateMonitor::kSpan, CRateMonitor::m_Data, and CRateMonitor::m_Rate.
char* MIME_ComposeContentTypeEx | ( | EMIME_Type | type, |
EMIME_SubType | subtype, | ||
EMIME_Encoding | encoding, | ||
char * | buf, | ||
size_t | bufsize | ||
) |
Definition at line 3293 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().
int MIME_ParseContentTypeEx | ( | const char * | str, |
EMIME_Type * | type, | ||
EMIME_SubType * | subtype, | ||
EMIME_Encoding * | encoding | ||
) |
Definition at line 3345 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().
Increment internal reference count by 1, then return "lk".
lk | A handle previously obtained from MT_LOCK_Create |
Definition at line 217 of file ncbi_core.c.
References MT_LOCK_tag::count, eMT_Lock, eMT_Unlock, g_CORE_MT_Lock_default, MT_LOCK_Do, and MT_LOCK_VALID.
Referenced by LOG_Create(), and REG_Create().
MT_LOCK MT_LOCK_Create | ( | void * | data, |
FMT_LOCK_Handler | handler, | ||
FMT_LOCK_Cleanup | cleanup | ||
) |
Create a new MT lock (with an internal reference count set to 1).
data | Unspecified data to call "handler" and "cleanup" with |
handler | Locking callback |
cleanup | Cleanup callback |
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().
Convert a C++ Toolkit lock object to an MT_LOCK lock.
lock | Existing lock to convert (if NULL a new CRWLock will be used) |
pass_ownership | True if the ownership of non-NULL lock gets passed to new MT_LOCK |
Definition at line 442 of file ncbi_core_cxx.cpp.
References _TRACE, MT_LOCK_Create(), NStr::PtrToString(), s_LOCK_Cleanup(), s_LOCK_Handler(), and s_TraceLock.
Referenced by CMergeyApp::Run(), and s_Init().
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".
lk | A handle previously obtained from MT_LOCK_Create |
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().
Definition at line 260 of file ncbi_core.c.
References MT_LOCK_tag::data, MT_LOCK_tag::handler, and MT_LOCK_VALID.
void NcbiBlowfishDecrypt | ( | NCBI_BLOWFISH | ctx, |
Uint8 * | data | ||
) |
Decrypt a 64-bit of cipher data pointed to by "data" back into the clear text stored at the same location.
ctx | Context from NcbiBlowfishInit() |
data | Cipher data replaced with clear text |
Definition at line 261 of file ncbi_blowfish.c.
void NcbiBlowfishEncrypt | ( | NCBI_BLOWFISH | ctx, |
Uint8 * | text | ||
) |
Encrypt a 64-bit block of data pointed to by "text" with an encrypted scrambled cipher data stored back at the same location.
ctx | Context from NcbiBlowfishInit() |
text | Clear text replaced with cipher data |
Definition at line 220 of file ncbi_blowfish.c.
References BF, F(), n, SNcbiBlowfish::P, SizeOf, and t.
Referenced by NcbiBlowfishInit().
void NcbiBlowfishFini | ( | NCBI_BLOWFISH | ctx | ) |
Destroy the context created by NcbiBlowfishInit().
Definition at line 354 of file ncbi_blowfish.c.
References free().
NCBI_BLOWFISH NcbiBlowfishInit | ( | const void * | key, |
size_t | keylen | ||
) |
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.
const char* NcbiMessagePlusError | ( | int * | dynamic, |
const char * | message, | ||
int | error, | ||
const char * | descr | ||
) |
Add current "error" (and maybe its description) to the message: <message>[ {error=[[<error>][,]][<descr>]}].
dynamic | [inout] non-zero pointed value means message was allocated from heap |
message | [in] message text (can be NULL) |
error | [in] error code (if it is zero, then use "descr" only if non-NULL/empty) |
descr | [in] error description (if NULL, then use "strerror(error)" if error!=0) |
Definition at line 334 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().
Definition at line 48 of file ncbi_types.c.
References int, ms(), STimeoutTag::sec, and STimeoutTag::usec.
Referenced by CPipe::ExecWait(), and CSeqUtils::GetAccessionPlacementsMsec().
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().
Increment internal reference count by 1, then return "rg".
rg | Registry handle as previously obtained from REG_Create |
Definition at line 528 of file ncbi_core.c.
References REG_tag::count, REG_LOCK_WRITE, REG_UNLOCK, and REG_VALID.
REG REG_Create | ( | void * | data, |
FREG_Get | get, | ||
FREG_Set | set, | ||
FREG_Cleanup | cleanup, | ||
MT_LOCK | lock | ||
) |
Create a new registry (with an internal reference count set to 1).
data | Unspecified data to call "set", "get" and "cleanup" with |
get | Getter callback |
set | Setter callback |
cleanup | Cleanup callback |
lock | Protective MT lock (may be NULL) |
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 REG_cxx2c | ( | const IRWRegistry * | reg, |
bool | pass_ownership = false |
||
) |
Convert a C++ Toolkit read-only registry object to a REG registry.
reg | A C++ toolkit registry, on top of which new REG registry is to be created |
pass_ownership | True if the ownership of "reg" gets passed to new REG |
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 REG_cxx2c | ( | IRWRegistry * | reg, |
bool | pass_ownership = false |
||
) |
Convert a C++ Toolkit registry object to a REG registry.
reg | A C++ toolkit registry, on top of which new REG registry is to be created |
pass_ownership | True if the ownership of "reg" gets passed to new REG |
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().
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".
rg | Registry handle as previously obtained from REG_Create |
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().
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).
rg | Registry handle as previously obtained from REG_Create |
section | Registry section name |
name | Registry entry name |
value | Buffer to receive the value of the requested entry, must be non-NULL |
value_size | Maximal size of buffer "value", must be greater than 0 |
def_value | Default value (none if passed NULL or "") |
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().
void REG_Reset | ( | REG | rg, |
void * | data, | ||
FREG_Get | get, | ||
FREG_Set | set, | ||
FREG_Cleanup | cleanup, | ||
int | do_cleanup | ||
) |
Reset the registry handle to use the new "data", "set", "get", and "cleanup".
rg | Registry handle as previously obtained from REG_Create |
data | New user data |
get | New getter callback |
set | New setter callback |
cleanup | New cleanup callback |
do_cleanup | Whether to call old cleanup (if any specified) for old data |
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().
int REG_Set | ( | REG | rg, |
const char * | section, | ||
const char * | name, | ||
const char * | value, | ||
EREG_Storage | storage | ||
) |
Store the "value" into the registry section "section" under the key "name", and according to "storage".
rg | Registry handle as previously obtained from REG_Create |
section | Section name to store the value into |
name | Name to store the value under |
value | The value to store (NULL to unset the parameter) |
storage | Whether to store temporarily or permanently |
Definition at line 604 of file ncbi_core.c.
References REG_tag::data, REG_LOCK_READ, REG_UNLOCK, REG_VALID, REG_tag::set, and rapidjson::value.
Referenced by g_CORE_RegistrySET().
vector<CSERV_Info> SERV_GetServers | ( | const string & | service, |
TSERV_TypeOnly | types = fSERV_Any |
||
) |
Get the servers for a given service.
[in] | service | Service name |
[in] | types | Which service types to obtain |
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().
|
inline |
Set size of the anticipated job, clear all prior measurements.
Definition at line 133 of file ncbi_misc.hpp.
References CRateMonitor::m_Data, CRateMonitor::m_Rate, CRateMonitor::m_Size, and ncbi::grid::netcache::search::fields::size.
EIO_Status SOCK_StripToPattern | ( | SOCK | sock, |
const void * | pattern, | ||
size_t | pattern_size, | ||
BUF * | discard, | ||
size_t * | n_discarded | ||
) |
Definition at line 3028 of file ncbi_connutil.c.
References s_SOCK_IO(), and s_StripToPattern().
Referenced by s_ReadHeader(), x_ReadChunkHead(), and x_ReadChunkTail().
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 2714 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().
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 2479 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().
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 | ||
) |
Definition at line 3193 of file ncbi_connutil.c.
References 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 | ||
) |
Definition at line 3134 of file ncbi_connutil.c.
References assert, s_HexChar(), and VALID_URL_SYMBOL.
Referenced by s_Read(), and URL_Decode().
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 | ||
) |
Definition at line 3246 of file ncbi_connutil.c.
References URL_EncodeEx().
Referenced by s_Connect(), s_VT_Write(), URL_Connect(), and x_UpdateDtabInArgs().
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 | ||
) |
Definition at line 3206 of file ncbi_connutil.c.
References assert, and s_EncodeTable.
Referenced by URL_Encode().
Calculate/Update Adler-32 checksum NB: Initial checksum is "1".
checksum | Checksum to update (start with 1) |
ptr | Block of data |
len | Size of block of data |
Definition at line 1178 of file ncbi_util.c.
References a, ADJUST_ADLER, b, data, FINALIZE_ADLER, i, len, and MAXLEN_ADLER.
Referenced by s_VerifyChecksum().
Calculate/Update CRC-32 checksum NB: Initial checksum is "0".
checksum | Checksum to update (start with 0) |
ptr | Block of data |
len | Size of block of data |
Definition at line 1153 of file ncbi_util.c.
References data, i, len, and s_CRC32Table.
Referenced by s_VerifyChecksum().
void* UTIL_GenerateHMAC | ( | const SHASH_Descriptor * | hash, |
const void * | text, | ||
size_t | text_len, | ||
const void * | key, | ||
size_t | key_len, | ||
void * | digest | ||
) |
Generate an RFC2401 digest (HMAC).
hash | Hash function descriptor |
text | Text to get a digest for |
text_key | Byte length of the text |
key | Key to hash the text with |
key_len | Byte length of the key (recommended to be no less than "hash::digest_len") |
digest | The resultant HMAC storage (must be of an adequate size) |
Definition at line 1224 of file ncbi_util.c.
References ctx, free(), i, ncbi::grid::netcache::search::fields::key, malloc(), pad(), text(), and tmp.
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 1420 of file ncbi_util.c.
References strcasecmp, and util::strcmp().
Shortcut for UTIL_MatchesMaskEx(text, mask, 1), that is matching is done case-insensitively for the letters (a-z).
Definition at line 1382 of file ncbi_util.c.
References mask, text(), and UTIL_MatchesMaskEx().
Referenced by s_LoadServices(), and x_NameMatch().
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.
text | A text to match |
mask | A text pattern, which, along with ordinary characters that must match literally in the given "text", can contain: '*' to denote any sequence of characters (including none), '?' to denote any single character, and character classes in the forms of "[...]" or "[!...]" that must MATCH or NOT MATCH, respectively, a single character in "text". To cancel the special meaning of '*', '?' or '[', they can be prepended with a backslash '\' (the backslash in front of other characters does not change their meaning, so "\\\\" matches one graphical backslash in the "text"). Within a character class, to have its literal meaning a closing square bracket ']' must be used at the first position, whereas '?', '*', '[, and '\' stand just for themselves. Two characters separated by a minus sign '-' denote a range that can be used for contraction to include all characters in between: "[A-F]" is equivalent to "[ABCDEF]". For its literal meaning, the minus sign '-' can be used either at the very first position, or the last position before the closing bracket ']'. To have a range that begins with an exclamation point, one has to use a dummy empty range followed by that range with '!'. Examples: "!" matches a single '!' (note that just "[!]" is invalid); "[!!]" matches any character, which is not an exclamation point '!'; "[][!]" matches ']', '[', and '!'; "[!][-]" matches any character except for ']', '[', and '-'; "[-]" matches a minus sign '-' (same as '-' just by itself); "[?*\\]" matches either '?', or '*', or a backslash '\'; "[]-\\]" matches nothing as it defines an empty range (from ']' to '\'); "\\[a]\\*" matches a literal substring "[a]*"; "[![a-]" matches any char but '[', 'a' or '-' (same as "[!-[a]"; but not "[![-a]", which defines an empty range, thus matches any char!); "[]A]" matches either ']' or 'A' (NB: "[A]]" matches a substring "A]"); "[0-9-]" matches any decimal digit or a minus sign '-' (same: "[-0-9]"); "[9-0!-$]" matches '!', '"', '#', and '$' (as first range matches nothing). |
ignore_case | Whether to ignore the case of the letters (a-z) in comparisons |
Definition at line 1375 of file ncbi_util.c.
References mask, text(), and x_MatchesMask().
Referenced by UTIL_MatchesMask().
char* UTIL_NcbiLocalHostName | ( | char * | hostname | ) |
Cut off well-known NCBI domain suffix out of the passed "hostname".
hostname | Hostname to shorten (if possible) |
Definition at line 1388 of file ncbi_util.c.
References assert, i, len, and strncasecmp.
Referenced by x_ClientAddress().
char* UTIL_PrintableStringEx | ( | const char * | data, |
size_t | size, | ||
char * | buf, | ||
TUTIL_PrintableFlags | flags, | ||
int | width | ||
) |
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).
data | Block of data (NULL causes NULL to return regardless of "size" or "buf") |
size | Size of block (0 causes strlen(data) to be used) |
buf | Buffer to store the result (NULL always causes NULL to return) |
flags | How to print representations of certain non-printable characters |
width | Insert escaped line breaks when output line exceeds "width"; no-op if 0 |
Definition at line 219 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().
size_t UTIL_PrintableStringSize | ( | const char * | data, |
size_t | size | ||
) |
Calculate size of buffer needed to store printable representation of the block of data of the specified size (or, if size is 0, strlen(data)) but without the '\0' terminator.
data | Block of data (NULL causes 0 to return regardless of "size") |
size | Size of the block (0 causes strlen(data) to be used) |
Definition at line 198 of file ncbi_util.c.
References count, data, isprint(), ncbi::grid::netcache::search::fields::size, and UTIL_PRINTABLE_WIDTH_MIN.
Referenced by ConnNetInfo_Log(), LOG_ComposeMessage(), and s_LOG_Handler().
void UTIL_ReleaseBufferOnHeap | ( | const void * | ptr | ) |
Referenced by DSOCK_CreateEx(), NcbiMessagePlusError(), s_Accept(), s_Connect_(), s_CreateListening(), s_CreateOnTop(), s_Select(), and TRIGGER_Create().
size_t SHASH_Descriptor::block_len |
Definition at line 575 of file ncbi_util.h.
char SConnNetInfo::client_host[255+1] |
Definition at line 195 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), and x_SetDefaultReferer().
NCBI_CRED SURLExtra::cred |
SSL credentials (if any)
Definition at line 738 of file ncbi_connutil.h.
Referenced by URL_ConnectEx().
NCBI_CRED SConnNetInfo::credentials |
Definition at line 223 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Connect(), and s_SocketConnectorBuilder().
EBDebugPrintout SConnNetInfo::debug_printout |
Definition at line 203 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), ConnNetInfo_Create(), s_Connect(), s_CreateConnector(), s_IsContentTypeDefined(), s_ParseHeader(), s_ReadHeader(), s_Resolve(), s_SocketConnectorBuilder(), and s_VT_Open().
size_t SHASH_Descriptor::digest_len |
Definition at line 576 of file ncbi_util.h.
int SLOG_Message::dynamic |
Definition at line 339 of file ncbi_core.h.
Referenced by LOG_Write(), and LOG_WriteInternal().
int SLOG_Message::err_code |
Definition at line 348 of file ncbi_core.h.
Referenced by LOG_Write().
int SLOG_Message::err_subcode |
Definition at line 349 of file ncbi_core.h.
Referenced by LOG_Write().
unsigned SConnNetInfo::external |
Definition at line 198 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_SocketConnectorBuilder(), x_FixupUserHeader(), and x_Open().
const char* SLOG_Message::file |
Definition at line 344 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), and LOG_Write().
void(* SHASH_Descriptor::fini) (void *ctx, void *digest) |
Definition at line 580 of file ncbi_util.h.
EBFWMode SConnNetInfo::firewall |
Definition at line 199 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().
const char* SLOG_Message::func |
Definition at line 343 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), and LOG_Write().
char SConnNetInfo::host[255+1] |
Definition at line 211 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().
const char* SURLExtra::host |
SSL host id (aka SNI) (if differs from "host")
Definition at line 739 of file ncbi_connutil.h.
Referenced by URL_ConnectEx().
char SConnNetInfo::http_proxy_host[255+1] |
Definition at line 214 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().
unsigned SConnNetInfo::http_proxy_leak |
Definition at line 205 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_CreateConnector(), s_SocketConnectorBuilder(), and s_VT_Open().
EBProxyType SConnNetInfo::http_proxy_mask |
Definition at line 207 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Connect(), s_CreateConnector(), s_CreateHttpConnector(), s_SocketConnectorBuilder(), s_VT_Open(), and x_SetupConnectionParams().
char SConnNetInfo::http_proxy_pass[63+1] |
Definition at line 217 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_CreateConnector(), s_SocketConnectorBuilder(), s_VT_Open(), x_Authenticate(), and CHttpRequest::x_SetProxy().
unsigned short SConnNetInfo::http_proxy_port |
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().
unsigned SConnNetInfo::http_proxy_skip |
Definition at line 206 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_SocketConnectorBuilder(), and s_VT_Open().
char SConnNetInfo::http_proxy_user[63+1] |
Definition at line 216 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_CreateConnector(), s_SocketConnectorBuilder(), s_VT_Open(), x_Authenticate(), and CHttpRequest::x_SetProxy().
unsigned SConnNetInfo::http_push_auth |
Definition at line 204 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Connect(), s_CreateHttpConnector(), and s_SocketConnectorBuilder().
const char* SConnNetInfo::http_referer |
Definition at line 222 of file ncbi_connutil.h.
Referenced by ConnNetInfo_Clone(), ConnNetInfo_CloneInternal(), s_CreateConnector(), s_CreateHttpConnector(), s_Open(), s_SocketConnectorBuilder(), x_FixupUserHeader(), and x_SetDefaultReferer().
const char* SConnNetInfo::http_user_header |
Definition at line 221 of file ncbi_connutil.h.
Referenced by ConnNetInfo_Clone(), ConnNetInfo_CloneInternal(), s_Connect(), s_IsContentTypeDefined(), x_FixupUserHeader(), and x_SetupConnectionParams().
unsigned SConnNetInfo::http_version |
Definition at line 202 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Connect(), s_ConnectAndSend(), s_CreateHttpConnector(), s_Read(), s_ReadHeader(), s_SocketConnectorBuilder(), s_VT_Write(), x_IsWriteThru(), and x_SetupConnectionParams().
Definition at line 578 of file ncbi_util.h.
|
protected |
Definition at line 123 of file ncbi_misc.hpp.
Referenced by CRateMonitor::Mark().
|
protected |
Definition at line 122 of file ncbi_misc.hpp.
Referenced by CRateMonitor::GetETA(), and CRateMonitor::GetTimeRemaining().
|
protected |
Definition at line 125 of file ncbi_misc.hpp.
Referenced by CRateMonitor::GetRate(), and CRateMonitor::Mark().
|
protected |
Definition at line 124 of file ncbi_misc.hpp.
Referenced by CRateMonitor::GetRate().
unsigned SConnNetInfo::lb_disable |
Definition at line 201 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_CreateConnector(), s_SocketConnectorBuilder(), and x_Open().
ELOG_Level SLOG_Message::level |
Definition at line 341 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), LOG_Write(), LOG_WriteInternal(), and s_LOG_FileHandler().
int SLOG_Message::line |
Definition at line 345 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), and LOG_Write().
|
protected |
Measurements as submitted by Mark()
Definition at line 128 of file ncbi_misc.hpp.
Referenced by CRateMonitor::GetPace(), CRateMonitor::GetPos(), CRateMonitor::GetRate(), CRateMonitor::GetTime(), CRateMonitor::GetTimeRemaining(), CRateMonitor::Mark(), and CRateMonitor::SetSize().
|
private |
Definition at line 66 of file ncbi_service.hpp.
Referenced by CSERV_Info::GetHost().
|
private |
Definition at line 67 of file ncbi_service.hpp.
Referenced by CSERV_Info::GetPort().
|
mutableprotected |
Cached rate from last calculation.
Definition at line 127 of file ncbi_misc.hpp.
Referenced by CRateMonitor::GetRate(), CRateMonitor::Mark(), and CRateMonitor::SetSize().
|
private |
Definition at line 68 of file ncbi_service.hpp.
Referenced by CSERV_Info::GetRate().
|
protected |
Total size of job to be performed.
Definition at line 129 of file ncbi_misc.hpp.
Referenced by CRateMonitor::GetETA(), CRateMonitor::GetSize(), CRateMonitor::GetTimeRemaining(), and CRateMonitor::SetSize().
|
private |
Definition at line 69 of file ncbi_service.hpp.
Referenced by CSERV_Info::GetType().
unsigned int SConnNetInfo::magic |
Definition at line 226 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal().
unsigned short SConnNetInfo::max_try |
Definition at line 218 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), CTaxon1::Init(), s_Adjust(), s_Connect(), s_CreateHttpConnector(), s_ReadHeader(), s_VT_Open(), and SERVICE_CreateConnectorEx().
const char* SLOG_Message::message |
Definition at line 340 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), LOG_Write(), and LOG_WriteInternal().
const char* SLOG_Message::module |
Definition at line 342 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), and LOG_Write().
char SConnNetInfo::pass[63+1] |
Definition at line 210 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), CFtpUtils::GetDirContent(), s_Connect(), s_CreateConnector(), s_SocketConnectorBuilder(), x_Authenticate(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), x_FTPLogin(), and x_SetupHttpProxy().
char SConnNetInfo::path[4095+1] |
Definition at line 213 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().
unsigned short SConnNetInfo::port |
Definition at line 212 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().
const void* SLOG_Message::raw_data |
Definition at line 346 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), LOG_Write(), and LOG_WriteInternal().
size_t SLOG_Message::raw_size |
Definition at line 347 of file ncbi_core.h.
Referenced by LOG_ComposeMessage(), LOG_Write(), and LOG_WriteInternal().
TReqMethod SConnNetInfo::req_method |
Definition at line 196 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().
unsigned SConnNetInfo::reserved |
Definition at line 208 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal().
EBURLScheme SConnNetInfo::scheme |
Definition at line 197 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().
unsigned int STimeoutTag::sec |
seconds
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().
unsigned SConnNetInfo::stateless |
Definition at line 200 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_Adjust(), s_CreateConnector(), s_Open(), s_Resolve(), s_SocketConnectorBuilder(), s_VT_Open(), SERVICE_CreateConnectorEx(), and x_Open().
const char SConnNetInfo::svc[1] |
Definition at line 228 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), s_LoadLocalIPs(), x_ErrorHeaderOnly(), and x_UnsafeRedirectOK().
Definition at line 220 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), HTTP_CreateTunnelEx(), s_CreateHttpConnector(), s_FtpConnectorBuilder(), s_Setup(), and s_SocketConnectorBuilder().
STimeout SConnNetInfo::tmo |
Definition at line 227 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal().
unsigned short SConnNetInfo::unused |
Definition at line 219 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal().
Definition at line 579 of file ncbi_util.h.
unsigned int STimeoutTag::usec |
microseconds (modulo 1,000,000)
Definition at line 78 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().
char SConnNetInfo::user[63+1] |
Definition at line 209 of file ncbi_connutil.h.
Referenced by ConnNetInfo_CloneInternal(), CFtpUtils::GetDirContent(), s_Connect(), s_CreateConnector(), s_SocketConnectorBuilder(), x_Authenticate(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), x_FTPLogin(), and x_SetupHttpProxy().