![]() |
Qt 6.x
The Qt SDK
|
#include "qdnslookup_p.h"
#include <qendian.h>
#include <qscopedpointer.h>
#include <qurl.h>
#include <qvarlengtharray.h>
#include <private/qnativesocketengine_p.h>
#include <private/qtnetwork-config_p.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <errno.h>
#include <resolv.h>
#include <array>
Go to the source code of this file.
Macros | |
#define | T_OPT ns_t_opt |
Typedefs | |
using | QueryBuffer = std::array< unsigned char,(QueryBufferSize+15)/16 *16 > |
using | Cache = QList< QDnsCachedName > |
template<bool Condition> | |
using | EnableIfIPv6 = std::enable_if_t< Condition, const QHostAddress * > |
Functions | |
QT_REQUIRE_CONFIG (libresolv) | |
Q_DECLARE_TYPEINFO (QDnsCachedName, Q_RELOCATABLE_TYPE) | |
template<typename T > | |
void | setNsMap (T &ext, std::enable_if_t< sizeof(T::nsmap) !=0, uint16_t > v) |
template<typename T > | |
void | setNsMap (T &,...) |
template<typename State > | |
bool | setIpv6NameServer (State *state, EnableIfIPv6< sizeof(std::declval< State >()._u._ext.nsaddrs) !=0 > addr, quint16 port) |
template<typename State > | |
bool | setIpv6NameServer (State *, const void *, quint16) |
static bool | applyNameServer (res_state state, const QHostAddress &nameserver, quint16 port) |
static int | prepareQueryBuffer (res_state state, QueryBuffer &buffer, const char *label, ns_rcode type) |
Variables | |
static constexpr qsizetype | ReplyBufferSize = 1280 - 40 - 8 |
static constexpr unsigned char | Edns0Record [] |
static constexpr qsizetype | QueryBufferSize |
#define T_OPT ns_t_opt |
Definition at line 29 of file qdnslookup_unix.cpp.
Definition at line 64 of file qdnslookup_unix.cpp.
using EnableIfIPv6 = std::enable_if_t<Condition, const QHostAddress *> |
Definition at line 93 of file qdnslookup_unix.cpp.
using QueryBuffer = std::array<unsigned char, (QueryBufferSize + 15) / 16 * 16> |
Definition at line 53 of file qdnslookup_unix.cpp.
|
static |
Definition at line 124 of file qdnslookup_unix.cpp.
References QAbstractSocket::IPv6Protocol, QHostAddress::isNull(), QHostAddress::protocol(), setIpv6NameServer(), and state.
|
static |
Definition at line 139 of file qdnslookup_unix.cpp.
References Edns0Record, Q_ASSERT, Q_UNLIKELY, and state.
Q_DECLARE_TYPEINFO | ( | QDnsCachedName | , |
Q_RELOCATABLE_TYPE | |||
) |
QT_REQUIRE_CONFIG | ( | libresolv | ) |
Definition at line 118 of file qdnslookup_unix.cpp.
bool setIpv6NameServer | ( | State * | state, |
EnableIfIPv6< sizeof(std::declval< State >()._u._ext.nsaddrs) !=0 > | addr, | ||
quint16 | port | ||
) |
Definition at line 96 of file qdnslookup_unix.cpp.
References Q_CHECK_PTR(), setNsMap(), and state.
Referenced by applyNameServer().
void setNsMap | ( | T & | , |
... | |||
) |
Definition at line 87 of file qdnslookup_unix.cpp.
void setNsMap | ( | T & | ext, |
std::enable_if_t< sizeof(T::nsmap) !=0, uint16_t > | v | ||
) |
Definition at line 79 of file qdnslookup_unix.cpp.
References ext.
Referenced by setIpv6NameServer().
|
staticconstexpr |
Definition at line 40 of file qdnslookup_unix.cpp.
Referenced by prepareQueryBuffer().
|
staticconstexpr |
Definition at line 51 of file qdnslookup_unix.cpp.
|
staticconstexpr |
Definition at line 37 of file qdnslookup_unix.cpp.