XrdNet Class Reference

#include <XrdNet.hh>

Inheritance diagram for XrdNet:

XrdInet XrdNetWork List of all members.

Public Member Functions

int Accept (XrdNetPeer &myPeer, int opts=0, int timeout=-1)
int Bind (int port, const char *contype="tcp")
int Bind (char *path, const char *contype="stream")
int Connect (XrdNetPeer &myPeer, const char *host, int port, int opts=0, int timeout=-1)
int Relay (XrdNetPeer &Peer, const char *dest, int opts=0)
int Port ()
void Secure (XrdNetSecurity *secp)
void setDefaults (int options, int buffsz=0)
void setDomain (const char *dname)
void Trim (char *hname)
void unBind ()
int WSize ()
 XrdNet (XrdSysError *erp, XrdNetSecurity *secp=0)
 ~XrdNet ()

Protected Attributes

XrdSysErroreDest
XrdNetSecurityPolice
char * Domain
int Domlen
int iofd
int Portnum
int PortType
int Windowsz
int netOpts
int BuffSize
XrdNetBufferQBuffQ

Private Member Functions

int do_Accept_TCP (XrdNetPeer &myPeer, int opts)
int do_Accept_UDP (XrdNetPeer &myPeer, int opts)

Detailed Description

Definition at line 33 of file XrdNet.hh.


Constructor & Destructor Documentation

XrdNet::XrdNet ( XrdSysError erp,
XrdNetSecurity secp = 0 
)

Definition at line 47 of file XrdNet.cc.

References BuffQ, Domain, Domlen, eDest, iofd, netOpts, Police, Portnum, PortType, and Windowsz.

XrdNet::~XrdNet (  ) 

Definition at line 61 of file XrdNet.cc.

References Domain, free(), and unBind().


Member Function Documentation

int XrdNet::Accept ( XrdNetPeer myPeer,
int  opts = 0,
int  timeout = -1 
)

Definition at line 71 of file XrdNet.cc.

References do_Accept_TCP(), do_Accept_UDP(), Domain, eDest, XrdSysError::Emsg(), iofd, poll(), POLLHUP, POLLIN, POLLPRI, POLLRDBAND, POLLRDNORM, PortType, Trim(), XRDNET_NODNTRIM, and XRDNET_NOEMSG.

Referenced by XrdProofdProofServMgr::Accept(), XrdInet::Accept(), and XrdNetWork::Accept().

int XrdNet::Bind ( int  port,
const char *  contype = "tcp" 
)

Definition at line 108 of file XrdNet.cc.

References BuffQ, BuffSize, XrdNetSocket::Detach(), eDest, XrdNetDNS::getPort(), iofd, XrdNetSocket::LastError(), netOpts, XrdNetSocket::Open(), opts, Portnum, PortType, unBind(), Windowsz, XRDNET_SERVER, XRDNET_UDPBUFFSZ, and XRDNET_UDPSOCKET.

Referenced by XrdProofdProofServ::CreateUNIXSock(), XrdCmsSupervisor::Init(), and XrdConfig::Setup().

int XrdNet::Bind ( char *  path,
const char *  contype = "stream" 
)

Definition at line 150 of file XrdNet.cc.

References BuffQ, BuffSize, XrdNetSocket::Detach(), eDest, XrdSysError::Emsg(), iofd, XrdNetSocket::LastError(), netOpts, XrdNetSocket::Open(), opts, PortType, unBind(), Windowsz, XRDNET_SERVER, XRDNET_UDPBUFFSZ, and XRDNET_UDPSOCKET.

int XrdNet::Connect ( XrdNetPeer myPeer,
const char *  host,
int  port,
int  opts = 0,
int  timeout = -1 
)

Definition at line 196 of file XrdNet.cc.

References XrdNetSocket::Detach(), Domain, eDest, XrdNetPeer::fd, free(), XrdNetPeer::InetAddr, XrdNetPeer::InetName, netOpts, XrdNetSocket::Open(), XrdNetSocket::Peername(), Trim(), Windowsz, XRDNET_NODNTRIM, XRDNET_NOEMSG, XRDNET_TOUT, XRDNET_UDPBUFFSZ, and XRDNET_UDPSOCKET.

Referenced by XrdInet::Connect(), XrdNetWork::Connect(), XrdNetWork::Relay(), and Relay().

int XrdNet::Relay ( XrdNetPeer Peer,
const char *  dest,
int  opts = 0 
)

Definition at line 234 of file XrdNet.cc.

References Connect(), and XRDNET_UDPSOCKET.

Referenced by XrdFrmMonitor::Init(), XrdXrootdMonitor::Init(), and XrdNetMsg::XrdNetMsg().

int XrdNet::Port (  )  [inline]

Definition at line 84 of file XrdNet.hh.

References Portnum.

Referenced by mainAccept(), XrdOucAppleBonjour::RegisterService(), XrdOucAvahiBonjour::RegisterService(), and XrdConfig::Setup().

void XrdNet::Secure ( XrdNetSecurity secp  ) 

Definition at line 243 of file XrdNet.cc.

References XrdNetSecurity::Merge(), and Police.

void XrdNet::setDefaults ( int  options,
int  buffsz = 0 
) [inline]

Definition at line 96 of file XrdNet.hh.

References netOpts, and Windowsz.

Referenced by XrdConfig::Setup().

void XrdNet::setDomain ( const char *  dname  )  [inline]

Definition at line 103 of file XrdNet.hh.

References Domain, Domlen, and free().

Referenced by XrdCmsSupervisor::Init(), and XrdConfig::Setup().

void XrdNet::Trim ( char *  hname  ) 

Definition at line 257 of file XrdNet.cc.

References Domain, Domlen, and k.

Referenced by Accept(), XrdNetLink::Alloc(), XrdLink::Alloc(), and Connect().

void XrdNet::unBind (  ) 

Definition at line 272 of file XrdNet.cc.

References BuffQ, close, iofd, and Portnum.

Referenced by Bind(), and ~XrdNet().

int XrdNet::WSize (  ) 

Definition at line 282 of file XrdNet.cc.

References eDest, XrdNetSocket::getWindow(), and iofd.

Referenced by XrdConfig::Setup().

int XrdNet::do_Accept_TCP ( XrdNetPeer myPeer,
int  opts 
) [private]

Definition at line 297 of file XrdNet.cc.

References XrdNetSecurity::Authorize(), close, eDest, XrdSysError::Emsg(), XrdNetPeer::fd, free(), XrdNetDNS::getHostID(), XrdNetDNS::getHostName(), XrdNetPeer::InetAddr, XrdNetPeer::InetName, iofd, netOpts, Police, XrdNetSocket::setOpts(), SOCKLEN_t, and XRDNET_NORLKUP.

Referenced by Accept().

int XrdNet::do_Accept_UDP ( XrdNetPeer myPeer,
int  opts 
) [private]

Definition at line 346 of file XrdNet.cc.

References XrdNetBufferQ::Alloc(), XrdNetSecurity::Authorize(), BuffQ, BuffSize, XrdNetBuffer::data, eDest, XrdSysError::Emsg(), XrdNetPeer::fd, free(), XrdNetDNS::getHostID(), XrdNetDNS::getHostName(), XrdNetPeer::InetAddr, XrdNetPeer::InetBuff, XrdNetPeer::InetName, iofd, XrdNetDNS::isLoopback(), Police, XrdNetBufferQ::Recycle(), XrdNetBuffer::Recycle(), SOCKLEN_t, Sokdata_t, XRDNET_NEWFD, and XRDNET_NORLKUP.

Referenced by Accept().


Member Data Documentation

XrdSysError* XrdNet::eDest [protected]

Definition at line 132 of file XrdNet.hh.

Referenced by Accept(), XrdInet::Accept(), XrdNetWork::Accept(), Bind(), XrdInet::Connect(), XrdNetWork::Connect(), Connect(), do_Accept_TCP(), do_Accept_UDP(), XrdNetWork::Relay(), WSize(), and XrdNet().

XrdNetSecurity* XrdNet::Police [protected]

Definition at line 133 of file XrdNet.hh.

Referenced by do_Accept_TCP(), do_Accept_UDP(), Secure(), and XrdNet().

char* XrdNet::Domain [protected]

Definition at line 134 of file XrdNet.hh.

Referenced by Accept(), Connect(), setDomain(), Trim(), XrdNet(), and ~XrdNet().

int XrdNet::Domlen [protected]

Definition at line 135 of file XrdNet.hh.

Referenced by setDomain(), Trim(), and XrdNet().

int XrdNet::iofd [protected]

Definition at line 136 of file XrdNet.hh.

Referenced by Accept(), XrdInet::Accept(), XrdNetWork::Accept(), Bind(), XrdInet::Connect(), do_Accept_TCP(), do_Accept_UDP(), XrdNetWork::Relay(), unBind(), WSize(), and XrdNet().

int XrdNet::Portnum [protected]

Definition at line 137 of file XrdNet.hh.

Referenced by Bind(), Port(), unBind(), and XrdNet().

int XrdNet::PortType [protected]

Definition at line 138 of file XrdNet.hh.

Referenced by Accept(), Bind(), and XrdNet().

int XrdNet::Windowsz [protected]

Definition at line 139 of file XrdNet.hh.

Referenced by Bind(), Connect(), setDefaults(), and XrdNet().

int XrdNet::netOpts [protected]

Definition at line 140 of file XrdNet.hh.

Referenced by XrdInet::Accept(), Bind(), Connect(), do_Accept_TCP(), setDefaults(), and XrdNet().

int XrdNet::BuffSize [protected]

Definition at line 141 of file XrdNet.hh.

Referenced by Bind(), and do_Accept_UDP().

XrdNetBufferQ* XrdNet::BuffQ [protected]

Definition at line 142 of file XrdNet.hh.

Referenced by XrdNetWork::Accept(), Bind(), XrdNetWork::Connect(), do_Accept_UDP(), XrdNetWork::Relay(), unBind(), and XrdNet().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:35 2011 for ROOT_528-00b_version by  doxygen 1.5.1