

Returns the list of IP addresses that this interface possesses along with their associated netmasks and broadcast addresses. QList QNetworkInterface:: addressEntries() const QNetworkInterface:: ~QNetworkInterface()įrees the resources associated with the QNetworkInterface object. QNetworkInterface &QNetworkInterface:: operator=(const QNetworkInterface & other)Ĭopies the contents of the QNetworkInterface object contained in other into this one. QNetworkInterface:: QNetworkInterface()Ĭonstructs an empty network interface object. Member Function Documentation QNetworkInterface:: QNetworkInterface(const QNetworkInterface & other)Ĭreates a copy of the QNetworkInterface object contained in other. IEEE 802.16 Wireless Metropolitan Area Network, also known under the commercial name "WiMAX". This type of interface is often used for mesh networking. IEEE 802.15.4 Personal Area Network interfaces, other than 6LoWPAN (see below).ĦLoWPAN (IPv6 over Low-power Wireless Personal Area Networks) interfaces, which operate on IEEE 802.15.4 PHY, but have specific header compression schemes for IPv6 and UDP. See the Linux kernel documentation for more information. Interfaces using the Linux Phonet socket family, for communication with cellular modems.
#QT GET MAC ADDRESS SERIAL#
Serial Line Internet Protocol interfaces. Point-to-Point Protocol interfaces, establishing a direct connection between two nodes over a lower transport layer (often serial over radio or physical line).
#QT GET MAC ADDRESS ISO#
ISO 11898 Controller Area Network bus interfaces, usually found on automotive systems.ĪNSI X3T12 Fiber Distributed Data Interface, a local area network over optical fibers. Note that on some systems, QNetworkInterface may be unable to distinguish regular Ethernet from Wi-Fi and will not return this enum value.

IEEE 802.3 Ethernet interfaces, though on many systems other types of IEEE 802 interfaces may also be detected as Ethernet (especially Wi-Fi). For example, tunnel interfaces are (currently) detected as virtual ones. The virtual loopback interface, which is assigned the loopback IP addresses (127.0.0.1, ::1).Ī type of interface determined to be virtual, but not any of the other possible types. The interface type could not be determined or is not one of the other listed types. Interface types that are not among those listed below will generally be listed as Unknown, though future versions of Qt may add new enumeration values. Specifies the type of hardware (PHY layer, OSI level 1) this interface is, if it could be determined. It stores an OR combination of InterfaceFlag values. The InterfaceFlags type is a typedef for QFlags. Note that one network interface cannot be both broadcast-based and point-to-point.

The network interface supports multicasting The network interface is a point-to-point interface: that is, there is one, single other address that can be directly reached by it.

The network interface is a loopback interface: that is, it's a virtual interface whose destination is the host computer itself The network interface works in broadcast mode The network interface is operational: configured "up" and (typically) physically connected to a network If(nets.flags().testFlag(QNetworkInterface::IsUp) & nets.flags().testFlag(QNetworkInterface::IsRunning) & !nets.flags().The network interface is "up" - enabled by administrative action If this network interface is activated and is running and is not a loop address, it is the MAC address we need to find. Get the IPv4 address of the first hostįor (int i = 0 i Nets = QNetworkInterface :: allinterface () // Get all network interface lists QList ipAddressesList = QNetworkInterface::allAddresses()
