Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: InetAddressMaskCtors

[220:14] static extends: object

Alternate constructors for InetAddressMask. Usage: InetAddressMaskCtors.<name>(...). The primary constructor lives directly on InetAddressMask.

Methods

  • newFromString (string mask_string)

    Parses @mask_string as an IP address and (optional) length, and creates a new #GInetAddressMask. The length, if present, is delimited by a "/". If it is not present, then the length is assumed to be the full length of the address.

    • @p mask_string is an IP address or address/length string.
    • @r A new InetAddressMask.

class: InetAddressMaskMeta

[242:14] static extends: object

Generated metadata helpers for InetAddressMask class surfaces.

Methods

  • properties ()

    Returns property metadata for InetAddressMask.

    • @r A list.

class: InetAddressMask

[16:7] extends: object

GInetAddressMask represents a range of IPv4 or IPv6 addresses described by a base address and a length indicating how many bits of the base address are relevant for matching purposes. These are often given in string form. For example, 10.0.0.0/8, or fe80::/10.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • InetAddressMask (addr = null, length = null)

    Creates a new #GInetAddressMask representing all addresses whose first

    • @length bits match @addr.
    • @p addr is a #GInetAddress.
    • @p length is number of bits of @addr to use.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asInitable ()

    Wraps this handle as Initable.

    • @r A Initable object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setAddress (object Value)

    The base address.

    • @p Value is the new property value.
    • @r None.
  • setLength (int Value)

    The prefix length, in bytes.

    • @p Value is the new property value.
    • @r None.
  • equal (object mask2)

    Tests if @mask and @mask2 are the same mask.

    • @p mask2 is another #GInetAddressMask.
  • get_address ()

    Gets @mask's base address

  • get_family ()

    Gets the #GSocketFamily of @mask's address

  • get_length ()

    Gets @mask's length

  • matches (object address)

    Tests if @address falls within the range described by @mask.

    • @p address is a #GInetAddress.
  • to_string ()

    Converts @mask back to its corresponding string form.