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

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Tue Jan 15 17:13:08 PST 2008


On Tue, Jan 15, 2008 at 04:28:16PM -0800, Sean Hefty wrote:
> >I'm prototyping this now (as part of our OMPI/rdma-cm/iwarp work).
> 
> I'm not sure about what the interface should be, since there could
> be multiple addresses (IPv4 and IPv6) on a port.  As a generality,
> my preference is to use sockaddr where possible.

Generally sockaddr alone for this kind of purpose is frowned on in my
view since there is no portable way to get the address length, and all
downstream functions require the length..

The best interface is something like getaddrinfo that returns a new
type that has the family, address and length in the structure.

Also, your second version would require the address array to be of
type sockaddr_storage, since sockaddr can only point to, not store
addresses..

Jason



More information about the general mailing list