Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

vipconnectaccept.c File Reference

#include <stdlib.h>
#include "vipl_priv.h"

Go to the source code of this file.

Functions

VIP_ENTRY_POINT VIP_RETURN VipConnectAccept (VIP_CONN_HANDLE ConnHandle, VIP_VI_HANDLE ViHandle)


Detailed Description

The VI-GM function VipConnectAccept implementation.

Definition in file vipconnectaccept.c.


Function Documentation

VIP_ENTRY_POINT VIP_RETURN VipConnectAccept VIP_CONN_HANDLE  ConnHandle,
VIP_VI_HANDLE  ViHandle
 

VipConnectAccept() is used to accept a connection request and associate the connection with a local VI endpoint. This function is called on the server side of the client/server connection model.

The caller passes in the handle of an Idle, unconnected VI endpoint to associate with the connection request. If the attributes of the local VI endpoint conflict with those of the remote endpoint, VipConnectAccept() will fail. It is the function of the VI Provider to determine if the connection should succeed based on the attributes of the two endpoints. Note: The VI attributes that must match when establishing a connection are ReliabilityLevel, MaxTransferSize and QoS.

If VipConnectAccept() fails, no explicit notification is sent to the remote end. The caller may choose to modify the attributes of the local VI endpoint, and try again. In order to reject a connection request, the VI Consumer must explicitly reject the connection request via the VipConnectReject() function.

Return values:
VIP_SUCCESS The connection was successfully established.
VIP_INVALID_PARAMETER One of the parameters was invalid.
VIP_INVALID_RELIABILITY_LEVEL The reliability level attribute of the local endpoint conflicted with the reliability level of the remote VI.
VIP_INVALID_MTU The maximum transfer size attribute of the local endpoint conflicted with the maximum transfer size of the remote endpoint.
VIP_INVALID_QOS The quality of service attribute was invalid, or conflicted with the remote endpoint.
VIP_TIMEOUT The connection could not be completed, possibly due to a timeout failure on the matching VipConnectRequest() on the client node.
VIP_ERROR_RESOURCE The operation failed due to insufficient resources.
VIP_INVALID_STATE The specified VI endpoint is not in the Idle state.
Parameters:
ConnHandle (IN) A handle to an opaque connection object created by VipConnectWait().
ViHandle (IN) Instance of a local VI endpoint.
See also:
VipConnectWait VipConnectRequest VipConnectReject VipDisconnect VIP_CONN
Author:
Patrick Geoffray
Version:
1.0

Definition at line 66 of file vipconnectaccept.c.

References VIP_PACKET_CONN_ACCEPT::clt_conn_ptr, VIP_PACKET_CONN_ACCEPT::clt_seq_num, VIP_SEND_REQ::dest_gm_id, VIP_SEND_REQ::dest_port_id, VIP_NIC::index, VIP_NIC::lock, VIP_GM::lock, VIP_PACKET_CONN_ACCEPT::net_local_nic_index, VIP_PACKET_CONN_ACCEPT::net_local_vi_index, VIP_SEND_REQ::ptr, VIP_PACKET_CONN_ACCEPT::rdma_write, VIP_PACKET_CONN_ACCEPT::srv_conn_ptr, VIP_PACKET_CONN_ACCEPT::srv_seq_num, VIP_SEND_REQ::type, VIP_PACKET_CONN_ACCEPT::type, VIP_ABORT, vip_addr2addrbits(), vip_allocate_packet(), VIP_ASSERT, VIP_CONN_ACCEPT_PKT, VIP_NIC::vip_conn_set, VIP_CONN_TYPE_SERVER, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_ERROR_RESOURCE, vip_free_handle(), VIP_NIC::vip_gm_ptr, VIP_HTON_UCHAR, VIP_HTON_UINT16, VIP_HTON_UINT64, VIP_INVALID_CONN_HANDLE, VIP_INVALID_MTU, VIP_INVALID_PARAMETER, VIP_INVALID_QOS, VIP_INVALID_RELIABILITY_LEVEL, VIP_INVALID_STATE, VIP_INVALID_VI_HANDLE, vip_is_conn_notified(), VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_SEND_REQ::vip_nic_ptr, VIP_NOT_DONE, VIP_PROGRESSION, vip_send_data(), VIP_SEND_REQ_RELIABLE, VIP_STATE_CONNECT_PENDING, VIP_STATE_IDLE, VIP_SUCCESS, VIP_TIMEOUT, VIP_SEND_REQ::vip_vi_ptr, and vip_wait_for_notification().

VI-GM-1.3 by Myricom © 1997-2006. Documentation generated on 20 May 2006 by doxygen 1.4.4.