#include <XrdSecTLayer.hh>
Inheritance diagram for XrdSecTLayer:
Public Types | |
enum | Initiator |
Public Member Functions | |
XrdSecTLayer (const char *pName, Initiator who1st=isClient) | |
virtual void | secClient (int theFD, XrdOucErrInfo *einfo)=0 |
virtual void | secServer (int theFD, XrdOucErrInfo *einfo)=0 |
virtual void | Delete ()=0 |
virtual int | Authenticate (XrdSecCredentials *cred, XrdSecParameters **parms, XrdOucErrInfo *einfo=0) |
virtual XrdSecCredentials * | getCredentials (XrdSecParameters *parm=0, XrdOucErrInfo *einfo=0) |
void | secXeq () |
Protected Member Functions | |
virtual | ~XrdSecTLayer () |
Protected Attributes | |
pthread_t | secTid |
Private Member Functions | |
int | bootUp (Initiator Who) |
int | Read (int FD, char *Buff, int rdLen) |
int | secDone () |
void | secDrain () |
const char * | secErrno (int rc, char *buff) |
void | secError (const char *Msg, int rc, int iserrno=1) |
Private Attributes | |
XrdSysSemaphore | mySem |
Initiator | Starter |
Initiator | Responder |
int | myFD |
int | urFD |
int | Tmax |
int | Tcur |
int | eCode |
char * | eText |
XrdOucErrInfo * | eDest |
XrdSecTLayer::TLayerRR | Hdr |
Static Private Attributes | |
static const int | buffSz = 8192 |
static const int | hdrSz = sizeof(TLayerRR) |
static const int | dataSz = buffSz - hdrSz |
Classes | |
struct | TLayerRR |
Definition at line 46 of file XrdSecTLayer.hh.
Definition at line 56 of file XrdSecTLayer.hh.
XrdSecTLayer::XrdSecTLayer | ( | const char * | pName, | |
Initiator | who1st = isClient | |||
) |
virtual XrdSecTLayer::~XrdSecTLayer | ( | ) | [inline, protected, virtual] |
virtual void XrdSecTLayer::secClient | ( | int | theFD, | |
XrdOucErrInfo * | einfo | |||
) | [pure virtual] |
Referenced by secXeq().
virtual void XrdSecTLayer::secServer | ( | int | theFD, | |
XrdOucErrInfo * | einfo | |||
) | [pure virtual] |
Referenced by secXeq().
virtual void XrdSecTLayer::Delete | ( | ) | [pure virtual] |
Implements XrdSecProtocol.
int XrdSecTLayer::Authenticate | ( | XrdSecCredentials * | cred, | |
XrdSecParameters ** | parms, | |||
XrdOucErrInfo * | einfo = 0 | |||
) | [virtual] |
Implements XrdSecProtocol.
Definition at line 124 of file XrdSecTLayer.cc.
References bootUp(), XrdSecBuffer::buffer, dataSz, ECONNRESET, eDest, XrdSecTLayer::TLayerRR::endData, Hdr, hdrSz, isServer, malloc(), myFD, XrdSecTLayer::TLayerRR::protCode, Read(), secDone(), secError(), XrdSecBuffer::size, Tcur, Tmax, write, and XrdSecTLayer::TLayerRR::xfrData.
XrdSecCredentials * XrdSecTLayer::getCredentials | ( | XrdSecParameters * | parm = 0 , |
|
XrdOucErrInfo * | einfo = 0 | |||
) | [virtual] |
Implements XrdSecProtocol.
Definition at line 56 of file XrdSecTLayer.cc.
References bootUp(), XrdSecBuffer::buffer, dataSz, ECONNRESET, eDest, XrdSecTLayer::TLayerRR::endData, Hdr, hdrSz, isClient, isServer, malloc(), myFD, XrdSecTLayer::TLayerRR::protCode, Read(), secDone(), secError(), XrdSecBuffer::size, Starter, Tcur, Tmax, write, and XrdSecTLayer::TLayerRR::xfrData.
void XrdSecTLayer::secXeq | ( | ) |
Definition at line 325 of file XrdSecTLayer.cc.
References close, eCode, eText, free(), XrdOucErrInfo::getErrText(), isClient, mySem, XrdSysSemaphore::Post(), Responder, secClient(), secServer(), and urFD.
Referenced by XrdSecTLayerBootUp().
int XrdSecTLayer::bootUp | ( | Initiator | Who | ) | [private] |
Definition at line 195 of file XrdSecTLayer.cc.
References close, F_SETFD, fcntl(), FD_CLOEXEC, myFD, Responder, XrdSysThread::Run(), secError(), secTid, urFD, XrdSecTLayerBootUp(), and XRDSYSTHREAD_HOLD.
Referenced by Authenticate(), and getCredentials().
int XrdSecTLayer::Read | ( | int | FD, | |
char * | Buff, | |||
int | rdLen | |||
) | [private] |
Definition at line 230 of file XrdSecTLayer.cc.
References poll(), POLLHUP, POLLIN, POLLRDNORM, read, and Tcur.
Referenced by Authenticate(), and getCredentials().
int XrdSecTLayer::secDone | ( | ) | [private] |
Definition at line 264 of file XrdSecTLayer.cc.
References eCode, eText, secDrain(), and secError().
Referenced by Authenticate(), and getCredentials().
void XrdSecTLayer::secDrain | ( | ) | [private] |
Definition at line 285 of file XrdSecTLayer.cc.
References close, myFD, mySem, and XrdSysSemaphore::Wait().
Referenced by secDone(), and secError().
const char * XrdSecTLayer::secErrno | ( | int | rc, | |
char * | buff | |||
) | [private] |
void XrdSecTLayer::secError | ( | const char * | Msg, | |
int | rc, | |||
int | iserrno = 1 | |||
) | [private] |
Definition at line 307 of file XrdSecTLayer.cc.
References eDest, Hdr, i, n, XrdSecTLayer::TLayerRR::protName, secDrain(), secErrno(), XrdOucErrInfo::setErrInfo(), and strerror().
Referenced by Authenticate(), bootUp(), getCredentials(), and secDone().
pthread_t XrdSecTLayer::secTid [protected] |
Definition at line 102 of file XrdSecTLayer.hh.
Referenced by bootUp(), and XrdSecProtocolssl::Delete().
XrdSysSemaphore XrdSecTLayer::mySem [private] |
Initiator XrdSecTLayer::Starter [private] |
Initiator XrdSecTLayer::Responder [private] |
int XrdSecTLayer::myFD [private] |
Definition at line 120 of file XrdSecTLayer.hh.
Referenced by Authenticate(), bootUp(), getCredentials(), secDrain(), and ~XrdSecTLayer().
int XrdSecTLayer::urFD [private] |
int XrdSecTLayer::Tmax [private] |
int XrdSecTLayer::Tcur [private] |
Definition at line 123 of file XrdSecTLayer.hh.
Referenced by Authenticate(), getCredentials(), and Read().
int XrdSecTLayer::eCode [private] |
char* XrdSecTLayer::eText [private] |
Definition at line 125 of file XrdSecTLayer.hh.
Referenced by secDone(), secXeq(), and ~XrdSecTLayer().
XrdOucErrInfo* XrdSecTLayer::eDest [private] |
Definition at line 126 of file XrdSecTLayer.hh.
Referenced by Authenticate(), getCredentials(), and secError().
struct XrdSecTLayer::TLayerRR XrdSecTLayer::Hdr [private] |
Referenced by Authenticate(), getCredentials(), secError(), and XrdSecTLayer().
const int XrdSecTLayer::buffSz = 8192 [static, private] |
Definition at line 137 of file XrdSecTLayer.hh.
const int XrdSecTLayer::hdrSz = sizeof(TLayerRR) [static, private] |
const int XrdSecTLayer::dataSz = buffSz - hdrSz [static, private] |