Rework struct glibtop_netload
@bdejean
Submitted by Ben Link to original bug (#565096)
Description
The current glibtop_get_netload API has many limitation:
- it doesn't provide broadcast address for IPv4 interface
- it supports only 1 IPv4 address per interface
- it supports only 1 IPv6 address per interface
May be it would be nice to split netload into:
-
keep netload as is for compatibility, eventually strip it
-
provide a new API to retrieve all addresses uses by an interface, possibly returning an array of struct { type; mtu; hardware address; union address { struct IPv4 { address, subnet, broadcast }; struct IPv6 { address, prefix, scope }; }; };
Or it would be also possible to enlarge struct glibtop_netload so that it would include a fixed number of addresses (say 32 ?).