xrootd
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
XrdLink Class Reference

#include <XrdLink.hh>

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

Classes

struct  sfVec

Public Member Functions

void Bind ()
void Bind (pthread_t tid)
int Client (char *buff, int blen)
int Close (int defer=0)
void DoIt ()
int FDnum ()
int getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy)
XrdProtocolgetProtocol ()
void Hold (int lk)
unsigned int Inst ()
int isFlawed ()
int isInstance (unsigned int inst)
const char * Name (sockaddr *ipaddr=0)
const char * Host (sockaddr *ipaddr=0)
int Peek (char *buff, int blen, int timeout=-1)
int Recv (char *buff, int blen)
int Recv (char *buff, int blen, int timeout)
int RecvAll (char *buff, int blen, int timeout=-1)
int Send (const char *buff, int blen)
int Send (const struct iovec *iov, int iocnt, int bytes=0)
int Send (const struct sfVec *sdP, int sdn)
void Serialize ()
int setEtext (const char *text)
void setID (const char *userid, int procid)
XrdProtocolsetProtocol (XrdProtocol *pp)
void setRef (int cnt)
void syncStats (int *ctime=0)
int Terminate (const XrdLink *owner, int fdnum, unsigned int inst)
time_t timeCon ()
int UseCnt ()
 XrdLink ()
 ~XrdLink ()

Static Public Member Functions

static XrdLinkAlloc (XrdNetPeer &Peer, int opts=0)
static XrdLinkfd2link (int fd)
static XrdLinkfd2link (int fd, unsigned int inst)
static XrdLinkFind (int &curr, XrdLinkMatch *who=0)
static int getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0)
static void Init (XrdSysError *eP, XrdOucTrace *tP, XrdScheduler *sP)
static void Init (XrdInet *iP)
static void setKWT (int wkSec, int kwSec)
static int Setup (int maxfd, int idlewait)
static int Stats (char *buff, int blen, int do_sync=0)

Public Attributes

char * ID

Static Public Attributes

static const int sfMax = 8
static int sfOK = 0

Private Member Functions

void Reset ()
int sendData (const char *Buff, int Blen)
- Private Member Functions inherited from XrdJob
virtual void DoIt ()=0
 XrdJob (const char *desc="")
virtual ~XrdJob ()

Private Attributes

long long BytesIn
long long BytesInTot
long long BytesOut
long long BytesOutTot
int stallCnt
int stallCntTot
int tardyCnt
int tardyCntTot
int SfIntr
struct sockaddr InetAddr
char Uname [24]
char Lname [232]
char * HostName
int HNlen
pthread_t TID
XrdSysMutex opMutex
XrdSysMutex rdMutex
XrdSysMutex wrMutex
XrdSysSemaphore IOSemaphore
XrdSysCondVarKillcvP
XrdLinkNext
XrdNetBufferudpbuff
XrdProtocolProtocol
XrdProtocolProtoAlt
XrdPollPoller
struct pollfd * PollEnt
char * Etext
int FD
unsigned int Instance
time_t conTime
int InUse
int doPost
char LockReads
char KeepFD
char isEnabled
char isIdle
char inQ
char tBound
char KillCnt
- Private Attributes inherited from XrdJob
XrdJobNextJob
const char * Comment

Static Private Attributes

static XrdSysErrorXrdLog = 0
static XrdOucTraceXrdTrace = 0
static XrdSchedulerXrdSched = 0
static XrdInetXrdNetTCP = 0
static XrdSysMutex LTMutex
static XrdLink ** LinkTab
static char * LinkBat
static unsigned int LinkAlloc
static int LTLast = -1
static const char * TraceID = "Link"
static int devNull = open("/dev/null", O_RDONLY)
static short killWait = 3
static short waitKill = 4
static long long LinkBytesIn = 0
static long long LinkBytesOut = 0
static long long LinkConTime = 0
static long long LinkCountTot = 0
static int LinkCount = 0
static int LinkCountMax = 0
static int LinkTimeOuts = 0
static int LinkStalls = 0
static int LinkSfIntr = 0
static XrdSysMutex statsMutex
static const char KillMax = 60
static const char KillMsk = 0x7f
static const char KillXwt = 0x80

Friends

class XrdLinkScan
class XrdPoll
class XrdPollPoll
class XrdPollDev
class XrdPollE

Constructor & Destructor Documentation

XrdLink::XrdLink ( )

References Etext, HostName, and Reset().

Referenced by Setup().

XrdLink::~XrdLink ( )
inline

Member Function Documentation

XrdLink * XrdLink::Alloc ( XrdNetPeer Peer,
int  opts = 0 
)
static
void XrdLink::Bind ( )

References tBound.

Referenced by Close(), and XrdCmsClientMan::Hookup().

void XrdLink::Bind ( pthread_t  tid)

References tBound, and TID.

int XrdLink::Client ( char *  buff,
int  blen 
)

References HNlen, HostName, ID, and Lname.

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

int XrdLink::Close ( int  defer = 0)
void XrdLink::DoIt ( )
static XrdLink* XrdLink::fd2link ( int  fd)
inlinestatic
static XrdLink* XrdLink::fd2link ( int  fd,
unsigned int  inst 
)
inlinestatic

References Instance, LinkBat, LinkTab, and LTLast.

int XrdLink::FDnum ( )
inline
XrdLink * XrdLink::Find ( int &  curr,
XrdLinkMatch who = 0 
)
static
int XrdLink::getIOStats ( long long &  inbytes,
long long &  outbytes,
int &  numstall,
int &  numtardy 
)
inline
int XrdLink::getName ( int &  curr,
char *  bname,
int  blen,
XrdLinkMatch who = 0 
)
static
XrdProtocol* XrdLink::getProtocol ( )
inline

References Protocol.

Referenced by XrdXrootdAdmin::do_Lsd().

void XrdLink::Hold ( int  lk)
inline
const char* XrdLink::Host ( sockaddr *  ipaddr = 0)
inline
static void XrdLink::Init ( XrdSysError eP,
XrdOucTrace tP,
XrdScheduler sP 
)
inlinestatic

References XrdLog, XrdSched, and XrdTrace.

Referenced by XrdConfig::Setup().

static void XrdLink::Init ( XrdInet iP)
inlinestatic

References XrdNetTCP.

unsigned int XrdLink::Inst ( )
inline
int XrdLink::isFlawed ( )
inline

References Etext.

Referenced by XrdProtLoad::Process().

int XrdLink::isInstance ( unsigned int  inst)
inline
const char* XrdLink::Name ( sockaddr *  ipaddr = 0)
inline
int XrdLink::Peek ( char *  buff,
int  blen,
int  timeout = -1 
)
int XrdLink::Recv ( char *  buff,
int  blen 
)
int XrdLink::Recv ( char *  buff,
int  blen,
int  timeout 
)
int XrdLink::RecvAll ( char *  buff,
int  blen,
int  timeout = -1 
)
void XrdLink::Reset ( )
private
int XrdLink::Send ( const char *  buff,
int  blen 
)
int XrdLink::Send ( const struct iovec *  iov,
int  iocnt,
int  bytes = 0 
)
int XrdLink::Send ( const struct sfVec sdP,
int  sdn 
)
int XrdLink::sendData ( const char *  Buff,
int  Blen 
)
private

References FD, and write().

Referenced by Send().

void XrdLink::Serialize ( )
int XrdLink::setEtext ( const char *  text)
void XrdLink::setID ( const char *  userid,
int  procid 
)
void XrdLink::setKWT ( int  wkSec,
int  kwSec 
)
static

References killWait, and waitKill.

Referenced by XrdConfig::xtmo().

XrdProtocol * XrdLink::setProtocol ( XrdProtocol pp)
void XrdLink::setRef ( int  cnt)
int XrdLink::Setup ( int  maxfd,
int  idlewait 
)
static
int XrdLink::Stats ( char *  buff,
int  blen,
int  do_sync = 0 
)
static
void XrdLink::syncStats ( int *  ctime = 0)
int XrdLink::Terminate ( const XrdLink owner,
int  fdnum,
unsigned int  inst 
)
time_t XrdLink::timeCon ( )
inline

References conTime.

Referenced by XrdXrootdAdmin::do_Lsd().

int XrdLink::UseCnt ( )
inline

Friends And Related Function Documentation

friend class XrdLinkScan
friend

Referenced by Setup().

friend class XrdPoll
friend
friend class XrdPollDev
friend
friend class XrdPollE
friend
friend class XrdPollPoll
friend

Member Data Documentation

long long XrdLink::BytesIn
private
long long XrdLink::BytesInTot
private

Referenced by getIOStats(), Reset(), and syncStats().

long long XrdLink::BytesOut
private

Referenced by getIOStats(), Reset(), Send(), and syncStats().

long long XrdLink::BytesOutTot
private

Referenced by getIOStats(), Reset(), and syncStats().

time_t XrdLink::conTime
private

Referenced by Reset(), syncStats(), and timeCon().

int XrdLink::devNull = open("/dev/null", O_RDONLY)
staticprivate

Referenced by Close(), and Setup().

int XrdLink::doPost
private

Referenced by Reset(), Serialize(), and setRef().

char* XrdLink::Etext
private
int XrdLink::FD
private
int XrdLink::HNlen
private

Referenced by Alloc(), Client(), Find(), and getName().

char* XrdLink::HostName
private
char* XrdLink::ID

Referenced by XrdCmsCluster::Add(), XrdXrootdProtocol::aio_Error(), Alloc(), XrdXrootdAio::Alloc(), Client(), Close(), XrdPoll::Detach(), XrdPollDev::Disable(), XrdPollE::Disable(), XrdPollPoll::Disable(), XrdXrootdProtocol::do_Auth(), XrdXrootdProtocol::do_Chmod(), XrdXrootdProtocol::do_CKsum(), XrdXrootdProtocol::do_Dirlist(), XrdXrootdProtocol::do_Locate(), XrdXrootdProtocol::do_Login(), XrdXrootdProtocol::do_Mkdir(), XrdXrootdProtocol::do_Mv(), XrdXrootdProtocol::do_Open(), XrdXrootdProtocol::do_Prepare(), XrdXrootdProtocol::do_Qfh(), XrdXrootdProtocol::do_Qopaque(), XrdXrootdProtocol::do_Qspace(), XrdXrootdProtocol::do_Qxattr(), XrdXrootdProtocol::do_Rm(), XrdXrootdProtocol::do_Rmdir(), XrdXrootdProtocol::do_Set(), XrdXrootdProtocol::do_Stat(), XrdXrootdProtocol::do_Statx(), XrdXrootdProtocol::do_Truncate(), DoIt(), XrdPollPoll::dqLink(), XrdPollDev::Enable(), XrdPollE::Enable(), XrdPollPoll::Enable(), XrdXrootdAioReq::endWrite(), XrdPollDev::Exclude(), XrdPollE::Exclude(), XrdPollPoll::Exclude(), Find(), getName(), XrdLinkScan::idleScan(), XrdPollE::Include(), XrdPollPoll::Include(), XrdPollPoll::LogEvent(), XrdXrootdJob2Do::lstClient(), Peek(), XrdPollPoll::Recover(), Recv(), RecvAll(), XrdProtLoad::Recycle(), XrdCmsProtocol::Recycle(), XrdXrootdProtocol::Recycle(), XrdPollE::remFD(), Reset(), XrdXrootdAioReq::Scuttle(), Send(), XrdXrootdAdmin::sendResp(), XrdXrootdJob2Do::sendResult(), setID(), XrdCmsNode::setName(), setRef(), XrdPollE::Start(), XrdPollDev::Start(), XrdPollPoll::Start(), and Terminate().

struct sockaddr XrdLink::InetAddr
private

Referenced by Alloc(), Host(), and Name().

char XrdLink::inQ
private
unsigned int XrdLink::Instance
private
int XrdLink::InUse
private
XrdSysSemaphore XrdLink::IOSemaphore
private

Referenced by Serialize(), and setRef().

char XrdLink::isEnabled
private
char XrdLink::isIdle
private
char XrdLink::KeepFD
private

Referenced by Alloc(), Close(), and Reset().

char XrdLink::KillCnt
private

Referenced by Reset(), and Terminate().

XrdSysCondVar* XrdLink::KillcvP
private

Referenced by Close(), Reset(), and Terminate().

const char XrdLink::KillMax = 60
staticprivate

Referenced by Terminate().

const char XrdLink::KillMsk = 0x7f
staticprivate

Referenced by Terminate().

short XrdLink::killWait = 3
staticprivate

Referenced by setKWT(), and Terminate().

const char XrdLink::KillXwt = 0x80
staticprivate

Referenced by Terminate().

unsigned int XrdLink::LinkAlloc
staticprivate

Referenced by Alloc(), and Setup().

char * XrdLink::LinkBat
staticprivate
long long XrdLink::LinkBytesIn = 0
staticprivate

Referenced by Stats(), and syncStats().

long long XrdLink::LinkBytesOut = 0
staticprivate

Referenced by Stats(), and syncStats().

long long XrdLink::LinkConTime = 0
staticprivate

Referenced by Stats(), and syncStats().

int XrdLink::LinkCount = 0
staticprivate

Referenced by Alloc(), Stats(), and syncStats().

int XrdLink::LinkCountMax = 0
staticprivate

Referenced by Alloc(), and Stats().

long long XrdLink::LinkCountTot = 0
staticprivate

Referenced by Alloc(), and Stats().

int XrdLink::LinkSfIntr = 0
staticprivate

Referenced by Stats(), and syncStats().

int XrdLink::LinkStalls = 0
staticprivate

Referenced by Stats(), and syncStats().

XrdLink ** XrdLink::LinkTab
staticprivate

Referenced by Alloc(), fd2link(), Find(), getName(), Setup(), and Stats().

int XrdLink::LinkTimeOuts = 0
staticprivate

Referenced by Stats(), and syncStats().

char XrdLink::Lname[232]
private
char XrdLink::LockReads
private

Referenced by Alloc(), Peek(), Recv(), RecvAll(), and Reset().

int XrdLink::LTLast = -1
staticprivate
XrdSysMutex XrdLink::LTMutex
staticprivate

Referenced by Alloc(), Close(), Find(), getName(), and Stats().

XrdLink* XrdLink::Next
private
XrdSysMutex XrdLink::opMutex
private
struct pollfd* XrdLink::PollEnt
private
XrdPoll* XrdLink::Poller
private
XrdProtocol* XrdLink::ProtoAlt
private

Referenced by Close(), XrdPoll::Finish(), and Reset().

XrdProtocol* XrdLink::Protocol
private
XrdSysMutex XrdLink::rdMutex
private

Referenced by Peek(), Recv(), RecvAll(), and syncStats().

int XrdLink::SfIntr
private

Referenced by Reset(), Send(), and syncStats().

const int XrdLink::sfMax = 8
static

Referenced by Send().

int XrdLink::sfOK = 0
static
int XrdLink::stallCnt
private

Referenced by getIOStats(), Recv(), Reset(), and syncStats().

int XrdLink::stallCntTot
private

Referenced by getIOStats(), Reset(), and syncStats().

XrdSysMutex XrdLink::statsMutex
staticprivate

Referenced by Alloc(), Stats(), and syncStats().

int XrdLink::tardyCnt
private

Referenced by getIOStats(), Recv(), Reset(), and syncStats().

int XrdLink::tardyCntTot
private

Referenced by getIOStats(), Reset(), and syncStats().

char XrdLink::tBound
private

Referenced by Bind(), and Reset().

pthread_t XrdLink::TID
private

Referenced by Bind().

const char * XrdLink::TraceID = "Link"
staticprivate
XrdNetBuffer* XrdLink::udpbuff
private

Referenced by Alloc(), Close(), and Reset().

char XrdLink::Uname[24]
private

Referenced by Reset(), and setID().

short XrdLink::waitKill = 4
staticprivate

Referenced by setKWT(), and Terminate().

XrdSysMutex XrdLink::wrMutex
private

Referenced by Send(), and syncStats().

XrdSysError * XrdLink::XrdLog = 0
staticprivate
XrdInet * XrdLink::XrdNetTCP = 0
staticprivate

Referenced by Alloc(), and Init().

XrdScheduler * XrdLink::XrdSched = 0
staticprivate

Referenced by DoIt(), Init(), and Setup().

XrdOucTrace * XrdLink::XrdTrace = 0
staticprivate

Referenced by Init(), and Setup().


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