UCX 1.17
Unified Communication X
Loading...
Searching...
No Matches
UCT client-server operations

Data Structures

struct  uct_ep_connect_params
 Parameters for connecting a UCT endpoint by uct_ep_connect. More...
 
struct  uct_cm_attr
 Connection manager attributes, capabilities and limitations. More...
 
struct  uct_listener_attr
 UCT listener attributes, capabilities and limitations. More...
 
struct  uct_listener_params
 Parameters for creating a listener object uct_listener_h by uct_listener_create. More...
 
struct  uct_cm_ep_priv_data_pack_args
 Arguments to the client-server private data pack callback. More...
 
struct  uct_cm_ep_resolve_args
 Arguments to the client-server resolved callback. More...
 
struct  uct_cm_remote_data
 Data received from the remote peer. More...
 
struct  uct_cm_listener_conn_request_args
 Arguments to the listener's connection request callback. More...
 
struct  uct_cm_ep_client_connect_args
 Arguments to the client's connect callback. More...
 
struct  uct_cm_ep_server_conn_notify_args
 Arguments to the server's notify callback. More...
 

Typedefs

typedef struct uct_cm_ep_priv_data_pack_args uct_cm_ep_priv_data_pack_args_t
 Arguments to the client-server private data pack callback.
 
typedef struct uct_cm_ep_resolve_args uct_cm_ep_resolve_args_t
 Arguments to the client-server resolved callback.
 
typedef struct uct_cm_remote_data uct_cm_remote_data_t
 Data received from the remote peer.
 
typedef struct uct_cm_listener_conn_request_args uct_cm_listener_conn_request_args_t
 Arguments to the listener's connection request callback.
 
typedef struct uct_cm_ep_client_connect_args uct_cm_ep_client_connect_args_t
 Arguments to the client's connect callback.
 
typedef struct uct_cm_ep_server_conn_notify_args uct_cm_ep_server_conn_notify_args_t
 Arguments to the server's notify callback.
 
typedef void(* uct_sockaddr_conn_request_callback_t) (uct_iface_h iface, void *arg, uct_conn_request_h conn_request, const void *conn_priv_data, size_t length)
 Callback to process an incoming connection request on the server side.
 
typedef void(* uct_cm_listener_conn_request_callback_t) (uct_listener_h listener, void *arg, const uct_cm_listener_conn_request_args_t *conn_req_args)
 Callback to process an incoming connection request on the server side listener in a connection manager.
 
typedef void(* uct_cm_ep_server_conn_notify_callback_t) (uct_ep_h ep, void *arg, const uct_cm_ep_server_conn_notify_args_t *connect_args)
 Callback to process an incoming connection establishment acknowledgment on the server side listener, from the client, which indicates that the client side is connected. The callback also notifies the server side of a local error on a not-yet-connected endpoint.
 
typedef void(* uct_cm_ep_client_connect_callback_t) (uct_ep_h ep, void *arg, const uct_cm_ep_client_connect_args_t *connect_args)
 Callback to process an incoming connection response on the client side from the server or handle a local error on a not-yet-connected endpoint.
 
typedef void(* uct_ep_disconnect_cb_t) (uct_ep_h ep, void *arg)
 Callback to handle the disconnection of the remote peer.
 
typedef ssize_t(* uct_cm_ep_priv_data_pack_callback_t) (void *arg, const uct_cm_ep_priv_data_pack_args_t *pack_args, void *priv_data)
 Callback to fill the user's private data in a client-server flow.
 
typedef ucs_status_t(* uct_cm_ep_resolve_callback_t) (void *user_data, const uct_cm_ep_resolve_args_t *resolve_args)
 Callback to notify that the client side endpoint is bound to a local device.
 

Enumerations

enum  uct_cm_attr_field { UCT_CM_ATTR_FIELD_MAX_CONN_PRIV = UCS_BIT(0) }
 UCT connection manager attributes field mask. More...
 
enum  uct_listener_attr_field { UCT_LISTENER_ATTR_FIELD_SOCKADDR = UCS_BIT(0) }
 UCT listener attributes field mask. More...
 
enum  uct_listener_params_field { UCT_LISTENER_PARAM_FIELD_BACKLOG = UCS_BIT(0) , UCT_LISTENER_PARAM_FIELD_CONN_REQUEST_CB = UCS_BIT(1) , UCT_LISTENER_PARAM_FIELD_USER_DATA = UCS_BIT(2) }
 UCT listener created by uct_listener_create parameters field mask. More...
 
enum  uct_ep_connect_params_field { UCT_EP_CONNECT_PARAM_FIELD_PRIVATE_DATA = UCS_BIT(0) , UCT_EP_CONNECT_PARAM_FIELD_PRIVATE_DATA_LENGTH = UCS_BIT(1) }
 UCT endpoint connected by uct_ep_connect parameters field mask. More...
 
enum  uct_cm_ep_priv_data_pack_args_field { UCT_CM_EP_PRIV_DATA_PACK_ARGS_FIELD_DEVICE_NAME = UCS_BIT(0) }
 Client-Server private data pack callback arguments field mask. More...
 
enum  uct_cm_ep_resolve_args_field { UCT_CM_EP_RESOLVE_ARGS_FIELD_DEV_NAME = UCS_BIT(0) , UCT_CM_EP_RESOLVE_ARGS_FIELD_STATUS = UCS_BIT(1) }
 Client-Server resolve callback arguments field mask. More...
 
enum  uct_cm_remote_data_field { UCT_CM_REMOTE_DATA_FIELD_DEV_ADDR = UCS_BIT(0) , UCT_CM_REMOTE_DATA_FIELD_DEV_ADDR_LENGTH = UCS_BIT(1) , UCT_CM_REMOTE_DATA_FIELD_CONN_PRIV_DATA = UCS_BIT(2) , UCT_CM_REMOTE_DATA_FIELD_CONN_PRIV_DATA_LENGTH = UCS_BIT(3) }
 Remote data attributes field mask. More...
 
enum  uct_cm_listener_conn_request_args_field { UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_DEV_NAME = UCS_BIT(0) , UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_CONN_REQUEST = UCS_BIT(1) , UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_REMOTE_DATA = UCS_BIT(2) , UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_CLIENT_ADDR = UCS_BIT(3) }
 Listener's connection request callback arguments field mask. More...
 
enum  uct_cm_ep_client_connect_args_field { UCT_CM_EP_CLIENT_CONNECT_ARGS_FIELD_REMOTE_DATA = UCS_BIT(0) , UCT_CM_EP_CLIENT_CONNECT_ARGS_FIELD_STATUS = UCS_BIT(1) }
 Field mask flags for client-side connection established callback. More...
 
enum  uct_cm_ep_server_conn_notify_args_field { UCT_CM_EP_SERVER_CONN_NOTIFY_ARGS_FIELD_STATUS = UCS_BIT(0) }
 Field mask flags for server-side connection established notification callback. More...
 

Functions

ucs_status_t uct_iface_accept (uct_iface_h iface, uct_conn_request_h conn_request)
 Accept connection request.
 
ucs_status_t uct_iface_reject (uct_iface_h iface, uct_conn_request_h conn_request)
 Reject connection request. Will invoke an error handler uct_error_handler_t on the remote transport interface, if set.
 
ucs_status_t uct_ep_connect (uct_ep_h ep, const uct_ep_connect_params_t *params)
 Connect a client side endpoint after it is bound to a local network device, i.e. uct_ep_params_t::cm_resolve_cb was invoked.
 
ucs_status_t uct_ep_disconnect (uct_ep_h ep, unsigned flags)
 Initiate a disconnection of an endpoint connected to a sockaddr by a connection manager uct_cm_h.
 
ucs_status_t uct_cm_open (uct_component_h component, uct_worker_h worker, const uct_cm_config_t *config, uct_cm_h *cm_p)
 Open a connection manager.
 
void uct_cm_close (uct_cm_h cm)
 Close a connection manager.
 
ucs_status_t uct_cm_query (uct_cm_h cm, uct_cm_attr_t *cm_attr)
 Get connection manager attributes.
 
ucs_status_t uct_cm_config_read (uct_component_h component, const char *env_prefix, const char *filename, uct_cm_config_t **config_p)
 Read the configuration for a connection manager.
 
ucs_status_t uct_cm_client_ep_conn_notify (uct_ep_h ep)
 Notify the server about client-side connection establishment.
 
ucs_status_t uct_listener_create (uct_cm_h cm, const struct sockaddr *saddr, socklen_t socklen, const uct_listener_params_t *params, uct_listener_h *listener_p)
 Create a new transport listener object.
 
void uct_listener_destroy (uct_listener_h listener)
 Destroy a transport listener.
 
ucs_status_t uct_listener_reject (uct_listener_h listener, uct_conn_request_h conn_request)
 Reject a connection request.
 
ucs_status_t uct_listener_query (uct_listener_h listener, uct_listener_attr_t *listener_attr)
 Get attributes specific to a particular listener.
 

Detailed Description

Defines client-server operations. The client-server API allows the connection establishment between an active side - a client, and its peer - the passive side - a server. The connection can be established through a UCT transport that supports listening and connecting via IP address and port (listening can also be on INADDR_ANY).

The following is a general overview of the operations on the server side:

Connecting: uct_cm_open Open a connection manager. uct_listener_create Create a listener on the CM and start listening on a given IP,port / INADDR_ANY. uct_cm_listener_conn_request_callback_t This callback is invoked by the UCT transport to handle an incoming connection request from a client. Accept or reject the client's connection request. uct_ep_create Connect to the client by creating an endpoint if the request is accepted. The server creates a new endpoint for every connection request that it accepts. uct_cm_ep_server_conn_notify_callback_t This callback is invoked by the UCT transport to handle the connection notification from the client.

Note
The private data which the server should send to the client can be either provided directly to uct_ep_create, or filled by uct_cm_ep_priv_data_pack_callback_t provided to uct_ep_create.
In order to reject a connection request, can either call uct_listener_reject or return failure status as defined by ucs_status_t from uct_cm_ep_priv_data_pack_callback_t.

Disconnecting: uct_ep_disconnect Disconnect the server's endpoint from the client. Can be called when initiating a disconnect or when receiving a disconnect notification from the remote side. uct_ep_disconnect_cb_t This callback is invoked by the UCT transport when the client side calls uct_ep_disconnect as well. uct_ep_destroy Destroy the endpoint connected to the remote peer. If this function is called before the endpoint was disconnected, the uct_ep_disconnect_cb_t will not be invoked.

Destroying the server's resources: uct_listener_destroy Destroy the listener object. uct_cm_close Close the connection manager.

The following is a general overview of the operations on the client side:

Connecting: uct_cm_open Open a connection manager. uct_ep_create Create an endpoint for establishing a connection to the server. uct_cm_ep_resolve_callback_t This callback is invoked on the client side of the connection manager, after the remote server address was resolved to the local device to be used for connection establishment. uct_ep_connect This function should be called on the client side, in order to send private data and resume connection establishment, following an address-resolved notification via uct_cm_ep_resolve_callback_t. uct_cm_ep_client_connect_callback_t This callback is invoked by the UCT transport to handle a connection response from the server. After invoking this callback, the UCT transport will finalize the client's connection to the server. uct_cm_client_ep_conn_notify After the client's connection establishment is completed, the client should call this function in which it sends a notification message to the server stating that it (the client) is connected. The notification message that is sent depends on the transport's implementation.

Disconnecting: uct_ep_disconnect Disconnect the client's endpoint from the server. Can be called when initiating a disconnect or when receiving a disconnect notification from the remote side. uct_ep_disconnect_cb_t This callback is invoked by the UCT transport when the server side calls uct_ep_disconnect as well. uct_ep_destroy Destroy the endpoint connected to the remote peer.

Destroying the client's resources: uct_cm_close Close the connection manager.


Data Structure Documentation

◆ uct_ep_connect_params

struct uct_ep_connect_params
Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_ep_connect_params_field. Fields not specified by this mask will be ignored.

const void * private_data

User's private data to be passed from client to server.

size_t private_data_length

Length of uct_ep_connect_params::private_data, the maximal allowed value is indicated by the uct_cm_attr::max_conn_priv.

◆ uct_cm_attr

struct uct_cm_attr
Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_attr_field. Fields not specified by this mask will be ignored.

size_t max_conn_priv

Max size of the connection manager's private data used for connection establishment with sockaddr.

◆ uct_listener_attr

struct uct_listener_attr
Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_listener_attr_field. Fields not specified by this mask will be ignored.

struct sockaddr_storage sockaddr

Sockaddr on which this listener is listening.

◆ uct_listener_params

struct uct_listener_params
Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_listener_params_field. Fields not specified by this mask will be ignored.

int backlog

Backlog of incoming connection requests. If specified, must be a positive value. If not specified, each CM component will use its maximal allowed value, based on the system's setting.

uct_cm_listener_conn_request_callback_t conn_request_cb

Callback function for handling incoming connection requests.

void * user_data

User data associated with the listener.

◆ uct_cm_ep_priv_data_pack_args

struct uct_cm_ep_priv_data_pack_args

Used with the client-server API on a connection manager.

Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_ep_priv_data_pack_args_field. Fields not specified by this mask should not be accessed by the callback.

char dev_name[UCT_DEVICE_NAME_MAX]

Device name. This routine may fill the user's private data according to the given device name. The device name that is passed to this routine, corresponds to uct_tl_resource_desc_t::dev_name as returned from uct_md_query_tl_resources.

◆ uct_cm_ep_resolve_args

struct uct_cm_ep_resolve_args

Used with the client-server API on a connection manager.

Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_ep_resolve_args_field. Fields not specified by this mask should not be accessed by the callback.

char dev_name[UCT_DEVICE_NAME_MAX]

Device name indicates the device that the endpoint was bound to during address and route resolution. The device name that is passed to this callback corresponds to uct_tl_resource_desc_t::dev_name as returned from uct_md_query_tl_resources.

ucs_status_t status

Indicates address resolution status: UCS_OK - address of the remote server was resolved successfully. UCS_ERR_UNREACHABLE - the remote server is unreachable. Otherwise - indicates an internal connection establishment error on the local (client) side.

◆ uct_cm_remote_data

struct uct_cm_remote_data

The remote peer's device address, the data received from it and their lengths. Used with the client-server API on a connection manager.

Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_remote_data_field. Fields not specified by this mask will be ignored.

const uct_device_addr_t * dev_addr

Device address of the remote peer.

size_t dev_addr_length

Length of the remote device address.

const void * conn_priv_data

Pointer to the received data. This is the private data that was passed to uct_ep_params_t::sockaddr_pack_cb.

size_t conn_priv_data_length

Length of the received data from the peer.

◆ uct_cm_listener_conn_request_args

struct uct_cm_listener_conn_request_args

The local device name, connection request handle and the data the client sent. Used with the client-server API on a connection manager.

Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_listener_conn_request_args_field. Fields not specified by this mask should not be accessed by the callback.

char dev_name[UCT_DEVICE_NAME_MAX]

Local device name which handles the incoming connection request.

uct_conn_request_h conn_request

Connection request handle. Can be passed to this callback from the transport and will be used by it to accept or reject the connection request from the client.

const uct_cm_remote_data_t * remote_data

Remote data from the client.

ucs_sock_addr_t client_address

Client's address.

◆ uct_cm_ep_client_connect_args

struct uct_cm_ep_client_connect_args

Used with the client-server API on a connection manager.

Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_ep_client_connect_args_field. Fields not specified by this mask should not be accessed by the callback.

const uct_cm_remote_data_t * remote_data

Remote data from the server.

ucs_status_t status

Indicates the connection establishment response from the remote server: UCS_OK - the remote server accepted the connection request. UCS_ERR_REJECTED - the remote server rejected the connection request. UCS_ERR_CONNECTION_RESET - the server's connection was reset during the connection establishment to the client. Otherwise - indicates an internal connection establishment error on the local (client) side.

◆ uct_cm_ep_server_conn_notify_args

struct uct_cm_ep_server_conn_notify_args

Used with the client-server API on a connection manager.

Data Fields
uint64_t field_mask

Mask of valid fields in this structure, using bits from uct_cm_ep_server_conn_notify_args_field. Fields not specified by this mask should not be accessed by the callback.

ucs_status_t status

Indicates the client's ucs_status_t status: UCS_OK - the client completed its connection establishment and called uct_cm_client_ep_conn_notify UCS_ERR_CONNECTION_RESET - the client's connection was reset during the connection establishment to the server. Otherwise - indicates an internal connection establishment error on the local (server) side.

Typedef Documentation

◆ uct_cm_ep_priv_data_pack_args_t

Used with the client-server API on a connection manager.

◆ uct_cm_ep_resolve_args_t

Used with the client-server API on a connection manager.

◆ uct_cm_remote_data_t

The remote peer's device address, the data received from it and their lengths. Used with the client-server API on a connection manager.

◆ uct_cm_listener_conn_request_args_t

The local device name, connection request handle and the data the client sent. Used with the client-server API on a connection manager.

◆ uct_cm_ep_client_connect_args_t

Used with the client-server API on a connection manager.

◆ uct_cm_ep_server_conn_notify_args_t

Used with the client-server API on a connection manager.

◆ uct_sockaddr_conn_request_callback_t

typedef void(* uct_sockaddr_conn_request_callback_t) (uct_iface_h iface, void *arg, uct_conn_request_h conn_request, const void *conn_priv_data, size_t length)

This callback routine will be invoked on the server side upon receiving an incoming connection request. It should be set by the server side while initializing an interface. Incoming data is placed inside the conn_priv_data buffer. This callback has to be thread safe. Other than communication progress routines, it is allowed to call other UCT communication routines from this callback.

Parameters
[in]ifaceTransport interface.
[in]argUser defined argument for this callback.
[in]conn_requestTransport level connection request. The user should accept or reject the request by calling uct_iface_accept or uct_iface_reject routines respectively. conn_request should not be used outside the scope of this callback.
[in]conn_priv_dataPoints to the received data. This is the private data that was passed to the uct_ep_params_t::sockaddr_pack_cb on the client side.
[in]lengthLength of the received data.

◆ uct_cm_listener_conn_request_callback_t

typedef void(* uct_cm_listener_conn_request_callback_t) (uct_listener_h listener, void *arg, const uct_cm_listener_conn_request_args_t *conn_req_args)

This callback routine will be invoked on the server side upon receiving an incoming connection request. It should be set by the server side while initializing a listener in a connection manager. This callback has to be thread safe. Other than communication progress routines, it is allowed to call other UCT communication routines from this callback.

Parameters
[in]listenerTransport listener.
[in]argUser argument for this callback as defined in uct_listener_params_t::user_data
[in]conn_req_argsListener's arguments to handle the connection request from the client.

◆ uct_cm_ep_server_conn_notify_callback_t

typedef void(* uct_cm_ep_server_conn_notify_callback_t) (uct_ep_h ep, void *arg, const uct_cm_ep_server_conn_notify_args_t *connect_args)

This callback routine will be invoked on the server side upon receiving an incoming connection establishment acknowledgment from the client, which is sent from it once the client is connected to the server. Used to connect the server side to the client or handle an error from it - depending on the status field. This callback will also be invoked in the event of an internal local error with a failed uct_cm_ep_server_conn_notify_args::status if the endpoint was not connected yet. This callback has to be thread safe. Other than communication progress routines, it is permissible to call other UCT communication routines from this callback.

Parameters
[in]epTransport endpoint.
[in]argUser argument for this callback as defined in uct_ep_params_t::user_data
[in]connect_argsServer's connect callback arguments.

◆ uct_cm_ep_client_connect_callback_t

typedef void(* uct_cm_ep_client_connect_callback_t) (uct_ep_h ep, void *arg, const uct_cm_ep_client_connect_args_t *connect_args)

This callback routine will be invoked on the client side upon receiving an incoming connection response from the server. Used to connect the client side to the server or handle an error from it - depending on the status field. This callback will also be invoked in the event of an internal local error with a failed uct_cm_ep_client_connect_args::status if the endpoint was not connected yet. This callback has to be thread safe. Other than communication progress routines, it is permissible to call other UCT communication routines from this callback.

Parameters
[in]epTransport endpoint.
[in]argUser argument for this callback as defined in uct_ep_params_t::user_data.
[in]connect_argsClient's connect callback arguments

◆ uct_ep_disconnect_cb_t

typedef void(* uct_ep_disconnect_cb_t) (uct_ep_h ep, void *arg)

This callback routine will be invoked on the client and server sides upon a disconnect of the remote peer. It will disconnect the given endpoint from the remote peer. This callback won't be invoked if the endpoint was not connected to the remote peer yet. This callback has to be thread safe. Other than communication progress routines, it is permissible to call other UCT communication routines from this callback.

Parameters
[in]epTransport endpoint to disconnect.
[in]argUser argument for this callback as defined in uct_ep_params_t::user_data.

◆ uct_cm_ep_priv_data_pack_callback_t

typedef ssize_t(* uct_cm_ep_priv_data_pack_callback_t) (void *arg, const uct_cm_ep_priv_data_pack_args_t *pack_args, void *priv_data)

This callback routine will be invoked on the client side, before sending the transport's connection request to the server, or on the server side before sending a connection response to the client. This callback routine can be set when creating an endpoint. The user's private data should be placed inside the priv_data buffer to be sent to the remote side. The maximal allowed length of the private data is indicated by the field max_conn_priv inside uct_iface_attr or inside uct_cm_attr when using a connection manager. Communication progress routines should not be called from this callback. It is allowed to call other UCT communication routines from this callback.

Parameters
[in]argUser defined argument for this callback.
[in]pack_argsHandle for the the private data packing.
[out]priv_dataUser's private data to be passed to the remote side.
Returns
Negative value indicates an error according to ucs_status_t. On success, a non-negative value indicates actual number of bytes written to the priv_data buffer.

◆ uct_cm_ep_resolve_callback_t

typedef ucs_status_t(* uct_cm_ep_resolve_callback_t) (void *user_data, const uct_cm_ep_resolve_args_t *resolve_args)

This callback routine will be invoked, when the client side endpoint is bound to a local device. The callback routine can be set when creating an endpoint. Communication progress routines should not be called from this callback. It is allowed to call other UCT communication routines from this callback.

Parameters
[in]user_dataUser argument as defined in uct_ep_params_t::user_data.
[in]resolve_argsHandle for the extra arguments provided by the transport.
Returns
UCS_OK on success or error as defined in ucs_status_t.

Enumeration Type Documentation

◆ uct_cm_attr_field

The enumeration allows specifying which fields in uct_cm_attr_t are present, for backward compatibility support.

Enumerator
UCT_CM_ATTR_FIELD_MAX_CONN_PRIV 

Enables uct_cm_attr::max_conn_priv

◆ uct_listener_attr_field

The enumeration allows specifying which fields in uct_listener_attr_t are present, for backward compatibility support.

Enumerator
UCT_LISTENER_ATTR_FIELD_SOCKADDR 

Enables uct_listener_attr::sockaddr

◆ uct_listener_params_field

The enumeration allows specifying which fields in uct_listener_params_t are present, for backward compatibility support.

Enumerator
UCT_LISTENER_PARAM_FIELD_BACKLOG 

Enables uct_listener_params::backlog

UCT_LISTENER_PARAM_FIELD_CONN_REQUEST_CB 

Enables uct_listener_params::conn_request_cb

UCT_LISTENER_PARAM_FIELD_USER_DATA 

Enables uct_listener_params::user_data

◆ uct_ep_connect_params_field

The enumeration allows specifying which fields in uct_ep_connect_params_t are present, for backward compatibility support.

Enumerator
UCT_EP_CONNECT_PARAM_FIELD_PRIVATE_DATA 

Enables uct_ep_connect_params::private_data

UCT_EP_CONNECT_PARAM_FIELD_PRIVATE_DATA_LENGTH 

Enables uct_ep_connect_params::private_data_length

◆ uct_cm_ep_priv_data_pack_args_field

The enumeration allows specifying which fields in uct_cm_ep_priv_data_pack_args are present, for backward compatibility support.

Enumerator
UCT_CM_EP_PRIV_DATA_PACK_ARGS_FIELD_DEVICE_NAME 

Enables uct_cm_ep_priv_data_pack_args::dev_name Indicates that dev_name field in uct_cm_ep_priv_data_pack_args_t is valid.

◆ uct_cm_ep_resolve_args_field

The enumeration allows specifying which fields in uct_cm_ep_resolve_args are present, for backward compatibility support.

Enumerator
UCT_CM_EP_RESOLVE_ARGS_FIELD_DEV_NAME 

Indicates that uct_cm_ep_resolve_args::dev_name is valid.

UCT_CM_EP_RESOLVE_ARGS_FIELD_STATUS 

Indicates that uct_cm_ep_resolve_args::status is valid.

◆ uct_cm_remote_data_field

The enumeration allows specifying which fields in uct_cm_remote_data are present, for backward compatibility support.

Enumerator
UCT_CM_REMOTE_DATA_FIELD_DEV_ADDR 

Enables uct_cm_remote_data::dev_addr

UCT_CM_REMOTE_DATA_FIELD_DEV_ADDR_LENGTH 

Enables uct_cm_remote_data::dev_addr_length

UCT_CM_REMOTE_DATA_FIELD_CONN_PRIV_DATA 

Enables uct_cm_remote_data::conn_priv_data

UCT_CM_REMOTE_DATA_FIELD_CONN_PRIV_DATA_LENGTH 

Enables uct_cm_remote_data::conn_priv_data_length

◆ uct_cm_listener_conn_request_args_field

The enumeration allows specifying which fields in uct_cm_listener_conn_request_args are present, for backward compatibility support.

Enumerator
UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_DEV_NAME 

Enables uct_cm_listener_conn_request_args::dev_name Indicates that dev_name field in uct_cm_listener_conn_request_args_t is valid.

UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_CONN_REQUEST 

Enables uct_cm_listener_conn_request_args::conn_request Indicates that conn_request field in uct_cm_listener_conn_request_args_t is valid.

UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_REMOTE_DATA 

Enables uct_cm_listener_conn_request_args::remote_data Indicates that remote_data field in uct_cm_listener_conn_request_args_t is valid.

UCT_CM_LISTENER_CONN_REQUEST_ARGS_FIELD_CLIENT_ADDR 

Enables uct_cm_listener_conn_request_args::client_address Indicates that client_address field in uct_cm_listener_conn_request_args_t is valid.

◆ uct_cm_ep_client_connect_args_field

The enumeration allows specifying which fields in uct_cm_ep_client_connect_args are present, for backward compatibility support.

Enumerator
UCT_CM_EP_CLIENT_CONNECT_ARGS_FIELD_REMOTE_DATA 

Enables uct_cm_ep_client_connect_args::remote_data

UCT_CM_EP_CLIENT_CONNECT_ARGS_FIELD_STATUS 

Enables uct_cm_ep_client_connect_args::status

◆ uct_cm_ep_server_conn_notify_args_field

The enumeration allows specifying which fields in uct_cm_ep_server_conn_notify_args are present, for backward compatibility support.

Enumerator
UCT_CM_EP_SERVER_CONN_NOTIFY_ARGS_FIELD_STATUS 

Enables uct_cm_ep_server_conn_notify_args::status Indicates that status field in uct_cm_ep_server_conn_notify_args_t is valid.

Function Documentation

◆ uct_iface_accept()

ucs_status_t uct_iface_accept ( uct_iface_h iface,
uct_conn_request_h conn_request )
Parameters
[in]ifaceTransport interface which generated connection request conn_request.
[in]conn_requestConnection establishment request passed as parameter of uct_sockaddr_conn_request_callback_t.
Returns
Error code as defined by ucs_status_t

◆ uct_iface_reject()

ucs_status_t uct_iface_reject ( uct_iface_h iface,
uct_conn_request_h conn_request )
Parameters
[in]ifaceInterface which generated connection establishment request conn_request.
[in]conn_requestConnection establishment request passed as parameter of uct_sockaddr_conn_request_callback_t.
Returns
Error code as defined by ucs_status_t

◆ uct_ep_connect()

ucs_status_t uct_ep_connect ( uct_ep_h ep,
const uct_ep_connect_params_t * params )

This non-blocking routine establishes connection of the client side endpoint and sends private data to the peer.

Parameters
[in]epEndpoint to connect.
[in]paramsParameters as defined in uct_ep_connect_params_t.
Returns
UCS_OK Operation has been initiated successfully. Other error codes as defined by ucs_status_t.

◆ uct_ep_disconnect()

ucs_status_t uct_ep_disconnect ( uct_ep_h ep,
unsigned flags )

This non-blocking routine will send a disconnect notification on the endpoint, so that uct_ep_disconnect_cb_t will be called on the remote peer. The remote side should also call this routine when handling the initiator's disconnect. After a call to this function, the given endpoint may not be used for communications anymore. The uct_ep_flush / uct_iface_flush routines will guarantee that the disconnect notification is delivered to the remote peer. uct_ep_destroy should be called on this endpoint after invoking this routine and uct_ep_params::disconnect_cb was called.

Parameters
[in]epEndpoint to disconnect.
[in]flagsReserved for future use.
Returns
UCS_OK Operation has completed successfully. UCS_ERR_BUSY The ep is not connected yet (either uct_cm_ep_client_connect_callback_t or uct_cm_ep_server_conn_notify_callback_t was not invoked). UCS_INPROGRESS The disconnect request has been initiated, but the remote peer has not yet responded to this request, and consequently the registered callback uct_ep_disconnect_cb_t has not been invoked to handle the request. UCS_ERR_NOT_CONNECTED The ep is disconnected locally and remotely. Other error codes as defined by ucs_status_t .

◆ uct_cm_open()

ucs_status_t uct_cm_open ( uct_component_h component,
uct_worker_h worker,
const uct_cm_config_t * config,
uct_cm_h * cm_p )

Open a connection manager. All client server connection establishment operations are performed in the context of a specific connection manager.

Note
This is an alternative API for uct_iface_open_mode::UCT_IFACE_OPEN_MODE_SOCKADDR_SERVER and uct_iface_open_mode::UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT .
Parameters
[in]componentComponent on which to open the connection manager, as returned from uct_query_components.
[in]workerWorker on which to open the connection manager.
[in]configCM configuration options. Either obtained from uct_cm_config_read() function, or pointer to CM-specific structure that extends uct_cm_config_t.
[out]cm_pFilled with a handle to the connection manager.
Returns
Error code.

◆ uct_cm_close()

void uct_cm_close ( uct_cm_h cm)
Parameters
[in]cmConnection manager to close.

◆ uct_cm_query()

ucs_status_t uct_cm_query ( uct_cm_h cm,
uct_cm_attr_t * cm_attr )

This routine queries the cm for its attributes uct_cm_attr_t.

Parameters
[in]cmConnection manager to query.
[out]cm_attrFilled with connection manager attributes.

◆ uct_cm_config_read()

ucs_status_t uct_cm_config_read ( uct_component_h component,
const char * env_prefix,
const char * filename,
uct_cm_config_t ** config_p )
Parameters
[in]componentRead the configuration of the connection manager on this component.
[in]env_prefixIf non-NULL, search for environment variables starting with this UCT_<prefix>_. Otherwise, search for environment variables starting with just UCT_.
[in]filenameIf non-NULL, read configuration from this file. If the file does not exist, or exists but cannot be opened or read, it will be ignored.
[out]config_pFilled with a pointer to the configuration.
Returns
Error code.

◆ uct_cm_client_ep_conn_notify()

ucs_status_t uct_cm_client_ep_conn_notify ( uct_ep_h ep)

This routine should be called on the client side after the client completed establishing its connection to the server. The routine will send a notification message to the server indicating that the client is connected.

Parameters
[in]epThe connected endpoint on the client side.
Returns
Error code.

◆ uct_listener_create()

ucs_status_t uct_listener_create ( uct_cm_h cm,
const struct sockaddr * saddr,
socklen_t socklen,
const uct_listener_params_t * params,
uct_listener_h * listener_p )

This routine creates a new listener on the given CM which will start listening on a given sockaddr.

Parameters
[in]cmConnection manager on which to open the listener. This cm should not be closed as long as there are open listeners on it.
[in]saddrThe socket address to listen on.
[in]socklenThe saddr length.
[in]paramsUser defined uct_listener_params_t configurations for the listener_p.
[out]listener_pFilled with handle to the new listener.
Returns
Error code.

◆ uct_listener_destroy()

void uct_listener_destroy ( uct_listener_h listener)
Parameters
[in]listenerListener to destroy.

◆ uct_listener_reject()

ucs_status_t uct_listener_reject ( uct_listener_h listener,
uct_conn_request_h conn_request )

This routine can be invoked on the server side. It rejects a connection request from the client.

Parameters
[in]listenerListener which will reject the connection request.
[in]conn_requestConnection establishment request passed as parameter of uct_cm_listener_conn_request_callback_t in uct_cm_listener_conn_request_args_t::conn_request.
Returns
Error code as defined by ucs_status_t

◆ uct_listener_query()

ucs_status_t uct_listener_query ( uct_listener_h listener,
uct_listener_attr_t * listener_attr )

This routine queries the listener for its attributes uct_listener_attr_t.

Parameters
[in]listenerListener object to query.
[out]listener_attrFilled with attributes of the listener.
Returns
Error code as defined by ucs_status_t