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)  

rodsServer.hpp
Go to the documentation of this file.
1 
3 /*-------------------------------------------------------------------------
4  *
5  * rodsServer.hpp-- Header file for rodsServer.cpp
6  *
7  *
8  *
9  *-------------------------------------------------------------------------
10  */
11 
12 #ifndef RODS_SERVER_HPP
13 #define RODS_SERVER_HPP
14 
15 #include <stdarg.h>
16 #include <unistd.h>
17 #include <signal.h>
18 #include <sys/wait.h>
19 
20 #include "rods.h"
21 #include "rcGlobalExtern.h" /* client global */
22 #include "rsLog.hpp"
23 #include "rodsLog.h"
24 #include "sockComm.h"
25 #include "rsIcatOpr.hpp"
26 #include "getRodsEnv.h"
27 #include "rcConnect.h"
28 
29 #include <vector>
30 
31 extern char *optarg;
32 extern int optind, opterr, optopt;
33 #define MAX_EXEC_ENV 10 /* max number of env for execv */
34 #define MAX_SVR_SVR_CONNECT_CNT 7 /* avoid recurive connect */
35 
36 #define MIN_AGENT_TIMEOUT_TIME 7200
37 
38 #define MAX_ACCEPT_ERR_CNT 1000
39 
40 #define NUM_READ_WORKER_THR 5
41 
42 #define RE_CACHE_SALT_NUM_RANDOM_BYTES 40
43 
44 #define AGENT_QUE_CHK_INT 600 /* check the agent queue every 600 sec
45 * for consistence */
46 
47 int serverize( char *logDir );
48 int serverMain( char *logDir );
49 int
50 procChildren( agentProc_t **agentProcHead );
52 getAgentProcByPid( int childPid, agentProc_t **agentProcHead );
53 
54 #if defined(linux_platform) || defined(aix_platform) || defined(solaris_platform) || defined(osx_platform)
55 void
56 serverExit( int sig );
57 #else
58 void
59 serverExit();
60 #endif
61 
62 void
63 usage( char *prog );
64 
65 int
66 initServer( rsComm_t *svrComm );
67 int
68 spawnAgent( agentProc_t *connReq, agentProc_t **agentProcHead );
69 int
70 execAgent( int newSock, startupPack_t *startupPack );
71 int
73 int
75 int
76 getAgentProcPIDs( std::vector<int>& _pids );
77 int
79 int
80 recordServerProcess( rsComm_t *svrComm );
81 int
82 initServerMain( rsComm_t *svrComm );
83 int
84 addConnReqToQue( rsComm_t *rsComm, int sock );
85 int
89 void
91 int
92 procSingleConnReq( agentProc_t *connReq );
93 int
95 void
97 void
99 int
100 procBadReq();
101 void
102 purgeLockFileWorkerTask(); // JMC - backport 4612
103 #endif /* RODS_SERVER_H */
initServer
int initServer(rsComm_t *svrComm)
Definition: rodsServer.cpp:1086
purgeLockFileWorkerTask
void purgeLockFileWorkerTask()
Definition: rodsServer.cpp:1620
rsComm_t
Definition: rcConnect.h:145
usage
void usage(char *prog)
Definition: irodsXmsgServer.cpp:97
rsLog.hpp
stopProcConnReqThreads
void stopProcConnReqThreads()
Definition: rodsServer.cpp:1365
getAgentProcByPid
agentProc_t * getAgentProcByPid(int childPid, agentProc_t **agentProcHead)
Definition: rodsServer.cpp:695
optarg
char * optarg
initConnThreadEnv
int initConnThreadEnv()
Definition: rodsServer.cpp:1305
serverMain
int serverMain(char *logDir)
Definition: rodsServer.cpp:421
recordServerProcess
int recordServerProcess(rsComm_t *svrComm)
Definition: rodsServer.cpp:1140
chkAgentProcCnt
int chkAgentProcCnt()
Definition: rodsServer.cpp:1021
rcConnect.h
execAgent
int execAgent(int newSock, startupPack_t *startupPack)
Definition: rodsServer.cpp:801
getConnReqFromQue
agentProc_t * getConnReqFromQue()
Definition: rodsServer.cpp:1310
chkConnectedAgentProcQue
int chkConnectedAgentProcQue()
Definition: rodsServer.cpp:1047
startProcConnReqThreads
int startProcConnReqThreads()
Definition: rodsServer.cpp:1342
rcGlobalExtern.h
opterr
int opterr
Definition: rodsServer.hpp:32
procBadReq
int procBadReq()
Definition: rodsServer.cpp:1599
procSingleConnReq
int procSingleConnReq(agentProc_t *connReq)
Definition: rodsServer.cpp:1534
spawnAgent
int spawnAgent(agentProc_t *connReq, agentProc_t **agentProcHead)
Definition: rodsServer.cpp:723
rodsLog.h
agentProc
Definition: rodsConnect.h:29
rsIcatOpr.hpp
readWorkerTask
void readWorkerTask()
Definition: rodsServer.cpp:1386
serverize
int serverize(char *logDir)
Definition: rodsServer.cpp:308
getAgentProcCnt
int getAgentProcCnt()
Definition: rodsServer.cpp:985
serverExit
void serverExit()
Definition: rodsServer.cpp:633
getAgentProcPIDs
int getAgentProcPIDs(std::vector< int > &_pids)
Definition: rodsServer.cpp:1001
startupPack
Definition: rodsDef.h:234
procChildren
int procChildren(agentProc_t **agentProcHead)
Definition: rodsServer.cpp:663
initServerMain
int initServerMain(rsComm_t *svrComm)
Definition: rodsServer.cpp:1189
sockComm.h
optind
int optind
spawnManagerTask
void spawnManagerTask()
Definition: rodsServer.cpp:1482
rods.h
addConnReqToQue
int addConnReqToQue(rsComm_t *rsComm, int sock)
Definition: rodsServer.cpp:1288
optopt
int optopt
Definition: rodsServer.hpp:32
getRodsEnv.h