]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
rsockets: Support native IB addressing on connected rsockets
authorSean Hefty <sean.hefty@intel.com>
Thu, 18 Jul 2013 20:26:15 +0000 (13:26 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 18 Jul 2013 20:26:15 +0000 (13:26 -0700)
Update rsockets to support AF_IB addresses on connected rsockets.
Support for datagram rsockets is more difficult as a result of
using real UDP sockets for QP resolution, so that support is
deferred.  For connected sockets, we need to update internal
checks to handle AF_IB.

Allow the user to specify GID addresses into the rsocket sample
applications.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/rsocket.c

index abdd392ed215955dc1c84597b370ee4f8f2d8953..1a6d989d46e3f699147eba5f45d05dd674d3808b 100644 (file)
@@ -1063,7 +1063,7 @@ int rsocket(int domain, int type, int protocol)
        struct rsocket *rs;
        int index, ret;
 
-       if ((domain != PF_INET && domain != PF_INET6) ||
+       if ((domain != AF_INET && domain != AF_INET6 && domain != AF_IB) ||
            ((type != SOCK_STREAM) && (type != SOCK_DGRAM)) ||
            (type == SOCK_STREAM && protocol && protocol != IPPROTO_TCP) ||
            (type == SOCK_DGRAM && protocol && protocol != IPPROTO_UDP))