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

(5bcacdbd1aa237cb3d39ffafbe378688a00ea502)

#include "qnetworkinterface.h"
#include "qnetworkinterface_p.h"
#include "qnetworkinterface_unix_p.h"
#include <qendian.h>
#include <qobjectdefs.h>
#include <qvarlengtharray.h>
#include <asm/types.h>
#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
#include <sys/socket.h>
+ Include dependency graph for qnetworkinterface_linux.cpp:

Go to the source code of this file.

Macros

#define ARPHRD_PHONET   820 /* v2.6.29: PhoNet media type */
 
#define ARPHRD_PHONET_PIPE   821 /* v2.6.29: PhoNet pipe header */
 
#define ARPHRD_IEEE802154   804 /* v2.6.31 */
 
#define ARPHRD_6LOWPAN   825 /* v3.14: IPv6 over LoWPAN */
 

Enumerations

enum  { BufferSize = 8192 }
 

Functions

static QNetworkInterface::InterfaceType probeIfType (int socket, struct ifreq *req, short arptype)
 
static QList< QNetworkInterfacePrivate * > getInterfaces (int sock, char *buf)
 
static void getAddresses (int sock, char *buf, QList< QNetworkInterfacePrivate * > &result)
 

Macro Definition Documentation

◆ ARPHRD_6LOWPAN

#define ARPHRD_6LOWPAN   825 /* v3.14: IPv6 over LoWPAN */

Definition at line 27 of file qnetworkinterface_linux.cpp.

Referenced by probeIfType().

◆ ARPHRD_IEEE802154

#define ARPHRD_IEEE802154   804 /* v2.6.31 */

Definition at line 26 of file qnetworkinterface_linux.cpp.

Referenced by probeIfType().

◆ ARPHRD_PHONET

#define ARPHRD_PHONET   820 /* v2.6.29: PhoNet media type */

Definition at line 24 of file qnetworkinterface_linux.cpp.

Referenced by probeIfType().

◆ ARPHRD_PHONET_PIPE

#define ARPHRD_PHONET_PIPE   821 /* v2.6.29: PhoNet pipe header */

Definition at line 25 of file qnetworkinterface_linux.cpp.

Referenced by probeIfType().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BufferSize 

Definition at line 31 of file qnetworkinterface_linux.cpp.

Function Documentation

◆ getAddresses()

static void getAddresses ( int sock,
char * buf,
QList< QNetworkInterfacePrivate * > & result )
static

Definition at line 292 of file qnetworkinterface_linux.cpp.

References AF_INET6, BufferSize, QNetworkInterfacePrivate::calculateDnsEligibility(), QDeadlineTimer::Forever, ptr(), Q_ASSERT, Q_UNLIKELY, qWarning, and sock.

+ Here is the call graph for this function:

◆ getInterfaces()

static QList< QNetworkInterfacePrivate * > getInterfaces ( int sock,
char * buf )
static

Definition at line 224 of file qnetworkinterface_linux.cpp.

References BufferSize, if(), Q_UNLIKELY, and sock.

+ Here is the call graph for this function:

◆ probeIfType()