Project

General

Profile

Actions

Feature #3654

closed

ioctl-based listNetworkInterfaces

Added by Alex Afanasyev over 8 years ago. Updated almost 8 years ago.

Status:
Abandoned
Priority:
Normal
Assignee:
-
Category:
Core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Listing available interfaces is necessary to enable multicast Faces.
Currently, listNetworkInterfaces function is implemented based on getifaddrs.

On some platforms, including Android NDK, getifaddrs is unavailable.
However, similar functionality, at least in the simplified form, can be implemented using direct ioctl system calls.

This task is to make ioctl based implementation of listNetworkInterfaces method, at the minimum targeting Android 19 platform.


Related issues 2 (0 open2 closed)

Has duplicate NFD-android - Feature #3765: listNetworkInterfacesAbandoned09/06/2016

Actions
Copied to NFD - Feature #3770: ioctl-based listNetworkInterfacesAbandonedzipeng wang09/08/2016

Actions
Actions #1

Updated by Alex Afanasyev over 8 years ago

The original modifications were done during NDN Hackathon by Pedro Soares (Universidade Fedara de Para - UFPA), Pedro Batista (Universidade Fedara de Para - UFPA).

http://gerrit.named-data.net/#/c/2791/ (not yet finished at the time of this note).

Actions #2

Updated by Junxiao Shi over 8 years ago

  • Tracker changed from Task to Feature
  • Subject changed from ioctl-based alternative to getifaddrs to ioctl-based listNetworkInterfaces
  • Description updated (diff)

What's the functional limitation of ioctl compared to getifaddrs?

Does it skip some interfaces?
Which interfaces are skipped?

Does it skip some attributes of an interface?
Which attributes are unavailable?

Does the unavailability of an attribute cause a semantic error?
For example, suppose NetworkInterfaceInfo::broadcastAddress becomes unavailable, it would be semantic error because this field has no Doxygen so I assume it's always available.
Doxygen needs to be added to every field that could be unavailable, and indicate what would be the value when the field is unavailable.

Actions #3

Updated by Davide Pesavento over 8 years ago

  • Start date deleted (06/21/2016)

As I commented on gerrit, the SIOCGIFCONF/SIOCGIFBRDADDR method returns only IPv4 info; no IPv6 and no LL stuff. At least that's what I understood, and what a quick test on linux confirms.

If this is an important feature for Android that can't be postponed and IPv4 is enough, then fine. Otherwise, assuming the Android kernel supports netlink, I suggest to reimplement listNetworkInterfaces() on top of ndn-cxx's enhanced NetworkMonitor (#3353).

Actions #4

Updated by Junxiao Shi over 8 years ago

The only problem of lacking IPv6 is that two Androids cannot talk to each other over cellular network.
Many carriers assign a globally unique IPv6 address when a phone connects to UMTS network, but a phone only gets an IPv4 address behind NAT.

However, I've never tested whether this IPv6 address is globally reachable.

Actions #5

Updated by Alex Afanasyev over 8 years ago

We haven't enabled IPv6 multicast support, so not having IPv6 addresses would be ok. I would be ok with netlink-based implementation if it works, though this one definitely works and we can merge (at least as a short-term solution).

Actions #6

Updated by zipeng wang over 8 years ago

  • Copied to Feature #3770: ioctl-based listNetworkInterfaces added
Actions #7

Updated by Davide Pesavento over 8 years ago

Actions #8

Updated by Junxiao Shi about 8 years ago

A quick search finds a getifaddrs implementation for Android NDK https://github.com/morristech/android-ifaddrs, which is based on rtnetlink.
#3353 is also based on rtnetlink.
Maybe we could adapt #3353, and ioctl-based implementation isn't needed after all?

Actions #9

Updated by Davide Pesavento about 8 years ago

Junxiao Shi wrote:

Maybe we could adapt #3353, and ioctl-based implementation isn't needed after all?

Yep, this is what I suggested in note-3.

Actions #10

Updated by Alex Afanasyev almost 8 years ago

  • Status changed from New to Abandoned
  • Assignee deleted (Alex Afanasyev)
Actions

Also available in: Atom PDF