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)  

rsApiHandler.hpp File Reference
#include "rods.h"
#include "apiHandler.hpp"
#include "rsGlobalExtern.hpp"
#include "rcGlobalExtern.h"
#include "rcMisc.h"
Include dependency graph for rsApiHandler.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DISCONN_STATUS   -1
 
#define SEND_RCV_RETRY_CNT   1
 
#define SEND_RCV_SLEEP_TIME   2 /* in sec */
 
#define BRANCH_MSG   0x1 /* whether to call sendAndRecvBranchMsg */
 
#define INTERNAL_SVR_CALL
 
#define RET_API_STATUS
 
#define READ_HEADER_TIMEOUT   0x2 /* timeout when reading the header */
 
#define READ_HEADER_TIMEOUT_IN_SEC   86400 /* timeout in sec */
 
#define L1DESC_INUSE   1
 
#define READ_HEADER_TIMED_OUT   2
 
#define MAX_READ_HEADER_RETRY   3
 

Functions

int rsApiHandler (rsComm_t *rsComm, int apiNumber, bytesBuf_t *inputStructBBuf, bytesBuf_t *bsBBuf)
 
int chkApiVersion (int apiInx)
 
int chkApiPermission (rsComm_t *rsComm, int apiInx)
 
int handlePortalOpr (rsComm_t *rsComm)
 
int sendApiReply (rsComm_t *rsComm, int apiInx, int retVal, void *myOutStruct, bytesBuf_t *myOutBsBBuf)
 
int sendAndProcApiReply (rsComm_t *rsComm, int apiInx, int status, void *myOutStruct, bytesBuf_t *myOutBsBBuf)
 
int readAndProcClientMsg (rsComm_t *rsComm, int retApiStatus)
 
int sendAndRecvBranchMsg (rsComm_t *rsComm, int apiInx, int status, void *myOutStruct, bytesBuf_t *myOutBsBBuf)
 
int svrSendCollOprStat (rsComm_t *rsComm, collOprStat_t *collOprStat)
 
int _svrSendCollOprStat (rsComm_t *rsComm, collOprStat_t *collOprStat)
 
int svrSendZoneCollOprStat (rsComm_t *rsComm, rcComm_t *conn, collOprStat_t *collOprStat, int retval)
 
void readTimeoutHandler (int sig)
 

Macro Definition Documentation

◆ BRANCH_MSG

#define BRANCH_MSG   0x1 /* whether to call sendAndRecvBranchMsg */

Definition at line 24 of file rsApiHandler.hpp.

◆ DISCONN_STATUS

#define DISCONN_STATUS   -1

Definition at line 19 of file rsApiHandler.hpp.

◆ INTERNAL_SVR_CALL

#define INTERNAL_SVR_CALL
Value:
0x2 /* called internally. not from the handler.
* error msg will be handled differently */

Definition at line 25 of file rsApiHandler.hpp.

◆ L1DESC_INUSE

#define L1DESC_INUSE   1

Definition at line 33 of file rsApiHandler.hpp.

◆ MAX_READ_HEADER_RETRY

#define MAX_READ_HEADER_RETRY   3

Definition at line 35 of file rsApiHandler.hpp.

◆ READ_HEADER_TIMED_OUT

#define READ_HEADER_TIMED_OUT   2

Definition at line 34 of file rsApiHandler.hpp.

◆ READ_HEADER_TIMEOUT

#define READ_HEADER_TIMEOUT   0x2 /* timeout when reading the header */

Definition at line 29 of file rsApiHandler.hpp.

◆ READ_HEADER_TIMEOUT_IN_SEC

#define READ_HEADER_TIMEOUT_IN_SEC   86400 /* timeout in sec */

Definition at line 31 of file rsApiHandler.hpp.

◆ RET_API_STATUS

#define RET_API_STATUS
Value:
0x1 /* return the status of the API instead of
* the status of the readAndProcClientMsg
* call */

Definition at line 28 of file rsApiHandler.hpp.

◆ SEND_RCV_RETRY_CNT

#define SEND_RCV_RETRY_CNT   1

Definition at line 20 of file rsApiHandler.hpp.

◆ SEND_RCV_SLEEP_TIME

#define SEND_RCV_SLEEP_TIME   2 /* in sec */

Definition at line 21 of file rsApiHandler.hpp.

Function Documentation

◆ _svrSendCollOprStat()

int _svrSendCollOprStat ( rsComm_t rsComm,
collOprStat_t collOprStat 
)

Definition at line 677 of file rsApiHandler.cpp.

References rsComm_t::apiInx, irods::CS_NEG_USE_SSL(), LOG_ERROR, myRead(), rsComm_t::negotiation_results, NULL, rodsLogError(), sendAndProcApiReply(), rsComm_t::sock, rsComm_t::ssl, sslRead(), irods.pypyodbc::status, and SYS_SVR_TO_CLI_COLL_STAT.

Referenced by svrSendCollOprStat(), and svrSendZoneCollOprStat().

Here is the call graph for this function:

◆ chkApiPermission()

int chkApiPermission ( rsComm_t rsComm,
int  apiInx 
)

Definition at line 376 of file rsApiHandler.cpp.

References authInfo_t::authFlag, userInfo_t::authInfo, rsComm_t::clientUser, irods::get_server_api_table(), irods::client_api_whitelist::instance(), LOG_ERROR, ProcessType, rsComm_t::proxyUser, rodsLog(), SYS_NO_API_PRIV, XMSG_SERVER_PT, XMSG_SVR_ALSO, and XMSG_SVR_ONLY.

Referenced by rsApiHandler().

Here is the call graph for this function:

◆ chkApiVersion()

int chkApiVersion ( int  apiInx)

Definition at line 361 of file rsApiHandler.cpp.

References irods::get_server_api_table(), LOG_ERROR, NULL, rodsLog(), RsApiTable, SP_API_VERSION, and USER_API_VERSION_MISMATCH.

Referenced by rsApiHandler().

Here is the call graph for this function:

◆ handlePortalOpr()

int handlePortalOpr ( rsComm_t rsComm)

Definition at line 460 of file rsApiHandler.cpp.

References apply_acPostProcForParallelTransferReceived(), GET_OPR, LOG_NOTICE, NULL, PortalOpr::oprType, rsComm_t::portalOpr, PUT_OPR, rodsLog(), irods.pypyodbc::status, svrPortalPutGet(), and SYS_INVALID_PORTAL_OPR.

Referenced by sendAndProcApiReply().

Here is the call graph for this function:

◆ readAndProcClientMsg()

◆ readTimeoutHandler()

void readTimeoutHandler ( int  sig)

Definition at line 728 of file rsApiHandler.cpp.

References isL1descInuse(), Jenv, L1DESC_INUSE, LOG_ERROR, READ_HEADER_TIMED_OUT, and rodsLog().

Here is the call graph for this function:

◆ rsApiHandler()

int rsApiHandler ( rsComm_t rsComm,
int  apiNumber,
bytesBuf_t inputStructBBuf,
bytesBuf_t bsBBuf 
)

◆ sendAndProcApiReply()

int sendAndProcApiReply ( rsComm_t rsComm,
int  apiInx,
int  status,
void *  myOutStruct,
bytesBuf_t myOutBsBBuf 
)

Definition at line 222 of file rsApiHandler.cpp.

References clearBBuf(), clearKeyVal(), DataOprInp::condInput, PortalOpr::dataOprInp, freeRErrorContent(), handlePortalOpr(), NULL, rsComm_t::portalOpr, rsComm_t::rError, sendApiReply(), and irods.pypyodbc::status.

Referenced by _svrSendCollOprStat(), rsApiHandler(), and sendAndRecvBranchMsg().

Here is the call graph for this function:

◆ sendAndRecvBranchMsg()

int sendAndRecvBranchMsg ( rsComm_t rsComm,
int  apiInx,
int  status,
void *  myOutStruct,
bytesBuf_t myOutBsBBuf 
)

Definition at line 626 of file rsApiHandler.cpp.

References rsComm_t::apiInx, LOG_ERROR, readAndProcClientMsg(), RET_API_STATUS, rodsLog(), sendAndProcApiReply(), irods.pypyodbc::status, SYS_HANDLER_DONE_NO_ERROR, and SYS_NO_HANDLER_REPLY_MSG.

Referenced by _rsDataObjGet(), _rsDataObjPut(), msiDataObjGet(), and msiDataObjPut().

Here is the call graph for this function:

◆ sendApiReply()

◆ svrSendCollOprStat()

int svrSendCollOprStat ( rsComm_t rsComm,
collOprStat_t collOprStat 
)

Definition at line 660 of file rsApiHandler.cpp.

References _svrSendCollOprStat(), LOG_ERROR, rodsLog(), irods.pypyodbc::status, SYS_CLI_TO_SVR_COLL_STAT_REPLY, and UNMATCHED_KEY_OR_INDEX.

Referenced by _rsPhyRmColl(), and rsCollRepl().

Here is the call graph for this function:

◆ svrSendZoneCollOprStat()

int svrSendZoneCollOprStat ( rsComm_t rsComm,
rcComm_t conn,
collOprStat_t collOprStat,
int  retval 
)

Definition at line 705 of file rsApiHandler.cpp.

References _cliGetCollOprStat(), _svrSendCollOprStat(), irods::CS_NEG_USE_SSL(), myWrite(), rcComm_t::negotiation_results, NULL, rcComm_t::sock, rcComm_t::ssl, sslWrite(), irods.pypyodbc::status, SYS_CLI_TO_SVR_COLL_STAT_REPLY, and SYS_SVR_TO_CLI_COLL_STAT.

Referenced by rsCollRepl().

Here is the call graph for this function: