get_primary_connection


Description:

public unowned ActiveConnection get_primary_connection ()

Gets the ActiveConnection corresponding to the primary active network device.

In particular, when there is no VPN active, or the VPN does not have the default route, this returns the active connection that has the default route. If there is a VPN active with the default route, then this function returns the active connection that contains the route to the VPN endpoint.

If there is no default route, or the default route is over a non-NetworkManager-recognized device, this will return null.

Parameters:

this

an Client

Returns:

the appropriate ActiveConnection, if any




2022 vala-language.org