aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2012-06-14 16:31:39 -0400
committerRoland Dreier <roland@purestorage.com>2012-07-08 21:02:24 -0400
commit68602120e496a31d8e3b36d0bfc7d9d2456fb05c (patch)
tree04eea1c0673ff60d1e9881b1d73785c0ed6f8271 /include/rdma
parent406b6a25f85271397739a7e9f5af1df665b8a0d0 (diff)
RDMA/cma: Allow user to restrict listens to bound address family
Provide an option for the user to specify that listens should only accept connections where the incoming address family matches that of the locally bound address. This is used to support the equivalent of IPV6_V6ONLY socket option, which allows an app to only accept connection requests directed to IPv6 addresses. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/rdma_cm.h10
-rw-r--r--include/rdma/rdma_user_cm.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index 51988f808181..ad3a3142383a 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -357,4 +357,14 @@ void rdma_set_service_type(struct rdma_cm_id *id, int tos);
357 */ 357 */
358int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse); 358int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse);
359 359
360/**
361 * rdma_set_afonly - Specify that listens are restricted to the
362 * bound address family only.
363 * @id: Communication identifer to configure.
364 * @afonly: Value indicating if listens are restricted.
365 *
366 * Must be set before identifier is in the listening state.
367 */
368int rdma_set_afonly(struct rdma_cm_id *id, int afonly);
369
360#endif /* RDMA_CM_H */ 370#endif /* RDMA_CM_H */
diff --git a/include/rdma/rdma_user_cm.h b/include/rdma/rdma_user_cm.h
index 5348a000c8f3..1ee9239ff8c2 100644
--- a/include/rdma/rdma_user_cm.h
+++ b/include/rdma/rdma_user_cm.h
@@ -224,6 +224,7 @@ enum {
224enum { 224enum {
225 RDMA_OPTION_ID_TOS = 0, 225 RDMA_OPTION_ID_TOS = 0,
226 RDMA_OPTION_ID_REUSEADDR = 1, 226 RDMA_OPTION_ID_REUSEADDR = 1,
227 RDMA_OPTION_ID_AFONLY = 2,
227 RDMA_OPTION_IB_PATH = 1 228 RDMA_OPTION_IB_PATH = 1
228}; 229};
229 230