See your nearest netdevice(7) and rtnetlink(3) Linux manpages.
- Gus
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>
>
"Netlink is a little harder to find documentation on, but is preferred
for new code since SIOCGIFCONF can't return IPv6 addresses (and
Android is IPv6-capable)."
Likewise, SIOCSIFCONF is IPv4-only - you should use netlink to get and
set IPv6 config. I suspect Android will require you to have elevated
privileges to modify interface configuration (usual Linux requires
root or CAP_NET_ADMIN).
- Gus
> On Jul 21, 11:15 pm, Akshay Gattani <akshay.gattani...@gmail.com>
> wrote:
>> Thanks Angus for the pointers. I will probably go the Netlink way as
>> you have suggested.
>>
>> On Jul 20, 6:57 pm, Angus Lees <al...@google.com> wrote:
>>
>> > The two usual ways of doing this on any Linux kernel is via
>> > SIOCGIFCONFioctlcalls or netlink. Netlink is a little harder to
>> > find documentation on, but is preferred for new code since SIOCGIFCONF
>> > can't returnIPv6addresses (and Android isIPv6-capable).
>> > I believe both should work on Android without any special permissions
>> > - getifaddrs() looks like it is a tiny wrapper around
>> >ioctl(SIOCGIFCONF) so should be trivial to reimplement if you want to
>> > go that route.
>>
>> > See your nearest netdevice(7) and rtnetlink(3) Linux manpages.
>>
>> >
>>