![]() |
Qt 6.x
The Qt SDK
|
Typedefs | |
typedef QVarLengthArray< char, 64 > | Buffer |
typedef quint32 | IPv4Address |
typedef quint8 | IPv6Address[16] |
Functions | |
static QString | number (quint8 val) |
static const QChar * | checkedToAscii (Buffer &buffer, const QChar *begin, const QChar *end) |
static bool | parseIp4Internal (IPv4Address &address, const char *ptr, bool acceptLeadingZero) |
bool | parseIp4 (IPv4Address &address, const QChar *begin, const QChar *end) |
void | toString (QString &appendTo, IPv4Address address) |
const QChar * | parseIp6 (IPv6Address &address, const QChar *begin, const QChar *end) |
static QChar | toHex (uchar c) |
void | toString (QString &appendTo, const IPv6Address address) |
typedef QVarLengthArray<char, 64> QIPAddressUtils::Buffer |
Definition at line 22 of file qipaddress.cpp.
typedef quint32 QIPAddressUtils::IPv4Address |
Definition at line 25 of file qipaddress_p.h.
typedef quint8 QIPAddressUtils::IPv6Address[16] |
Definition at line 26 of file qipaddress_p.h.
|
static |
Definition at line 23 of file qipaddress.cpp.
References begin().
Referenced by parseIp4(), and parseIp6().
Definition at line 16 of file qipaddress.cpp.
References QStringLiteral, qulltoa(), and zero.
Q_CORE_EXPORT bool QIPAddressUtils::parseIp4 | ( | IPv4Address & | address, |
const QChar * | begin, | ||
const QChar * | end | ||
) |
Definition at line 42 of file qipaddress.cpp.
References begin(), checkedToAscii(), parseIp4Internal(), ptr(), and Q_ASSERT.
Referenced by QHostAddressPrivate::parse(), and QUrlPrivate::setHost().
|
static |
Definition at line 53 of file qipaddress.cpp.
References ptr(), qstrlen(), and qstrntoull().
Referenced by parseIp4(), and parseIp6().
Q_CORE_EXPORT const QChar * QIPAddressUtils::parseIp6 | ( | IPv6Address & | address, |
const QChar * | begin, | ||
const QChar * | end | ||
) |
Parses one IPv6 address from begin to end and stores the representation in address. Returns null if everything was parsed correctly, or the pointer to the first bad character where parsing failed. If the parsing failed for a reason not related to a particular character, returns end.
Definition at line 114 of file qipaddress.cpp.
References begin(), checkedToAscii(), nullptr, parseIp4Internal(), pos, ptr(), Q_ASSERT, qstrntoull(), and ret.
Referenced by isIp6(), parseIp6(), and parseIp6().
Definition at line 215 of file qipaddress.cpp.
References QChar::fromLatin1(), and QtMiscUtils::toHexLower().
Referenced by toString().
Q_CORE_EXPORT void QIPAddressUtils::toString | ( | QString & | appendTo, |
const IPv6Address | address | ||
) |
Definition at line 220 of file qipaddress.cpp.
References QString::append(), i, j, QString::reserve(), QString::size(), toHex(), and toString().
Q_CORE_EXPORT void QIPAddressUtils::toString | ( | QString & | appendTo, |
IPv4Address | address | ||
) |
Definition at line 94 of file qipaddress.cpp.
References number.
Referenced by parseIp6(), QUrlPrivate::setHost(), QHostAddress::toString(), and toString().