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

vipconnectpeerrequest.c File Reference

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

Go to the source code of this file.

Functions

VIP_ENTRY_POINT VIP_RETURN VipConnectPeerRequest (VIP_VI_HANDLE ViHandle, VIP_NET_ADDRESS *LocalAddr, VIP_NET_ADDRESS *RemoteAddr, VIP_ULONG Timeout)


Detailed Description

The VI-GM function VipConnectPeerRequest implementation.

Definition in file vipconnectpeerrequest.c.


Function Documentation

VIP_ENTRY_POINT VIP_RETURN VipConnectPeerRequest VIP_VI_HANDLE  ViHandle,
VIP_NET_ADDRESS LocalAddr,
VIP_NET_ADDRESS RemoteAddr,
VIP_ULONG  Timeout
 

VipConnectPeerRequest posts a request that a connection be established between the local VI endpoint and a remote VI endpoint. The user specifies local and remote network addresses as part of the connection request. This call returns as soon as the connection request is initiated. The caller of VipConnectPeerRequest can check the status of the connection request or wait for connection completion by calling VipConnectPeerDone or VipConnectPeerWait respectively.

If a connection is successfully established, the local address is bound to the local VI endpoint and the attributes of the remote VI endpoint are returned to the caller when the connect completion status is delivered. If a connection cannot be established before the specified Timeout period, a VIP_TIMEOUT error is returned in the return status of VipConnectPeerDone or VipConnectPeerWait.

If the host portion of the LocalAddr parameter does not match the local NIC address (specified in the LocalNicAddress field of the NicAttributes structure), then a VIP_INVALID_PARAMETER error is returned.

Return values:
VIP_SUCCESS The connection request was queued.
VIP_ERROR_RESOURCE The request failed due to insufficient resources.
VIP_INVALID_STATE The specified VI endpoint is not in the Idle state.
VIP_INVALID_PARAMETER One of the parameters was invalid.
Parameters:
ViHandle Handle for the local VI endpoint (IN).
LocalAddr Local network address. The local address is used solely for administrative purposes and is not used for matching connection requests. The host portion of this network address must match the NIC s address (IN).
RemoteAddr The remote network address (IN).
Timeout The count, in milliseconds, that VipConnectPeerRequest will wait for connection to complete. VIP_INFINITE if no time-out is desired. A timeout value of zero results in a VIP_INVALID_PARAMETER error return (IN).
See also:
VipConnectPeerWait VipConnectPeerDone
Author:
Patrick Geoffray
Version:
1.0

Definition at line 64 of file vipconnectpeerrequest.c.

References VIP_PACKET_CONN_LIST::clt_conn_ptr, VIP_PACKET_CONN_LIST::clt_seq_num, VIP_SEND_REQ::dest_gm_id, VIP_SEND_REQ::dest_port_id, VIP_NET_ADDRESS::DiscriminatorLen, VIP_VI_ATTRIBUTES::EnableRdmaRead, VIP_CONN::event, VIP_GM::gm_port, VIP_PACKET_CONN_LIST::gm_unique_id, VIP_CONN::handle, VIP_GM::head_waiting_conn_ptr, VIP_NET_ADDRESS::HostAddress, VIP_NET_ADDRESS::HostAddressLen, VIP_CONN::locale_disc_len, VIP_CONN::locale_net_addr, VIP_NIC::lock, VIP_GM::lock, VIP_GM::mac_address, VIP_VI_ATTRIBUTES::MaxTransferSize, VIP_CONN::next_waiting_conn_ptr, VIP_CONN::peer_timeout_alarm, VIP_CONN::prev_waiting_conn_ptr, VIP_SEND_REQ::ptr, VIP_VI_ATTRIBUTES::QoS, VIP_VI_ATTRIBUTES::ReliabilityLevel, VIP_CONN::remote_disc_len, VIP_CONN::remote_gm_id, VIP_CONN::remote_net_addr, VIP_CONN::remote_port_id, VIP_CONN::remote_vi_attribs, VIP_HANDLE::seq_num, VIP_CONN::status, VIP_GM::tail_waiting_conn_ptr, VIP_SEND_REQ::type, VIP_PACKET_CONN_LIST::type, VIP_CONN::type, VI_GM_MAC_ADDRESS_LEN, VI_GM_MAX_DISCRIMINATOR_LEN, VI_GM_PORT_CONN_MANAGER, vip_addr2addrbits(), vip_allocate_handle(), vip_allocate_packet(), VIP_ASSERT, VIP_CONN_LIST_REQ_PKT, vip_conn_peer_request_alarm_callback(), VIP_NIC::vip_conn_set, VIP_CONN_TYPE_PEER, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_ENTER_IOCTL, VIP_ERROR_RESOURCE, VIP_EVENT_INIT, VIP_EXIT_IOCTL, VIP_FALSE, vip_free_handle(), vip_gm_host_name_lock, VIP_NIC::vip_gm_ptr, VIP_HTON_UCHAR, VIP_HTON_UINT16, VIP_HTON_UINT64, VIP_INVALID_PARAMETER, VIP_INVALID_STATE, VIP_INVALID_VI_HANDLE, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_SEND_REQ::vip_nic_ptr, VIP_NOT_DONE, VIP_PROGRESSION, vip_remove_conn_waiting_list(), vip_send_data(), VIP_SEND_REQ_RELIABLE, VIP_STATE_CONNECT_PENDING, VIP_STATE_IDLE, VIP_SUCCESS, VIP_TRUE, VIP_SEND_REQ::vip_vi_ptr, VIP_CONN::vip_vi_ptr, and VIP_CONN::waiting_list.

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