Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qhostaddress.cpp File Reference

(3273c03b51f225a6d12a4725e47b6dda2c35527b)

#include "qhostaddress.h"
#include "qhostaddress_p.h"
#include "private/qipaddress_p.h"
#include "qdebug.h"
#include <netinet/in.h>
#include "qplatformdefs.h"
#include "qstringlist.h"
#include "qendian.h"
#include <qdatastream.h>
#include "moc_qhostaddress.cpp"
+ Include dependency graph for qhostaddress.cpp:

Go to the source code of this file.

Functions

static bool convertToIpv4 (quint32 &a, const Q_IPV6ADDR &a6, const QHostAddress::ConversionMode mode)
 
static bool parseIp6 (const QString &address, QIPAddressUtils::IPv6Address &addr, QString *scopeId)
 
static void clearBits (quint8 *where, int start, int end)
 
QDebug operator<< (QDebug d, const QHostAddress &address)
 

Function Documentation

◆ clearBits()

static void clearBits ( quint8 * where,
int start,
int end )
static

Definition at line 288 of file qhostaddress.cpp.

References Q_ASSERT.

Referenced by QNetmask::address(), and QHostAddress::parseSubnet().

+ Here is the caller graph for this function:

◆ convertToIpv4()

static bool convertToIpv4 ( quint32 & a,
const Q_IPV6ADDR & a6,
const QHostAddress::ConversionMode mode )
static

parses v4-mapped addresses or the AnyIPv6 address and stores in a; returns true if the address was one of those

Definition at line 54 of file qhostaddress.cpp.

References QHostAddress::ConvertLocalHost, QHostAddress::ConvertUnspecifiedAddress, QHostAddress::ConvertV4CompatToIPv4, QHostAddress::ConvertV4MappedToIPv4, ptr(), and QHostAddress::StrictConversion.

Referenced by QHostAddress::isEqual(), QHostAddressPrivate::setAddress(), and QHostAddress::toIPv4Address().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<()

QDebug operator<< ( QDebug d,
const QHostAddress & address )

Definition at line 1234 of file qhostaddress.cpp.

References QHostAddress::Any, and d.

◆ parseIp6()

static bool parseIp6 ( const QString & address,
QIPAddressUtils::IPv6Address & addr,
QString * scopeId )
static

Definition at line 101 of file qhostaddress.cpp.

References QStringView::begin(), QStringView::chop(), QString::clear(), QStringView::end(), QStringView::lastIndexOf(), QStringView::mid(), QIPAddressUtils::parseIp6(), and QStringView::size().

+ Here is the call graph for this function: