#include <XrdNet.hh>
Inheritance diagram for XrdNet:
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 | |
XrdSysError * | eDest |
XrdNetSecurity * | Police |
char * | Domain |
int | Domlen |
int | iofd |
int | Portnum |
int | PortType |
int | Windowsz |
int | netOpts |
int | BuffSize |
XrdNetBufferQ * | BuffQ |
Private Member Functions | |
int | do_Accept_TCP (XrdNetPeer &myPeer, int opts) |
int | do_Accept_UDP (XrdNetPeer &myPeer, int opts) |
Definition at line 33 of file XrdNet.hh.
XrdNet::XrdNet | ( | XrdSysError * | erp, | |
XrdNetSecurity * | secp = 0 | |||
) |
XrdNet::~XrdNet | ( | ) |
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 | ) |
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 | ( | ) |
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().
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] |
int XrdNet::Domlen [protected] |
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] |
int XrdNet::PortType [protected] |
int XrdNet::Windowsz [protected] |
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] |
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().