interface index

From: Patrick Rittiner
Date: Thu Jul 16 2009 - 05:32:23 EST


hello,

can someone tell me how I can get the interface index of a socket connection in kernel space? I mean ow can I use this call in kernel space:
ioctl(sock, SIOCGIFFLAGS, &ifInfo)
I need it to bind the socket to a ethernet interface.
thanks a lot
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/