te
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END

Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.

-*- nroff -*-

IBV_GID_REACHABLE 3 2012-08-08 libibverbs "Libibverbs Programmer's Manual"
"NAME"
ibv_gid_reachable - will contact the SA to do a path record lookup from the device,port specified by 'context','port' to the remote 'gid_p'. It finds the status of the remote GID (reachable or unreachable).
"SYNOPSIS"
 #include <infiniband/verbs.h>  "int ibv_gid_reachable(struct ibv_context *context, uint port,  "union ibv_gid *gid_p, int timeout) 

gid_p A pointer to the gid to check

context A device context obtained from a call to ibv_open_device(). This identifies the device to use in order to contact the remote 'gid_p'.

port Specifies the port on the device associated with 'context'. If '0' then the implementation will choose a port.

timeout It is currently set to '0' and reserved for future enhancement. ibv_gid_reachable() will block until a response (success, fail or no path found) is obtained.

"DESCRIPTION"
ibv_gid_reachable() will contact the SA from the device,port specified by 'context','port' to the remote 'gid_p'. It finds the status of the remote 'gid_p' (reachable or not). ibv_gid_reachable() returns 0 on success, -1 on failure with errno set as follows:

EINVAL Invalid argument.

ENXIO No Path Found

EIO I/O Error

ENOMEM Could not allocate kernel resource required to perform the lookup.

EINTR Abort due to interrupted system call.

"RETURN VALUE"
ibv_gid_reachable() returns 0 on success, and -1 on error.
"NOTES"