.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "ibv_import_device" "3" "2020-5-3" "libibverbs" "Libibverbs Programmer\[cq]s Manual" .hy .SH NAME .PP ibv_import_device - import a device from a given command FD .SH SYNOPSIS .IP .nf \f[C] #include struct ibv_context *ibv_import_device(int cmd_fd); \f[R] .fi .SH DESCRIPTION .PP \f[B]ibv_import_device()\f[R] returns an \f[I]ibv_context\f[R] pointer that is associated with the given \f[I]cmd_fd\f[R]. .PP The \f[I]cmd_fd\f[R] is obtained from the ibv_context cmd_fd member, which must be dup\[cq]d (eg by dup(), SCM_RIGHTS, etc) before being passed to ibv_import_device(). .PP Once the \f[I]ibv_context\f[R] usage has been ended \f[I]ibv_close_device()\f[R] should be called. This call may cleanup whatever is needed/opposite of the import including closing the command FD. .SH RETURN VALUE .PP \f[B]ibv_import_device()\f[R] returns a pointer to the allocated RDMA context, or NULL if the request fails. .SH SEE ALSO .PP \f[B]ibv_open_device\f[R](3), \f[B]ibv_close_device\f[R](3), .SH AUTHOR .PP Yishai Hadas