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

(4370f9f227fd60ae252fb040f660e7835316830f)

#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()

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

Definition at line 35 of file qnetworkinterface_unix.cpp.

◆ findInterface()

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

Definition at line 181 of file qnetworkinterface_unix.cpp.

◆ getMtu()

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

Definition at line 117 of file qnetworkinterface_unix.cpp.

◆ ifreq_index() [1/2]

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

Definition at line 64 of file qnetworkinterface_unix.cpp.

◆ ifreq_index() [2/2]

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

Definition at line 58 of file qnetworkinterface_unix.cpp.

◆ interfaceListing()

static QList< QNetworkInterfacePrivate * > interfaceListing ( )
static

Definition at line 226 of file qnetworkinterface_unix.cpp.

◆ interfaceNames()

static QSet< QByteArray > interfaceNames ( int socket)
static

Definition at line 129 of file qnetworkinterface_unix.cpp.