Gets the group ID (GID) that is the network interface controller
(NIC)'s Media Control Access (MAC) address.
Syntax
#include <rdma/verbs.h>
int ibv_query_gid(struct ibv_context *context, uint8_t port_num, int index, union ibv_gid *gid)
Description
The ibv_query_gid() function
returns the MAC address of the NIC in the subnet_prefix
parameter
and 0 in the interface_id
identifier.
Input Parameters
Item |
Description |
context |
Specifies the context pointer that is returned
by the ibv_open_device() function. |
port_num |
Specifies the port number for the device that
is returned by the ibv_query_device() function. |
index |
Specifies the index for the port_num parameter
that is derived from the attributes that are returned by the ibv_query_port() function. |
Output Parameter
Item |
Description |
gid |
Specifies the pointer where the group ID (GID)
can be stored. |
Return Values
Item |
Description |
0 |
On success. |
-1 |
The request fails because of one of the following
reasons:
- The context or gid parameter is NULL.
- The open or write operation failed on the /dev/rdma/ofed_adm administrator
device.
|
ibv_gid
union ibv_gid
{
uint8_t raw[16];
struct
{
uint64_t subnet_prefix;
uint64_t interface_id;
} global;
};