Function

NM-1.0NMutils_ip4_addresses_from_variant

  • Utility function to convert a GLib.Variant of type 'aau' representing a list of NetworkManager IPv4 addresses (which are tuples of address, prefix, and gateway) into a GLib.PtrArray of NM.IPAddress objects. The "gateway" field of the first address (if set) will be returned in out_gateway; the "gateway" fields of the other addresses are ignored. Note that invalid addresses are discarded but the valid addresses are still returned.

    Since 1.46, an empty list is returned if the variant type is not valid (before it was checked as assertion)

    Parameters

    Returns [IPAddress[], string]

    a newly allocated GLib.PtrArray of NM.IPAddress objects