.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "IBV_QUERY_GID_TABLE" "3" "2020-04-24" "libibverbs" "Libibverbs Programmer\[cq]s Manual" .hy .SH NAME .PP ibv_query_gid_table - query an InfiniBand device\[cq]s GID table .SH SYNOPSIS .IP .nf \f[C] #include ssize_t ibv_query_gid_table(struct ibv_context *context, struct ibv_gid_entry *entries, size_t max_entries, uint32_t flags); \f[R] .fi .SH DESCRIPTION .PP \f[B]ibv_query_gid_table()\f[R] returns the valid GID table entries of the RDMA device context \f[I]context\f[R] at the pointer \f[I]entries\f[R]. .PP A caller must allocate \f[I]entries\f[R] array for the GID table entries it desires to query. This API returns only valid GID table entries. .PP A caller must pass non zero number of entries at \f[I]max_entries\f[R] that corresponds to the size of \f[I]entries\f[R] array. .PP \f[I]entries\f[R] array must be allocated such that it can contain all the valid GID table entries of the device. If there are more valid GID entries than the provided value of \f[I]max_entries\f[R] and \f[I]entries\f[R] array, the call will fail. For example, if an RDMA device \f[I]context\f[R] has a total of 10 valid GID entries, \f[I]entries\f[R] should be allocated for at least 10 entries, and \f[I]max_entries\f[R] should be set appropriately. .SH ARGUMENTS .TP \f[I]context\f[R] The context of the device to query. .TP \f[I]entries\f[R] Array of ibv_gid_entry structs where the GID entries are returned. Please see \f[B]ibv_query_gid_ex\f[R](3) man page for \f[I]ibv_gid_entry\f[R]. .TP \f[I]max_entries\f[R] Maximum number of entries that can be returned. .TP \f[I]flags\f[R] Extra fields to query post \f[I]entries->ndev_ifindex\f[R], for now must be 0. .SH RETURN VALUE .PP \f[B]ibv_query_gid_table()\f[R] returns the number of entries that were read on success or negative errno value on error. Number of entries returned is <= max_entries. .SH SEE ALSO .PP \f[B]ibv_open_device\f[R](3), \f[B]ibv_query_device\f[R](3), \f[B]ibv_query_port\f[R](3), \f[B]ibv_query_gid_ex\f[R](3) .SH AUTHOR .PP Parav Pandit