rdma_getaddrinfo
Translates the transport independent address to establish communication.
Syntax
Description
The rdma_getaddrinfo function
resolves the destination node and service address and returns information
that is required to establish communication. The function provides
the RDMA functional equivalent to getaddrinfo
.
Notes:
You
must specify either node or service parameters for the translation.
If hints are provided, the operation is controlled by the hints.ai_flags
flag.
If the RAI_PASSIVE
flag is specified, the call resolves
the address information that is used on the passive side of a connection.
Item | Description |
---|---|
ai_flags | Specifies the hint flags that control the operation. The following
flags are supported:
|
ai_family | Specifies the address family for the source and destination
address. The supported families are AF_IB , AF_INET ,
and AF_INET6 . |
ai_qp_type | Indicates the type of RDMA QP used for communication. The
types that are supported are IBV_UD (unreliable datagram)
and IBV_RC (reliable connected). |
ai_port_space | Indicates the RDMA port space that is in use. The supported
values are RDMA_PS_UDP and RDMA_PS_TCP . |
ai_src_len | Indicates the length of the source address that
is referenced by the ai_src_addr flag. If an appropriate
source address for a given destination is not discovered the value
of the ai_src_len flag is 0. |
ai_dst_len | Indicates the length of the destination address
that is referenced by ai_src_addr flag. This flag
is set to 0, if the RAI_PASSIVE flag was specified
as part of the hints. |
ai_src_addr | Specifies the address for the local RDMA device, if the RDMA device is provided. |
ai_dst_addr | Specifies the destination address for the RDMA device, if the RDMA device is provided. |
ai_src_canonname | Specifies the canonical for the source. |
ai_dst_canonname | Specifies the canonical for the destination. |
ai_route_len | Specifies the size of the routing information
buffer that is referenced by the ai_route flag. If
the transport does not require routing data or none of the address
could be resolved, the ai_route flag is 0. |
ai_connect_len | Specifies the routing information for RDMA transports
that require routing data for establishing the connection. The format
of the routing data depends on the underlying transport. If InfiniBand
transports are used, the ai_route flag references
an array of ibv_path_data structures. |
ai_connect | Specifies the size of connection information
referenced by ai_route flag. If the underlying transport
does not require any additional information to establish connection,
the ai_connect flag is set to 0. |
ai_next | Specifies the pointer to the next rdma_addrinfo structure
in the list. The ai_next flag is NULL if no structures
exist. |
Parameters
Item | Description |
---|---|
hints | Specifies a reference to a rdma_addrinfo structure
containing hints about the type of service the caller supports. |
node | Specifies the optional name, dotted-decimal IPv4 or IPv6 hexadecimal address that must be resolved. |
res | Specifies a pointer to a linked list of rdma_addrinfo structures
that contains the response information. |
service | Specifies the service name or port number of the address. |
Return Values
Returns 0 on success, or -1 on error. If an error occurs, then errno is set to indicate the reason for failure.