![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cNetHost.h>
Public Member Functions | |
cNetHost6 () noexcept | |
cNetHost6 (const in6_addr &ip) noexcept | |
cNetHost6 (const in_addr &ip) | |
cNetHost6 (const char *pszIP) | |
void | SetEmptyHostAddr () noexcept |
bool | isHostValid () const |
bool | isHostLoopback () const |
bool | isHostPrivate () const |
bool | isHostIP4 () const |
HRESULT | put_HostStr (const char *pszIP) |
cStringA | get_HostStr () const |
operator in6_addr () const noexcept | |
const in6_addr & | get_HostIp6 () const noexcept |
HASHCODE_t | get_HashCode () const noexcept |
bool | operator== (const in6_addr &ip) const noexcept |
Static Public Member Functions | |
static StrLen_t GRAYCALL | GetIP6Format (const char *pszIP, bool bTerm=true) |
Static Public Attributes | |
static const in6_addr | k_AddrNull = IN6ADDR_ANY_INIT |
invalid address for initialize. More... | |
Protected Attributes | |
in6_addr | m_ipa6 |
(network order bytes) (16 bytes) More... | |
AF_INET6 IPv6 format. 16 bytes = 128 bit address. sizeof(GUID) includes support for IPv4 as a subset. isHostIP4 Broadcast for ip6 is just a multi homed device ?
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Set ipv6 from ipv4 - IN6_IS_ADDR_V4MAPPED
|
inline |
Set IP as "2001:0db8:85a3:08d3:1319:8a2e:0370:7334" Any port info (or host name) is ignored.
|
noexcept |
Make a hash code from the full address. use CRC32 ?
|
inlinenoexcept |
cStringA GrayLib::cNetHost6::get_HostStr | ( | ) | const |
return string in format "fec0::9256:a00:20ff:fe12:528" lower case hex numbers and removed leading zeros. 0 sequences can be collapsed away to "::"
is pszIP in IPv6 format? e.g. "fec0::9256:a00:20ff:fe12:528"
bool GrayLib::cNetHost6::isHostIP4 | ( | ) | const |
bool GrayLib::cNetHost6::isHostLoopback | ( | ) | const |
localhost = "::1"
bool GrayLib::cNetHost6::isHostPrivate | ( | ) | const |
bool GrayLib::cNetHost6::isHostValid | ( | ) | const |
0 = unspecified.
|
inlinenoexcept |
|
inlinenoexcept |
HRESULT GrayLib::cNetHost6::put_HostStr | ( | const char * | pszIP | ) |
inet_pton() replaces inet_addr for ipv6. ASSUME no port. RtlIpv6StringToAddress() only for Win vista or later. http://en.wikipedia.org/wiki/IPv6
|
inlinenoexcept |
|
static |
invalid address for initialize.
|
protected |
(network order bytes) (16 bytes)