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.h
Go to the documentation of this file.
1 #ifndef RODS_CONNECT_H
2 #define RODS_CONNECT_H
3 
4 #include "rodsDef.h"
5 #include "rcConnect.h"
6 
7 #define HOST_CONFIG_FILE "hosts_config.json"
8 #define RE_RULES_FILE "reRules"
9 
10 /* Keywords used in CONNECT_CONTROL_FILE */
11 #define USER_WHITELIST_KW "whitelist"
12 #define USER_BLACKLIST_KW "blacklist"
13 #define NO_MAX_CONNECTION_LIMIT -1
14 #define DEF_MAX_CONNECTION NO_MAX_CONNECTION_LIMIT
15 
16 /* definition for initialization state InitialState and IcatConnState */
17 
18 #define INITIAL_NOT_DONE 0
19 #define INITIAL_DONE 1
20 
21 /* rsPipeSignalHandler parameters */
22 #define MAX_BROKEN_PIPE_CNT 50
23 #define BROKEN_PIPE_INT 300 /* 5 minutes interval */
24 
25 #define LOCK_FILE_PURGE_TIME 7200 /* purge lock files every 2 hr. */
26 
27 /* Managing the spawned agents */
28 
29 typedef struct agentProc {
30  int pid;
31  int sock;
33  struct sockaddr_in remoteAddr; /* remote address */
34  struct agentProc *next;
36 
37 typedef struct hostName {
38  char *name;
39  struct hostName *next;
41 
42 /* definition for localFlag */
43 #define UNKNOWN_HOST_LOC -1
44 #define LOCAL_HOST 0
45 #define REMOTE_HOST 1
46 #define REMOTE_GW_HOST 2 /* remote gateway host */
47 #define REMOTE_ZONE_HOST 3 /* host in remote zone */
48 
49 /* definition for rcatEnabled */
50 
51 #define NOT_RCAT_ENABLED 0
52 #define LOCAL_ICAT 1
53 #define LOCAL_SLAVE_ICAT 2
54 #define REMOTE_ICAT 3
55 
56 /* definition for runMode */
57 
58 #define SINGLE_PASS 0
59 #define SERVER 1
60 #define STANDALONE_SERVER 2
61 
62 typedef struct rodsServerHost {
68  int localFlag;
69  int status;
70  void *zoneInfo;
73 
74 typedef struct zoneInfo {
76  int portNum;
79  struct zoneInfo *next;
81 
82 /* definitions for Server ID information */
83 #define MAX_FED_RSIDS 5
84 #define LOCAL_ZONE_SID_KW "LocalZoneSID"
85 #define REMOTE_ZONE_SID_KW "RemoteZoneSID"
86 #define SID_KEY_KW "SIDKey"
87 
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91 
92 int
94 int
95 queHostName( rodsServerHost_t *rodsServerHost, const char *myHostName, int topFlag );
96 int
97 queRodsServerHost( rodsServerHost_t **rodsServerHostHead,
98  rodsServerHost_t *myRodsServerHost );
100 mkServerHost( char *myHostAddr, char *zoneName );
101 int
104 int
105 matchHostConfig( rodsServerHost_t *myRodsServerHost );
106 int
107 queConfigName( rodsServerHost_t *configServerHost,
108  rodsServerHost_t *myRodsServerHost );
109 int
110 getAndConnRcatHost( rsComm_t *rsComm, int rcatType, const char *rcatZoneHint,
112 int
113 getAndConnRcatHostNoLogin( rsComm_t *rsComm, int rcatType, char *rcatZoneHint,
115 int
116 getRcatHost( int rcatType, const char *rcatZoneHint,
118 int
119 disconnRcatHost( int rcatType, const char *rcatZoneHint );
120 int
121 getAndDisconnRcatHost( int rcatType, char *rcatZoneHint,
123 int
125 int
127 int
128 getAndConnRemoteZone( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
129  rodsServerHost_t **rodsServerHost, char *remotZoneOpr );
130 int
132 int
134 int
135 resetRcatHost( int rcatType, const char *rcatZoneHint );
136 int
137 isLocalHost( const char *hostAddr );
138 int
140 int
141 getLocalZoneInfo( zoneInfo_t **outZoneInfo );
142 char *
144 int
145 getZoneInfo( const char *rcatZoneHint, zoneInfo_t **myZoneInfo );
146 int
147 getRemoteZoneHost( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
148  rodsServerHost_t **rodsServerHost, char *remotZoneOpr );
149 int
150 isLocalZone( char *zoneHint );
151 int
152 isSameZone( char *zoneHint1, char *zoneHint2 );
153 int
154 convZoneSockError( int inStatus );
155 int
157 int
160 int
163 int
164 printZoneInfo();
165 int
166 printServerHost( rodsServerHost_t *myServerHost );
167 int
168 printZoneInfo();
169 
170 #ifdef __cplusplus
171 } //extern C
172 #endif
173 
174 #endif /* RODS_CONNECT_H */
zoneInfo_t
struct zoneInfo zoneInfo_t
matchHostConfig
int matchHostConfig(rodsServerHost_t *myRodsServerHost)
Definition: rodsConnect.cpp:302
rcComm_t
Definition: rcConnect.h:95
zoneInfo::masterServerHost
rodsServerHost_t * masterServerHost
Definition: rodsConnect.h:77
rsComm_t
Definition: rcConnect.h:145
rodsServerHost::localFlag
int localFlag
Definition: rodsConnect.h:68
myHostName
char myHostName[(1024+64)]
Definition: nre.reHelpers1.cpp:45
queRodsServerHost
int queRodsServerHost(rodsServerHost_t **rodsServerHostHead, rodsServerHost_t *myRodsServerHost)
Definition: rodsConnect.cpp:212
rodsServerHost::conn
rcComm_t * conn
Definition: rodsConnect.h:64
queHostName
int queHostName(rodsServerHost_t *rodsServerHost, const char *myHostName, int topFlag)
Definition: rodsConnect.cpp:177
rodsServerHost::rcatEnabled
int rcatEnabled
Definition: rodsConnect.h:65
getAndConnRcatHostNoLogin
int getAndConnRcatHostNoLogin(rsComm_t *rsComm, int rcatType, char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:62
isLocalZone
int isLocalZone(char *zoneHint)
Definition: rodsConnect.cpp:869
getRemoteZoneHost
int getRemoteZoneHost(rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsServerHost_t **rodsServerHost, char *remotZoneOpr)
Definition: rodsConnect.cpp:910
rodsServerHost::status
int status
Definition: rodsConnect.h:69
rcConnect.h
mkServerHost
rodsServerHost_t * mkServerHost(char *myHostAddr, char *zoneName)
Definition: rodsConnect.cpp:110
agentProc_t
struct agentProc agentProc_t
zoneInfo::zoneName
char zoneName[64]
Definition: rodsConnect.h:75
isSameZone
int isSameZone(char *zoneHint1, char *zoneHint2)
Definition: rodsConnect.cpp:891
rodsServerHost::next
struct rodsServerHost * next
Definition: rodsConnect.h:71
queZone
int queZone(const char *zoneName, int portNum, rodsServerHost_t *masterServerHost, rodsServerHost_t *slaveServerHost)
Definition: rodsConnect.cpp:233
hostName::next
struct hostName * next
Definition: rodsConnect.h:39
printServerHost
int printServerHost(rodsServerHost_t *myServerHost)
Definition: rodsConnect.cpp:475
queConfigName
int queConfigName(rodsServerHost_t *configServerHost, rodsServerHost_t *myRodsServerHost)
Definition: rodsConnect.cpp:354
hostName
Definition: rodsConnect.h:37
agentProc::next
struct agentProc * next
Definition: rodsConnect.h:34
getReHost
int getReHost(rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:972
convZoneSockError
int convZoneSockError(int inStatus)
Definition: rodsConnect.cpp:603
getZoneInfo
int getZoneInfo(const char *rcatZoneHint, zoneInfo_t **myZoneInfo)
Definition: rodsConnect.cpp:614
agentProc::pid
int pid
Definition: rodsConnect.h:30
rodsDef.h
hostName::name
char * name
Definition: rodsConnect.h:38
DataObjInp
Definition: dataObjInpOut.h:65
getAndConnReHost
int getAndConnReHost(rsComm_t *rsComm, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:1015
zoneInfo::next
struct zoneInfo * next
Definition: rodsConnect.h:79
svrReconnect
int svrReconnect(rsComm_t *rsComm)
getLocalZoneInfo
int getLocalZoneInfo(zoneInfo_t **outZoneInfo)
Definition: rodsConnect.cpp:666
getXmsgHost
int getXmsgHost(rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:991
disconnectAllSvrToSvrConn
int disconnectAllSvrToSvrConn()
Definition: rodsConnect.cpp:762
rodsServerHost::xmsgHostFlag
int xmsgHostFlag
Definition: rodsConnect.h:67
zoneHint
char zoneHint[(1024+64)]
Definition: lsUtil.cpp:13
zoneInfo::portNum
int portNum
Definition: rodsConnect.h:76
printZoneInfo
int printZoneInfo()
Definition: rodsConnect.cpp:515
agentProc
Definition: rodsConnect.h:29
rodsServerHost_t
struct rodsServerHost rodsServerHost_t
getRcatHost
int getRcatHost(int rcatType, const char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:88
agentProc::startupPack
startupPack_t startupPack
Definition: rodsConnect.h:32
hostName_t
struct hostName hostName_t
getLocalZoneName
char * getLocalZoneName()
Definition: rodsConnect.cpp:685
getAndConnRcatHost
int getAndConnRcatHost(rsComm_t *rsComm, int rcatType, const char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:26
rodsServerHost::reHostFlag
int reHostFlag
Definition: rodsConnect.h:66
resetRcatHost
int resetRcatHost(int rcatType, const char *rcatZoneHint)
Definition: rodsConnect.cpp:745
rodsServerHost
Definition: rodsConnect.h:62
getAndDisconnRcatHost
int getAndDisconnRcatHost(int rcatType, char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:698
getAndConnRemoteZone
int getAndConnRemoteZone(rsComm_t *rsComm, dataObjInp_t *dataObjInp, rodsServerHost_t **rodsServerHost, char *remotZoneOpr)
Definition: rodsConnect.cpp:784
isLocalHost
int isLocalHost(const char *hostAddr)
Definition: rodsConnect.cpp:955
rodsServerHost::zoneInfo
void * zoneInfo
Definition: rodsConnect.h:70
startupPack
Definition: rodsDef.h:234
zoneInfo::slaveServerHost
rodsServerHost_t * slaveServerHost
Definition: rodsConnect.h:78
resolveHostByDataObjInfo
int resolveHostByDataObjInfo(dataObjInfo_t *dataObjInfo, rodsServerHost_t **rodsServerHost)
queAddr
int queAddr(rodsServerHost_t *rodsServerHost, char *myHostName)
Definition: rodsConnect.cpp:143
disconnRcatHost
int disconnRcatHost(int rcatType, const char *rcatZoneHint)
Definition: rodsConnect.cpp:716
rodsServerHost::hostName
hostName_t * hostName
Definition: rodsConnect.h:63
agentProc::remoteAddr
struct sockaddr_in remoteAddr
Definition: rodsConnect.h:33
zoneInfo
Definition: rodsConnect.h:74
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
DataObjInfo
Definition: objInfo.h:129
resoAndConnHostByDataObjInfo
int resoAndConnHostByDataObjInfo(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:437
agentProc::sock
int sock
Definition: rodsConnect.h:31
resolveHost
int resolveHost(rodsHostAddr_t *addr, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:375
rodsHostAddr_t
Definition: rodsDef.h:296