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

vipdisconnect.c File Reference

#include "vipl_priv.h"

Go to the source code of this file.

Functions

VIP_ENTRY_POINT VIP_RETURN VipDisconnect (VIP_VI_HANDLE ViHandle)


Detailed Description

The VI-GM function VipDisconnect implementation.

Definition in file vipdisconnect.c.


Function Documentation

VIP_ENTRY_POINT VIP_RETURN VipDisconnect VIP_VI_HANDLE  ViHandle  ) 
 

VipDisconnect() is used to terminate a connection. When the local endpoint is disconnected, it stops processing of all posted Descriptors, all pending (not completed) Descriptors are marked completed because of disconnection with a Descriptor Flushed error, and the local endpoint transitions to the Idle state. When the remote endpoint causes a connection to terminate by closing the endpoint or by calling VipDisconnect(), an asynchronous error callback happens indicating the disconnected connection. The node that initiated the VipDisconnect() will not get an error callback. The local client should call VipDisconnect() to reset the disconnected connection from the Error state to the Idle state.

VipDisconnect() can be called in any VI state to cause pending Descriptors on the VI to be completed with the Descriptor Flushed error bit set and transition the VI to the Idle state. Specifically, VipDisconnect() can be called in the Idle state to force pending receive Descriptors to be completed in error so they can be de-queued prior to calling VipDestroyVi().

Return values:
VIP_SUCCESS The disconnect was successful.
VIP_INVALID_PARAMETER The ViHandle parameter was invalid.
VIP_ERROR_RESOURCE The operation failed due to insufficient resources.
Parameters:
ViHandle (IN) Instance of a connected Virtual Interface endpoint.
See also:
VipConnectWait VipConnectAccept VipConnectRequest VipConnectReject
Author:
Patrick Geoffray
Version:
1.0

Definition at line 50 of file vipdisconnect.c.

References VIP_NIC::lock, VIP_GM::lock, VIP_GM::recv_lock, VIP_ASSERT, VIP_NIC::vip_conn_set, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_FALSE, vip_free_handle(), VIP_NIC::vip_gm_ptr, VIP_INVALID_PARAMETER, VIP_INVALID_VI_HANDLE, vip_millisleep(), VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, vip_receive_event(), vip_remove_conn_waiting_list(), VIP_STATE_CONNECT_PENDING, VIP_STATE_IDLE, VIP_SUCCESS, VIP_TRUE, and vip_vi_transition_to_error_state().

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