Hi,

On Mon, 2013-11-18 at 13:32 -0800, Andrew LeCain wrote:

> To me, the most obvious way is to use the ipconfig_changed notifier channel
> to fire off events whenever the dhcp state changes. To export the needed
> state, we would then need to add API functions to request the current DHCP
> state and relevant timeouts to ipconfig.h. We could either add specific
> getters or just expose the definition of the connman_ipconfig struct in the
> header. Unfortunately, I can see how this would add a lot more coupling
> between the DHCP module and the the ipconfig structure, so I can understand
> not wanting to do that.
> 
> The other option would be adding a new notifier channel specifically for
> DHCP. We could then collect all the accessors into a new header file, but
> on systems with multiple interfaces, we would need to keep the link between
> the ipconfig and the associated lease, etc.

This is indeed a hairy problem, and there are actually two parts to it.

The problem you describe is ConnMan exporting the excpcted time where
there will be no need for any actions, mostly but not quite tied to DHCP
lease time. Once a service is in online state or known not to be able to
reach that, an non-activity event mechanism could be called with the
DHCP lease time taken as the basis of inactivity calculation.

There is an opposite problem also, that is the system knows it became
active and needs to inform ConnMan that the user will now want to be
serviced. The result of this would be to e.g. check that the most proper
network connection is being used especially when PreferredTechnologies
have been specified. Depending on the situation this could be achieved
using Session API, but depending on the solution to the first problem
activity could also be signalled the other way.

This is unfortunately rough speculation at this time, I don't think
there exists any component with the purpose to indicate activity in the
open source world. Unless of course systemd would have something
available.

Cheers,

        Patrik

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to