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)  

miscServerFunct.hpp
Go to the documentation of this file.
1 
4 /* miscServerFunct.h - header file for miscServerFunct.c
5  */
6 
7 
8 
9 #ifndef MISC_SERVER_FUNCT_HPP
10 #define MISC_SERVER_FUNCT_HPP
11 
12 #include <sys/types.h>
13 
14 #include <netinet/in.h>
15 #include <arpa/inet.h>
16 
17 #include "rods.h"
18 #include "rcConnect.h"
19 #include "fileOpen.h"
20 #include "dataObjInpOut.h"
21 #include "dataCopy.h"
22 #include "rodsConnect.h"
23 
24 #include "structFileSync.h" /* JMC */
25 
26 #define MAX_RECON_ERROR_CNT 10
27 
28 typedef struct PortalTransferInp {
30  int destFd;
31  int srcFd;
34  int threadNum;
38  int flags;
39  int status;
41 
42  int key_size;
43  int salt_size;
46  char shared_secret[ NAME_LEN ]; // JMC - shared secret for each portal thread
47 
49 
50 int
51 singleL1Copy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp );
52 int
54 int
56 int
58 int
59 createSrvPortal( rsComm_t *rsComm, portList_t *thisPortList, int proto );
60 int
61 acceptSrvPortal( rsComm_t *rsComm, portList_t *thisPortList );
62 int
63 svrPortalPutGet( rsComm_t *rsComm );
64 void
66 void
68 int
70  int srcFd, int destFd, int destRescTypeInx, int srcRescTypeInx,
71  int threadNum, rodsLong_t size, rodsLong_t offset, int flags );
72 int
73 sameHostCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp );
74 void
76 int
77 rbudpRemLocCopy( dataCopyInp_t *dataCopyInp );
78 int
79 remLocCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp );
80 void
82 void
84 int
85 singleRemLocCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp );
86 int
87 singleRemToLocCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp );
88 int
89 singleLocToRemCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp );
90 int
91 isUserPrivileged( rsComm_t *rsComm );
92 int intNoSupport( ... );
94 void getZoneServerId( char *zoneName, char *zoneSID );
95 int
97 void
98 reconnManager( rsComm_t *rsComm );
99 int
101 int
103 int
105 int
107 int
108 svrSockOpenForInConn( rsComm_t *rsComm, int *portNum, char **addr, int proto );
109 char *
111 char *
113 char *
115 int
116 setLocalSrvAddr( char *outLocalAddr );
117 int
118 forkAndExec( char *av[] );
119 int
120 setupSrvPortalForParaOpr( rsComm_t *rsComm, dataOprInp_t *dataOprInp,
121  int oprType, portalOprOut_t **portalOprOut );
122 int
124 int
126 int
128 int
130 int
131 changeToUser( uid_t uid );
132 int
134 int
135 checkModArgType( const char *arg );
136 
137 #ifdef __cplusplus
138 #include "irods_error.hpp"
139 #include "irods_plugin_base.hpp"
140 #include "irods_network_object.hpp"
141 
145  struct timeval *tv );
146 
148 
150  const std::string& script_language,
151  const std::string& script_name,
152  const std::vector<std::string>& args,
153  std::string& output );
154 
156  keyValPair_t& _kvp );
157 
158 irods::error get_catalog_service_role( std::string& );
160 irods::error list_rule_plugin_instances( std::vector< std::string >& );
161 
162 void applyMetadataFromKVP( rsComm_t *rsComm, dataObjInp_t *dataObjInp);
163 void applyACLFromKVP( rsComm_t *rsComm, dataObjInp_t *dataObjInp);
164 #endif // __cplusplus
165 
166 
167 #endif /* MISC_SERVER_FUNCT_H */
singleRemToLocCopy
int singleRemToLocCopy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:2512
partialDataGet
void partialDataGet(portalTransferInp_t *myInput)
Definition: miscServerFunct.cpp:828
rsComm_t
Definition: rcConnect.h:145
applyMetadataFromKVP
void applyMetadataFromKVP(rsComm_t *rsComm, dataObjInp_t *dataObjInp)
Definition: miscServerFunct.cpp:3199
fileOpen.h
remToLocPartialCopy
void remToLocPartialCopy(portalTransferInp_t *myInput)
Definition: miscServerFunct.cpp:1069
add_global_re_params_to_kvp_for_dynpep
irods::error add_global_re_params_to_kvp_for_dynpep(keyValPair_t &)
Definition: miscServerFunct.cpp:3100
structFileSync.h
partialDataPut
void partialDataPut(portalTransferInp_t *myInput)
Definition: miscServerFunct.cpp:600
singleLocToRemCopy
int singleLocToRemCopy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:2576
portalOprOut
Definition: dataObjInpOut.h:114
setRECacheSaltFromEnv
irods::error setRECacheSaltFromEnv()
Definition: miscServerFunct.cpp:3021
PortalTransferInp::bytesWritten
rodsLong_t bytesWritten
Definition: miscServerFunct.hpp:37
irods_plugin_base.hpp
remLocCopy
int remLocCopy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:1321
portalTransferInp_t
struct PortalTransferInp portalTransferInp_t
irods_network_object.hpp
PortalTransferInp::shared_secret
char shared_secret[64]
Definition: miscServerFunct.hpp:46
rbudpRemLocCopy
int rbudpRemLocCopy(dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:1260
applyACLFromKVP
void applyACLFromKVP(rsComm_t *rsComm, dataObjInp_t *dataObjInp)
Definition: miscServerFunct.cpp:3227
setLocalSrvAddr
int setLocalSrvAddr(char *outLocalAddr)
Definition: miscServerFunct.cpp:2437
generate_iadmin_commands_for_41_to_42_upgrade.output
output
Definition: generate_iadmin_commands_for_41_to_42_upgrade.py:21
changeToServiceUser
int changeToServiceUser()
Definition: miscServerFunct.cpp:2899
rcConnect.h
DataCopyInp
Definition: dataCopy.h:7
svrPortalPutGet
int svrPortalPutGet(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:389
list_rule_plugin_instances
irods::error list_rule_plugin_instances(std::vector< std::string > &_instance_names)
Definition: miscServerFunct.cpp:3181
singleL1Copy
int singleL1Copy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:2641
PortalTransferInp::status
int status
Definition: miscServerFunct.hpp:39
rodsConnect.h
changeToRootUser
int changeToRootUser()
Definition: miscServerFunct.cpp:2871
PortalTransferInp::encryption_algorithm
char encryption_algorithm[64]
Definition: miscServerFunct.hpp:45
sameHostCopy
int sameHostCopy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:1496
dataObjInpOut.h
PortalTransferInp::threadNum
int threadNum
Definition: miscServerFunct.hpp:34
sameHostPartialCopy
void sameHostPartialCopy(portalTransferInp_t *myInput)
Definition: miscServerFunct.cpp:1625
acceptSrvPortal
int acceptSrvPortal(rsComm_t *rsComm, portList_t *thisPortList)
Definition: miscServerFunct.cpp:283
reconnManager
void reconnManager(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:2173
PortalTransferInp::key_size
int key_size
Definition: miscServerFunct.hpp:42
PortalTransferInp::dataOprInp
dataOprInp_t * dataOprInp
Definition: miscServerFunct.hpp:40
singleRemLocCopy
int singleRemLocCopy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp)
Definition: miscServerFunct.cpp:2489
longNoSupport
rodsLong_t longNoSupport(...)
Definition: miscServerFunct.cpp:2015
DataObjInp
Definition: dataObjInpOut.h:65
PortalTransferInp::destFd
int destFd
Definition: miscServerFunct.hpp:30
PortalTransferInp::srcFd
int srcFd
Definition: miscServerFunct.hpp:31
svrToSvrConnect
int svrToSvrConnect(rsComm_t *rsComm, rodsServerHost_t *rodsServerHost)
Definition: miscServerFunct.cpp:106
portList_t
Definition: dataObjInpOut.h:29
locToRemPartialCopy
void locToRemPartialCopy(portalTransferInp_t *myInput)
Definition: miscServerFunct.cpp:1740
svrChkReconnAtSendStart
int svrChkReconnAtSendStart(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:2300
initServiceUser
int initServiceUser()
Definition: miscServerFunct.cpp:2821
PortalTransferInp
Definition: miscServerFunct.hpp:28
svrChkReconnAtReadStart
int svrChkReconnAtReadStart(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:2334
svrChkReconnAtReadEnd
int svrChkReconnAtReadEnd(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:2354
getSvrAddr
char * getSvrAddr(rodsServerHost_t *rodsServerHost)
Definition: miscServerFunct.cpp:2425
irods::error
Definition: irods_error.hpp:23
get_default_rule_plugin_instance
irods::error get_default_rule_plugin_instance(std::string &_instance_name)
Definition: miscServerFunct.cpp:3165
PortalTransferInp::size
rodsLong_t size
Definition: miscServerFunct.hpp:35
PortalTransferInp::destRescTypeInx
int destRescTypeInx
Definition: miscServerFunct.hpp:32
PortalTransferInp::offset
rodsLong_t offset
Definition: miscServerFunct.hpp:36
svrPortalPutGetRbudp
int svrPortalPutGetRbudp(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:2020
svrChkReconnAtSendEnd
int svrChkReconnAtSendEnd(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:2320
get_catalog_service_role
irods::error get_catalog_service_role(std::string &_role)
Definition: miscServerFunct.cpp:3153
rodsServerHost
Definition: rodsConnect.h:62
PortalTransferInp::srcRescTypeInx
int srcRescTypeInx
Definition: miscServerFunct.hpp:33
intNoSupport
int intNoSupport(...)
Definition: miscServerFunct.cpp:2010
svrToSvrConnectNoLogin
int svrToSvrConnectNoLogin(rsComm_t *rsComm, rodsServerHost_t *rodsServerHost)
Definition: miscServerFunct.cpp:74
irods::network_object_ptr
boost::shared_ptr< network_object > network_object_ptr
Definition: irods_network_object.hpp:78
dataCopy.h
isServiceUserSet
int isServiceUserSet()
Definition: miscServerFunct.cpp:2858
DataOprInp
Definition: dataObjInpOut.h:122
checkModArgType
int checkModArgType(const char *arg)
Definition: miscServerFunct.cpp:3002
startupPack
Definition: rodsDef.h:234
PortalTransferInp::num_hash_rounds
int num_hash_rounds
Definition: miscServerFunct.hpp:44
getZoneServerId
void getZoneServerId(char *zoneName, char *zoneSID)
Definition: miscServerFunct.cpp:1945
PortalTransferInp::rsComm
rsComm_t * rsComm
Definition: miscServerFunct.hpp:29
irods_error.hpp
setupSrvPortalForParaOpr
int setupSrvPortalForParaOpr(rsComm_t *rsComm, dataOprInp_t *dataOprInp, int oprType, portalOprOut_t **portalOprOut)
Definition: miscServerFunct.cpp:138
size
long long size
Definition: filesystem.cpp:102
readStartupPack
irods::error readStartupPack(irods::network_object_ptr _ptr, startupPack_t **startupPack, struct timeval *tv)
Definition: miscServerFunct.cpp:2716
dropRootPrivilege
int dropRootPrivilege()
Definition: miscServerFunct.cpp:2962
get_script_output_single_line
irods::error get_script_output_single_line(const std::string &script_language, const std::string &script_name, const std::vector< std::string > &args, std::string &output)
Definition: miscServerFunct.cpp:3046
PortalTransferInp::salt_size
int salt_size
Definition: miscServerFunct.hpp:43
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
KeyValPair
Definition: objInfo.h:120
isUserPrivileged
int isUserPrivileged(rsComm_t *rsComm)
Definition: miscServerFunct.cpp:1995
PortalTransferInp::flags
int flags
Definition: miscServerFunct.hpp:38
getLocalSvrAddr
char * getLocalSvrAddr()
Definition: miscServerFunct.cpp:2397
_getSvrAddr
char * _getSvrAddr(rodsServerHost_t *rodsServerHost)
Definition: miscServerFunct.cpp:2404
svrSockOpenForInConn
int svrSockOpenForInConn(rsComm_t *rsComm, int *portNum, char **addr, int proto)
Definition: miscServerFunct.cpp:2368
forkAndExec
int forkAndExec(char *av[])
Definition: miscServerFunct.cpp:2456
rods.h
createSrvPortal
int createSrvPortal(rsComm_t *rsComm, portList_t *thisPortList, int proto)
Definition: miscServerFunct.cpp:214
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
fillPortalTransferInp
int fillPortalTransferInp(portalTransferInp_t *myInput, rsComm_t *rsComm, int srcFd, int destFd, int destRescTypeInx, int srcRescTypeInx, int threadNum, rodsLong_t size, rodsLong_t offset, int flags)
Definition: miscServerFunct.cpp:553
changeToUser
int changeToUser(uid_t uid)
Definition: miscServerFunct.cpp:2931