### Class

# Gio InetAddressMask

since: 2.32

#### Description

    class Gio.InetAddressMask : GObject.Object
      implements Gio.Initable {
      /* No available fields */
    }

`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`.

Available since: 2.32

#### Ancestors

- GObject

#### Implements

- GInitable

#### Constructors

###### g_inet_address_mask_new

Creates a new `GInetAddressMask` representing all addresses whose first `length` bits match `addr`.

since: 2.32

###### g_inet_address_mask_new_from_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.

since: 2.32

#### Instance methods

###### g_inet_address_mask_equal

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

since: 2.32

###### g_inet_address_mask_get_address

Gets `mask`‘s base address.

since: 2.32

###### g_inet_address_mask_get_family

Gets the `GSocketFamily` of `mask`‘s address.

since: 2.32

###### g_inet_address_mask_get_length

Gets `mask`‘s length.

since: 2.32

###### g_inet_address_mask_matches

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

since: 2.32

###### g_inet_address_mask_to_string

Converts `mask` back to its corresponding string form.

since: 2.32

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GInitable (1)

###### g_initable_init

Initializes the object implementing the interface.

since: 2.22

#### Properties

###### Gio.InetAddressMask:address

The base address.

since: 2.32

###### Gio.InetAddressMask:family

The address family (IPv4 or IPv6).

since: 2.32

###### Gio.InetAddressMask:length

The prefix length, in bytes.

since: 2.32

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GioInetAddressMaskClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.