Koushik,
Thiago answered in another message that the most likely cause of the looping is 
the absence of AF_NETLINK address family from Tizen, and I agree.  It is 
unfortunate that Android and Tizen dropped this Linux capability, but there are 
ways to work around it.
I propose two solutions for this issue:

?       Find a Tizen API that will provide notification when a network 
interface has changed state.  Note that the notification doesn?t need to say 
what interface has change (or even how it has changed.)  This is the solution 
used in the new Android caipnwmonitor.c   JNI provides notification that a 
network interface has changed, and the Android caipnwmonitor.c figures out by 
examining the interfaces which one changed.  This solution is coded and pushed, 
but not yet tested, and I hope to have it merged next week.  You can examine it 
in Change 1822.

?       Resume polling to look for changes.  This is an inferior solution, 
especially for constrained devices, including mobile.  Polling keeps 
constrained devices from sleeping, which is how they conserve battery usage.  
Admittedly, there are some other polling loops in IoTivity, but we should all 
work hard to eliminate them.  If polling is deemed necessary, I am including in 
Change 1822 the infrastructure needed to poll for network interface changes 
without using another thread.  If it isn?t obvious to you, I can walk you 
through it.
I am disappointed that I was unable to provide a solution for Tizen network 
monitoring with IP Adapter.  After you determine which of the above solutions 
is applicable to Tizen, I will be glad to work with you to fill that gap.
John Light
Intel OTC OIC Development

From: Koushik Girijala [mailto:[email protected]]
Sent: Thursday, July 23, 2015 3:09 AM
To: Light, John J; iotivity-dev at lists.iotivity.org
Subject: Re: RE: [dev] CAGetNetworkInformation() function does not work


Hi John,



 Verified "ifgetaddrs()" function with tizen casample and found that it is not 
working properly .

 When ifgetaddrs api is called by CAIPGetInterfaceInformation , found it is 
looping inside the function netlink_recv()

 i.e  recvmsg() is not working for tizen, because of which we are not able to 
get network information of device.



Can you suggest any solution for this problem .



Regards,

Koushik



------- Original Message -------

Sender : Light, John J<john.j.light at intel.com<mailto:john.j.light at 
intel.com>>

Date : Jul 20, 2015 21:31 (GMT+05:30)

Title : RE: [dev] CAGetNetworkInformation() function does not work


Koushik,
I wrote what I believed would work on Tizen, but I was unable to verify it 
because I have no Tizen build environment and no Tizen build environment.
Apparently there is a bug in my Network Information code for Tizen.  I 
sincerely  apologize for that.  It was certainly not my intention.
I?m sure there is a relatively simple fix for the Tizen code I provided.  I 
hope you see that reintroducing all the complexity of the old NetworkMonitor 
(extra thread, polling loop, multiple mutexes, many mutex calls, etc.) is not 
necessary.
I will be glad to work with you to find an acceptable solution.
John Light
Intel OTC OIC Development

From: Koushik Girijala [mailto:[email protected]]
Sent: Monday, July 20, 2015 7:38 AM
To: Light, John J; iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at 
lists.iotivity.org>
Cc: hyuna jo
Subject: Re: [dev] CAGetNetworkInformation() function does not work


Hi John,



I verified CA SAMPLE on Tizen, found that CAIPGetInterfaceInformation is 
blocking the flow.

It seems like getifaddrs() api is not working for Tizen.



As suggested by Abhishek Sharma, would have used network monitor for Tizen.



Regards,

Koushik



------- Original Message -------

Sender : hyuna jo<hyuna0213.jo at samsung.com<mailto:hyuna0213.jo at 
samsung.com>> S3/Assistant Engineer/IoT Solution Lab./Samsung Electronics

Date : Jul 20, 2015 16:22 (GMT+05:30)

Title : [dev] CAGetNetworkInformation() function does not work



Hi, John Light



I have taken the latest master code but I have some problems runnings the CA 
sample.
I'm trying to use CAGetNetworkInformation() function to get local network 
information.
but it looks like that it does not work well.
I cannot get the ip address and port information from CAGetNetworkInformation 
function.
currently, CAGetNetworkInformation function returns network interface name only.
why did you change the code to return interface name instead of address and 
fixed the port number with 0?
Without the ip address and port number information, ca sample can not be 
executed well on Linux/Tizen/Android/Arduino platform.
Please help me to resolve this issues.

Regards,
Hyuna Jo
[Image removed by sender.]



[cid:image002.gif at 01D0C521.DC4EAA80]

[http://ext.samsung.net/mailcheck/SeenTimeChecker?do=0fa18573320d62117afc5eb0d1d15f785c6f8b6e216faa140e35c7a397fff71914e1f8fcc37c44e79dd130b31b023ef15296970253332b3707805447a154a46fcf878f9a26ce15a0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150723/bf1b72ff/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 823 bytes
Desc: image001.jpg
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150723/bf1b72ff/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 13168 bytes
Desc: image002.gif
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150723/bf1b72ff/attachment.gif>

Reply via email to