Hi, As mentioned in discussion of RFC "Publish DHCP statistics to dbus" on 10/31, we have a usecase that requires knowledge of dhcp statistics (specifically lease duration and lease time) to make power management decisions for the system. As suggested by Marcel, we've implemented this as a plugin, however there are a few changes to the core and api needed to expose this data to the plugin.
Specifically, we need accessors to request the statistics about the lease and a notifier event to trigger every time the lease changes (renew, rebind, etc) I have implemented this as generically as possible to allow other plugins that need information about the lease to use this information as well. Please let me know if there are any changes you'd like to see made before accepting these changes! Cheers, Andrew LeCain Andrew LeCain (1): dhcp: add notifier event when dhcp is renewed gdhcp/client.c | 158 +++++++++++++++++++++++++++++++++++++++++----------- gdhcp/gdhcp.h | 6 ++ include/ipconfig.h | 18 ++++++ src/connman.h | 6 ++ src/dhcp.c | 75 +++++++++++++++++++++++++ src/dhcpv6.c | 93 +++++++++++++++++++++++++++++++ src/ipconfig.c | 35 ++++++++++++ src/service.c | 6 ++ 8 files changed, 366 insertions(+), 31 deletions(-) -- 1.7.9.5 _______________________________________________ connman mailing list [email protected] https://lists.connman.net/mailman/listinfo/connman
