#include <XrdProofConn.h>
Inheritance diagram for XrdProofConn:
Definition at line 59 of file XrdProofConn.h.
Definition at line 67 of file XrdProofConn.h.
XrdProofConn::XrdProofConn | ( | const char * | url, | |
char | mode = 'M' , |
|||
int | psid = -1 , |
|||
char | ver = -1 , |
|||
XrdClientAbsUnsolMsgHandler * | uh = 0 , |
|||
const char * | logbuf = 0 | |||
) |
Definition at line 98 of file XrdProofConn.cxx.
References fConnectInterruptMtx, fMutex, GetServType(), Init(), kSTProofd, TRACE, URLTAG, XPDLOC, and XrdSysRecMutex.
XrdProofConn::~XrdProofConn | ( | ) | [virtual] |
Definition at line 275 of file XrdProofConn.cxx.
References Close(), fConnectInterruptMtx, fMutex, fPhyConn, fRemoteProtocol, SafeDelete, and SetConnectInterrupt().
XrdSecProtocol * XrdProofConn::Authenticate | ( | char * | plist, | |
int | lsiz | |||
) | [private] |
Definition at line 1206 of file XrdProofConn.cxx.
References XPClientRequest::auth, XrdSecBuffer::buffer, XrdOucString::c_str(), ClientAuthRequest::credtype, XrdClientMessage::DataLen(), XrdSecProtocol::Delete(), ClientRequestHdr::dlen, XrdSecProtocol::Entity, fgSecGetProtocol, fgSecPlugin, fHost, fLastErr, fLastErrMsg, fUrl, XrdSecProtocol::getCredentials(), XrdOucErrInfo::getErrText(), XrdNetDNS::getHostAddr(), GetLastErr(), XrdSysPlugin::getPlugin(), XPClientRequest::header, XrdClientMessage::HeaderStatus(), XrdClientUrlInfo::Host, XrdClientUrlInfo::HostAddr, kXP_auth, kXR_authmore, kXR_error, kXR_NotAuthorized, kXR_ok, kXR_Unsupported, XrdOucString::length(), malloc(), XrdClientUrlInfo::Port, XrdSecEntity::prot, ClientRequestHdr::requestid, ClientAuthRequest::reserved, SafeDelete, SendReq(), SetSID(), XrdSecBuffer::size, ClientRequestHdr::streamid, TRACE, URLTAG, XPDLOC, and XrdSysPlugin.
Referenced by Login().
bool XrdProofConn::CheckErrorStatus | ( | XrdClientMessage * | , | |
int & | , | |||
const char * | , | |||
bool | ||||
) | [private] |
Definition at line 767 of file XrdProofConn.cxx.
References XrdClientMessage::DataLen(), fLastErr, fLastErrMsg, XrdClientMessage::GetData(), XrdClientMessage::HeaderStatus(), kXP_reconnecting, kXR_error, kXR_wait, sleep, TRACE, URLTAG, and XPDLOC.
Referenced by SendReq().
bool XrdProofConn::CheckResp | ( | struct ServerResponseHeader * | resp, | |
const char * | met, | |||
bool | ||||
) | [private] |
Definition at line 683 of file XrdProofConn.cxx.
References kXR_authmore, kXR_ok, kXR_wait, MatchStreamID(), ServerResponseHeader::status, TRACE, URLTAG, and XPDLOC.
Referenced by SendReq().
void XrdProofConn::Connect | ( | ) | [private, virtual] |
Definition at line 195 of file XrdProofConn.cxx.
References Close(), ConnectInterrupt(), EnvGetLong, XrdOucString::erase(), fConnected, fgMaxTry, fgTimeWait, fLastErr, fLastErrMsg, fPhyConn, fPort, fUrl, GetAccessToSrv(), GetServType(), XrdClientUrlInfo::GetUrl(), i, if(), XrdClientPhyConnection::IsLogged(), kNo, kSTProofd, kXR_InvalidRequest, kXR_NotAuthorized, NAME_CONNECTTIMEOUT, NAME_FIRSTCONNECTMAXCNT, XrdClientUrlInfo::Port, XrdOucString::rfind(), sleep, TRACE, TryConnect(), and XPDLOC.
Referenced by Init(), TXUnixSocket::Reconnect(), and ReConnect().
void XrdProofConn::ReConnect | ( | ) | [private] |
Definition at line 299 of file XrdProofConn.cxx.
References Close(), Connect(), fPhyConn, fRemoteProtocol, GetRetryParam(), IsValid(), SetRetryParam(), TRACE, and XPDLOC.
Referenced by TXSocket::Reconnect(), and SendReq().
int XrdProofConn::TryConnect | ( | ) | [private, virtual] |
Definition at line 325 of file XrdProofConn.cxx.
References XrdOucString::c_str(), XrdClientConnectionMgr::Connect(), fConnected, fgConnMgr, fLogConnID, fPhyConn, fRemoteProtocol, XrdClientPhyConnection::fServerProto, fStreamid, fUnsolMsgHandler, fUrl, XrdNetDNS::getAddrName(), XrdClientConnectionMgr::GetConnection(), XrdClientLogConnection::GetPhyConnection(), XrdClientUrlInfo::Host, XrdClientUrlInfo::HostAddr, i, if(), XrdClientUrlInfo::Port, SetAsync(), XrdClientLogConnection::Streamid(), TRACE, URLTAG, and XPDLOC.
Referenced by Connect().
XrdProofConn::ESrvType XrdProofConn::DoHandShake | ( | ) | [private] |
Definition at line 911 of file XrdProofConn.cxx.
References fPhyConn, fRemoteProtocol, XrdClientPhyConnection::fServerProto, XrdClientPhyConnection::fServerType, kSTBaseXrootd, kSTError, kSTNone, kSTProofd, kSTXProofd, len, ServerInitHandShake::protover, ReadRaw(), XPD::ServerInitHandShake2HostFmt(), TRACE, TXSOCK_ERR_TIMEOUT, type, URLTAG, WriteRaw(), and XPDLOC.
Referenced by XrdProofPhyConn::GetAccessToSrv(), and GetAccessToSrv().
bool XrdProofConn::GetAccessToSrv | ( | ) | [private, virtual] |
Definition at line 833 of file XrdProofConn.cxx.
References Close(), DoHandShake(), fPhyConn, XrdClientPhyConnection::fServerType, fServerType, XrdClientPhyConnection::IsLogged(), kNo, kSTBaseXrootd, kSTError, kSTNone, kSTProofd, kSTXProofd, Login(), ok, XrdClientPhyConnection::StartReader(), TRACE, URLTAG, WriteRaw(), and XPDLOC.
Referenced by Connect().
bool XrdProofConn::Init | ( | const char * | url = 0 |
) | [private, virtual] |
Definition at line 154 of file XrdProofConn.cxx.
References XrdOucString::c_str(), Connect(), DWORD, fConnected, fgConnMgr, fHost, fPort, fUrl, fUser, XrdClientUrlInfo::Host, length, XrdOucString::length(), name, XrdClientUrlInfo::Port, XrdClientUrlInfo::TakeUrl(), TRACE, XrdClientUrlInfo::User, and XPDLOC.
Referenced by XrdProofConn().
bool XrdProofConn::Login | ( | ) | [private] |
Definition at line 1019 of file XrdProofConn.cxx.
References Authenticate(), buf, XrdOucString::c_str(), XrdClientMessage::DataLen(), EnvGetLong, fCapVer, fHost, XrdOucString::find(), fLoginBuffer, fMode, fPhyConn, free(), fRemoteProtocol, fSessionID, fUrl, fUser, GetLastErr(), kNo, kXP_login, kYes, len, XrdOucString::length(), NAME_DEBUG, XrdClientUrlInfo::Passwd, putenv, passwd::pw_dir, s, SafeDelete, SendReq(), XrdClientPhyConnection::SetLogged(), XrdClientPhyConnection::SetSecProtocol(), SetSID(), sprintf(), STR_NPOS, strcpy(), TRACE, TRACING, URLTAG, XPDLOC, and XPDPRT.
Referenced by GetAccessToSrv(), and XrdProofPhyConn::GetAccessToSrv().
bool XrdProofConn::MatchStreamID | ( | struct ServerResponseHeader * | resp | ) | [private] |
Definition at line 713 of file XrdProofConn.cxx.
References fStreamid, and ServerResponseHeader::streamid.
Referenced by CheckResp().
XrdClientMessage * XrdProofConn::SendRecv | ( | XPClientRequest * | req, | |
const void * | reqData, | |||
char ** | answData | |||
) | [private] |
Definition at line 483 of file XrdProofConn.cxx.
References XPD::clientMarshall(), XPD::convertRespStatusToChar(), XrdClientMessage::DataLen(), ServerResponseHeader::dlen, XrdClientMessage::fHdr, free(), XrdClientMessage::GetData(), XPClientRequest::header, XrdClientMessage::HeaderStatus(), XrdClientMessage::IsError(), kOK, kXR_authmore, kXR_error, kXR_ok, kXR_oksofar, LowWrite(), ReadMsg(), realloc(), SafeDelete, SetSID(), size_t, XPD::smartPrintClientHeader(), XPD::smartPrintServerHeader(), ServerResponseHeader::status, ClientRequestHdr::streamid, TRACE, TRACING, URLTAG, and XPDLOC.
Referenced by SendReq().
void XrdProofConn::SetInterrupt | ( | ) | [private] |
Definition at line 1371 of file XrdProofConn.cxx.
References fPhyConn, and XrdClientPhyConnection::SetInterrupt().
Referenced by TXSocket::SetInterrupt().
void XrdProofConn::SetConnectInterrupt | ( | ) | [private] |
Definition at line 1380 of file XrdProofConn.cxx.
References fConnectInterrupt, and fConnectInterruptMtx.
Referenced by ~XrdProofConn().
bool XrdProofConn::ConnectInterrupt | ( | ) | [private] |
Definition at line 1389 of file XrdProofConn.cxx.
References fConnectInterrupt, and fConnectInterruptMtx.
Referenced by Connect().
void XrdProofConn::Close | ( | const char * | opt = "" |
) | [virtual] |
Definition at line 384 of file XrdProofConn.cxx.
References XrdClientConnectionMgr::Disconnect(), fConnected, fgConnMgr, GetLogConnID(), TRACE, URLTAG, and XPDLOC.
Referenced by TXSocket::Close(), Connect(), GetAccessToSrv(), TXUnixSocket::Reconnect(), ReConnect(), and ~XrdProofConn().
int XrdProofConn::GetLogConnID | ( | ) | const [inline] |
Definition at line 141 of file XrdProofConn.h.
References fLogConnID.
Referenced by Close(), TXSocket::GetLogConnID(), and TXSocket::Reconnect().
int XrdProofConn::GetLowSocket | ( | ) |
Definition at line 1011 of file XrdProofConn.cxx.
References fPhyConn, and XrdClientPhyConnection::GetSocket().
Referenced by TXSocket::GetLowSocket().
int XrdProofConn::GetOpenError | ( | ) | const [inline] |
Definition at line 143 of file XrdProofConn.h.
References fLastErr.
Referenced by TXSocket::Create(), and TXSocket::GetOpenError().
int XrdProofConn::GetServType | ( | ) | const [inline] |
Definition at line 144 of file XrdProofConn.h.
References fServerType.
Referenced by Connect(), TXSocket::GetServType(), TXSocket::IsServProofd(), TXSocket::TXSocket(), and XrdProofConn().
short XrdProofConn::GetSessionID | ( | ) | const [inline] |
Definition at line 145 of file XrdProofConn.h.
References fSessionID.
Referenced by TXSocket::GetSessionID().
const char* XrdProofConn::GetUrl | ( | ) | [inline] |
Definition at line 146 of file XrdProofConn.h.
References XrdOucString::c_str(), fUrl, and XrdClientUrlInfo::GetUrl().
const char* XrdProofConn::GetLastErr | ( | ) | [inline] |
Definition at line 147 of file XrdProofConn.h.
References XrdOucString::c_str(), and fLastErrMsg.
Referenced by Authenticate(), TXSocket::Create(), TXSocket::DisconnectSession(), Login(), TXSocket::Ping(), XrdProofdNetMgr::Send(), TXSocket::SendCoordinator(), TXSocket::SendInterrupt(), TXSocket::SendRaw(), TXSocket::SendUrgent(), and TXSocket::TXSocket().
bool XrdProofConn::IsValid | ( | ) | const |
Definition at line 1404 of file XrdProofConn.cxx.
References fConnected, fPhyConn, and XrdClientPhyConnection::IsValid().
Referenced by XrdProofdNetMgr::BroadcastCtrlC(), TXSocket::IsValid(), XrdProofdNetMgr::ReadBufferRemote(), XrdProofdNetMgr::ReadLogPaths(), TXSocket::Reconnect(), TXUnixSocket::Reconnect(), ReConnect(), XrdProofdNetMgr::Send(), SendReq(), and TXSocket::TXSocket().
XReqErrorType XrdProofConn::LowWrite | ( | XPClientRequest * | , | |
const void * | , | |||
int | ||||
) |
Definition at line 733 of file XrdProofConn.cxx.
References fPhyConn, XPClientRequest::header, kOK, kWRITE, len, TRACE, URLTAG, WriteRaw(), and XPDLOC.
Referenced by XrdProofdNetMgr::BroadcastCtrlC(), TXSocket::CtrlC(), TXSocket::Ping(), TXSocket::RemoteTouch(), and SendRecv().
int XrdProofConn::ReadRaw | ( | void * | buf, | |
int | len | |||
) | [virtual] |
Definition at line 899 of file XrdProofConn.cxx.
References fgConnMgr, fLogConnID, and XrdClientConnectionMgr::ReadRaw().
Referenced by DoHandShake().
XrdClientMessage * XrdProofConn::ReadMsg | ( | ) | [virtual] |
Definition at line 475 of file XrdProofConn.cxx.
References fgConnMgr, fLogConnID, and XrdClientConnectionMgr::ReadMsg().
Referenced by SendRecv().
XrdClientMessage * XrdProofConn::SendReq | ( | XPClientRequest * | req, | |
const void * | reqData, | |||
char ** | answData, | |||
const char * | CmdName, | |||
bool | notifyerr = 1 | |||
) |
Definition at line 595 of file XrdProofConn.cxx.
References CheckErrorStatus(), CheckResp(), XPClientSendRcvRequest::dlen, fgMaxTry, XrdClientMessage::fHdr, fPhyConn, XrdClientMessage::IsError(), IsValid(), kXR_maxReqRetry, ReConnect(), SafeDelete, XPClientRequest::sendrcv, SendRecv(), sleep, TRACE, URLTAG, and XPDLOC.
Referenced by Authenticate(), TXSocket::Create(), TXSocket::DisconnectSession(), Login(), TXSocket::Ping(), XrdProofdNetMgr::ReadBufferRemote(), XrdProofdNetMgr::ReadLogPaths(), XrdProofdNetMgr::Send(), TXSocket::SendCoordinator(), TXSocket::SendInterrupt(), TXSocket::SendRaw(), and TXSocket::SendUrgent().
void XrdProofConn::SetAsync | ( | XrdClientAbsUnsolMsgHandler * | uh, | |
XrdProofConnSender_t | = 0 , |
|||
void * | = 0 | |||
) | [virtual] |
Definition at line 461 of file XrdProofConn.cxx.
References fgConnMgr, fLogConnID, fSender, fSenderArg, XrdClientConnectionMgr::GetConnection(), and XrdClientUnsolMsgSender::UnsolicitedMsgHandler.
Referenced by TXSocket::Close(), XrdProofdNetMgr::Send(), TXSocket::SetSessionID(), and TryConnect().
void XrdProofConn::SetSID | ( | kXR_char * | sid | ) |
Definition at line 726 of file XrdProofConn.cxx.
References fStreamid.
Referenced by Authenticate(), XrdProofdNetMgr::BroadcastCtrlC(), TXSocket::Create(), TXSocket::CtrlC(), TXSocket::DisconnectSession(), Login(), TXSocket::Ping(), XrdProofdNetMgr::ReadBufferRemote(), XrdProofdNetMgr::ReadLogPaths(), TXSocket::RemoteTouch(), XrdProofdNetMgr::Send(), TXSocket::SendCoordinator(), TXSocket::SendInterrupt(), TXSocket::SendRaw(), SendRecv(), and TXSocket::SendUrgent().
int XrdProofConn::WriteRaw | ( | const void * | buf, | |
int | len | |||
) | [virtual] |
Definition at line 887 of file XrdProofConn.cxx.
References fgConnMgr, fLogConnID, and XrdClientConnectionMgr::WriteRaw().
Referenced by DoHandShake(), GetAccessToSrv(), LowWrite(), and TXProofMgr::PutFile().
void XrdProofConn::GetRetryParam | ( | int & | maxtry, | |
int & | timewait | |||
) | [static] |
Definition at line 134 of file XrdProofConn.cxx.
References fgMaxTry, and fgTimeWait.
Referenced by XrdProofPhyConn::Connect(), TXUnixSocket::Reconnect(), and ReConnect().
void XrdProofConn::SetRetryParam | ( | int | maxtry = 5 , |
|
int | timewait = 2 | |||
) | [static] |
Definition at line 144 of file XrdProofConn.cxx.
References fgMaxTry, and fgTimeWait.
Referenced by XrdProofdNetMgr::Config(), TXSocket::InitEnvs(), TXUnixSocket::Reconnect(), and ReConnect().
UnsolRespProcResult XrdProofConn::ProcessUnsolicitedMsg | ( | XrdClientUnsolMsgSender * | s, | |
XrdClientMessage * | m | |||
) | [virtual] |
Implements XrdClientAbsUnsolMsgHandler.
Definition at line 409 of file XrdProofConn.cxx.
References fSender, fSenderArg, kUNSOL_KEEP, kXPD_srvmsg, len, m, TRACE, and XPDLOC.
friend class TXSocket [friend] |
Definition at line 61 of file XrdProofConn.h.
friend class TXUnixSocket [friend] |
Definition at line 62 of file XrdProofConn.h.
friend class XrdProofPhyConn [friend] |
Definition at line 63 of file XrdProofConn.h.
char XrdProofConn::fMode [private] |
bool XrdProofConn::fConnected [private] |
Definition at line 72 of file XrdProofConn.h.
Referenced by XrdProofPhyConn::Close(), Close(), XrdProofPhyConn::Connect(), Connect(), XrdProofPhyConn::Init(), Init(), IsValid(), TryConnect(), and XrdProofPhyConn::TryConnect().
int XrdProofConn::fLogConnID [private] |
Definition at line 73 of file XrdProofConn.h.
Referenced by GetLogConnID(), ReadMsg(), ReadRaw(), SetAsync(), TryConnect(), XrdProofPhyConn::TryConnect(), and WriteRaw().
kXR_unt16 XrdProofConn::fStreamid [private] |
Definition at line 74 of file XrdProofConn.h.
Referenced by MatchStreamID(), TXSocket::ProcessUnsolicitedMsg(), XrdProofPhyConn::ReadMsg(), SetSID(), TryConnect(), and XrdProofPhyConn::TryConnect().
int XrdProofConn::fRemoteProtocol [private] |
Definition at line 75 of file XrdProofConn.h.
Referenced by DoHandShake(), Login(), ReConnect(), TryConnect(), TXSocket::TXSocket(), and ~XrdProofConn().
int XrdProofConn::fServerProto [private] |
Definition at line 76 of file XrdProofConn.h.
ESrvType XrdProofConn::fServerType [private] |
Definition at line 77 of file XrdProofConn.h.
Referenced by XrdProofPhyConn::GetAccessToSrv(), GetAccessToSrv(), and GetServType().
short XrdProofConn::fSessionID [private] |
XrdOucString XrdProofConn::fUser [private] |
Definition at line 80 of file XrdProofConn.h.
Referenced by XrdProofPhyConn::Init(), Init(), Login(), and TXSocket::TXSocket().
XrdOucString XrdProofConn::fHost [private] |
Definition at line 81 of file XrdProofConn.h.
Referenced by Authenticate(), XrdProofPhyConn::Init(), Init(), Login(), and TXSocket::TXSocket().
int XrdProofConn::fPort [private] |
Definition at line 82 of file XrdProofConn.h.
Referenced by Connect(), XrdProofPhyConn::Init(), Init(), and TXSocket::TXSocket().
XrdOucString XrdProofConn::fLastErrMsg [private] |
Definition at line 83 of file XrdProofConn.h.
Referenced by Authenticate(), CheckErrorStatus(), Connect(), XrdProofPhyConn::Connect(), TXSocket::Create(), GetLastErr(), TXSocket::Reconnect(), and TXSocket::TXSocket().
XErrorCode XrdProofConn::fLastErr [private] |
Definition at line 84 of file XrdProofConn.h.
Referenced by Authenticate(), CheckErrorStatus(), Connect(), XrdProofPhyConn::Connect(), and GetOpenError().
char XrdProofConn::fCapVer [private] |
XrdOucString XrdProofConn::fLoginBuffer [private] |
XrdSysRecMutex* XrdProofConn::fMutex [private] |
Definition at line 89 of file XrdProofConn.h.
Referenced by TXUnixSocket::Reconnect(), XrdProofConn(), XrdProofPhyConn::XrdProofPhyConn(), and ~XrdProofConn().
XrdSysRecMutex* XrdProofConn::fConnectInterruptMtx [private] |
Definition at line 91 of file XrdProofConn.h.
Referenced by ConnectInterrupt(), SetConnectInterrupt(), XrdProofConn(), and ~XrdProofConn().
bool XrdProofConn::fConnectInterrupt [private] |
Definition at line 92 of file XrdProofConn.h.
Referenced by ConnectInterrupt(), and SetConnectInterrupt().
XrdClientPhyConnection* XrdProofConn::fPhyConn [private] |
Definition at line 94 of file XrdProofConn.h.
Referenced by XrdProofPhyConn::Close(), Connect(), DoHandShake(), GetAccessToSrv(), XrdProofPhyConn::GetAccessToSrv(), GetLowSocket(), IsValid(), Login(), LowWrite(), XrdProofPhyConn::ReadMsg(), XrdProofPhyConn::ReadRaw(), TXSocket::Reconnect(), ReConnect(), SendReq(), XrdProofPhyConn::SetAsync(), SetInterrupt(), TryConnect(), XrdProofPhyConn::TryConnect(), XrdProofPhyConn::WriteRaw(), and ~XrdProofConn().
int XrdProofConn::fOpenSockFD [private] |
Definition at line 96 of file XrdProofConn.h.
Definition at line 98 of file XrdProofConn.h.
Referenced by TryConnect(), and XrdProofPhyConn::TryConnect().
XrdProofConnSender_t XrdProofConn::fSender [private] |
Definition at line 100 of file XrdProofConn.h.
Referenced by ProcessUnsolicitedMsg(), and SetAsync().
void* XrdProofConn::fSenderArg [private] |
Definition at line 101 of file XrdProofConn.h.
Referenced by ProcessUnsolicitedMsg(), and SetAsync().
XrdClientUrlInfo XrdProofConn::fUrl [private] |
Definition at line 103 of file XrdProofConn.h.
Referenced by Authenticate(), Connect(), GetUrl(), XrdProofPhyConn::Init(), Init(), Login(), TryConnect(), XrdProofPhyConn::TryConnect(), and TXSocket::TXSocket().
XrdClientConnectionMgr * XrdProofConn::fgConnMgr [static, private] |
Definition at line 105 of file XrdProofConn.h.
Referenced by Close(), Init(), ReadMsg(), ReadRaw(), SetAsync(), TryConnect(), and WriteRaw().
int XrdProofConn::fgMaxTry [static, private] |
Definition at line 107 of file XrdProofConn.h.
Referenced by Connect(), GetRetryParam(), SendReq(), and SetRetryParam().
int XrdProofConn::fgTimeWait [static, private] |
Definition at line 108 of file XrdProofConn.h.
Referenced by Connect(), GetRetryParam(), and SetRetryParam().
XrdSysPlugin * XrdProofConn::fgSecPlugin [static, private] |
void * XrdProofConn::fgSecGetProtocol [static, private] |