3 .TH IBV_GET_DEVICE_LIST 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
5 ibv_get_device_list, ibv_free_device_list \- get and release list of available RDMA devices
8 .B #include <infiniband/verbs.h>
10 .BI "struct ibv_device **ibv_get_device_list(int " "*num_devices" );
12 .BI "void ibv_free_device_list(struct ibv_device " "**list" );
15 .B ibv_get_device_list()
16 returns a NULL-terminated array of RDMA devices currently available.
19 is optional; if not NULL, it is set to the number of devices returned in the array.
21 .B ibv_free_device_list()
22 frees the array of devices
25 .B ibv_get_device_list()\fR.
27 .B ibv_get_device_list()
28 returns the array of available RDMA devices, or sets
30 and returns NULL if the request fails. If no devices are found then
32 is set to 0, and non-NULL is returned.
34 .B ibv_free_device_list()
42 No kernel support for RDMA.
45 Insufficient memory to complete the operation.
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.
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)
60 Dotan Barak <dotanb@mellanox.co.il>