[ofa-general] Re: new API for the rdma-cma

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Tue Jan 15 16:18:08 PST 2008


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



More information about the general mailing list