|
xrootd
|
#include <XrdNet.hh>


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) |
| XrdNet::XrdNet | ( | XrdSysError * | erp, |
| XrdNetSecurity * | secp = 0 |
||
| ) |
| int XrdNet::Accept | ( | XrdNetPeer & | myPeer, |
| int | opts = 0, |
||
| int | timeout = -1 |
||
| ) |
References iofd, eDest, XrdSysError::Emsg(), POLLIN, POLLRDNORM, POLLRDBAND, POLLPRI, POLLHUP, poll(), XRDNET_NOEMSG, PortType, do_Accept_TCP(), do_Accept_UDP(), Domain, XRDNET_NODNTRIM, Trim(), and XrdNetPeer::InetName.
Referenced by XrdInet::Accept(), and XrdNetWork::Accept().
| int XrdNet::Bind | ( | int | port, |
| const char * | contype = "tcp" |
||
| ) |
References eDest, opts, XRDNET_SERVER, netOpts, Windowsz, unBind(), PortType, XRDNET_UDPSOCKET, XRDNET_UDPBUFFSZ, XrdNetSocket::Open(), XrdNetSocket::LastError(), iofd, XrdNetSocket::Detach(), Portnum, XrdSysDNS::getPort(), BuffSize, and BuffQ.
Referenced by XrdConfig::Setup().
| int XrdNet::Bind | ( | char * | path, |
| const char * | contype = "stream" |
||
| ) |
| int XrdNet::Connect | ( | XrdNetPeer & | myPeer, |
| const char * | host, | ||
| int | port, | ||
| int | opts = 0, |
||
| int | timeout = -1 |
||
| ) |
References XRDNET_NOEMSG, eDest, Windowsz, netOpts, XRDNET_UDPSOCKET, XRDNET_UDPBUFFSZ, XRDNET_TOUT, XrdNetSocket::Open(), XrdNetPeer::InetName, XrdNetPeer::InetAddr, XrdNetSocket::Peername(), Domain, XRDNET_NODNTRIM, Trim(), XrdNetPeer::fd, and XrdNetSocket::Detach().
Referenced by XrdInet::Connect(), Relay(), XrdNetWork::Connect(), and XrdNetWork::Relay().
| int XrdNet::do_Accept_TCP | ( | XrdNetPeer & | myPeer, |
| int | opts | ||
| ) | [private] |
References SOCKLEN_t, iofd, eDest, XrdSysError::Emsg(), Police, XrdNetSecurity::Authorize(), XrdSysDNS::getHostName(), close, XRDNET_NORLKUP, XrdSysDNS::getHostID(), XrdNetSocket::setOpts(), netOpts, XrdNetPeer::fd, XrdNetPeer::InetAddr, and XrdNetPeer::InetName.
Referenced by Accept().
| int XrdNet::do_Accept_UDP | ( | XrdNetPeer & | myPeer, |
| int | opts | ||
| ) | [private] |
References SOCKLEN_t, BuffQ, XrdNetBufferQ::Alloc(), eDest, XrdSysError::Emsg(), iofd, Sokdata_t, XrdNetBuffer::data, BuffSize, XrdNetBufferQ::Recycle(), XrdSysDNS::isLoopback(), Police, XrdNetSecurity::Authorize(), XrdSysDNS::getHostName(), XRDNET_NORLKUP, XrdSysDNS::getHostID(), XrdNetPeer::fd, XRDNET_NEWFD, XrdNetPeer::InetAddr, XrdNetPeer::InetName, XrdNetPeer::InetBuff, and XrdNetBuffer::Recycle().
Referenced by Accept().
| int XrdNet::Port | ( | ) | [inline] |
References Portnum.
Referenced by XrdgetProtocol(), XrdConfig::Setup(), main(), XrdOucAppleBonjour::RegisterService(), and XrdOucAvahiBonjour::RegisterService().
| int XrdNet::Relay | ( | XrdNetPeer & | Peer, |
| const char * | dest, | ||
| int | opts = 0 |
||
| ) |
References Connect(), and XRDNET_UDPSOCKET.
Referenced by XrdFrmMonitor::Init(), XrdNetMsg::XrdNetMsg(), and XrdXrootdMonitor::Init().
| void XrdNet::Secure | ( | XrdNetSecurity * | secp | ) |
References Police, and XrdNetSecurity::Merge().
Referenced by XrdgetProtocol().
| void XrdNet::setDefaults | ( | int | options, |
| int | buffsz = 0 |
||
| ) | [inline] |
References netOpts, and Windowsz.
Referenced by XrdConfig::Setup().
| void XrdNet::setDomain | ( | const char * | dname | ) | [inline] |
References Domain, and Domlen.
Referenced by XrdConfig::Setup().
| void XrdNet::Trim | ( | char * | hname | ) |
References Domlen, and Domain.
Referenced by XrdLink::Alloc(), Accept(), Connect(), and XrdNetLink::Alloc().
| void XrdNet::unBind | ( | ) |
| int XrdNet::WSize | ( | ) |
References iofd, XrdNetSocket::getWindow(), and eDest.
Referenced by XrdConfig::Setup().
XrdNetBufferQ* XrdNet::BuffQ [protected] |
Referenced by XrdNet(), Bind(), unBind(), do_Accept_UDP(), XrdNetWork::Accept(), XrdNetWork::Connect(), and XrdNetWork::Relay().
int XrdNet::BuffSize [protected] |
Referenced by Bind(), and do_Accept_UDP().
char* XrdNet::Domain [protected] |
int XrdNet::Domlen [protected] |
Referenced by XrdNet(), Trim(), and setDomain().
XrdSysError* XrdNet::eDest [protected] |
Referenced by XrdInet::Accept(), XrdInet::Connect(), XrdNet(), Accept(), Bind(), Connect(), WSize(), do_Accept_TCP(), do_Accept_UDP(), XrdNetWork::Accept(), XrdNetWork::Connect(), and XrdNetWork::Relay().
int XrdNet::iofd [protected] |
Referenced by XrdInet::Accept(), XrdInet::Connect(), XrdNet(), Accept(), Bind(), unBind(), WSize(), do_Accept_TCP(), do_Accept_UDP(), XrdNetWork::Accept(), and XrdNetWork::Relay().
int XrdNet::netOpts [protected] |
Referenced by XrdInet::Accept(), XrdNet(), Bind(), Connect(), do_Accept_TCP(), and setDefaults().
XrdNetSecurity* XrdNet::Police [protected] |
Referenced by XrdNet(), Secure(), do_Accept_TCP(), and do_Accept_UDP().
int XrdNet::Portnum [protected] |
int XrdNet::PortType [protected] |
int XrdNet::Windowsz [protected] |
Referenced by XrdNet(), Bind(), Connect(), and setDefaults().
1.7.5