Dear All,
I'm trying to set the Ipv4 configuration using the setProperty in the intefarce
net.connman.Service.
The documentation says that the the data passed to the interface must be a dict
with same values as IPv4 property.
So I've created a GVariant of type a{sv} i.e. an array of dict entries made of
a string and a variance.
Calling setProperty on services ( not connected ) do not change the
configuration as expected.
What am I doing wrong? I suspect wrong data definition for the configuration.
Thanks in advance
Below some code
GVariant * iResVar = NULL;
GVariant * iVarArr[4];
iVarArr[0] = g_variant_new_dict_entry( g_variant_new_string( "Method"
), g_variant_new_variant( g_variant_new_string( "manual" ) ) );
iVarArr[1] = g_variant_new_dict_entry( g_variant_new_string( "Address
), g_variant_new_variant( g_variant_new_string( "127.0.0.1" ) ) );
iVarArr[2] = g_variant_new_dict_entry( g_variant_new_string( "Netmask"
), g_variant_new_variant( g_variant_new_string( "255.255.255.0" ) ) );
iVarArr[3] = g_variant_new_dict_entry( g_variant_new_string( "Gateway"
), g_variant_new_variant( g_variant_new_string( "1.2.3.4" ) ) );
iResVar = g_variant_new_variant( g_variant_new_array ( ((const
GVariantType *) "{sv}"), iVarArr, 4 ) );
net_connman_service_call_set_property_sync(
NET_CONNMAN_SERVICE ( pServiceProxy ),
"IPv4.Configuration", iResVal, NULL, &iError );
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman