Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QIPAddressUtils Namespace Reference

Typedefs

typedef QVarLengthArray< char, 64 > Buffer
typedef quint32 IPv4Address
typedef quint8 IPv6Address[16]

Functions

static QString number (quint8 val)
static const QCharcheckedToAscii (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 QCharparseIp6 (IPv6Address &address, const QChar *begin, const QChar *end)
static QChar toHex (uchar c)
void toString (QString &appendTo, const IPv6Address address)

Typedef Documentation

◆ Buffer

Definition at line 23 of file qipaddress.cpp.

◆ IPv4Address

Definition at line 26 of file qipaddress_p.h.

◆ IPv6Address

typedef quint8 QIPAddressUtils::IPv6Address[16]

Definition at line 27 of file qipaddress_p.h.

Function Documentation

◆ checkedToAscii()

const QChar * QIPAddressUtils::checkedToAscii ( Buffer & buffer,
const QChar * begin,
const QChar * end )
static

Definition at line 24 of file qipaddress.cpp.

◆ number()

QString QIPAddressUtils::number ( quint8 val)
static

Definition at line 17 of file qipaddress.cpp.

◆ parseIp4()

bool QIPAddressUtils::parseIp4 ( IPv4Address & address,
const QChar * begin,
const QChar * end )

Definition at line 43 of file qipaddress.cpp.

References parseIp4Internal().

Here is the call graph for this function:

◆ parseIp4Internal()

bool QIPAddressUtils::parseIp4Internal ( IPv4Address & address,
const char * ptr,
bool acceptLeadingZero )
static

Definition at line 54 of file qipaddress.cpp.

Referenced by parseIp4(), and parseIp6().

Here is the caller graph for this function:

◆ parseIp6()

const QChar * QIPAddressUtils::parseIp6 ( IPv6Address & address,
const QChar * begin,
const QChar * end )
Since
5.0

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 115 of file qipaddress.cpp.

References parseIp4Internal().

Here is the call graph for this function:

◆ toHex()

QChar QIPAddressUtils::toHex ( uchar c)
inlinestatic

Definition at line 216 of file qipaddress.cpp.

◆ toString() [1/2]

void QIPAddressUtils::toString ( QString & appendTo,
const IPv6Address address )

Definition at line 221 of file qipaddress.cpp.

◆ toString() [2/2]

void QIPAddressUtils::toString ( QString & appendTo,
IPv4Address address )

Definition at line 95 of file qipaddress.cpp.