Thanks for your kindly reply. I tried with IPv4.configuration, and the settings 
can be read out even in non-connected state.

Can I regard the different usage of IPv4 and IPv4.configuration as following: 
if the service in ready state (connected), we can use IPv4 to read out the 
con-current IP settings (address..etc), and if not in ready state, we can only 
use IPv4.configuration to get the IP settings?

Code piece:

     if (g_str_equal (priv->state, "ready")) {
        value = g_hash_table_lookup (properties, "IPv4");
     } else {
        value = g_hash_table_lookup (properties, "IPv4.Configuration");
     }

Thanks!
Best Regards,
Ying-An

-----Original Message-----
From: connman-boun...@connman.net [mailto:connman-boun...@connman.net] On 
Behalf Of Marcel Holtmann
Sent: Wednesday, May 05, 2010 6:30 PM
To: connman@connman.net
Subject: Re: service.ipv4 attributes can not be got when service is not in 
connection state

Hi Ying-An,

> I am adding static ip setting in Carrick so that people can use static ip on 
> netbook.
> 
> Here I got some problem:  I failed to read out either wired or wireless 
> connection with its ipv4 properties, as ip address, network mask or gateway 
> when it is not in connected state. Only when that connection is established, 
> I can read out those values through the API exposed by connMan0.52.
> 
> I think it is not friendly enough for end users to be not able to see 
> concurrent ip settings (as address, netmask and gateway) before they are 
> trying to make a change, as what they used to do on Windows 7 or Redhat. 
> Could you give some comments upon?

so the IPv4 property is only valid when connected. If you are not
connected, what do you expect to see there.

The IPv4.Configuration property is for the settings that the user
chooses. While the user can choose Method=dhcp here, but then IPv4
property will also tell you the actual assigned IP address etc.

>From a pure configuration UI point of view, you should only be using
IPv4.Configuration and use these values. They represent the users
choice. If you then additionally wanna present the current configuration
you have to look at IPv4. In a lot of cases they might be identical, but
certainly that is not a requirement in all cases.

Regards

Marcel


_______________________________________________
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