net.interfaces

net.interfaces

net.interfaces

Function

reads the local network interface information.

Syntax

Parameters

has no parameters.

Return Value

TypeDescription
ArrayReturns an array of network interface information objects.

Each object in the interface object field

array represents a network address.

FieldTypeMust existDescription
nameStringYesThe name of the interface. The current implementation returns default for the default egress address and loopback for the local loopback address.
ipStringYesIP address string, such as 192.168.1.10 or 127.0.0.1.
familyStringYesIP address family. This may currently be IPv4 or IPv6.
internalBoolYesWhether it is an internal address. true represents the internal address of the local machine such as loopback; false represents the default export address.

Examples

Notes

- The current implementation contains default egress IP and loopback information.