![]() |
XRootD
|
#include <XrdLinkCtl.hh>
Public Member Functions | |
XrdLinkCtl () | |
Constructor. More... | |
Static Public Member Functions | |
static XrdLink * | Alloc (XrdNetAddr &peer, int opts=0) |
static XrdLink * | fd2link (int fd) |
static XrdLink * | fd2link (int fd, unsigned int inst) |
static XrdPollInfo * | fd2PollInfo (int fd) |
static XrdLink * | Find (int &curr, XrdLinkMatch *who=0) |
static int | getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0) |
static void | idleScan () |
Look for idle links and close hem down. More... | |
static void | setKWT (int wkSec, int kwSec) |
static int | Setup (int maxfds, int idlewt) |
static void | SyncAll () |
Synchronize statustics for ll links. More... | |
static void | Unhook (int fd) |
Unhook a link from the active table of links. More... | |
Static Public Attributes | |
static short | killWait = 3 |
Link destruction control constants. More... | |
static short | waitKill = 4 |
Additional Inherited Members | |
![]() | |
typedef XrdOucSFVec | sfVec |
![]() | |
int | RecvIOV (const struct iovec *iov, int iocnt) |
void | Reset () |
int | sendData (const char *Buff, int Blen) |
int | SendIOV (const struct iovec *iov, int iocnt, int bytes) |
int | SFError (int rc) |
int | TLS_Error (const char *act, XrdTls::RC rc) |
bool | TLS_Write (const char *Buff, int Blen) |
XrdLinkXeq () | |
~XrdLinkXeq () | |
XrdNetAddrInfo * | AddrInfo () |
int | Backlog () |
int | Client (char *buff, int blen) |
int | Close (bool defer=false) |
void | DoIt () |
int | getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy) |
XrdTlsPeerCerts * | getPeerCerts () |
XrdProtocol * | getProtocol () |
const char * | Name () const |
const XrdNetAddr * | NetAddr () const |
int | Peek (char *buff, int blen, int timeout=-1) |
int | Recv (char *buff, int blen) |
int | Recv (char *buff, int blen, int timeout) |
int | Recv (const struct iovec *iov, int iocnt, int timeout) |
int | RecvAll (char *buff, int blen, int timeout=-1) |
bool | Register (const char *hName) |
int | Send (const char *buff, int blen) |
int | Send (const sfVec *sdP, int sdn) |
int | Send (const struct iovec *iov, int iocnt, int bytes=0) |
void | setID (const char *userid, int procid) |
void | setLocation (XrdNetAddrInfo::LocInfo &loc) |
bool | setNB () |
void | setProtName (const char *name) |
XrdProtocol * | setProtocol (XrdProtocol *pp, bool push) |
bool | setTLS (bool enable, XrdTlsContext *ctx=0) |
void | Shutdown (bool getLock) |
void | syncStats (int *ctime=0) |
int | TLS_Peek (char *Buff, int Blen, int timeout) |
int | TLS_Recv (char *Buff, int Blen) |
int | TLS_Recv (char *Buff, int Blen, int timeout, bool havelock=false) |
int | TLS_Recv (const struct iovec *iov, int iocnt, int timeout) |
int | TLS_RecvAll (char *Buff, int Blen, int timeout) |
int | TLS_Send (const char *Buff, int Blen) |
int | TLS_Send (const sfVec *sfP, int sfN) |
int | TLS_Send (const struct iovec *iov, int iocnt, int bytes) |
const char * | verTLS () |
![]() | |
~XrdLink () | |
void | ResetLink () |
int | Wait4Data (int timeout) |
XrdLink (XrdLinkXeq &lxq) | |
bool | Activate () |
XrdNetAddrInfo * | AddrInfo () |
void | armBridge () |
Mark this link as an in-memory communications bridge (internal use only). More... | |
int | Backlog () |
int | Client (char *buff, int blen) |
int | Close (bool defer=false) |
void | Enable () |
Enable the link to field interrupts. More... | |
int | FDnum () |
int | getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy) |
XrdTlsPeerCerts * | getPeerCerts () |
XrdProtocol * | getProtocol () |
Obtain current protocol object pointer. More... | |
bool | hasBridge () const |
bool | hasTLS () const |
void | Hold (bool lk) |
const char * | Host () const |
unsigned int | Inst () const |
bool | isFlawed () const |
bool | isInstance (unsigned int inst) const |
const char * | Name () const |
const XrdNetAddr * | NetAddr () const |
int | Peek (char *buff, int blen, int timeout=-1) |
int | Recv (char *buff, int blen) |
int | Recv (char *buff, int blen, int timeout) |
int | Recv (const struct iovec *iov, int iocnt, int timeout) |
int | RecvAll (char *buff, int blen, int timeout=-1) |
bool | Register (const char *hName) |
int | Send (const char *buff, int blen) |
int | Send (const sfVec *sdP, int sdn) |
int | Send (const struct iovec *iov, int iocnt, int bytes=0) |
void | Serialize () |
Wait for all outstanding requests to be completed on the link. More... | |
int | setEtext (const char *text) |
void | setID (const char *userid, int procid) |
void | setLocation (XrdNetAddrInfo::LocInfo &loc) |
bool | setNB () |
void | setProtName (const char *name) |
XrdProtocol * | setProtocol (XrdProtocol *pp, bool runit=false, bool push=false) |
void | setRef (int cnt) |
bool | setTLS (bool enable, XrdTlsContext *ctx=0) |
Enable or disable TLS on the link. More... | |
void | Shutdown (bool getLock) |
void | syncStats (int *ctime=0) |
int | Terminate (const char *owner, int fdnum, unsigned int inst) |
time_t | timeCon () const |
Return the time the link was made active (i.e. time of connection). More... | |
int | UseCnt () const |
Return link's reference count. More... | |
const char * | verTLS () |
![]() | |
XrdJob (const char *desc="") | |
virtual | ~XrdJob () |
![]() | |
static int | getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0) |
static int | Stats (char *buff, int blen, bool do_sync=false) |
![]() | |
static XrdLink * | Find (int &curr, XrdLinkMatch *who=0) |
static int | getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0) |
static int | Stats (char *buff, int blen, bool do_sync=0) |
![]() | |
XrdNetAddr | Addr |
long long | BytesIn |
long long | BytesInTot |
long long | BytesOut |
long long | BytesOutTot |
int | HNlen |
char | isIdle |
bool | KeepFD |
char | Lname [256] |
bool | LockReads |
XrdProtocol * | ProtoAlt |
XrdProtocol * | Protocol |
XrdSysMutex | rdMutex |
XrdSendQ * | sendQ |
int | SfIntr |
int | stallCnt |
int | stallCntTot |
int | tardyCnt |
int | tardyCntTot |
XrdTlsSocket | tlsIO |
char | Uname [24] |
XrdSysMutex | wrMutex |
XrdLinkInfo | LinkInfo |
XrdPollInfo | PollInfo |
![]() | |
char * | HostName |
unsigned int | Instance |
bool | isBridged |
bool | isTLS |
XrdLinkXeq & | linkXQ |
void * | rsvd1 [3] |
char | rsvd2 [2] |
char * | ID |
Pointer to the client's link identity. More... | |
![]() | |
const char * | Comment |
XrdJob * | NextJob |
![]() | |
static long long | LinkBytesIn = 0 |
static long long | LinkBytesOut = 0 |
static long long | LinkConTime = 0 |
static int | LinkCount = 0 |
static int | LinkCountMax = 0 |
static long long | LinkCountTot = 0 |
static int | LinkSfIntr = 0 |
static int | LinkStalls = 0 |
static int | LinkTimeOuts = 0 |
static XrdSysMutex | statsMutex |
static const char * | TraceID = "LinkXeq" |
![]() | |
static bool | sfOK = false |
Definition at line 42 of file XrdLinkCtl.hh.
|
inline |
|
static |
Definition at line 109 of file XrdLinkCtl.cc.
References XrdLinkXeq::Addr, AtomicInc, XrdJob::Comment, XrdSysError::Emsg(), XrdLinkInfo::FD, XrdPollInfo::FD, XrdNetAddrInfo::fmtAuto, XrdNetAddrInfo::Format(), XrdLinkXeq::HNlen, XrdLink::HostName, XrdLink::ID, XrdLink::Instance, XrdLinkXeq::KeepFD, XrdLinkXeq::LinkInfo, XrdLinkXeq::Lname, XrdSysMutex::Lock(), XrdLinkXeq::LockReads, XrdGlobal::Log, XrdNetAddrInfo::noPort, XrdNetAddrInfo::old6Map4, opts, XrdLinkXeq::PollInfo, XrdLinkXeq::Reset(), XrdNetAddrInfo::SockFD(), strlcpy(), XrdNet::Trim(), XrdLinkXeq::Uname, XrdSysMutex::UnLock(), XRDLINK_NOCLOSE, XRDLINK_RDLOCK, and XrdGlobal::XrdNetTCP.
Referenced by XrdInet::Accept(), and XrdInet::Connect().
|
inlinestatic |
Translate a file descriptor number to the corresponding link object.
fd | The file descriptor number. |
Definition at line 72 of file XrdLinkCtl.hh.
Referenced by XrdXrootdResponse::Send(), and XrdLink::Terminate().
|
inlinestatic |
Translate a file descriptor number and an instance to a link object.
fd | The file descriptor number. |
inst | The file descriptor number instance number. |
Definition at line 87 of file XrdLinkCtl.hh.
References XrdLink::Instance.
|
inlinestatic |
Translate a file descriptor number to the corresponding PollInfo object.
fd | The file descriptor number. |
Definition at line 103 of file XrdLinkCtl.hh.
References XrdLinkXeq::PollInfo.
|
static |
Find the next link matching certain attributes.
curr | Is an internal tracking value that allows repeated calls. It must be set to a value of 0 or less on the initial call and not touched therafter unless a null pointer is returned. |
who | If the object use to check if the link matches the wanted criterea (typically, client name and host name). If the ppointer is nil, the next link is always returned. |
Definition at line 202 of file XrdLinkCtl.cc.
References XrdLinkXeq::HNlen, XrdLink::HostName, XrdLink::ID, XrdLink::Instance, XrdLinkXeq::Lname, XrdLinkMatch::Match(), and XrdLink::setRef().
Referenced by XrdLink::Find().
|
static |
Find the next client name matching certain attributes.
curr | Is an internal tracking value that allows repeated calls. It must be set to a value of 0 or less on the initial call and not touched therafter unless zero is returned. |
bname | Pointer to a buffer where the name is to be returned. |
blen | The length of the buffer. |
who | If the object use to check if the link matches the wanted criterea (typically, client name and host name). If the pointer is nil, a match always occurs. |
Definition at line 248 of file XrdLinkCtl.cc.
References XrdLinkXeq::Client(), XrdLinkXeq::HNlen, XrdLink::HostName, XrdLink::ID, XrdLinkXeq::Lname, and XrdLinkMatch::Match().
Referenced by XrdLink::getName().
|
static |
Look for idle links and close hem down.
Definition at line 285 of file XrdLinkCtl.cc.
References XrdPoll::Disable(), XrdSysError::Emsg(), XrdLink::ID, XrdLinkInfo::InUse, XrdPollInfo::isEnabled, XrdLinkXeq::isIdle, XrdLinkXeq::LinkInfo, XrdSysMutex::Lock(), XrdGlobal::Log, XrdLinkInfo::opMutex, XrdPollInfo::Poller, XrdLinkXeq::PollInfo, TRACE, and XrdSysMutex::UnLock().
|
static |
Set kill constants.
wkSec | Seconds to wait for kill to happed, |
kwSec | The minimum number of seconds to wait after killing a connection for it to end. |
Definition at line 327 of file XrdLinkCtl.cc.
|
static |
Setup link processing.
maxfds | The maximum number of connections to handle. |
idlewt | The time interval to check for idle connections. |
Definition at line 337 of file XrdLinkCtl.cc.
References DEBUG, XrdSysError::Emsg(), XrdGlobal::Log, XrdGlobal::Sched, XrdScheduler::Schedule(), and TRACE.
|
static |
Synchronize statustics for ll links.
Definition at line 374 of file XrdLinkCtl.cc.
Referenced by XrdLinkXeq::Stats().
|
static |
Unhook a link from the active table of links.
Definition at line 392 of file XrdLinkCtl.cc.
Referenced by XrdLinkXeq::Close().
|
static |
Link destruction control constants.
Definition at line 190 of file XrdLinkCtl.hh.
Referenced by XrdLink::Terminate().
|
static |
Definition at line 191 of file XrdLinkCtl.hh.
Referenced by XrdLink::Terminate().