Hi Denis,
Thanks for the comments.
> +enum ofono_gprs_addrconf {
> + OFONO_GPRS_ADDRCONF_NONE,
> + OFONO_GPRS_ADDRCONF_STATIC,
> + OFONO_GPRS_ADDRCONF_DHCP,
> +};
> +
What exactly is the _NONE addrconf for? And why don't we use
a gboolean
here like before?
Neither "static" nor "DHCP" makes sense for IPv6. If we have an IPv6
only context, the "Method" property will not show up at all.
I also wanted to leave the door open for additional address configuration protocols in
case e.g. IPv6 capable modems with virtual ethernet intefaces require some weird quirks. I
also felt this was a bit cleaner, although that is a matter of opinion, of course.
Normally, IPv6 addresses and routes are autoconfigured using IPv6 stateless address
autoconfiguration followed optionally by DHCPv6 to get additional settings. The kernel
actually starts stateless address autoconfiguration immediately when the interface is
configured up (which oFono does), assuming the interface already has a link-local IPv6
address (which all Ethernet interface do have, as it is calculated from the MAC address
and added automatically).
Point-to-point interfaces, on the other, require the link-local address to be added
manually to the interface before the autoconfiguration can happen. oFono should probably
add the address to be consistent with Ethernet interfaces.
The upshot would be that IPv6 could be autoconfigured immediately without connman's
intervention. IPv6 does not have private address spaces, so in theory connman does not
really have to care about IPv6 addresses and routes. However, the optional DHCPv6 step
would probably be controlled by connman. Configuration of IPv6 tethering would be another
optional followup step controlled by connman.
On the other hand, if we want connman to be fully in charge, we could change oFono to
always leave the network interface down and let connman do everything. Marcels input on
this would be welcome as well.
Regards,
MikaL