Gjsify LogoGjsify Logo

Hierarchy

  • IPAddress

Index

Constructors

  • new IPAddress(family: number, addr: string, prefix: number): IPAddress
  • Creates a new #NMIPAddress object.

    Parameters

    • family: number

      the IP address family (AF_INET or AF_INET6)

    • addr: string

      the IP address

    • prefix: number

      the address prefix length

    Returns IPAddress

Properties

name: string

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

    • b: IPAddress

      the #NMIPAddress to compare address to.

    • cmpFlags: IPAddressCmpFlags

      the #NMIPAddressCmpFlags that indicate what to compare.

    Returns number

  • Determines if two #NMIPAddress objects contain the same address and prefix (attributes are not compared).

    Parameters

    • other: IPAddress

      the #NMIPAddress to compare address to.

    Returns boolean

  • getAddress(): string
  • Gets the IP address property of this address object.

    Returns string

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

    Parameters

    • name: string

      the name of an address attribute

    Returns GLib.Variant

  • getAttributeNames(): string[]
  • Gets an array of attribute names defined on address.

    Returns string[]

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

    Returns number

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

    Returns number

  • ref(): void
  • Increases the reference count of the object.

    Returns void

  • setAddress(addr: string): void
  • 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

    • value: GLib.Variant

      the value

    Returns void

  • setPrefix(prefix: number): void
  • Sets the IP address prefix property of this address object.

    Parameters

    • prefix: number

      the IP address prefix

    Returns void

  • unref(): void
  • Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.

    Returns void

  • new(family: number, addr: string, prefix: number): IPAddress
  • Creates a new #NMIPAddress object.

    Parameters

    • family: number

      the IP address family (AF_INET or AF_INET6)

    • addr: string

      the IP address

    • prefix: number

      the address prefix length

    Returns IPAddress

  • newBinary(family: number, addr: object, prefix: number): IPAddress
  • Creates a new #NMIPAddress object. addr must point to a buffer of the correct size for family.

    Parameters

    • family: number

      the IP address family (AF_INET or AF_INET6)

    • addr: object

      the IP address

    • prefix: number

      the address prefix length

    Returns IPAddress

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method