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
qnetworkinterface_unix.cpp File Reference

(fd34c2fd3532c5b6430e90b28947c1e9404514dd)

#include "qbytearray.h"
#include "qset.h"
#include "qnetworkinterface.h"
#include "qnetworkinterface_p.h"
#include "qnetworkinterface_unix_p.h"
#include "qalgorithms.h"
#include <QtCore/private/qduplicatetracker_p.h>
#include <qplatformdefs.h>
Include dependency graph for qnetworkinterface_unix.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE QHostAddress addressFromSockaddr (sockaddr *sa, int ifindex=0, const QString &ifname=QString())
template<typename Req>
static auto & ifreq_index (Req &req, std::enable_if_t< sizeof(std::declval< Req >().ifr_index) !=0, int >=0)
template<typename Req>
static auto & ifreq_index (Req &req, std::enable_if_t< sizeof(std::declval< Req >().ifr_ifindex) !=0, int >=0)
static int getMtu (int socket, struct ifreq *req)
static QSet< QByteArrayinterfaceNames (int socket)
static QNetworkInterfacePrivatefindInterface (int socket, QList< QNetworkInterfacePrivate * > &interfaces, struct ifreq &req)
static QList< QNetworkInterfacePrivate * > interfaceListing ()

Function Documentation

◆ addressFromSockaddr()

QT_BEGIN_NAMESPACE QHostAddress addressFromSockaddr ( sockaddr * sa,
int ifindex = 0,
const QString & ifname = QString() )
static

Definition at line 36 of file qnetworkinterface_unix.cpp.

◆ findInterface()

QNetworkInterfacePrivate * findInterface ( int socket,
QList< QNetworkInterfacePrivate * > & interfaces,
struct ifreq & req )
static

Definition at line 182 of file qnetworkinterface_unix.cpp.

◆ getMtu()

int getMtu ( int socket,
struct ifreq * req )
static

Definition at line 118 of file qnetworkinterface_unix.cpp.

◆ ifreq_index() [1/2]

template<typename Req>
auto & ifreq_index ( Req & req,
std::enable_if_t< sizeof(std::declval< Req >().ifr_ifindex) !=0, int > = 0 )
static

Definition at line 65 of file qnetworkinterface_unix.cpp.

◆ ifreq_index() [2/2]

template<typename Req>
auto & ifreq_index ( Req & req,
std::enable_if_t< sizeof(std::declval< Req >().ifr_index) !=0, int > = 0 )
static

Definition at line 59 of file qnetworkinterface_unix.cpp.

◆ interfaceListing()

QList< QNetworkInterfacePrivate * > interfaceListing ( )
static

Definition at line 227 of file qnetworkinterface_unix.cpp.

◆ interfaceNames()

QSet< QByteArray > interfaceNames ( int socket)
static

Definition at line 130 of file qnetworkinterface_unix.cpp.