]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_get_device_list.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_get_device_list.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_GET_DEVICE_LIST 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_get_device_list, ibv_free_device_list \- get and release list of available RDMA devices
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "struct ibv_device **ibv_get_device_list(int " "*num_devices" );
11 .sp
12 .BI "void ibv_free_device_list(struct ibv_device " "**list" );
13 .fi
14 .SH "DESCRIPTION"
15 .B ibv_get_device_list()
16 returns a NULL-terminated array of RDMA devices currently available.
17 The argument
18 .I num_devices
19 is optional; if not NULL, it is set to the number of devices returned in the array.
20 .PP
21 .B ibv_free_device_list()
22 frees the array of devices
23 .I list
24 returned by
25 .B ibv_get_device_list()\fR.
26 .SH "RETURN VALUE"
27 .B ibv_get_device_list()
28 returns the array of available RDMA devices, or sets
29 .I errno
30 and returns NULL if the request fails. If no devices are found then
31 .I num_devices
32 is set to 0, and non-NULL is returned.
33 .PP
34 .B ibv_free_device_list()
35 returns no value.
36 .SH "ERRORS"
37 .TP
38 .B EPERM
39 Permission denied.
40 .TP
41 .B ENOSYS
42 No kernel support for RDMA.
43 .TP
44 .B ENOMEM
45 Insufficient memory to complete the operation.
46 .SH "NOTES"
47 Client code should open all the devices it intends to use with
48 .B ibv_open_device()\fR before calling
49 .B ibv_free_device_list()\fR.
50 Once it frees the array with
51 .B ibv_free_device_list()\fR,
52 it will be able to use only the open devices; pointers to unopened devices will no longer be valid.
53 .SH "SEE ALSO"
54 .BR ibv_fork_init (3),
55 .BR ibv_get_device_name (3),
56 .BR ibv_get_device_guid (3),
57 .BR ibv_open_device (3)
58 .SH "AUTHORS"
59 .TP
60 Dotan Barak <dotanb@mellanox.co.il>