xrootd
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends
XrdLink Class Reference

#include <XrdLink.hh>

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

List of all members.

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 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 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 pollfdPollEnt
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

Static Private Attributes

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 ( )
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 ( ) [virtual]
static XrdLink* XrdLink::fd2link ( int  fd) [inline, static]
static XrdLink* XrdLink::fd2link ( int  fd,
unsigned int  inst 
) [inline, static]

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]
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, ssize_t, 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) [static, private]

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(), XrdXrootdAio::Alloc(), Alloc(), Bind(), Client(), Close(), XrdPoll::Detach(), XrdPollPoll::Disable(), XrdPollE::Disable(), XrdPollDev::Disable(), XrdXrootdProtocol::do_Auth(), XrdXrootdProtocol::do_Chmod(), 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_Set_Mon(), XrdXrootdProtocol::do_Stat(), XrdXrootdProtocol::do_Statx(), XrdXrootdProtocol::do_Truncate(), DoIt(), XrdPollPoll::dqLink(), XrdPollPoll::Enable(), XrdPollE::Enable(), XrdPollDev::Enable(), XrdXrootdAioReq::endWrite(), XrdPollPoll::Exclude(), XrdPollE::Exclude(), XrdPollDev::Exclude(), Find(), getName(), XrdLinkScan::idleScan(), XrdPollPoll::Include(), XrdPollE::Include(), XrdPollPoll::LogEvent(), XrdXrootdJob2Do::lstClient(), Peek(), XrdPollPoll::Recover(), Recv(), RecvAll(), XrdXrootdProtocol::Recycle(), XrdProtLoad::Recycle(), XrdCmsProtocol::Recycle(), XrdPollE::remFD(), Reset(), XrdXrootdAioReq::Scuttle(), Send(), XrdXrootdAdmin::sendResp(), XrdXrootdJob2Do::sendResult(), setID(), XrdCmsNode::setName(), setRef(), XrdPollPoll::Start(), XrdPollE::Start(), XrdPollDev::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]

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().

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

const char XrdLink::KillMax = 60 [static, private]

Referenced by Terminate().

const char XrdLink::KillMsk = 0x7f [static, private]

Referenced by Terminate().

short XrdLink::killWait = 3 [static, private]

Referenced by setKWT(), and Terminate().

const char XrdLink::KillXwt = 0x80 [static, private]

Referenced by Terminate().

unsigned int XrdLink::LinkAlloc [static, private]

Referenced by Alloc(), and Setup().

char * XrdLink::LinkBat [static, private]
long long XrdLink::LinkBytesIn = 0 [static, private]

Referenced by Stats(), and syncStats().

long long XrdLink::LinkBytesOut = 0 [static, private]

Referenced by Stats(), and syncStats().

long long XrdLink::LinkConTime = 0 [static, private]

Referenced by Stats(), and syncStats().

int XrdLink::LinkCount = 0 [static, private]

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

int XrdLink::LinkCountMax = 0 [static, private]

Referenced by Alloc(), and Stats().

long long XrdLink::LinkCountTot = 0 [static, private]

Referenced by Alloc(), and Stats().

int XrdLink::LinkSfIntr = 0 [static, private]

Referenced by Stats(), and syncStats().

int XrdLink::LinkStalls = 0 [static, private]

Referenced by Stats(), and syncStats().

XrdLink ** XrdLink::LinkTab [static, private]

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

int XrdLink::LinkTimeOuts = 0 [static, private]

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 [static, private]
XrdSysMutex XrdLink::LTMutex [static, private]

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

XrdLink* XrdLink::Next [private]
struct pollfd* XrdLink::PollEnt [private]

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

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

int XrdLink::SfIntr [private]

Referenced by 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 [static, private]

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" [static, private]

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

char XrdLink::Uname[24] [private]

Referenced by Reset(), and setID().

short XrdLink::waitKill = 4 [static, private]

Referenced by setKWT(), and Terminate().

Referenced by Send(), and syncStats().


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