1RDMA_GETADDRINFO(3)      Librdmacm Programmer's Manual     RDMA_GETADDRINFO(3)
2
3
4

NAME

6       rdma_getaddrinfo - Provides transport independent address translation.
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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

RETURN VALUE

32       Returns  0  on success, or -1 on error.  If an error occurs, errno will
33       be set to indicate the failure reason.
34

NOTES

36       Either node, service, or hints must be provided.   If  hints  are  pro‐
37       vided, the operation will be controlled by hints.ai_flags.  If RAI_PAS‐
38       SIVE is specified, the call will resolve address information for use on
39       the  passive  side  of  a connection.  If node is provided, rdma_getad‐
40       drinfo will attempt to resolve the RDMA address, route, and  connection
41       data  to the given node.  The hints parameter, if provided, may be used
42       to control the resulting output as indicated below.   If  node  is  not
43       given,  rdma_getaddrinfo  will  attempt  to resolve the RDMA addressing
44       information  based  on  the  hints.ai_src_addr,  hints.ai_dst_addr,  or
45       hints.ai_route.
46

rdma_addrinfo

48       ai_flags    Hint  flags  that  control  the operation.  Supported flags
49                   are:
50
51       RAI_PASSIVE Indicates that the results will be used on the passive/lis‐
52                   tening side of a connection.
53
54       RAI_NUMERICHOST
55                   If specified, then the node parameter, if provided, must be
56                   a numerical network  address.   This  flag  suppresses  any
57                   lengthy address resolution.
58
59       RAI_NOROUTE If set, this flag suppresses any lengthy route resolution.
60
61       RAI_FAMILY  If  set,  the  ai_family setting should be used as an input
62                   hint for interpretting the node parameter.
63
64       ai_family   Address family for  the  source  and  destination  address.
65                   Supported families are: AF_INET, AF_INET6, and AF_IB.
66
67       ai_qp_type  Indicates the type of RDMA QP used for communication.  Sup‐
68                   ported types are: IBV_UD (unreliable datagram)  and  IBV_RC
69                   (reliable connected).
70
71       ai_port_space
72                   RDMA port space in use.  Supported values are: RDMA_PS_UDP,
73                   RDMA_PS_TCP, and RDMA_PS_IB.
74
75       ai_src_len  The length of the source address referenced by ai_src_addr.
76                   This  will  be 0 if an appropriate source address could not
77                   be discovered for a given destination.
78
79       ai_dst_len  The  length  of  the  destination  address  referenced   by
80                   ai_dst_addr.   This  will  be 0 if the RAI_PASSIVE flag was
81                   specified as part of the hints.
82
83       ai_src_addr If provided, the address for the local RDMA device.
84
85       ai_dst_addr If provided, the address for the destination RDMA device.
86
87       ai_src_canonname
88                   The canonical for the source.
89
90       ai_dst_canonname
91                   The canonical for the destination.
92
93       ai_route_len
94                   Size  of  the  routing  information  buffer  referenced  by
95                   ai_route.   This will be 0 if the underlying transport does
96                   not require routing data, or none could be resolved.
97
98       ai_route    Routing information for RDMA transports that require  rout‐
99                   ing  data  as part of connection establishment.  The format
100                   of the routing data depends on  the  underlying  transport.
101                   If  Infiniband transports are used, ai_route will reference
102                   an array of struct ibv_path_data on output, if routing data
103                   is  available.   Routing paths may be restricted by setting
104                   desired routing data fields on input  to  rdma_getaddrinfo.
105                   For  Infiniband,  hints.ai_route  may reference an array of
106                   struct ibv_path_record or struct ibv_path_data on input.
107
108       ai_connect_len
109                   Size of connection information  referenced  by  ai_connect.
110                   This will be 0 if the underlying transport does not require
111                   additional connection information.
112
113       ai_connect  Data exchanged as  part  of  the  connection  establishment
114                   process.   If provided, ai_connect data must be transferred
115                   as private data, with any user supplied private  data  fol‐
116                   lowing it.
117
118       ai_next     Pointer  to  the  next rdma_addrinfo structure in the list.
119                   Will be NULL if no more structures exist.
120

SEE ALSO

122       rdma_create_id(3),  rdma_resolve_route(3),  rdma_connect(3),  rdma_cre‐
123       ate_qp(3), rdma_bind_addr(3), rdma_create_ep(3)
124
125
126
127librdmacm                         2010-07-19               RDMA_GETADDRINFO(3)
Impressum