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 _______________________________________________ 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
