ArcGIS for Developers

NetworkInterface QML Type

Provides a listing of the host's IP addresses and network interfaces. More...

Import Statement: import ArcGIS.AppFramework.Networking 1.0

Properties

Detailed Description

The NetworkInterface component 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.

Instantiate the NetworkInterface component with this code sample, after which the properties can be used:

property var networkInterface : Networking.interfaces[0]

Property Documentation

[read-only] addresses : List<NetworkAddress>

Returns a list of associated IP addresses.

    Text{
    text: JSON.stringify(networkInterface.addresses)
}

[read-only] canMulticast : bool

Returns true if the device has multicasting capabilities. Otherwise, returns false.

    Text{
    text:networkInterface.canMulticast.toString()
}

[read-only] displayName : string

Returns the human-readable name of this network interface, if the name can be determined. If it can't be, returns the same result as the name property.

    Text {
    text:networkInterface.displayName
}

[read-only] hardwareAddress : string

Returns the low-level hardware address for this interface. The exact type of hardware address will depend on the interface type; for example, an Ethernet interface will return a MAC address separated by colons.

    Text{
    text:networkInterface.hardwareAddress
}

[read-only] isLoopback : bool

Returns true if the address given is a loopback address. The IPv4 loopback addresses are 127.0.0.1-127.255.255.255; the IPv6 loopback address is 0.0.0.0.0.0.0.1, or simply ::1.

    Text{
    text:networkInterface.isLoopback.toString()
}

[read-only] name : string

Returns the name of the network interface. on Unix-based systems, this is a string containing the type of the interface and sometimes a sequence number. On Windows, this is an internal ID the user cannot change.

    Text{
            text:networkInterface.name
}

[read-only] valid : bool

Returns true if the NetworkInterface object contains valid information about a network interface. Otherwise, returns false.

    Text{
    text:networkInterface.valid
}