xrootd
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
XrdXrootdProtocol Class Reference

#include <XrdXrootdProtocol.hh>

Inheritance diagram for XrdXrootdProtocol:
Inheritance graph
[legend]
Collaboration diagram for XrdXrootdProtocol:
Collaboration graph
[legend]

List of all members.

Classes

struct  RD_Table

Public Member Functions

void DoIt ()
XrdProtocolMatch (XrdLink *lp)
int Process (XrdLink *lp)
void Recycle (XrdLink *lp, int consec, const char *reason)
int Stats (char *buff, int blen, int do_sync=0)
XrdXrootdProtocol operator= (const XrdXrootdProtocol &rhs)
 XrdXrootdProtocol ()
 ~XrdXrootdProtocol ()

Static Public Member Functions

static int Configure (char *parms, XrdProtocol_Config *pi)
static int StatGen (struct stat &buf, char *xxBuff)

Protected Attributes

int numReads
int numReadP
int numWrites
int numFiles
int cumReads
int cumReadP
int cumWrites
long long totReadP
XrdLinkLink
XrdBufferargp
XrdXrootdFileTableFTab
XrdXrootdMonitorMonitor
kXR_unt32 monUID
char monFILE
char monIO
char Status
unsigned char CapVer
XrdSecEntityClient
XrdSecProtocolAuthProt
XrdSecEntity Entity
XrdXrootdAioReqmyAioReq
char * myBuff
int myBlen
int myBlast
int(XrdXrootdProtocol::* Resume )()
XrdXrootdFilemyFile
long long myOffset
int myIOLen
int myStalls
int hcPrev
int hcNext
int hcNow
int halfBSize
XrdSysMutex streamMutex
XrdSysSemaphorereTry
XrdXrootdProtocolStream [maxStreams]
unsigned int mySID
char isActive
char isDead
char isBound
char isNOP
XrdXrootdPiopioFirst
XrdXrootdPiopioLast
XrdXrootdPiopioFree
short PathID
char doWrite
char doWriteC
XrdXrootdReqID ReqID
ClientRequest Request
XrdXrootdResponse Response

Static Protected Attributes

static XrdXrootdXPath RPList
static XrdXrootdXPath XPList
static XrdSfsFileSystemosFS
static XrdSecServiceCIA = 0
static XrdXrootdFileLockLocker
static XrdSchedulerSched
static XrdBuffManagerBPool
static XrdSysError eDest
static const char * myInst = 0
static const char * TraceID = "Protocol"
static char * pidPath = strdup("/tmp")
static int myPID = static_cast<int>(getpid())
static XrdNetSocketAdminSock = 0
static int hailWait
static int readWait
static int Port
static int Window
static int WANPort
static int WANWindow
static char * SecLib = 0
static char * FSLib = 0
static char * Notify = 0
static char isRedir = 0
static char chkfsV = 0
static XrdXrootdJobJobCKS = 0
static char * JobCKT = 0
static struct
XrdXrootdProtocol::RD_Table 
Route [RD_Num]
static int as_maxperlnk = 8
static int as_maxperreq = 8
static int as_maxpersrv = 4096
static int as_miniosz = 32768
static int as_minsfsz = 8192
static int as_segsize = 131072
static int as_maxstalls = 5
static int as_force = 0
static int as_noaio = 0
static int as_nosf = 0
static int as_syncw = 0
static int maxBuffsz
static int maxTransz = 262144
static const int maxRvecsz = 1024
static XrdXrootdStatsSI
static int hcMax = 28657
static const int maxStreams = 16
static const int maxPio = 4

Private Types

enum  RD_func {
  RD_chmod = 0, RD_dirlist, RD_locate, RD_mkdir,
  RD_mv, RD_prepare, RD_prepstg, RD_rm,
  RD_rmdir, RD_stat, RD_open1, RD_open2,
  RD_open3, RD_open4, RD_Num
}

Private Member Functions

int do_Admin ()
int do_Auth ()
int do_Bind ()
int do_Chmod ()
int do_CKsum (int canit)
int do_Close ()
int do_Dirlist ()
int do_Endsess ()
int do_Getfile ()
int do_Login ()
int do_Locate ()
int do_Mkdir ()
int do_Mv ()
int do_Offload (int pathID, int isRead)
int do_OffloadIO ()
int do_Open ()
int do_Ping ()
int do_Prepare ()
int do_Protocol ()
int do_Putfile ()
int do_Qconf ()
int do_Qfh ()
int do_Qopaque (short)
int do_Qspace ()
int do_Query ()
int do_Qxattr ()
int do_Read ()
int do_ReadV ()
int do_ReadAll (int asyncOK=1)
int do_ReadNone (int &retc, int &pathID)
int do_Rm ()
int do_Rmdir ()
int do_Set ()
int do_Set_Mon (XrdOucTokenizer &setargs)
int do_Stat ()
int do_Statx ()
int do_Sync ()
int do_Truncate ()
int do_Write ()
int do_WriteAll ()
int do_WriteCont ()
int do_WriteNone ()
int aio_Error (const char *op, int ecode)
int aio_Read ()
int aio_Write ()
int aio_WriteAll ()
int aio_WriteCont ()
void Assign (const XrdXrootdProtocol &rhs)
void Cleanup ()
int fsError (int rc, XrdOucErrInfo &myError)
int getBuff (const int isRead, int Quantum)
int getData (const char *dtype, char *buff, int blen)
int Process2 ()
void Reset ()
int rpEmsg (const char *op, char *fn)
int vpEmsg (const char *op, char *fn)

Static Private Member Functions

static int Config (const char *fn)
static int mapMode (int mode)
static void PidFile ()
static int rpCheck (char *fn, const char **opaque)
static int Squash (char *)
static int xapath (XrdOucStream &Config)
static int xasync (XrdOucStream &Config)
static int xcksum (XrdOucStream &Config)
static int xexp (XrdOucStream &Config)
static int xexpdo (char *path, int popt=0)
static int xfsl (XrdOucStream &Config)
static int xpidf (XrdOucStream &Config)
static int xprep (XrdOucStream &Config)
static int xlog (XrdOucStream &Config)
static int xmon (XrdOucStream &Config)
static int xred (XrdOucStream &Config)
static void xred_set (RD_func func, const char *rHost, int rPort)
static int xsecl (XrdOucStream &Config)
static int xtrace (XrdOucStream &Config)

Private Attributes

XrdObject< XrdXrootdProtocolProtLink

Static Private Attributes

static XrdObjectQ
< XrdXrootdProtocol
ProtStack

Friends

class XrdXrootdAdmin
class XrdXrootdAioReq

Member Enumeration Documentation

Enumerator:
RD_chmod 
RD_dirlist 
RD_locate 
RD_mkdir 
RD_mv 
RD_prepare 
RD_prepstg 
RD_rm 
RD_rmdir 
RD_stat 
RD_open1 
RD_open2 
RD_open3 
RD_open4 
RD_Num 

Constructor & Destructor Documentation

XrdXrootdProtocol::XrdXrootdProtocol ( )

References Reset().

Referenced by Match().

XrdXrootdProtocol::~XrdXrootdProtocol ( ) [inline]

References Cleanup().


Member Function Documentation

int XrdXrootdProtocol::aio_Error ( const char *  op,
int  ecode 
) [private]
int XrdXrootdProtocol::aio_Read ( ) [private]
int XrdXrootdProtocol::aio_Write ( ) [private]

References aio_WriteAll(), XrdXrootdAioReq::Alloc(), and myAioReq.

Referenced by do_Write().

int XrdXrootdProtocol::aio_WriteAll ( ) [private]
int XrdXrootdProtocol::aio_WriteCont ( ) [private]
void XrdXrootdProtocol::Assign ( const XrdXrootdProtocol rhs) [private]
void XrdXrootdProtocol::Cleanup ( ) [private]
int XrdXrootdProtocol::Config ( const char *  fn) [static, private]
int XrdXrootdProtocol::Configure ( char *  parms,
XrdProtocol_Config pi 
) [static]

References XrdXrootdAdmin::addJob(), AdminSock, XrdProtocol_Config::AdmMode, XrdProtocol_Config::AdmPath, XrdProtocol_Config::argc, XrdProtocol_Config::argv, as_maxperreq, as_maxpersrv, as_miniosz, as_noaio, as_nosf, as_segsize, XrdProtocol_Config::BPool, BPool, chkfsV, CIA, Config(), XrdProtocol_Config::ConfigFN, XrdProtocol_Config::ConnMax, XrdNetSocket::Create(), DEBUG, XrdProtocol_Config::DebugON, XrdProtocol_Config::eDest, eDest, XrdSysError::Emsg(), XrdOucEnv::Export(), FSLib, XrdOucUtils::genPath(), XrdSfsFileSystem::getVersion(), XrdProtocol_Config::hailWait, hailWait, XrdXrootdAdmin::Init(), XrdXrootdMonitor::Init(), XrdXrootdFile::Init(), XrdXrootdAioReq::Init(), XrdXrootdXPath::Insert(), XrdNetDNS::IPAddr(), isRedir, JobCKS, Locker, XrdSysError::logger(), XrdMpx::Logger, maxBuffsz, XrdBuffManager::MaxSize(), maxTransz, XrdProtocol_Config::myAddr, XrdProtocol_Config::myInst, myInst, XrdProtocol_Config::myName, XrdProtocol_Config::NetTCP, XrdXrootdXPath::Next(), Notify, optind, XrdXrootdXPath::Opts(), osFS, XrdXrootdXPath::Path(), PidFile(), XrdProtocol_Config::Port, Port, ProtStack, XrdProtocol_Config::readWait, readWait, Route, RPList, XrdSysError::Say(), XrdProtocol_Config::Sched, Sched, SecLib, XrdObjectQ< T >::Set(), XrdXrootdStats::setFS(), XrdXrootdCallBack::setVals(), SI, XrdProtocol_Config::Stats, TRACE, TRACE_ALL, TRACE_MEM, XrdProtocol_Config::WANPort, WANPort, WANWindow, XrdProtocol_Config::WANWSize, XrdOucTrace::What, Window, XrdProtocol_Config::WSize, xexpdo(), XPList, XrdSfsGetDefaultFileSystem(), XrdVERSION, XrdXrootdInstance, XrdXrootdloadFileSystem(), XrdXrootdloadSecurity(), and XrdXrootdPort.

Referenced by XrdgetProtocol().

int XrdXrootdProtocol::do_Admin ( ) [private]
int XrdXrootdProtocol::do_Auth ( ) [private]
int XrdXrootdProtocol::do_Bind ( ) [private]
int XrdXrootdProtocol::do_Chmod ( ) [private]
int XrdXrootdProtocol::do_CKsum ( int  canit) [private]
int XrdXrootdProtocol::do_Close ( ) [private]
int XrdXrootdProtocol::do_Dirlist ( ) [private]
int XrdXrootdProtocol::do_Endsess ( ) [private]
int XrdXrootdProtocol::do_Getfile ( ) [private]
int XrdXrootdProtocol::do_Locate ( ) [private]
int XrdXrootdProtocol::do_Login ( ) [private]
int XrdXrootdProtocol::do_Mkdir ( ) [private]
int XrdXrootdProtocol::do_Mv ( ) [private]
int XrdXrootdProtocol::do_Offload ( int  pathID,
int  isRead 
) [private]
int XrdXrootdProtocol::do_OffloadIO ( ) [private]
int XrdXrootdProtocol::do_Open ( ) [private]
int XrdXrootdProtocol::do_Ping ( ) [private]

References Response, XrdXrootdResponse::Send(), and UPSTATS.

Referenced by Process2().

int XrdXrootdProtocol::do_Prepare ( ) [private]
int XrdXrootdProtocol::do_Protocol ( ) [private]
int XrdXrootdProtocol::do_Putfile ( ) [private]
int XrdXrootdProtocol::do_Qconf ( ) [private]
int XrdXrootdProtocol::do_Qfh ( ) [private]
int XrdXrootdProtocol::do_Qopaque ( short  qopt) [private]
int XrdXrootdProtocol::do_Qspace ( ) [private]
int XrdXrootdProtocol::do_Query ( ) [private]
int XrdXrootdProtocol::do_Qxattr ( ) [private]
int XrdXrootdProtocol::do_Read ( ) [private]
int XrdXrootdProtocol::do_ReadAll ( int  asyncOK = 1) [private]
int XrdXrootdProtocol::do_ReadNone ( int &  retc,
int &  pathID 
) [private]
int XrdXrootdProtocol::do_ReadV ( ) [private]
int XrdXrootdProtocol::do_Rm ( ) [private]
int XrdXrootdProtocol::do_Rmdir ( ) [private]
int XrdXrootdProtocol::do_Set ( ) [private]
int XrdXrootdProtocol::do_Set_Mon ( XrdOucTokenizer setargs) [private]
int XrdXrootdProtocol::do_Stat ( ) [private]
int XrdXrootdProtocol::do_Statx ( ) [private]
int XrdXrootdProtocol::do_Sync ( ) [private]
int XrdXrootdProtocol::do_Truncate ( ) [private]
int XrdXrootdProtocol::do_Write ( ) [private]
int XrdXrootdProtocol::do_WriteAll ( ) [private]
int XrdXrootdProtocol::do_WriteCont ( ) [private]
int XrdXrootdProtocol::do_WriteNone ( ) [private]
void XrdXrootdProtocol::DoIt ( ) [inline, virtual]

Implements XrdJob.

References Resume.

int XrdXrootdProtocol::fsError ( int  rc,
XrdOucErrInfo myError 
) [private]
int XrdXrootdProtocol::getBuff ( const int  isRead,
int  Quantum 
) [private]
int XrdXrootdProtocol::getData ( const char *  dtype,
char *  buff,
int  blen 
) [private]
int XrdXrootdProtocol::mapMode ( int  mode) [static, private]

References Map_Mode.

Referenced by do_Chmod(), do_Mkdir(), and do_Open().

XrdProtocol * XrdXrootdProtocol::Match ( XrdLink lp) [virtual]
XrdXrootdProtocol XrdXrootdProtocol::operator= ( const XrdXrootdProtocol rhs)
void XrdXrootdProtocol::PidFile ( void  ) [static, private]
int XrdXrootdProtocol::Process ( XrdLink lp) [virtual]
int XrdXrootdProtocol::Process2 ( ) [private]
void XrdXrootdProtocol::Recycle ( XrdLink lp,
int  consec,
const char *  reason 
) [virtual]
void XrdXrootdProtocol::Reset ( ) [private]
int XrdXrootdProtocol::rpCheck ( char *  fn,
const char **  opaque 
) [static, private]
int XrdXrootdProtocol::rpEmsg ( const char *  op,
char *  fn 
) [private]
int XrdXrootdProtocol::Squash ( char *  fn) [static, private]
static int XrdXrootdProtocol::StatGen ( struct stat &  buf,
char *  xxBuff 
) [static]

Referenced by do_Open(), and do_Stat().

int XrdXrootdProtocol::Stats ( char *  buff,
int  blen,
int  do_sync = 0 
) [virtual]
int XrdXrootdProtocol::vpEmsg ( const char *  op,
char *  fn 
) [private]
static int XrdXrootdProtocol::xapath ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xasync ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xcksum ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xexp ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xexpdo ( char *  path,
int  popt = 0 
) [static, private]
int XrdXrootdProtocol::xfsl ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xlog ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xmon ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xpidf ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xprep ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xred ( XrdOucStream Config) [static, private]
void XrdXrootdProtocol::xred_set ( RD_func  func,
const char *  rHost,
int  rPort 
) [static, private]
int XrdXrootdProtocol::xsecl ( XrdOucStream Config) [static, private]
int XrdXrootdProtocol::xtrace ( XrdOucStream Config) [static, private]

Friends And Related Function Documentation

friend class XrdXrootdAdmin [friend]
friend class XrdXrootdAioReq [friend]

Member Data Documentation

XrdNetSocket * XrdXrootdProtocol::AdminSock = 0 [static, protected]

Referenced by Configure().

int XrdXrootdProtocol::as_force = 0 [static, protected]

Referenced by do_Open(), and xasync().

int XrdXrootdProtocol::as_maxperlnk = 8 [static, protected]

Referenced by do_ReadAll(), do_Write(), and xasync().

int XrdXrootdProtocol::as_maxperreq = 8 [static, protected]

Referenced by Configure(), and xasync().

int XrdXrootdProtocol::as_maxpersrv = 4096 [static, protected]

Referenced by Configure(), and xasync().

int XrdXrootdProtocol::as_maxstalls = 5 [static, protected]

Referenced by aio_WriteAll(), do_Write(), and xasync().

int XrdXrootdProtocol::as_miniosz = 32768 [static, protected]
int XrdXrootdProtocol::as_minsfsz = 8192 [static, protected]

Referenced by do_ReadAll(), and xasync().

int XrdXrootdProtocol::as_noaio = 0 [static, protected]

Referenced by Configure(), do_Open(), and xasync().

int XrdXrootdProtocol::as_nosf = 0 [static, protected]

Referenced by Configure(), and xasync().

int XrdXrootdProtocol::as_segsize = 131072 [static, protected]

Referenced by Configure(), and xasync().

int XrdXrootdProtocol::as_syncw = 0 [static, protected]

Referenced by do_Write(), and xasync().

Referenced by Cleanup(), do_Auth(), operator=(), and Reset().

unsigned char XrdXrootdProtocol::CapVer [protected]
char XrdXrootdProtocol::chkfsV = 0 [static, protected]

Referenced by Configure(), and xfsl().

XrdSecService * XrdXrootdProtocol::CIA = 0 [static, protected]

Referenced by Configure(), do_Auth(), and do_Login().

int XrdXrootdProtocol::cumReadP [protected]
int XrdXrootdProtocol::cumReads [protected]
char XrdXrootdProtocol::doWrite [protected]

Referenced by do_Offload(), and do_OffloadIO().

char XrdXrootdProtocol::doWriteC [protected]

Referenced by do_Offload(), and do_OffloadIO().

char * XrdXrootdProtocol::FSLib = 0 [static, protected]

Referenced by Configure(), and xfsl().

int XrdXrootdProtocol::hailWait [static, protected]

Referenced by Configure(), and Match().

Referenced by getBuff(), and Process().

int XrdXrootdProtocol::hcMax = 28657 [static, protected]

Referenced by getBuff().

int XrdXrootdProtocol::hcNext [protected]
int XrdXrootdProtocol::hcNow [protected]
int XrdXrootdProtocol::hcPrev [protected]

Referenced by getBuff(), Process(), and Reset().

char XrdXrootdProtocol::isActive [protected]
char XrdXrootdProtocol::isBound [protected]

Referenced by Cleanup(), do_Bind(), and Reset().

char XrdXrootdProtocol::isDead [protected]

Referenced by Cleanup(), do_Offload(), Recycle(), and Reset().

char XrdXrootdProtocol::isNOP [protected]

Referenced by do_Offload(), do_OffloadIO(), and Reset().

char XrdXrootdProtocol::isRedir = 0 [static, protected]

Referenced by Configure(), do_Protocol(), and Match().

XrdXrootdJob * XrdXrootdProtocol::JobCKS = 0 [static, protected]

Referenced by Configure(), do_CKsum(), and xcksum().

char * XrdXrootdProtocol::JobCKT = 0 [static, protected]

Referenced by do_CKsum(), and xcksum().

Referenced by Configure(), and do_Open().

int XrdXrootdProtocol::maxBuffsz [static, protected]
const int XrdXrootdProtocol::maxPio = 4 [static, protected]

Referenced by do_Bind(), and do_Qconf().

const int XrdXrootdProtocol::maxRvecsz = 1024 [static, protected]

Referenced by do_Qconf().

const int XrdXrootdProtocol::maxStreams = 16 [static, protected]

Referenced by Cleanup(), do_Bind(), do_Offload(), and do_Qconf().

int XrdXrootdProtocol::maxTransz = 262144 [static, protected]

Referenced by Configure(), do_Qconf(), and do_ReadV().

char XrdXrootdProtocol::monFILE [protected]
char XrdXrootdProtocol::monIO [protected]

Referenced by do_Login(), do_Set_Mon(), Recycle(), and Reset().

int XrdXrootdProtocol::myBlast [protected]
int XrdXrootdProtocol::myBlen [protected]
char* XrdXrootdProtocol::myBuff [protected]

Referenced by getData(), Process(), and Reset().

const char * XrdXrootdProtocol::myInst = 0 [static, protected]

Referenced by Configure(), and xprep().

int XrdXrootdProtocol::myIOLen [protected]
long long XrdXrootdProtocol::myOffset [protected]
int XrdXrootdProtocol::myPID = static_cast<int>(getpid()) [static, protected]

Referenced by do_Bind(), do_Endsess(), and do_Login().

unsigned int XrdXrootdProtocol::mySID [protected]

Referenced by do_Login(), and Reset().

int XrdXrootdProtocol::myStalls [protected]
char * XrdXrootdProtocol::Notify = 0 [static, protected]

Referenced by Configure(), and do_Prepare().

int XrdXrootdProtocol::numFiles [protected]
int XrdXrootdProtocol::numReadP [protected]
int XrdXrootdProtocol::numReads [protected]
short XrdXrootdProtocol::PathID [protected]

Referenced by do_Bind(), and Reset().

char * XrdXrootdProtocol::pidPath = strdup("/tmp") [static, protected]

Referenced by PidFile(), and xpidf().

Referenced by do_Offload(), do_OffloadIO(), and Reset().

int XrdXrootdProtocol::Port [static, protected]

Referenced by Recycle().

Referenced by Configure(), Match(), and Recycle().

int XrdXrootdProtocol::readWait [static, protected]

Referenced by Configure(), do_WriteNone(), and getData().

int(XrdXrootdProtocol::* XrdXrootdProtocol::Resume)() [protected]

Referenced by do_Offload(), do_OffloadIO(), and Reset().

struct XrdXrootdProtocol::RD_Table XrdXrootdProtocol::Route[RD_Num] [static, protected]

Referenced by Configure(), do_Open(), and xred().

XrdScheduler * XrdXrootdProtocol::Sched [static, protected]

Referenced by Configure(), do_Offload(), and xcksum().

char * XrdXrootdProtocol::SecLib = 0 [static, protected]

Referenced by Configure(), and xsecl().

XrdXrootdStats * XrdXrootdProtocol::SI [static, protected]
char XrdXrootdProtocol::Status [protected]
long long XrdXrootdProtocol::totReadP [protected]

Referenced by XrdXrootdAdmin::do_Lsd(), and Reset().

const char * XrdXrootdProtocol::TraceID = "Protocol" [static, protected]
int XrdXrootdProtocol::WANPort [static, protected]

Referenced by Configure(), and do_Qconf().

int XrdXrootdProtocol::WANWindow [static, protected]

Referenced by Configure(), and do_Qconf().

int XrdXrootdProtocol::Window [static, protected]

Referenced by Configure(), and do_Qconf().

Referenced by Configure(), do_Locate(), Squash(), and xexpdo().


The documentation for this class was generated from the following files: