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)  

rodsConnect.cpp File Reference
#include "rcMisc.h"
#include "rodsConnect.h"
#include "rsGlobalExtern.hpp"
#include "rcGlobalExtern.h"
#include "miscServerFunct.hpp"
#include "getRemoteZoneResc.h"
#include "irods_resource_backport.hpp"
#include "rsLog.hpp"
Include dependency graph for rodsConnect.cpp:

Go to the source code of this file.

Functions

int getAndConnRcatHost (rsComm_t *rsComm, int rcatType, const char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
 
int getAndConnRcatHostNoLogin (rsComm_t *rsComm, int rcatType, char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
 
int getRcatHost (int rcatType, const char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
 
rodsServerHost_tmkServerHost (char *myHostAddr, char *zoneName)
 
int queAddr (rodsServerHost_t *rodsServerHost, char *myHostName)
 
int queHostName (rodsServerHost_t *rodsServerHost, const char *myName, int topFlag)
 
int queRodsServerHost (rodsServerHost_t **rodsServerHostHead, rodsServerHost_t *myRodsServerHost)
 
int queZone (const char *zoneName, int portNum, rodsServerHost_t *masterServerHost, rodsServerHost_t *slaveServerHost)
 
int matchHostConfig (rodsServerHost_t *myRodsServerHost)
 
int queConfigName (rodsServerHost_t *configServerHost, rodsServerHost_t *myRodsServerHost)
 
int resolveHost (rodsHostAddr_t *addr, rodsServerHost_t **rodsServerHost)
 
int resoAndConnHostByDataObjInfo (rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, rodsServerHost_t **rodsServerHost)
 
int printServerHost (rodsServerHost_t *myServerHost)
 
int printZoneInfo ()
 
int convZoneSockError (int inStatus)
 
int getZoneInfo (const char *rcatZoneHint, zoneInfo_t **myZoneInfo)
 
int getLocalZoneInfo (zoneInfo_t **outZoneInfo)
 
char * getLocalZoneName ()
 
int getAndDisconnRcatHost (int rcatType, char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
 
int disconnRcatHost (int rcatType, const char *rcatZoneHint)
 
int resetRcatHost (int rcatType, const char *rcatZoneHint)
 
int disconnectAllSvrToSvrConn ()
 
int getAndConnRemoteZone (rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsServerHost_t **rodsServerHost, char *remoteZoneOpr)
 
int getAndConnRemoteZoneForCopy (rsComm_t *rsComm, dataObjCopyInp_t *dataObjCopyInp, rodsServerHost_t **rodsServerHost)
 
int isLocalZone (char *zoneHint)
 
int isSameZone (char *zoneHint1, char *zoneHint2)
 
int getRemoteZoneHost (rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsServerHost_t **rodsServerHost, char *remoteZoneOpr)
 
int isLocalHost (const char *hostAddr)
 
int getReHost (rodsServerHost_t **rodsServerHost)
 
int getXmsgHost (rodsServerHost_t **rodsServerHost)
 
int getAndConnReHost (rsComm_t *rsComm, rodsServerHost_t **rodsServerHost)
 

Function Documentation

◆ convZoneSockError()

int convZoneSockError ( int  inStatus)

Definition at line 603 of file rodsConnect.cpp.

References CROSS_ZONE_SOCK_CONNECT_ERR, getErrno(), and USER_SOCK_CONNECT_ERR.

Referenced by getAndConnRcatHost(), getAndConnRcatHostNoLogin(), and getRemoteZoneHost().

Here is the call graph for this function:

◆ disconnectAllSvrToSvrConn()

int disconnectAllSvrToSvrConn ( )

Definition at line 762 of file rodsConnect.cpp.

References rodsServerHost::conn, rodsServerHost::next, NULL, rcDisconnect(), and ServerHostHead.

Referenced by cleanup().

Here is the call graph for this function:

◆ disconnRcatHost()

int disconnRcatHost ( int  rcatType,
const char *  rcatZoneHint 
)

Definition at line 716 of file rodsConnect.cpp.

References rodsServerHost::conn, getRcatHost(), LOCAL_HOST, NULL, rcDisconnect(), REMOTE_HOST, and irods.pypyodbc::status.

Here is the call graph for this function:

◆ getAndConnRcatHost()

◆ getAndConnRcatHostNoLogin()

int getAndConnRcatHostNoLogin ( rsComm_t rsComm,
int  rcatType,
char *  rcatZoneHint,
rodsServerHost_t **  rodsServerHost 
)

Definition at line 62 of file rodsConnect.cpp.

References convZoneSockError(), getRcatHost(), LOCAL_HOST, LOG_NOTICE, REMOTE_ICAT, rodsLog(), irods.pypyodbc::status, and svrToSvrConnectNoLogin().

Referenced by rsAuthCheck().

Here is the call graph for this function:

◆ getAndConnReHost()

int getAndConnReHost ( rsComm_t rsComm,
rodsServerHost_t **  rodsServerHost 
)

Definition at line 1015 of file rodsConnect.cpp.

References getReHost(), LOCAL_HOST, LOG_NOTICE, REMOTE_HOST, rodsLog(), irods.pypyodbc::status, and svrToSvrConnect().

Referenced by rsRuleExecDel(), and rsRuleExecSubmit().

Here is the call graph for this function:

◆ getAndConnRemoteZone()

int getAndConnRemoteZone ( rsComm_t rsComm,
dataObjInp_t dataObjInp,
rodsServerHost_t **  rodsServerHost,
char *  remoteZoneOpr 
)

◆ getAndConnRemoteZoneForCopy()

int getAndConnRemoteZoneForCopy ( rsComm_t rsComm,
dataObjCopyInp_t dataObjCopyInp,
rodsServerHost_t **  rodsServerHost 
)

Definition at line 814 of file rodsConnect.cpp.

References DataObjCopyInp::destDataObjInp, getAndConnRemoteZone(), getRcatHost(), LOCAL_HOST, LOG_ERROR, MASTER_RCAT, NULL, DataObjInp::objPath, rodsServerHost::rcatEnabled, REMOTE_CREATE, REMOTE_ICAT, rodsLog(), DataObjCopyInp::srcDataObjInp, and irods.pypyodbc::status.

Referenced by rsDataObjCopy().

Here is the call graph for this function:

◆ getAndDisconnRcatHost()

int getAndDisconnRcatHost ( int  rcatType,
char *  rcatZoneHint,
rodsServerHost_t **  rodsServerHost 
)

Definition at line 698 of file rodsConnect.cpp.

References getRcatHost(), NULL, rcDisconnect(), and irods.pypyodbc::status.

Here is the call graph for this function:

◆ getLocalZoneInfo()

int getLocalZoneInfo ( zoneInfo_t **  outZoneInfo)

Definition at line 666 of file rodsConnect.cpp.

References LOCAL_ICAT, LOG_ERROR, zoneInfo::masterServerHost, zoneInfo::next, NULL, rodsServerHost::rcatEnabled, rodsLog(), SYS_INVALID_ZONE_NAME, and ZoneInfoHead.

Referenced by getLocalZoneName(), and getLogPathFromPhyPath().

Here is the call graph for this function:

◆ getLocalZoneName()

char* getLocalZoneName ( )

Definition at line 685 of file rodsConnect.cpp.

References getLocalZoneInfo(), NULL, and zoneInfo::zoneName.

Referenced by _rsGetHierarchyForResc(), get_server_reports(), logAgentProc(), mkFileDirR(), readStartupPack(), and rsGetHierarchyForResc().

Here is the call graph for this function:

◆ getRcatHost()

int getRcatHost ( int  rcatType,
const char *  rcatZoneHint,
rodsServerHost_t **  rodsServerHost 
)

◆ getReHost()

int getReHost ( rodsServerHost_t **  rodsServerHost)

Definition at line 972 of file rodsConnect.cpp.

References getRcatHost(), MASTER_RCAT, rodsServerHost::next, NULL, rodsServerHost::reHostFlag, ServerHostHead, and irods.pypyodbc::status.

Referenced by getAndConnReHost(), initServerMain(), and printZoneInfo().

Here is the call graph for this function:

◆ getRemoteZoneHost()

int getRemoteZoneHost ( rsComm_t rsComm,
dataObjInp_t dataObjInp,
rodsServerHost_t **  rodsServerHost,
char *  remoteZoneOpr 
)

Definition at line 910 of file rodsConnect.cpp.

References addKeyVal(), DataObjInp::condInput, rodsServerHost::conn, convZoneSockError(), getRcatHost(), rodsServerHost::hostName, LOCAL_HOST, LOG_ERROR, MASTER_RCAT, hostName::name, NULL, DataObjInp::objPath, rodsServerHost::rcatEnabled, rcGetRemoteZoneResc(), REMOTE_ICAT, REMOTE_ZONE_OPR_KW, resolveHost(), rodsLog(), irods.pypyodbc::status, and svrToSvrConnect().

Referenced by getAndConnRemoteZone().

Here is the call graph for this function:

◆ getXmsgHost()

int getXmsgHost ( rodsServerHost_t **  rodsServerHost)

◆ getZoneInfo()

int getZoneInfo ( const char *  rcatZoneHint,
zoneInfo_t **  myZoneInfo 
)

Definition at line 614 of file rodsConnect.cpp.

References getZoneNameFromHint(), LOCAL_ICAT, LOG_DEBUG, LOG_ERROR, zoneInfo::masterServerHost, NAME_LEN, zoneInfo::next, NULL, rodsServerHost::rcatEnabled, rodsLog(), irods.pypyodbc::status, SYS_INVALID_ZONE_NAME, ZoneInfoHead, and zoneInfo::zoneName.

Referenced by getRcatHost(), and mkServerHost().

Here is the call graph for this function:

◆ isLocalHost()

int isLocalHost ( const char *  hostAddr)

Definition at line 955 of file rodsConnect.cpp.

References rodsHostAddr_t::hostAddr, LOCAL_HOST, NAME_LEN, resolveHost(), and rstrcpy().

Referenced by getNumThreads().

Here is the call graph for this function:

◆ isLocalZone()

int isLocalZone ( char *  zoneHint)

Definition at line 869 of file rodsConnect.cpp.

References getRcatHost(), MASTER_RCAT, NULL, rodsServerHost::rcatEnabled, REMOTE_ICAT, irods.pypyodbc::status, and zoneHint.

Referenced by rsDataObjRsync(), rsObjStat(), and rsPhyBundleColl().

Here is the call graph for this function:

◆ isSameZone()

int isSameZone ( char *  zoneHint1,
char *  zoneHint2 
)

Definition at line 891 of file rodsConnect.cpp.

References getZoneNameFromHint(), NAME_LEN, and NULL.

Referenced by rsDataObjRename(), and rsStructFileExtAndReg().

Here is the call graph for this function:

◆ matchHostConfig()

int matchHostConfig ( rodsServerHost_t myRodsServerHost)

Definition at line 302 of file rodsConnect.cpp.

References HostConfigHead, rodsServerHost::hostName, LOCAL_HOST, rodsServerHost::localFlag, hostName::name, hostName::next, rodsServerHost::next, NULL, queConfigName(), irods.pypyodbc::status, and UNKNOWN_HOST_LOC.

Referenced by initLocalServerHost(), and mkServerHost().

Here is the call graph for this function:

◆ mkServerHost()

rodsServerHost_t* mkServerHost ( char *  myHostAddr,
char *  zoneName 
)

Definition at line 110 of file rodsConnect.cpp.

References getZoneInfo(), rodsServerHost::localFlag, matchHostConfig(), NULL, queAddr(), queHostName(), irods.pypyodbc::status, UNKNOWN_HOST_LOC, and rodsServerHost::zoneInfo.

Referenced by resolveHost().

Here is the call graph for this function:

◆ printServerHost()

int printServerHost ( rodsServerHost_t myServerHost)

Definition at line 475 of file rodsConnect.cpp.

References rodsServerHost::hostName, LOCAL_HOST, rodsServerHost::localFlag, LOG_NOTICE, hostName::name, hostName::next, NULL, rodsLog(), and rodsServerHost::zoneInfo.

Referenced by initLocalServerHost().

Here is the call graph for this function:

◆ printZoneInfo()

int printZoneInfo ( )

Definition at line 515 of file rodsConnect.cpp.

References getReHost(), getXmsgHost(), rodsServerHost::hostName, LOCAL_ICAT, LOG_ERROR, LOG_NOTICE, zoneInfo::masterServerHost, hostName::name, zoneInfo::next, NULL, zoneInfo::portNum, rodsServerHost::rcatEnabled, rodsLog(), zoneInfo::slaveServerHost, ZoneInfoHead, and zoneInfo::zoneName.

Referenced by initServer().

Here is the call graph for this function:

◆ queAddr()

int queAddr ( rodsServerHost_t rodsServerHost,
char *  myHostName 
)

Definition at line 143 of file rodsConnect.cpp.

References irods::EMPTY_RESC_HOST(), get_canonical_name(), LOG_ERROR, LOG_WARNING, myHostName, NULL, ProcessType, queHostName(), rodsLog(), SERVER_PT, and SYS_GET_HOSTNAME_ERR.

Referenced by initLocalServerHost(), and mkServerHost().

Here is the call graph for this function:

◆ queConfigName()

int queConfigName ( rodsServerHost_t configServerHost,
rodsServerHost_t myRodsServerHost 
)

Definition at line 354 of file rodsConnect.cpp.

References rodsServerHost::hostName, hostName::name, hostName::next, NULL, and queHostName().

Referenced by matchHostConfig().

Here is the call graph for this function:

◆ queHostName()

int queHostName ( rodsServerHost_t rodsServerHost,
const char *  myName,
int  topFlag 
)

◆ queRodsServerHost()

int queRodsServerHost ( rodsServerHost_t **  rodsServerHostHead,
rodsServerHost_t myRodsServerHost 
)

Definition at line 212 of file rodsConnect.cpp.

References rodsServerHost::next, and NULL.

Referenced by initHostConfigByFile(), and resolveHost().

◆ queZone()

int queZone ( const char *  zoneName,
int  portNum,
rodsServerHost_t masterServerHost,
rodsServerHost_t slaveServerHost 
)

Definition at line 233 of file rodsConnect.cpp.

References LOG_DEBUG, LOG_ERROR, zoneInfo::masterServerHost, NAME_LEN, zoneInfo::next, NULL, zoneInfo::portNum, rodsLog(), rstrcpy(), zoneInfo::slaveServerHost, SYS_INVALID_SERVER_HOST, rodsServerHost::zoneInfo, ZoneInfoHead, and zoneInfo::zoneName.

Referenced by initServerInfo(), and initZone().

Here is the call graph for this function:

◆ resetRcatHost()

int resetRcatHost ( int  rcatType,
const char *  rcatZoneHint 
)

Definition at line 745 of file rodsConnect.cpp.

References rodsServerHost::conn, getRcatHost(), LOCAL_HOST, rodsServerHost::localFlag, NULL, REMOTE_HOST, and irods.pypyodbc::status.

Here is the call graph for this function:

◆ resoAndConnHostByDataObjInfo()

int resoAndConnHostByDataObjInfo ( rsComm_t rsComm,
dataObjInfo_t dataObjInfo,
rodsServerHost_t **  rodsServerHost 
)

Definition at line 437 of file rodsConnect.cpp.

References irods::error::code(), irods::get_loc_for_hier_string(), rodsHostAddr_t::hostAddr, irods::log(), LOG_ERROR, LOG_NOTICE, NAME_LEN, NULL, irods::error::ok(), PASSMSG, REMOTE_HOST, DataObjInfo::rescHier, resolveHost(), rodsLog(), rstrcpy(), irods.pypyodbc::status, svrToSvrConnect(), and SYS_INTERNAL_NULL_INPUT_ERR.

Here is the call graph for this function:

◆ resolveHost()