[LiSA-Devel] Get interface name

Claudiu Ghioc claudiughioc at gmail.com
Thu May 9 18:39:11 EEST 2013


Hello,

I have some trouble retrieving an interface's name based on its index.
In if_add (in the "bridge" and "8021q" implementation) I have to add
the interface to the default bridge ("vlan1") and I need the name of
the interface. I used the existing function if_get_name(from
lib/if_generic.h) with different kind of sockets. I tried
"socket(AF_UNIX, SOCK_DGRAM, 0);" and "socket(PF_INET, SOCK_STREAM,
0);" and it still returns null. I found that any kind of socket would
suffice. The LiSA implementation used the PF_SWITCH socket. Any idea?

Thank you!

-- 
Claudiu Ghioc
Software Developer
CloudBit
Email: claudiu.ghioc at gmail.com
+(40) 745 783 796


More information about the LiSA-Devel mailing list