XrdLink Class Reference

#include <XrdLink.hh>

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

List of all members.

Public Types

typedef XrdOucSFVec sfVec

Public Member Functions

XrdNetAddrInfoAddrInfo ()
int Backlog ()
void Bind ()
void Bind (pthread_t tid)
int Client (char *buff, int blen)
int Close (int defer=0)
void DoIt ()
void Enable ()
int FDnum ()
int getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy)
XrdProtocolgetProtocol ()
void Hold (int lk)
const char * Host ()
unsigned int Inst ()
bool isFlawed ()
bool isInstance (unsigned int inst)
const char * Name ()
const XrdNetAddrNetAddr ()
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 sfVec *sdP, int sdn)
void Serialize ()
int setEtext (const char *text)
void setID (const char *userid, int procid)
void setLocation (XrdNetAddrInfo::LocInfo &loc)
bool setNB ()
XrdProtocolsetProtocol (XrdProtocol *pp)
void setRef (int cnt)
void Shutdown (bool getLock)
void syncStats (int *ctime=0)
int Terminate (const XrdLink *owner, int fdnum, unsigned int inst)
time_t timeCon ()
int UseCnt ()
void armBridge ()
int hasBridge ()
 XrdLink ()
 ~XrdLink ()

Static Public Member Functions

static XrdLinkAlloc (XrdNetAddr &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 int sfOK

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
XrdNetAddr Addr
char Uname [24]
char Lname [232]
char * HostName
int HNlen
XrdLinkNext
XrdSysMutex opMutex
XrdSysMutex rdMutex
XrdSysMutex wrMutex
XrdSysSemaphore IOSemaphore
XrdSysCondVarKillcvP
XrdSendQsendQ
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 isBridged
char KillCnt

Static Private Attributes

static XrdSysErrorXrdLog
static XrdOucTraceXrdTrace
static XrdSchedulerXrdSched
static XrdInetXrdNetTCP
static XrdSysMutex LTMutex
static XrdLink ** LinkTab
static char * LinkBat
static unsigned int LinkAlloc
static int LTLast
static const char * TraceID
static int devNull
static short killWait
static short waitKill
static long long LinkBytesIn
static long long LinkBytesOut
static long long LinkConTime
static long long LinkCountTot
static int LinkCount
static int LinkCountMax
static int LinkTimeOuts
static int LinkStalls
static int LinkSfIntr
static int maxFD
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

Member Typedef Documentation


Constructor & Destructor Documentation

XrdLink::XrdLink (  ) 
XrdLink::~XrdLink (  )  [inline]

Member Function Documentation

XrdNetAddrInfo* XrdLink::AddrInfo (  )  [inline]

Obtain the address information for this link.

Returns:
Pointer to the XrdAddrInfo object. The pointer is valid while the end-point is connected.

References Addr.

static XrdLink* XrdLink::Alloc ( XrdNetAddr peer,
int  opts = 0 
) [static]

Allocate a new link object.

Parameters:
peer The connection information for the endpoint.
opts Processing options: XRDLINK_NOCLOSE - do not close the FD upon recycling. XRDLINK_RDLOCK - obtain a lock prior to reading data.
Returns:
!0 The pointer to the new object. =0 A new link object could not be allocated.
void XrdLink::armBridge (  )  [inline]

References isBridged.

int XrdLink::Backlog (  ) 
void XrdLink::Bind ( pthread_t  tid  )  [inline]
void XrdLink::Bind (  )  [inline]
int XrdLink::Client ( char *  buff,
int  blen 
)
int XrdLink::Close ( int  defer = 0  ) 
void XrdLink::DoIt (  )  [virtual]

Implements XrdJob.

void XrdLink::Enable (  ) 
static XrdLink* XrdLink::fd2link ( int  fd,
unsigned int  inst 
) [inline, static]

References Instance, LinkBat, LinkTab, and LTLast.

static XrdLink* XrdLink::fd2link ( int  fd  )  [inline, static]

References LinkBat, LinkTab, and LTLast.

int XrdLink::FDnum (  )  [inline]

References FD.

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

References Protocol.

int XrdLink::hasBridge (  )  [inline]

References isBridged.

void XrdLink::Hold ( int  lk  )  [inline]
const char* XrdLink::Host (  )  [inline]

Get the fully qualified name of the endpoint.

Returns:
Pointer to fully qualified host name. The contents are valid while the endpoint is connected.

References HostName.

static void XrdLink::Init ( XrdInet iP  )  [inline, static]

References XrdNetTCP.

static void XrdLink::Init ( XrdSysError eP,
XrdOucTrace tP,
XrdScheduler sP 
) [inline, static]

References XrdLog, XrdSched, and XrdTrace.

unsigned int XrdLink::Inst (  )  [inline]

Obtain the link's instance number.

Returns:
The link's instance number.

References Instance.

bool XrdLink::isFlawed (  )  [inline]

Indicate whether or not the link has an outstanding error.

Returns:
True the link has an outstanding error. the link has no outstanding error.

References Etext.

bool XrdLink::isInstance ( unsigned int  inst  )  [inline]

Indicate whether or not this link is of a particular instance. only be used for display and not for security purposes.

Parameters:
inst the expected instance number.
Returns:
True the link matches the instance number. the link differs the instance number.

References FD, and Instance.

const char* XrdLink::Name (  )  [inline]

Obtain the domain trimmed name of the end-point. The returned value should only be used for display and not for security purposes.

Returns:
Pointer to the name that remains valid during the link's lifetime.

References Lname.

const XrdNetAddr* XrdLink::NetAddr (  )  [inline]

Obtain the network address object for this link. The returned value is valid as long as the end-point is connected. Otherwise, it may change.

Returns:
Pointer to the object and remains valid during the link's lifetime.

References Addr.

Referenced by XrdCmsNode::isNode().

int XrdLink::Peek ( char *  buff,
int  blen,
int  timeout = -1 
)
int XrdLink::Recv ( char *  buff,
int  blen,
int  timeout 
)
int XrdLink::Recv ( char *  buff,
int  blen 
)
int XrdLink::RecvAll ( char *  buff,
int  blen,
int  timeout = -1 
)
void XrdLink::Reset (  )  [private]
int XrdLink::Send ( const sfVec sdP,
int  sdn 
)
int XrdLink::Send ( const struct iovec *  iov,
int  iocnt,
int  bytes = 0 
)
int XrdLink::Send ( const char *  buff,
int  blen 
)

Referenced by XrdCmsNode::Send().

int XrdLink::sendData ( const char *  Buff,
int  Blen 
) [private]
void XrdLink::Serialize (  ) 
int XrdLink::setEtext ( const char *  text  ) 
void XrdLink::setID ( const char *  userid,
int  procid 
)
static void XrdLink::setKWT ( int  wkSec,
int  kwSec 
) [static]
void XrdLink::setLocation ( XrdNetAddrInfo::LocInfo loc  )  [inline]

References Addr, and XrdNetAddr::SetLocation().

bool XrdLink::setNB (  ) 
XrdProtocol* XrdLink::setProtocol ( XrdProtocol pp  ) 
void XrdLink::setRef ( int  cnt  ) 
static int XrdLink::Setup ( int  maxfd,
int  idlewait 
) [static]
void XrdLink::Shutdown ( bool  getLock  ) 
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.

int XrdLink::UseCnt (  )  [inline]

References InUse.


Friends And Related Function Documentation

friend class XrdLinkScan [friend]
friend class XrdPoll [friend]
friend class XrdPollDev [friend]
friend class XrdPollE [friend]
friend class XrdPollPoll [friend]

Member Data Documentation

Referenced by AddrInfo(), NetAddr(), and setLocation().

long long XrdLink::BytesIn [private]

Referenced by getIOStats().

long long XrdLink::BytesInTot [private]

Referenced by getIOStats().

long long XrdLink::BytesOut [private]

Referenced by getIOStats().

long long XrdLink::BytesOutTot [private]

Referenced by getIOStats().

time_t XrdLink::conTime [private]

Referenced by timeCon().

int XrdLink::devNull [static, private]
int XrdLink::doPost [private]
char* XrdLink::Etext [private]

Referenced by isFlawed().

int XrdLink::FD [private]

Referenced by FDnum(), and isInstance().

int XrdLink::HNlen [private]
char* XrdLink::HostName [private]

Referenced by Host().

char* XrdLink::ID
char XrdLink::inQ [private]
unsigned int XrdLink::Instance [private]

Referenced by fd2link(), Inst(), and isInstance().

int XrdLink::InUse [private]

Referenced by getIOStats(), and UseCnt().

char XrdLink::isBridged [private]

Referenced by armBridge(), and hasBridge().

char XrdLink::isEnabled [private]
char XrdLink::isIdle [private]
char XrdLink::KeepFD [private]
char XrdLink::KillCnt [private]
const char XrdLink::KillMax = 60 [static, private]
const char XrdLink::KillMsk = 0x7f [static, private]
short XrdLink::killWait [static, private]
const char XrdLink::KillXwt = 0x80 [static, private]
unsigned int XrdLink::LinkAlloc [static, private]
char* XrdLink::LinkBat [static, private]

Referenced by fd2link().

long long XrdLink::LinkBytesIn [static, private]
long long XrdLink::LinkBytesOut [static, private]
long long XrdLink::LinkConTime [static, private]
int XrdLink::LinkCount [static, private]
int XrdLink::LinkCountMax [static, private]
long long XrdLink::LinkCountTot [static, private]
int XrdLink::LinkSfIntr [static, private]
int XrdLink::LinkStalls [static, private]
XrdLink** XrdLink::LinkTab [static, private]

Referenced by fd2link().

int XrdLink::LinkTimeOuts [static, private]
char XrdLink::Lname[232] [private]

Referenced by Name().

char XrdLink::LockReads [private]
int XrdLink::LTLast [static, private]

Referenced by fd2link().

XrdSysMutex XrdLink::LTMutex [static, private]
int XrdLink::maxFD [static, private]
XrdLink* XrdLink::Next [private]

Referenced by Hold().

struct pollfd* XrdLink::PollEnt [read, private]

Referenced by getProtocol().

int XrdLink::SfIntr [private]
int XrdLink::sfOK [static]
int XrdLink::stallCnt [private]

Referenced by getIOStats().

int XrdLink::stallCntTot [private]

Referenced by getIOStats().

XrdSysMutex XrdLink::statsMutex [static, private]
int XrdLink::tardyCnt [private]

Referenced by getIOStats().

int XrdLink::tardyCntTot [private]

Referenced by getIOStats().

const char* XrdLink::TraceID [static, private]
char XrdLink::Uname[24] [private]
short XrdLink::waitKill [static, private]
XrdSysError* XrdLink::XrdLog [static, private]

Referenced by Init().

XrdInet* XrdLink::XrdNetTCP [static, private]

Referenced by Init().

XrdScheduler* XrdLink::XrdSched [static, private]

Referenced by Init().

XrdOucTrace* XrdLink::XrdTrace [static, private]

Referenced by Init().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Apr 2019 for xrootd by  doxygen 1.6.1