Network Monitor


Network monitoring portal

The NetworkMonitor interface provides network status information to sandboxed applications. It is not a portal in the strict sense, since it does not involve user interaction. Applications are expected to use this interface indirectly, via a library API such as the GLib GNetworkMonitor interface.

This documentation describes version 3 of this interface.



version readable u



GetAvailable (
  OUT available b

Returns whether the network is considered available. That is, whether the system as a default route for at least one of IPv4 or IPv6.

This method was added in version 2 to replace the available property.


whether the network is available


GetMetered (
  OUT metered b

Returns whether the network is considered metered. That is, whether the system as traffic flowing through the default connection that is subject ot limitations by service providers.

This method was added in version 2 to replace the metered property.


whether the network is metered


GetConnectivity (
  OUT connectivity u

Returns more detailed information about the host’s network connectivity. The meaning of the value is:

  • 1: Local only. The host is not configured with a route to the internet.

  • 2: Limited connectivity. The host is connected to a network, but can’t reach the full internet.

  • 3: Captive portal. The host is behind a captive portal and cannot reach the full internet.

  • 4: Full network. The host connected to a network, and can reach the full internet.

This method was added in version 2 to replace the connectivity property.


the level of connectivity


GetStatus (
  OUT status a{sv}

Returns the three values all at once.

The following results get returned via status:

  • available (b)

    Whether the network is available.

  • metered (b)

    Whether the network is metered.

  • connectivity (u)

    The level of connectivity.

This method was added in version 3 to avoid multiple round-trips.


a dictionary with the current values


CanReach (
  IN hostname s,
  IN port u,
  OUT reachable b

Returns whether the given hostname is believed to be reachable. This method was added in version 3.


the hostname to reach


the port to reach


Whether the hostname:port was reachable



changed ()

Emitted when the network configuration changes.