Type Alias uct_ep_params_t

Source
pub type uct_ep_params_t = uct_ep_params;
Expand description

@ingroup UCT_RESOURCE @brief Parameters for creating a UCT endpoint by @ref uct_ep_create

Aliased Type§

struct uct_ep_params_t {
Show 17 fields pub field_mask: u64, pub iface: *mut uct_iface, pub user_data: *mut c_void, pub dev_addr: *const uct_device_addr, pub iface_addr: *const uct_iface_addr, pub sockaddr: *const ucs_sock_addr, pub sockaddr_cb_flags: u32, pub sockaddr_pack_cb: Option<unsafe extern "C" fn(_: *mut c_void, _: *const uct_cm_ep_priv_data_pack_args, _: *mut c_void) -> i32>, pub cm: *mut uct_cm, pub conn_request: *mut c_void, pub sockaddr_cb_client: Option<unsafe extern "C" fn(_: *mut uct_ep, _: *mut c_void, _: *const uct_cm_ep_client_connect_args)>, pub sockaddr_cb_server: Option<unsafe extern "C" fn(_: *mut uct_ep, _: *mut c_void, _: *const uct_cm_ep_server_conn_notify_args)>, pub disconnect_cb: Option<unsafe extern "C" fn(_: *mut uct_ep, _: *mut c_void)>, pub path_index: u32, pub cm_resolve_cb: Option<unsafe extern "C" fn(_: *mut c_void, _: *const uct_cm_ep_resolve_args) -> ucs_status_t>, pub private_data: *const c_void, pub private_data_length: u32,
}

Fields§

§field_mask: u64

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

§iface: *mut uct_iface

Interface to create the endpoint on. Either @a iface or @a cm field must be initialized but not both.

§user_data: *mut c_void

User data associated with the endpoint.

§dev_addr: *const uct_device_addr

The device address to connect to on the remote peer. This must be defined together with @ref uct_ep_params_t::iface_addr to create an endpoint connected to a remote interface.

§iface_addr: *const uct_iface_addr

This specifies the remote address to use when creating an endpoint that is connected to a remote interface. @note This requires @ref UCT_IFACE_FLAG_CONNECT_TO_IFACE capability.

§sockaddr: *const ucs_sock_addr

The sockaddr to connect to on the remote peer. If set, @ref uct_ep_create will create an endpoint for a connection to the remote peer, specified by its socket address. @note The interface in this routine requires the @ref UCT_IFACE_FLAG_CONNECT_TO_SOCKADDR capability.

§sockaddr_cb_flags: u32

@ref uct_cb_flags to indicate @ref uct_ep_params_t::sockaddr_pack_cb, @ref uct_ep_params_t::sockaddr_cb_client, @ref uct_ep_params_t::sockaddr_cb_server, @ref uct_ep_params_t::disconnect_cb and @ref uct_ep_params_t::cm_resolve_cb behavior. If none from these are not set, this field will be ignored.

§sockaddr_pack_cb: Option<unsafe extern "C" fn(_: *mut c_void, _: *const uct_cm_ep_priv_data_pack_args, _: *mut c_void) -> i32>

Callback that will be used for filling the user’s private data to be delivered to the remote peer by the callback on the server or client side. This field is only valid if @ref uct_ep_params_t::sockaddr is set. @note It is never guaranteed that the callback will be called. If, for example, the endpoint goes into error state before issuing the connection request, the callback will not be invoked. @note Can not be set together with @ref uct_ep_params_t::private_data or @ref uct_ep_params_t::cm_resolve_cb.

§cm: *mut uct_cm

The connection manager object as created by @ref uct_cm_open. Either @a cm or @a iface field must be initialized but not both.

§conn_request: *mut c_void

Connection request that was passed to @ref uct_cm_listener_conn_request_args_t::conn_request. @note After a call to @ref uct_ep_create, @a params.conn_request is consumed and should not be used anymore, even if the call returns with an error.

§sockaddr_cb_client: Option<unsafe extern "C" fn(_: *mut uct_ep, _: *mut c_void, _: *const uct_cm_ep_client_connect_args)>

Callback that will be invoked when the endpoint on the client side is being connected to the server by a connection manager @ref uct_cm_h .

§sockaddr_cb_server: Option<unsafe extern "C" fn(_: *mut uct_ep, _: *mut c_void, _: *const uct_cm_ep_server_conn_notify_args)>

Callback that will be invoked when the endpoint on the server side is being connected to a client by a connection manager @ref uct_cm_h .

§disconnect_cb: Option<unsafe extern "C" fn(_: *mut uct_ep, _: *mut c_void)>

Callback that will be invoked when the endpoint is disconnected.

§path_index: u32

Index of the path which the endpoint should use, must be in the range 0..(@ref uct_iface_attr_t.dev_num_paths - 1).

§cm_resolve_cb: Option<unsafe extern "C" fn(_: *mut c_void, _: *const uct_cm_ep_resolve_args) -> ucs_status_t>

This callback is invoked when the remote server address provided in field @ref uct_ep_params_t::sockaddr is resolved to the local device to be used for connection establishment. @note This field is mutually exclusive with @ref uct_ep_params::sockaddr_pack_cb.

§private_data: *const c_void

Private data to be passed from server to client. Can be used only along with @ref uct_ep_params::conn_request. @note This field is mutually exclusive with @ref uct_ep_params::sockaddr_pack_cb.

§private_data_length: u32

Length of @ref uct_ep_params::private_data, the maximal allowed value is indicated by the @ref uct_cm_attr::max_conn_priv.