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.h File Reference
#include "rodsDef.h"
#include "rodsError.h"
#include "rodsLog.h"
#include "stringOpr.h"
#include "rodsType.h"
#include "rodsUser.h"
#include "getRodsEnv.h"
#include "objInfo.h"
#include "dataObjInpOut.h"
#include "guiProgressCallback.h"
#include <openssl/ssl.h>
#include <openssl/x509v3.h>
#include <openssl/err.h>
Include dependency graph for rcConnect.h:

Go to the source code of this file.

Classes

struct  reconnMsg
 
struct  dataSeg
 
struct  fileRestartInfo_t
 
struct  fileRestart_t
 
struct  rcComm_t
 
struct  perfStat_t
 
struct  rsComm_t
 

Macros

#define NO_RECONN   0 /* no reconnection */
 
#define RECONN_NOTUSED   1 /* this has been deprecated */
 
#define RECONN_TIMEOUT   200
 
#define RECONN_TIMEOUT_TIME   600 /* re-connection timeout time in sec */
 

Typedefs

typedef struct reconnMsg reconnMsg_t
 
typedef struct dataSeg dataSeg_t
 

Enumerations

enum  procState_t { PROCESSING_STATE, RECEIVING_STATE, SENDING_STATE, CONN_WAIT_STATE }
 
enum  fileRestartFlag_t { FILE_RESTART_OFF, FILE_RESTART_ON }
 
enum  fileRestartStatus_t { FILE_NOT_RESTART, FILE_RESTARTED }
 
enum  procLogFlag_t { PROC_LOG_NOT_DONE, PROC_LOG_DONE }
 

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 setAuthInfo (char *rodsAuthScheme, char *authStr, char *rodsServerDn, userInfo_t *clientUser, userInfo_t *proxyUser, int flag)
 
int rcDisconnect (rcComm_t *conn)
 
int freeRcComm (rcComm_t *conn)
 
int cleanRcComm (rcComm_t *conn)
 
int clientLogin (rcComm_t *conn, const char *_context, const char *_scheme_override)
 
int clientLoginPam (rcComm_t *conn, char *password, int ttl)
 
int clientLoginTTL (rcComm_t *conn, int ttl)
 
char * getSessionSignatureClientside ()
 
int clientLoginWithPassword (rcComm_t *conn, char *password)
 
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)
 

Macro Definition Documentation

◆ NO_RECONN

#define NO_RECONN   0 /* no reconnection */

Definition at line 35 of file rcConnect.h.

◆ RECONN_NOTUSED

#define RECONN_NOTUSED   1 /* this has been deprecated */

Definition at line 36 of file rcConnect.h.

◆ RECONN_TIMEOUT

#define RECONN_TIMEOUT   200

Definition at line 37 of file rcConnect.h.

◆ RECONN_TIMEOUT_TIME

#define RECONN_TIMEOUT_TIME   600 /* re-connection timeout time in sec */

Definition at line 39 of file rcConnect.h.

Typedef Documentation

◆ dataSeg_t

typedef struct dataSeg dataSeg_t

◆ reconnMsg_t

typedef struct reconnMsg reconnMsg_t

Enumeration Type Documentation

◆ fileRestartFlag_t

Enumerator
FILE_RESTART_OFF 
FILE_RESTART_ON 

Definition at line 62 of file rcConnect.h.

◆ fileRestartStatus_t

Enumerator
FILE_NOT_RESTART 
FILE_RESTARTED 

Definition at line 67 of file rcConnect.h.

◆ procLogFlag_t

Enumerator
PROC_LOG_NOT_DONE 
PROC_LOG_DONE 

Definition at line 88 of file rcConnect.h.

◆ procState_t

Enumerator
PROCESSING_STATE 
RECEIVING_STATE 
SENDING_STATE 
CONN_WAIT_STATE 

Definition at line 41 of file rcConnect.h.

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:

◆ clientLogin()

int clientLogin ( rcComm_t _comm,
const char *  _context,
const char *  _scheme_override 
)

◆ clientLoginPam()

int clientLoginPam ( rcComm_t conn,
char *  password,
int  ttl 
)

Definition at line 97 of file clientLogin.cpp.

References pamAuthRequestOut_t::irodsPamPassword, LOG_NOTICE, MAX_PASSWORD_LEN, NAME_LEN, NULL, obfSavePw(), pamAuthRequestInp_t::pamPassword, pamAuthRequestInp_t::pamUser, printError(), rcComm_t::proxyUser, rcPamAuthRequest(), rodsLog(), sslEnd(), sslStart(), irods.pypyodbc::status, pamAuthRequestInp_t::timeToLive, and userInfo_t::userName.

Here is the call graph for this function:

◆ clientLoginTTL()

int clientLoginTTL ( rcComm_t conn,
int  ttl 
)

Definition at line 174 of file clientLogin.cpp.

References HASH_TYPE_DEFAULT, hashToStr(), MAX_PASSWORD_LEN, obfGetPw(), obfMakeOneWayHash(), obfSavePw(), printError(), rcGetLimitedPassword(), irods.pypyodbc::status, getLimitedPasswordOut_t::stringToHashWith, getLimitedPasswordInp_t::ttl, and getLimitedPasswordInp_t::unused1.

Here is the call graph for this function:

◆ clientLoginWithPassword()

int clientLoginWithPassword ( rcComm_t conn,
char *  password 
)

Definition at line 348 of file clientLogin.cpp.

References authRequestOut_t::challenge, CHALLENGE_LEN, rcComm_t::loggedIn, MAX_PASSWORD_LEN, NAME_LEN, NULL, printError(), rcComm_t::proxyUser, rcAuthRequest(), rcAuthResponse(), authResponseInp_t::response, RESPONSE_LEN, userInfo_t::rodsZone, setSessionSignatureClientside(), irods.pypyodbc::status, authResponseInp_t::username, and userInfo_t::userName.

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:

◆ getSessionSignatureClientside()

char* getSessionSignatureClientside ( )

Definition at line 44 of file clientLogin.cpp.

References prevChallengeSignatureClient.

◆ 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()

◆ setAuthInfo()

int setAuthInfo ( char *  rodsAuthScheme,
char *  authStr,
char *  rodsServerDn,
userInfo_t clientUser,
userInfo_t proxyUser,
int  flag 
)

◆ 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: