irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rcConnect.cpp File Reference
#include "rcConnect.h"
#include "rcGlobalExtern.h"
#include "rcMisc.h"
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/chrono.hpp>
#include "irods_network_factory.hpp"
#include "sockComm.h"
#include "irods_threads.hpp"
#include "sockCommNetworkInterface.hpp"
#include "rodsError.h"
#include <time.h>
Include dependency graph for rcConnect.cpp:

Go to the source code of this file.

Functions

rcComm_trcConnect (const char *rodsHost, int rodsPort, const char *userName, const char *rodsZone, int reconnFlag, rErrMsg_t *errMsg)
 
rcComm_t_rcConnect (const char *rodsHost, int rodsPort, const char *proxyUserName, const char *proxyRodsZone, const char *clientUserName, const char *clientRodsZone, rErrMsg_t *errMsg, int connectCnt, int reconnFlag)
 
int setUserInfo (const char *proxyUserName, const char *proxyRodsZone, const char *clientUserName, const char *clientRodsZone, userInfo_t *clientUser, userInfo_t *proxyUser)
 
int setRhostInfo (rcComm_t *conn, const char *rodsHost, int rodsPort)
 
int setSockAddr (struct sockaddr_in *remoteAddr, const char *rodsHost, int rodsPort)
 
int rcDisconnect (rcComm_t *_conn)
 
int freeRcComm (rcComm_t *conn)
 
int cleanRcComm (rcComm_t *conn)
 
rcComm_trcConnectXmsg (rodsEnv *myRodsEnv, rErrMsg_t *errMsg)
 
void cliReconnManager (rcComm_t *conn)
 
int cliChkReconnAtSendStart (rcComm_t *conn)
 
int cliChkReconnAtSendEnd (rcComm_t *conn)
 
int cliChkReconnAtReadStart (rcComm_t *conn)
 
int cliChkReconnAtReadEnd (rcComm_t *conn)
 
int isLoopbackAddress (const char *ip_address)
 

Function Documentation

◆ _rcConnect()

rcComm_t* _rcConnect ( const char *  rodsHost,
int  rodsPort,
const char *  proxyUserName,
const char *  proxyRodsZone,
const char *  clientUserName,
const char *  clientRodsZone,
rErrMsg_t errMsg,
int  connectCnt,
int  reconnFlag 
)

◆ cleanRcComm()

int cleanRcComm ( rcComm_t conn)

Definition at line 337 of file rcConnect.cpp.

References thread_context::cond, freeRError(), thread_context::lock, NULL, thread_context::reconnThr, rcComm_t::rError, rcComm_t::svrVersion, and rcComm_t::thread_ctx.

Referenced by freeRcComm().

Here is the call graph for this function:

◆ cliChkReconnAtReadEnd()

int cliChkReconnAtReadEnd ( rcComm_t conn)

Definition at line 585 of file rcConnect.cpp.

References rcComm_t::clientState, thread_context::cond, CONN_WAIT_STATE, thread_context::lock, LOG_DEBUG, LOG_ERROR, NULL, PROCESSING_STATE, version_t::reconnPort, rcComm_t::reconnThrState, rodsLog(), rcComm_t::svrVersion, SYS_INTERNAL_ERR, and rcComm_t::thread_ctx.

Referenced by readAndProcApiReply().

Here is the call graph for this function:

◆ cliChkReconnAtReadStart()

int cliChkReconnAtReadStart ( rcComm_t conn)

Definition at line 567 of file rcConnect.cpp.

References rcComm_t::clientState, thread_context::lock, LOG_ERROR, NULL, RECEIVING_STATE, version_t::reconnPort, rodsLog(), rcComm_t::svrVersion, SYS_INTERNAL_ERR, and rcComm_t::thread_ctx.

Referenced by readAndProcApiReply().

Here is the call graph for this function:

◆ cliChkReconnAtSendEnd()

int cliChkReconnAtSendEnd ( rcComm_t conn)

Definition at line 545 of file rcConnect.cpp.

References rcComm_t::clientState, thread_context::cond, CONN_WAIT_STATE, thread_context::lock, LOG_ERROR, NULL, PROCESSING_STATE, version_t::reconnPort, rcComm_t::reconnThrState, rodsLog(), rcComm_t::svrVersion, SYS_INTERNAL_ERR, and rcComm_t::thread_ctx.

Referenced by sendApiRequest().

Here is the call graph for this function:

◆ cliChkReconnAtSendStart()

int cliChkReconnAtSendStart ( rcComm_t conn)

Definition at line 512 of file rcConnect.cpp.

References rcComm_t::clientState, thread_context::cond, CONN_WAIT_STATE, thread_context::lock, LOG_DEBUG, LOG_ERROR, NULL, PROCESSING_STATE, version_t::reconnPort, rcComm_t::reconnThrState, rodsLog(), SENDING_STATE, rcComm_t::svrVersion, SYS_INTERNAL_ERR, SYS_INVALID_INPUT_PARAM, and rcComm_t::thread_ctx.

Referenced by sendApiRequest().

Here is the call graph for this function:

◆ cliReconnManager()

◆ freeRcComm()

int freeRcComm ( rcComm_t conn)

Definition at line 323 of file rcConnect.cpp.

References cleanRcComm(), NULL, and irods.pypyodbc::status.

Referenced by rcDisconnect().

Here is the call graph for this function:

◆ isLoopbackAddress()

int isLoopbackAddress ( const char *  ip_address)

Definition at line 620 of file rcConnect.cpp.

Referenced by _getSvrAddr(), _rcConnect(), and svrSockOpenForInConn().

◆ rcConnect()

rcComm_t* rcConnect ( const char *  rodsHost,
int  rodsPort,
const char *  userName,
const char *  rodsZone,
int  reconnFlag,
rErrMsg_t errMsg 
)

Definition at line 30 of file rcConnect.cpp.

References _rcConnect(), NULL, RECONN_TIMEOUT, and RECONNECT_ENV.

Referenced by irods::connection_pool::create_connection(), irods::server_control_executor::get_resource_host_names(), msi_update_unixfilesystem_resource_free_space(), rcConnectXmsg(), and rcReconnect().

Here is the call graph for this function:

◆ rcConnectXmsg()

rcComm_t* rcConnectXmsg ( rodsEnv myRodsEnv,
rErrMsg_t errMsg 
)

Definition at line 362 of file rcConnect.cpp.

References NULL, rcConnect(), rodsEnv::rodsUserName, rodsEnv::rodsZone, rodsEnv::xmsgHost, and rodsEnv::xmsgPort.

Referenced by _readXMsg(), _writeXMsg(), and msiXmsgServerConnect().

Here is the call graph for this function:

◆ rcDisconnect()

◆ setRhostInfo()

int setRhostInfo ( rcComm_t conn,
const char *  rodsHost,
int  rodsPort 
)

Definition at line 217 of file rcConnect.cpp.

References rcComm_t::host, NAME_LEN, NULL, rcComm_t::portNum, rcComm_t::remoteAddr, rstrcpy(), setSockAddr(), irods.pypyodbc::status, and USER_RODS_HOST_EMPTY.

Referenced by _rcConnect().

Here is the call graph for this function:

◆ setSockAddr()

int setSockAddr ( struct sockaddr_in *  remoteAddr,
const char *  rodsHost,
int  rodsPort 
)

Definition at line 233 of file rcConnect.cpp.

References load_in_addr_from_hostname(), and irods.pypyodbc::status.

Referenced by connectToRhostPortal(), and setRhostInfo().

Here is the call graph for this function:

◆ setUserInfo()

int setUserInfo ( const char *  proxyUserName,
const char *  proxyRodsZone,
const char *  clientUserName,
const char *  clientRodsZone,
userInfo_t clientUser,
userInfo_t proxyUser 
)

Definition at line 186 of file rcConnect.cpp.

References CLIENT_RODS_ZONE_KEYWD, CLIENT_USER_NAME_KEYWD, NAME_LEN, NULL, userInfo_t::rodsZone, rstrcpy(), and userInfo_t::userName.

Referenced by _rcConnect().

Here is the call graph for this function: