xrootd
Classes | Defines | Typedefs | Functions

XrdWin32.hh File Reference

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <time.h>
#include <direct.h>
#include <sys/types.h>
#include <Winsock2.h>
Include dependency graph for XrdWin32.hh:

Go to the source code of this file.

Classes

struct  pollfd
struct  timezone
struct  iovec
struct  sockaddr_un

Defines

#define POLLIN   0x0001
#define POLLPRI   0x0002
#define POLLOUT   0x0004
#define POLLERR   0x0008
#define POLLHUP   0x0010
#define POLLNVAL   0x0020
#define POLLRDNORM   0x0001
#define POLLWRNORM   0x0002
#define POLLRDBAND   0x0000
#define EMSGSIZE   WSAEMSGSIZE
#define EAFNOSUPPORT   WSAEAFNOSUPPORT
#define EWOULDBLOCK   WSAEWOULDBLOCK
#define ECONNRESET   WSAECONNRESET
#define EINPROGRESS   WSAEINPROGRESS
#define ENOBUFS   WSAENOBUFS
#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
#define ECONNREFUSED   WSAECONNREFUSED
#define EBADFD   WSAENOTSOCK
#define EOPNOTSUPP   WSAEOPNOTSUPP
#define ENETUNREACH   WSAENETUNREACH
#define EHOSTUNREACH   WSAEHOSTUNREACH
#define EHOSTDOWN   WSAEHOSTDOWN
#define EISCONN   WSAEISCONN
#define ECONNABORTED   WSAECONNABORTED
#define ESHUTDOWN   WSAESHUTDOWN
#define ETIMEDOUT   WSAETIMEDOUT
#define ETXTBSY   26
#define WEXITSTATUS(w)   (((w) >> 8) & 0xff)
#define WIFEXITED(w)   (((w) & 0xff) == 0)
#define WTERMSIG(w)   ((w) & 0x7f)
#define WIFSIGNALED(w)   (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
#define S_ISDIR(m)   (((m)&(S_IFMT)) == (S_IFDIR))
#define S_ISREG(m)   (((m)&(S_IFMT)) == (S_IFREG))
#define S_IXUSR   00100
#define S_IRGRP   00040
#define S_IXGRP   00010
#define S_IROTH   00004
#define S_IXOTH   00001
#define S_IRUSR   S_IREAD
#define S_IWUSR   S_IWRITE
#define S_IWGRP   000020
#define S_IWOTH   000002
#define S_IRWXU   0000700
#define S_IRWXG   0000070
#define S_IFIFO   0010000
#define S_ISFIFO(m)   ((m & S_IFMT) == S_IFIFO)
#define S_IFSOCK   0140000
#define _SC_PAGESIZE   1
#define F_GETFL   1
#define F_SETFL   2
#define F_GETFD   4
#define F_SETFD   8
#define FD_CLOEXEC   1
#define O_NDELAY   2
#define O_NONBLOCK   4
#define X_OK   1
#define W_OK   2
#define R_OK   4
#define RTLD_NOW   0x0001
#define STDIN_FILENO   0
#define STDOUT_FILENO   1
#define STDERR_FILENO   2
#define fsync(a)   _commit(a)
#define socklen_t   int
#define SOCKLEN_t   int
#define snprintf   _snprintf
#define localtime_r(_clock, _result)
#define pipe(a)   _pipe(a, 256, O_BINARY)
#define rindex   strrchr
#define sleep(s)   Sleep(s*1000)
#define strtoll(a, b, c)   _strtoi64(a, b, c)
#define ntohll(x)   (((_int64)(ntohl((int)((x << 32) >> 32))) << 32) | (unsigned int)ntohl(((int)(x >> 32))))
#define htonll(x)   ntohll(x)
#define random()   rand()
#define usleep(x)   Sleep(x / 1000)
#define lstat(a, b)   stat(a, b)
#define memalign(a, b)   _aligned_malloc(b, a)
#define setpgid(x, y)
#define fsync(a)   _commit(a)
#define ssize_t   SSIZE_T

Typedefs

typedef char * caddr_t
typedef int pid_t
typedef unsigned int mode_t
typedef unsigned short uint16_t

Functions

int poll (struct pollfd *fds, unsigned int nfds, int timeout)
int lrint (double n)
void gethostbyname_r (const char *inetName, struct hostent *hent, char *buff, int buffsize, struct hostent **hp, int *rc)
void gethostbyaddr_r (char *addr, size_t len, int type, struct hostent *hent, char *buff, size_t buffsize, struct hostent **hp, int *rc)
int getservbyname_r (const char *servname, const char *servtype, struct servent *sent, char *buff, size_t buffsize, struct servent **sp)
int gettimeofday (struct timeval *tp, struct timezone *tzp)
void * dlopen (const char *libPath, int opt)
BOOL dlclose (void *lib)
void * dlsym (void *libHandle, const char *pname)
char * dlerror ()
pid_t fork ()
const char * inet_ntop (int af, const void *src, char *dst, size_t size)
int sysconf (int what)
int fcntl (int fd, int cmd, long arg)
int close (int fd)
int writev (int sock, const struct iovec iov[], int nvecs)
int posix_memalign (void **memptr, size_t alignment, size_t size)
char * index (const char *str, int c)
char * cuserid (char *s)

Define Documentation

#define _SC_PAGESIZE   1
#define EAFNOSUPPORT   WSAEAFNOSUPPORT
#define EBADFD   WSAENOTSOCK
#define ECONNABORTED   WSAECONNABORTED
#define ECONNREFUSED   WSAECONNREFUSED
#define ECONNRESET   WSAECONNRESET
#define EHOSTDOWN   WSAEHOSTDOWN
#define EHOSTUNREACH   WSAEHOSTUNREACH
#define EINPROGRESS   WSAEINPROGRESS
#define EISCONN   WSAEISCONN
#define EMSGSIZE   WSAEMSGSIZE
#define ENETUNREACH   WSAENETUNREACH
#define ENOBUFS   WSAENOBUFS
#define EOPNOTSUPP   WSAEOPNOTSUPP
#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
#define ESHUTDOWN   WSAESHUTDOWN
#define ETIMEDOUT   WSAETIMEDOUT
#define ETXTBSY   26
#define EWOULDBLOCK   WSAEWOULDBLOCK
#define F_GETFD   4
#define F_GETFL   1
#define F_SETFD   8
#define F_SETFL   2
#define FD_CLOEXEC   1
#define fsync (   a)    _commit(a)
#define fsync (   a)    _commit(a)
#define htonll (   x)    ntohll(x)
#define localtime_r (   _clock,
  _result 
)
#define lstat (   a,
 
)    stat(a, b)
#define memalign (   a,
 
)    _aligned_malloc(b, a)
#define ntohll (   x)    (((_int64)(ntohl((int)((x << 32) >> 32))) << 32) | (unsigned int)ntohl(((int)(x >> 32))))
#define O_NDELAY   2

Referenced by XrdNetConnect::Connect().

#define O_NONBLOCK   4
#define pipe (   a)    _pipe(a, 256, O_BINARY)
#define POLLERR   0x0008
#define POLLHUP   0x0010
#define POLLIN   0x0001
#define POLLNVAL   0x0020
#define POLLOUT   0x0004
#define POLLPRI   0x0002
#define POLLRDBAND   0x0000
#define POLLRDNORM   0x0001
#define POLLWRNORM   0x0002
#define R_OK   4
#define random ( )    rand()

Referenced by Think(), and XrdSecProtocolsslInit().

#define rindex   strrchr
#define RTLD_NOW   0x0001
#define S_IFIFO   0010000
#define S_IFSOCK   0140000
#define S_IRGRP   00040
#define S_IROTH   00004
#define S_IRUSR   S_IREAD
#define S_IRWXG   0000070
#define S_IRWXU   0000700
#define S_ISDIR (   m)    (((m)&(S_IFMT)) == (S_IFDIR))
#define S_ISFIFO (   m)    ((m & S_IFMT) == S_IFIFO)
#define S_ISREG (   m)    (((m)&(S_IFMT)) == (S_IFREG))
#define S_IWGRP   000020
#define S_IWOTH   000002
#define S_IWUSR   S_IWRITE
#define S_IXGRP   00010
#define S_IXOTH   00001
#define S_IXUSR   00100
#define setpgid (   x,
 
)

Referenced by XrdOucStream::Exec().

#define sleep (   s)    Sleep(s*1000)
#define snprintf   _snprintf

Referenced by XrdOucBonjourRecord::AddTXTRecord(), XrdXrootdProtocol::aio_Error(), XrdSecProtocolunix::Authenticate(), XrdSecProtocolkrb5::Authenticate(), XrdSecProtocolkrb4::Authenticate(), XrdPssSys::buildHdr(), XrdOssSys::Config_Display(), XrdOfs::Config_Display(), XrdAccConfig::ConfigDB(), XrdSecServer::ConfigFile(), XrdAccConfig::ConfigFile(), XrdCmsManTree::Connect(), XrdSecProtocolsss::Decode(), XrdAccAudit::Deny(), XrdSysFAttr::Diagnose(), XrdOssMio::Display(), XrdXrootdProtocol::do_Dirlist(), XrdCmsNode::do_Load(), XrdXrootdAdmin::do_Login(), XrdXrootdProtocol::do_Open(), XrdClientConn::DoLogin(), XrdSysError::Emsg(), XrdSfsNative::Emsg(), XrdOfs::Emsg(), XrdBwm::Emsg(), XrdPosixXrootd::endPoint(), XrdSutPFile::Err(), XrdBwmLogger::Event(), XrdFrmTransfer::Fetch(), XrdOucUtils::fmtBytes(), XrdSecsssKT::genFN(), XrdSecProtocolkrb4::getCredentials(), XrdCryptoFactory::GetCryptoFactory(), XrdClientConn::GetSessionID(), XrdOssSys::getStats(), XrdClientInputBuffer::GetSyncObjOrMakeOne(), XrdAccAudit::Grant(), XrdOucReqID::ID(), XrdStats::InfoStats(), XrdSecProtocolkrb5::Init(), XrdNetDNS::IP2String(), XrdOucReqID::isMine(), XrdSecPManager::ldPO(), XrdXrootdPrepare::List(), XrdOssCache::List(), XrdOssSys::List_Path(), XrdXrootdPrepare::Log(), XrdPollPoll::LogEvent(), XrdPssSys::P2URL(), XrdXrootdProtocol::PidFile(), XrdOucUtils::PidFile(), XrdCmsConfig::PidFile(), XrdOucBonjourNode::Print(), XrdStats::ProcStats(), XrdSecProtocolpwd::QueryCreds(), XrdSecProtocolpwd::QueryUser(), XrdXrootdProtocol::Recycle(), XrdOssSys::Rename(), XrdXrootdProtocol::rpEmsg(), XrdSysTimer::s2hms(), XrdCmsCluster::Select(), XrdXrootdAdmin::sendErr(), XrdXrootdAioReq::sendError(), XrdXrootdAdmin::sendOK(), XrdLink::setID(), XrdCmsManTree::setMaxCon(), XrdOfsEvsFormat::SNP(), XrdOfs::Stall(), XrdOssSys::StatFS(), XrdOssSys::StatLS(), XrdXrootdStats::Stats(), XrdStats::Stats(), XrdScheduler::Stats(), XrdRootdProtocol::Stats(), XrdPoll::Stats(), XrdLink::Stats(), XrdCmsCluster::Stats(), XrdBuffManager::Stats(), XrdOssSys::StatXA(), XrdLink::Terminate(), XrdSysLogger::Time(), XrdXrootdProtocol::vpEmsg(), XrdOfs::WaitTime(), and XrdOucReqID::XrdOucReqID().

#define socklen_t   int
#define SOCKLEN_t   int
#define ssize_t   SSIZE_T
#define STDERR_FILENO   2
#define STDIN_FILENO   0
#define STDOUT_FILENO   1
#define strtoll (   a,
  b,
 
)    _strtoi64(a, b, c)
#define usleep (   x)    Sleep(x / 1000)

Referenced by main().

#define W_OK   2
#define WEXITSTATUS (   w)    (((w) >> 8) & 0xff)
#define WIFEXITED (   w)    (((w) & 0xff) == 0)
#define WIFSIGNALED (   w)    (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
#define WTERMSIG (   w)    ((w) & 0x7f)
#define X_OK   1

Typedef Documentation

typedef char* caddr_t
typedef unsigned int mode_t
typedef int pid_t
typedef unsigned short uint16_t

Function Documentation

int close ( int  fd)
char* cuserid ( char *  s)

References getlogin().

Referenced by XrdClientSock::Socks4Handshake().

BOOL dlclose ( void *  lib)
char* dlerror ( )
void* dlopen ( const char *  libPath,
int  opt 
)
void* dlsym ( void *  libHandle,
const char *  pname 
)
int fcntl ( int  fd,
int  cmd,
long  arg 
)
pid_t fork ( )
void gethostbyaddr_r ( char *  addr,
size_t  len,
int  type,
struct hostent *  hent,
char *  buff,
size_t  buffsize,
struct hostent **  hp,
int *  rc 
)
void gethostbyname_r ( const char *  inetName,
struct hostent *  hent,
char *  buff,
int  buffsize,
struct hostent **  hp,
int *  rc 
)

Referenced by XrdNetDNS::getHostAddr().

int getservbyname_r ( const char *  servname,
const char *  servtype,
struct servent *  sent,
char *  buff,
size_t  buffsize,
struct servent **  sp 
)

Referenced by XrdNetDNS::getPort().

int gettimeofday ( struct timeval *  tp,
struct timezone tzp 
)
char* index ( const char *  str,
int  c 
)

Referenced by XrdFrmXfrAgent::Add(), XrdCmsPrepare::Add(), XrdCmsManList::Add(), XrdCnsSsi::AddDel(), XrdCnsSsi::AddFile(), XrdClientVector< T >::BufRealloc(), XrdFrmUtils::chkURL(), XrdFrmConfig::ConfigCmd(), XrdFrmConfig::ConfigOTO(), XrdOssSys::ConfigStageC(), XrdFrmConfig::Configure(), XrdConfig::Configure(), XrdCnsConfig::Configure(), XrdXrootdAdmin::do_Red(), XrdCmsNode::do_Select(), XrdOssPath::Extract(), XrdMpxXml::Format(), XrdOfs::fsctl(), XrdOssPath::genPath(), XrdOssPath::genPFN(), XrdCnsDaemon::getLFN(), XrdSecProtocolsss::getLID(), XrdOucArgs::getopt(), XrdMpxXml::getVars(), getXDate(), XrdNetDNS::Host2Dest(), XrdCmsPrepare::Inform(), XrdCnsLog::isEP(), XrdNetDNS::isMatch(), XrdOucReqID::isMine(), XrdOucStream::isSet(), XrdXrootdPrepare::List(), main(), XrdOucUtils::makePath(), XrdFrmUtils::MapM2O(), XrdCnsLogServer::Massage(), XrdSfsNative::Mkpath(), XrdOssSys::Mkpath(), XrdFrmXfrQueue::Notify(), XrdBwmFile::open(), XrdPssSys::P2URL(), XrdOucMsubs::Parse(), XrdOssCache::Parse(), XrdOfsEvs::Parse(), XrdFrmAdmin::ParseKeep(), XrdFrmAdmin::ParseOwner(), XrdFrmAdmin::ParseSpace(), XrdCmsConfig::PidFile(), XrdOssPath::posCname(), XrdOfsHandle::PoscSet(), XrdCmsReq::Reply_Redirect(), XrdXrootdProtocol::rpCheck(), XrdXrootdPrepare::Scrub(), XrdLinkMatch::Set(), XrdPssSys::T2UID(), XrdLink::Terminate(), XrdFrmTransfer::TrackDC(), XrdOucStream::vSubs(), XrdOfs::xforward(), XrdCmsConfig::xmang(), XrdCmsClientConfig::xmang(), XrdXrootdProtocol::xmon(), XrdFrmConfig::xmon(), XrdPssSys::xorig(), XrdConfig::xprot(), XrdCmsClientMan::XrdCmsClientMan(), XrdCmsNode::XrdCmsNode(), XrdFfsMisc_get_all_urls_real(), XrdFfsMisc_get_current_url(), XrdOucNList::XrdOucNList(), XrdOucStream::XrdOucStream(), XrdPosixXrootPath::XrdPosixXrootPath(), XrdSecProtBind::XrdSecProtBind(), XrdXrootdProtocol::xred(), XrdConfig::xrep(), and XrdCmsConfig::xrmtrt().

const char* inet_ntop ( int  af,
const void *  src,
char *  dst,
size_t  size 
)
int lrint ( double  n) [inline]
int poll ( struct pollfd fds,
unsigned int  nfds,
int  timeout 
) [inline]
int posix_memalign ( void **  memptr,
size_t  alignment,
size_t  size 
)
int sysconf ( int  what)
int writev ( int  sock,
const struct iovec  iov[],
int  nvecs 
)

References iovec::iov_len, and is_socket().