NCBI C++ ToolKit
|
#include <connect/ncbi_ipv6.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | SNcbiDomainInfo |
Functions | |
int | NcbiIsLocalIP (unsigned int ip) |
Return non-zero (true) if the IP address (in network byte order) provided as an agrument, is a local one (i.e. More... | |
int | NcbiIsLocalIPEx (const TNCBI_IPv6Addr *addr, SNcbiDomainInfo *info) |
Return non-zero (true) if the IP address (in network byte order) provided as an agrument, is a local one (i.e. More... | |
void | NcbiInitLocalIP (void) |
Init local IP classification. More... | |
void NcbiInitLocalIP | ( | void | ) |
Init local IP classification.
Definition at line 354 of file ncbi_localip.c.
References s_Inited.
Return non-zero (true) if the IP address (in network byte order) provided as an agrument, is a local one (i.e.
belongs to NCBI); return zero (false) otherwise.
Definition at line 420 of file ncbi_localip.c.
References ip, NcbiIPv4ToIPv6(), NcbiIsLocalIPEx(), and SOCK_NetToHostLong.
int NcbiIsLocalIPEx | ( | const TNCBI_IPv6Addr * | addr, |
SNcbiDomainInfo * | info | ||
) |
Return non-zero (true) if the IP address (in network byte order) provided as an agrument, is a local one (i.e.
belongs to NCBI), and update domain info (when passed non-NULL) of the address, if available; return zero (false) otherwise.
addr | Either true IPv6 or IPv6-mapped IPv4 |
Definition at line 362 of file ncbi_localip.c.
References a, assert, SIPRange::b, b, buf, CORE_LOCK_WRITE, CORE_LOG_X, CORE_UNLOCK, eIPRange_Application, eIPRange_None, eLOG_Trace, info, n, NcbiDumpIPRange(), NcbiIsEmptyIPv6(), NcbiIsInIPRange(), SNcbiDomainInfo::num, result, s_Inited, s_LoadLocalIPs(), s_LocalIP, SNcbiDomainInfo::sfx, and SizeOf.
Referenced by NcbiIsLocalIP().