|
XRootD
|
#include <XrdLinkCtl.hh>
Inheritance diagram for XrdLinkCtl:
Collaboration diagram for XrdLinkCtl:Public Member Functions | |
| XrdLinkCtl () | |
| Constructor. | |
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. | |
| static void | setKWT (int wkSec, int kwSec) |
| static int | Setup (int maxfds, int idlewt) |
| static void | SyncAll () |
| Synchronize statustics for ll links. | |
| static void | Unhook (int fd) |
| Unhook a link from the active table of links. | |
Static Public Attributes | |
| static short | killWait = 3 |
| Link destruction control constants. | |
| static short | waitKill = 4 |
Additional Inherited Members | |
Protected Types inherited from XrdLink | |
| typedef XrdOucSFVec | sfVec |
Protected Member Functions inherited from XrdLinkXeq | |
| 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 () |
Protected Member Functions inherited from XrdLink | |
| ~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). | |
| int | Backlog () |
| int | Client (char *buff, int blen) |
| int | Close (bool defer=false) |
| void | Enable () |
| Enable the link to field interrupts. | |
| int | FDnum () |
| int | getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy) |
| XrdTlsPeerCerts * | getPeerCerts () |
| XrdProtocol * | getProtocol () |
| Obtain current protocol object pointer. | |
| 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. | |
| 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. | |
| 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). | |
| int | UseCnt () const |
| Return link's reference count. | |
| const char * | verTLS () |
Protected Member Functions inherited from XrdJob | |
| XrdJob (const char *desc="") | |
| virtual | ~XrdJob () |
Static Protected Member Functions inherited from XrdLinkXeq | |
| static int | getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0) |
| static int | Stats (char *buff, int blen, bool do_sync=false) |
Static Protected Member Functions inherited from XrdLink | |
| 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) |
Protected Attributes inherited from XrdLinkXeq | |
| 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 |
Protected Attributes inherited from XrdLink | |
| 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. | |
Protected Attributes inherited from XrdJob | |
| const char * | Comment |
| XrdJob * | NextJob |
Static Protected Attributes inherited from XrdLinkXeq | |
| 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 Protected Attributes inherited from XrdLink | |
| 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::LinkCount, XrdLinkXeq::LinkCountMax, XrdLinkXeq::LinkCountTot, XrdLinkXeq::LinkInfo, XrdLinkXeq::Lname, XrdSysMutex::Lock(), XrdLinkXeq::LockReads, XrdGlobal::Log, XrdNetAddrInfo::noPort, XrdNetAddrInfo::old6Map4, opts, XrdLinkXeq::PollInfo, XrdLinkXeq::Reset(), XrdNetAddrInfo::SockFD(), XrdLinkXeq::statsMutex, strlcpy(), XrdNet::Trim(), XrdLinkXeq::Uname, XrdSysMutex::UnLock(), XRDLINK_NOCLOSE, XRDLINK_RDLOCK, and XrdGlobal::XrdNetTCP.
Referenced by XrdInet::Accept(), and XrdInet::Connect().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the caller graph for this function:
|
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, XrdSysMutex::Lock(), XrdLinkMatch::Match(), XrdLink::setRef(), and XrdSysMutex::UnLock().
Referenced by XrdLink::Find().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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, XrdSysMutex::Lock(), XrdLinkMatch::Match(), and XrdSysMutex::UnLock().
Referenced by XrdLink::getName().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the call graph for this function:
|
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.
Here is the call graph for this function:
|
static |
Synchronize statustics for ll links.
Definition at line 374 of file XrdLinkCtl.cc.
References XrdSysMutex::Lock(), XrdLinkXeq::syncStats(), and XrdSysMutex::UnLock().
Referenced by XrdLinkXeq::Stats().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Unhook a link from the active table of links.
Definition at line 392 of file XrdLinkCtl.cc.
References XrdSysMutex::Lock(), and XrdSysMutex::UnLock().
Referenced by XrdLinkXeq::Close().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Link destruction control constants.
Definition at line 190 of file XrdLinkCtl.hh.
Referenced by setKWT(), and XrdLink::Terminate().
|
static |
Definition at line 191 of file XrdLinkCtl.hh.
Referenced by setKWT(), and XrdLink::Terminate().