[LiSA-Devel] [CLI&SW_API] get_if_list

Andreea-Cristina Hodea andreea.cristina.hodea at gmail.com
Tue Apr 16 16:48:54 EEST 2013


Hello,

I'm working on interposing the sw_api between cli and lisa kernel
module and, right now, at cmd_show_vlan, which calls if_map_fetch.
I've made some digging on the functions calling if_map_fetch (which
currently makes a ioctl on SW_GETIFLIST) and it turned out that almost
all of them also need the name of the interface and not only the
ifindex. I remember we talked about the difference between the name
and the description of an interface, so now I'm asking myself where to
obtain the name of an interface from because get_if_list returns only
the indexes and not a struct net_switch_dev *.

If I understand correctly, the name of a interface is held in kernel
space and description of a interface is held in userspace, so I think
there was a misunderstanding on get_if_list returning only the
ifindex, as for obtaining the names (and not the descriptions) another
system call would be required. Is it ok if get_if_list returns a list
of net_switch_dev structures instead of ifindexes?

Andreea


More information about the LiSA-Devel mailing list