Hi,
On Fri, 2014-03-28 at 11:07 -0400, Glenn Schmottlach wrote:
> After reading the docs on Sessions, I have several questions that I
> don't believe were directly addressed:
>
> 1) Let's say I have two session policies:
>
> [policy_auser]
> uid = auser
> AllowedBearers = wifi
>
> [policy_buser]
> uid = buser
> AllowedBearers = cellular
>
> At a given point, the WiFi service is "online" and the "auser" is
> connected. The "buser" application chooses to "connect". What will be
> the outcome? Will ConnMan disconnect WiFi and connect the cellular
> service so "buser" can access the cellular network? Will the "buser"
> be informed that a connection cannot be made? Will ConnMan establish
> two connections in parallel so that both users are connected to the
> network ("auser" over WiFi, "buser" over cellular)? If only one
> session can be connected (e.g. they don't have a common bearer), who
> takes priority? Is it solely based on the priority field in the
> session policy file?
Sessions create their own routing tables so that auser has one for
itself and buser another one. As the matches were by UID, the routing
tables are selected by UID. So both auser and buser will be connected
with different default routes. If auser or buser must have a certain
type of connection connected, they have to call Connect() in the Session
API to ensure this. Otherwise auser and buser are only notified when the
allowed bearers match services connected by ConnMan autoconnect or some
other Sessions issuing Connect().
The global routing table used by everybody else will have its default
route updated (or not) according to "normal" rules, i.e. the new service
if the new service can go online and the existing service was in state
ready, else the existing service is kept.
> 2) Not directly session related, but what triggers the service state
> to become "online". The documentation indicates that when the
> Internet connection is available and "verified" it will be marked as
> "online". What criteria has to be met in order to be declared
> "verified"?
If a http connect to ipv{4,6}.connman.net succeeds, the connection is
considered online. pacrunnner,
http://git.kernel.org/cgit/network/connman/pacrunner.git/, will help
here with figuring out automatic proxy.pac configuration on behalf of
ConnMan and other applications; a patch exists also for libproxy to
utilize pacrunner.
> 3) Is there ever a scenario where two services can be declared
> "online" at the same time? If possible, who owns the default route if
> gateway information is available?
Only one service at a time can be online.
> Fundamentally, I'm trying to understand whether it's possible, under
> ConnMan, to have more than one active/configured interface/service
> available which applications can use to reach the Internet. Perhaps
> application "A" is designed to work over WiFi only while application
> "B" works over a cellular connection. If both interfaces/services are
> up/ready, could these applications reach the Internet simultaneously?
> Is this a use-case ConnMan was designed for? Is it a use-case that is
> planned to be supported?
Use Session support in ConnMan to achieve this. With or without explicit
Connect()/Disconnect() calls. A few more wrinkles have been sorted out
in upstream and will land into the next release.
Cheers,
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman