1RDMA_GETADDRINFO(3) Librdmacm Programmer's Manual RDMA_GETADDRINFO(3)
2
3
4
6 rdma_getaddrinfo - Provides transport independent address translation.
7
9 #include <rdma/rdma_cma.h>
10
11 int rdma_getaddrinfo (const char *node, const char *service, const
12 struct rdma_addrinfo *hints, struct rdma_addrinfo **res);
13
15 node Optional, name, dotted-decimal IPv4, or IPv6 hex address to
16 resolve.
17
18 service Service name or port number of address.
19
20 hints Reference to an rdma_addrinfo structure containing hints
21 about the type of service the caller supports.
22
23 res A pointer to a linked list of rdma_addrinfo structures con‐
24 taining response information.
25
27 Resolves the destination node and service address and returns informa‐
28 tion needed to establish communication. Provides the RDMA functional
29 equivalent to getaddrinfo.
30
32 Returns 0 on success, or -1 on error (errno will be set to indicate the
33 failure reason), or one of the following nonzero error codes:
34
35 EAI_ADDRFAMILY
36 The specified network host does not have any network ad‐
37 dresses in the requested address family.
38
39 EAI_AGAIN The name server returned a temporary failure indication.
40 Try again later.
41
42 EAI_BADFLAGS
43 hints.ai_flags contains invalid flags.
44
45 EAI_FAIL The name server returned a permanent failure indication.
46
47 EAI_FAMILY The requested address family is not supported.
48
49 EAI_MEMORY Out of memory.
50
51 EAI_NODATA The specified network host exists, but does not have any
52 network addresses defined.
53
54 EAI_NONAME The node or service is not known; or both node and service
55 are NULL.
56
57 EAI_SERVICE The requested service is not available for the requested QP
58 type. It may be available through another QP type.
59
60 EAI_QPTYPE The requested socket type is not supported. This could oc‐
61 cur, for example, if hints.ai_qptype and
62 hints.ai_port_space are inconsistent (e.g., IBV_QPT_UD and
63 RDMA_PS_TCP, respectively).
64
65 EAI_SYSTEM Other system error, check errno for details. The gai_str‐
66 error() function translates these error codes to a human
67 readable string, suitable for error reporting.
68
70 Either node, service, or hints must be provided. If hints are pro‐
71 vided, the operation will be controlled by hints.ai_flags. If RAI_PAS‐
72 SIVE is specified, the call will resolve address information for use on
73 the passive side of a connection. If node is provided, rdma_getad‐
74 drinfo will attempt to resolve the RDMA address, route, and connection
75 data to the given node. The hints parameter, if provided, may be used
76 to control the resulting output as indicated below. If node is not
77 given, rdma_getaddrinfo will attempt to resolve the RDMA addressing in‐
78 formation based on the hints.ai_src_addr, hints.ai_dst_addr, or
79 hints.ai_route.
80
82 ai_flags Hint flags that control the operation. Supported flags
83 are:
84
85 RAI_PASSIVE Indicates that the results will be used on the passive/lis‐
86 tening side of a connection.
87
88 RAI_NUMERICHOST
89 If specified, then the node parameter, if provided, must be
90 a numerical network address. This flag suppresses any
91 lengthy address resolution.
92
93 RAI_NOROUTE If set, this flag suppresses any lengthy route resolution.
94
95 RAI_FAMILY If set, the ai_family setting should be used as an input
96 hint for interpretting the node parameter.
97
98 ai_family Address family for the source and destination address.
99 Supported families are: AF_INET, AF_INET6, and AF_IB.
100
101 ai_qp_type Indicates the type of RDMA QP used for communication. Sup‐
102 ported types are: IBV_QPT_UD (unreliable datagram) and
103 IBV_QPT_RC (reliable connected).
104
105 ai_port_space
106 RDMA port space in use. Supported values are: RDMA_PS_UDP,
107 RDMA_PS_TCP, and RDMA_PS_IB.
108
109 ai_src_len The length of the source address referenced by ai_src_addr.
110 This will be 0 if an appropriate source address could not
111 be discovered for a given destination.
112
113 ai_dst_len The length of the destination address referenced by
114 ai_dst_addr. This will be 0 if the RAI_PASSIVE flag was
115 specified as part of the hints.
116
117 ai_src_addr If provided, the address for the local RDMA device.
118
119 ai_dst_addr If provided, the address for the destination RDMA device.
120
121 ai_src_canonname
122 The canonical for the source.
123
124 ai_dst_canonname
125 The canonical for the destination.
126
127 ai_route_len
128 Size of the routing information buffer referenced by
129 ai_route. This will be 0 if the underlying transport does
130 not require routing data, or none could be resolved.
131
132 ai_route Routing information for RDMA transports that require rout‐
133 ing data as part of connection establishment. The format
134 of the routing data depends on the underlying transport.
135 If Infiniband transports are used, ai_route will reference
136 an array of struct ibv_path_data on output, if routing data
137 is available. Routing paths may be restricted by setting
138 desired routing data fields on input to rdma_getaddrinfo.
139 For Infiniband, hints.ai_route may reference an array of
140 struct ibv_path_record or struct ibv_path_data on input.
141
142 ai_connect_len
143 Size of connection information referenced by ai_connect.
144 This will be 0 if the underlying transport does not require
145 additional connection information.
146
147 ai_connect Data exchanged as part of the connection establishment
148 process. If provided, ai_connect data must be transferred
149 as private data, with any user supplied private data fol‐
150 lowing it.
151
152 ai_next Pointer to the next rdma_addrinfo structure in the list.
153 Will be NULL if no more structures exist.
154
156 rdma_create_id(3), rdma_resolve_route(3), rdma_connect(3), rdma_cre‐
157 ate_qp(3), rdma_bind_addr(3), rdma_create_ep(3)
158
159
160
161librdmacm 2010-07-19 RDMA_GETADDRINFO(3)