Metered connections
- From: Beniamino Galvani <bgalvani redhat com>
- To: networkmanager-list gnome org
- Subject: Metered connections
- Date: Thu, 30 Apr 2015 16:37:12 +0200
Hi,
we have an open BZ item requesting a way to report information about
metered connections:
https://bugzilla.gnome.org/show_bug.cgi?id=741725
I was thinking to a possible way to implement this starting from
Thomas' comments on BZ and my current idea is:
- each connection would have a 'metered' string property with
possible values 'yes', 'no', 'unknown' (or 'auto'?)
- each device would also have a 'metered' string property with
possible values:
* yes/no: set if the value for the connection is yes/no
* unknown: set if the device is not connected
* guess-yes/guess-no: set when the value for the connection is
'unknown'; the actual value is based on some heuristics
- the value will be changed for a device only after it enters the
Activated and Disconnected states
- a straightforward heuristic is to look at the type of connection:
for example, GSM connections would be considered as metered while
all other connections would default to not metered
- Android devices in wireless hotspot mode send a vendor-specific
DHCP option containing the string 'ANDROID_METERED': we can parse
this option in nm_dhcp_utils_ip[46]_config_from_options and add a
new field to NMIP[46]Config to keep track of it. Later, when the
device becomes Activated we can check if its IP configurations
have that flag set to decide if the device must be 'guess-yes' or
'guess-no' metered
Any other ideas or suggestions are welcome!
Beniamino
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]