Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qnetworkinterface_unix.cpp File Reference
#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 <ifaddrs.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())
 
static int getMtu (int socket, struct ifreq *req)
 
static QList< QNetworkInterfacePrivate * > createInterfaces (ifaddrs *rawList)
 
static void getAddressExtraInfo (QNetworkAddressEntry *entry, struct sockaddr *sa, const char *ifname)
 
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 39 of file qnetworkinterface_unix.cpp.

References AF_INET6, and QNetworkInterfaceManager::interfaceNameFromIndex().

Referenced by interfaceListing().

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

◆ createInterfaces()

static QList< QNetworkInterfacePrivate * > createInterfaces ( ifaddrs *  rawList)
static

Definition at line 541 of file qnetworkinterface_unix.cpp.

References QList< T >::begin(), convertFlags(), QList< T >::end(), QString::fromLatin1(), getMtu(), ptr(), and Q_UNUSED.

Referenced by interfaceListing().

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

◆ getAddressExtraInfo()

static void getAddressExtraInfo ( QNetworkAddressEntry entry,
struct sockaddr *  sa,
const char *  ifname 
)
static

Definition at line 571 of file qnetworkinterface_unix.cpp.

References Q_UNUSED.

Referenced by interfaceListing().

+ Here is the caller graph for this function:

◆ getMtu()

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

Definition at line 118 of file qnetworkinterface_unix.cpp.

References qt_safe_ioctl(), and socket.

Referenced by createInterfaces().

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

◆ interfaceListing()

static QList< QNetworkInterfacePrivate * > interfaceListing ( )
static

Definition at line 579 of file qnetworkinterface_unix.cpp.

References addressFromSockaddr(), QList< T >::begin(), QNetworkInterface::CanBroadcast, createInterfaces(), QList< T >::end(), getAddressExtraInfo(), interfaceListing(), and ptr().

Referenced by interfaceListing().

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