|  | Home · Overviews · Examples |

# QNetworkInterface Class Reference
[com.trolltech.qt.network module]

The `QNetworkInterface` class provides a listing of the host's IP addresses and network interfaces. More...

## Detailed Description

The `QNetworkInterface` class provides a listing of the host's IP addresses and network interfaces.

`QNetworkInterface` represents one network interface attached to the host where the program is being run. Each network interface may contain zero or more IP addresses, each of which is optionally associated with a netmask and/or a broadcast address. The list of such trios can be obtained with `addressEntries`. Alternatively, when the netmask or the broadcast addresses aren't necessary, use the `allAddresses` convenience function to obtain just the IP addresses.

`QNetworkInterface` also reports the interface's hardware address with `hardwareAddress`.

Not all operating systems support reporting all features. Only the IPv4 addresses are guaranteed to be listed by this class in all platforms. In particular, IPv6 address listing is only supported on Windows XP and more recent versions, Linux, MacOS X and the BSDs.

See also `QNetworkAddressEntry`.