Hello Patrik,

But shouldn't the gateway returned for each service be the route setup for
the interface on which the service is running (at least display purposes)

ie.
192.168.1.1     *               255.255.255.255 UH    0      0        0 eth0
192.168.6.1     *               255.255.255.255 UH    0      0        0
wlan0

By looking up the service that is currently in the online state, i would be
able to tell which is the default route (provided that only one service is
in the online at any given time, which right now is not always the case).

Of course, i should be able to get the gateway information using socket
api's or something for my display purposes. But i believe connman would do
a better job at it ;)

Regards
~Sameer



On Mon, Feb 25, 2013 at 6:03 PM, Patrik Flykt
<patrik.fl...@linux.intel.com>wrote:

>
>         Hi,
>
> On Mon, 2013-02-25 at 17:32 +0530, Sameer Naik wrote:
> > I found that when i connect both the wired and wifi technologies (i.e.
> > connect to a service for each), only one of them goes in the online
> > state.
> > Both will be never enter the online state under normal circumstances.
> >
> > eg.
> > 1. Start connman with lan cable connected
> >       Connman connects to the lan network and enter the online state
> > 2. Connect to a wireless service
> >       Connman connects to the wireless service, and the service
> > remains in
> > the offline state until the ethernet cable is disconnected.
> >
> > This is probably a behaviour by design and i can understand why it is
> > this
> > way. One of the reason being that only one interface can
> > serve as the default route at a time, etc.
>
> Your observation is correct, only one default route is set at a time. As
> a default route is defined as matching every packet and sending the
> packets to the gateway, only one gateway is set at any time. So only the
> service which has the default route will contain gateway information.
> Thus the network information provided by all services is identical to
> what can be read from the routing table.
>
> Cheers,
>
>         Patrik
>
> _______________________________________________
> connman mailing list
> connman@connman.net
> http://lists.connman.net/listinfo/connman
>
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to