Class (GI Struct)

NM-1.0NMIPAddress

Index

Constructors

Properties

$gtype: GType<IPAddress>

Methods

  • Note that with cmp_flags #NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS, there is no total order for comparing GVariant. That means, if the two addresses only differ by their attributes, the sort order is undefined and the return value only indicates equality.

    Parameters

    Returns number

    0 if the two objects have the same values (according to their flags) or a integer indicating the compare order.

  • Creates a copy of address

    Returns IPAddress

    a copy of address This API was part of public headers before 1.32.0 but was erroneously not exported in the ABI. It is thus only usable since 1.32.0.

  • Gets the IP address property of this address object.

    Returns string

    the IP address

  • Gets the value of the attribute with name name on address

    Parameters

    • name: string

      the name of an address attribute

    Returns GLib.Variant

    the value of the attribute with name name on address, or null if address has no such attribute.

  • Gets an array of attribute names defined on address.

    Returns string[]

    a null-terminated array of attribute names,

  • Gets the IP address family (eg, AF_INET) property of this address object.

    Returns number

    the IP address family

  • Gets the IP address prefix (ie "24" or "30" etc) property of this address object.

    Returns number

    the IP address prefix

  • Sets the IP address property of this address object.

    addr must be a valid address of address's family. If you aren't sure you have a valid address, use nm_utils_ipaddr_valid() to check it.

    Parameters

    • addr: string

      the IP address, as a string

    Returns void

  • Sets or clears the named attribute on address to the given value.

    Parameters

    • name: string

      the name of an address attribute

    • Optionalvalue: GLib.Variant<any>

      the value

    Returns void

  • Sets the IP address prefix property of this address object.

    Parameters

    • prefix: number

      the IP address prefix

    Returns void

  • Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.

    Returns void