On Tue, Jan 15, 2008 at 05:38:05PM -0600, Steve Wise wrote:

> Here's a simple ipv4-only way to do this:

Maybe a better approach is to return the underlying
interface index (ie if_nametoindex) and let the caller worry about
properly querying the kernel.

The right way these days is to use netlink and get the full IPv4/v6
list for the interface and that is a fair chunk of code if you can't
use the netlink library.. The ioctl really only works in a very
limited case and is certainly no good if you are doing ipv6.

This would also make it easier for the caller to do more advanced
things like base connection decisions on the routing tables.

Jason
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to