XrdPosixXrootd Class Reference

POSIX interface to XRootD with some extensions, as noted. More...

#include <XrdPosixXrootd.hh>

List of all members.

Public Member Functions

int fdOrigin ()
 XrdPosixXrootd (int maxfd=255, int maxdir=0, int maxthr=0)
 ~XrdPosixXrootd ()

Static Public Member Functions

static int Access (const char *path, int amode)
 Access() conforms to POSIX.1-2001 access().
static int Close (int fildes)
 Close() conforms to POSIX.1-2001 close().
static int Closedir (DIR *dirp)
 Closedir() conforms to POSIX.1-2001 closedir().
static int endPoint (int FD, char *Buff, int Blen)
static int Fstat (int fildes, struct stat *buf)
 Fstat() conforms to POSIX.1-2001 fstat().
static int Fsync (int fildes)
 Fsync() conforms to POSIX.1-2001 fsync().
static void Fsync (int fildes, XrdPosixCallBackIO *cbp)
static int Ftruncate (int fildes, off_t offset)
 Ftruncate() conforms to POSIX.1-2001 ftruncate().
static long long Getxattr (const char *path, const char *name, void *value, unsigned long long size)
static off_t Lseek (int fildes, off_t offset, int whence)
 Lseek() conforms to POSIX.1-2001 lseek().
static int Mkdir (const char *path, mode_t mode)
 Mkdir() conforms to POSIX.1-2001 mkdir().
static int Open (const char *path, int oflag, mode_t mode=0, XrdPosixCallBack *cbP=0)
static DIR * Opendir (const char *path)
 Opendir() conforms to POSIX.1-2001 opendir().
static ssize_t Pread (int fildes, void *buf, size_t nbyte, off_t offset)
 Pread() conforms to POSIX.1-2001 pread().
static void Pread (int fildes, void *buf, size_t nbyte, off_t offset, XrdPosixCallBackIO *cbp)
static ssize_t Pwrite (int fildes, const void *buf, size_t nbyte, off_t offset)
 Pwrite() conforms to POSIX.1-2001 pwrite().
static void Pwrite (int fildes, const void *buf, size_t nbyte, off_t offset, XrdPosixCallBackIO *cbp)
static int QueryChksum (const char *path, time_t &mtime, char *buff, int blen)
static long long QueryOpaque (const char *path, char *buff, int blen)
static ssize_t Read (int fildes, void *buf, size_t nbyte)
 Read() conforms to POSIX.1-2001 read().
static ssize_t Readv (int fildes, const struct iovec *iov, int iovcnt)
 Readv() conforms to POSIX.1-2001 readv().
static struct dirent * Readdir (DIR *dirp)
static struct dirent64 * Readdir64 (DIR *dirp)
static int Readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
static int Readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
static int Rename (const char *oldpath, const char *newpath)
 Rename() conforms to POSIX.1-2001 rename().
static void Rewinddir (DIR *dirp)
 Rewinddir() conforms to POSIX.1-2001 rewinddir().
static int Rmdir (const char *path)
 Rmdir() conforms to POSIX.1-2001 rmdir().
static void Seekdir (DIR *dirp, long loc)
 Seekdir() conforms to POSIX.1-2001 seekdir().
static int Stat (const char *path, struct stat *buf)
 Stat() conforms to POSIX.1-2001 stat().
static int Statfs (const char *path, struct statfs *buf)
static int Statvfs (const char *path, struct statvfs *buf)
 Statvfs() conforms to POSIX.1-2001 statvfs().
static long Telldir (DIR *dirp)
 Telldir() conforms to POSIX.1-2001 telldir().
static int Truncate (const char *path, off_t offset)
 Telldir() conforms to POSIX.1-2001 telldir().
static int Unlink (const char *path)
 Unlink() conforms to POSIX.1-2001 unlink().
static void VRead (int fildes, const XrdOucIOVec *readV, int n, XrdPosixCallBackIO *cbp)
static ssize_t VRead (int fildes, const XrdOucIOVec *readV, int n)
static ssize_t Write (int fildes, const void *buf, size_t nbyte)
 Write() conforms to POSIX.1-2001 write().
static ssize_t Writev (int fildes, const struct iovec *iov, int iovcnt)
 Writev() conforms to POSIX.1-2001 writev().
static bool isXrootdDir (DIR *dirp)
static bool myFD (int fd)
static void setCache (XrdOucCache *cP)
static void setCache (XrdOucCache2 *cP)
static void setDebug (int val, bool doDebug=false)
static void setEnv (const char *kword, int kval)
static void setIPV4 (bool userv4)
static void setLogger (XrdSysLogger *logP)
static void setNumCB (int numcb)
static void setN2N (XrdOucName2Name *pN2N, int opts=0)
static void setSched (XrdScheduler *sP)

Static Public Attributes

static const int isStream = 0x40000000

Static Private Member Functions

static int Fault (XrdPosixFile *fp, int ecode)
static void initStat (struct stat *buf)
static void initXdev (dev_t &st_dev, dev_t &st_rdev)

Static Private Attributes

static int baseFD
static int initDone

Detailed Description

POSIX interface to XRootD with some extensions, as noted.


Constructor & Destructor Documentation

XrdPosixXrootd::XrdPosixXrootd ( int  maxfd = 255,
int  maxdir = 0,
int  maxthr = 0 
)
XrdPosixXrootd::~XrdPosixXrootd (  ) 

Member Function Documentation

static int XrdPosixXrootd::Access ( const char *  path,
int  amode 
) [static]

Access() conforms to POSIX.1-2001 access().

static int XrdPosixXrootd::Close ( int  fildes  )  [static]

Close() conforms to POSIX.1-2001 close().

static int XrdPosixXrootd::Closedir ( DIR *  dirp  )  [static]

Closedir() conforms to POSIX.1-2001 closedir().

static int XrdPosixXrootd::endPoint ( int  FD,
char *  Buff,
int  Blen 
) [static]

endPoint() is a POSIX extension and returns the location of an open file.

Parameters:
FD File descriptor of an open file in question.
Buff Pointer to the buffer to receive '<host>:<port>' of the server.
Blen Size of the buffer, it must be big enough for the result.
Returns:
>= 0 The numeric port number of the data server.
-1 Call failed, errno has the reason.
static int XrdPosixXrootd::Fault ( XrdPosixFile fp,
int  ecode 
) [static, private]
int XrdPosixXrootd::fdOrigin (  )  [inline]

The following methods are considered private but defined as public to allow XrdPosix 'C' functions and XrdPss classes access private members.

References baseFD.

static int XrdPosixXrootd::Fstat ( int  fildes,
struct stat *  buf 
) [static]

Fstat() conforms to POSIX.1-2001 fstat().

static void XrdPosixXrootd::Fsync ( int  fildes,
XrdPosixCallBackIO cbp 
) [static]
static int XrdPosixXrootd::Fsync ( int  fildes  )  [static]

Fsync() conforms to POSIX.1-2001 fsync().

static int XrdPosixXrootd::Ftruncate ( int  fildes,
off_t  offset 
) [static]

Ftruncate() conforms to POSIX.1-2001 ftruncate().

static long long XrdPosixXrootd::Getxattr ( const char *  path,
const char *  name,
void *  value,
unsigned long long  size 
) [static]

Getxattr() is a POSIX extension and conforms to Linux 2.4 getxattr(). This method returns attributes associated with a file. The format does not correspond to information returned by Linux. Refer to the XRootD protocol reference for the detailed description of the information returned.

Parameters:
path pointer to the path whose attributes are to be returned
name name of the attribute to be returned. Valid attributes are xrootd.cksum - file's checksum xrootd.space - space associated with the path xrootd.xattr - server specific extended attributes for path
value pointer to the buffer to receive the attribute values.
size size of the buffer (value). If size is zero, only the maximum length of the attribute value is returned.
Returns:
On success, a positive number is returned indicating the size of is extended attribute value. On failure, -1 is returned and errno is set to indicate the reason. ----------------------------------------------------------------------------
static void XrdPosixXrootd::initStat ( struct stat *  buf  )  [static, private]
static void XrdPosixXrootd::initXdev ( dev_t &  st_dev,
dev_t &  st_rdev 
) [static, private]
static bool XrdPosixXrootd::isXrootdDir ( DIR *  dirp  )  [static]
static off_t XrdPosixXrootd::Lseek ( int  fildes,
off_t  offset,
int  whence 
) [static]

Lseek() conforms to POSIX.1-2001 lseek().

static int XrdPosixXrootd::Mkdir ( const char *  path,
mode_t  mode 
) [static]

Mkdir() conforms to POSIX.1-2001 mkdir().

static bool XrdPosixXrootd::myFD ( int  fd  )  [static]
static int XrdPosixXrootd::Open ( const char *  path,
int  oflag,
mode_t  mode = 0,
XrdPosixCallBack cbP = 0 
) [static]
static DIR* XrdPosixXrootd::Opendir ( const char *  path  )  [static]

Opendir() conforms to POSIX.1-2001 opendir().

static void XrdPosixXrootd::Pread ( int  fildes,
void *  buf,
size_t  nbyte,
off_t  offset,
XrdPosixCallBackIO cbp 
) [static]
static ssize_t XrdPosixXrootd::Pread ( int  fildes,
void *  buf,
size_t  nbyte,
off_t  offset 
) [static]

Pread() conforms to POSIX.1-2001 pread().

static void XrdPosixXrootd::Pwrite ( int  fildes,
const void *  buf,
size_t  nbyte,
off_t  offset,
XrdPosixCallBackIO cbp 
) [static]
static ssize_t XrdPosixXrootd::Pwrite ( int  fildes,
const void *  buf,
size_t  nbyte,
off_t  offset 
) [static]

Pwrite() conforms to POSIX.1-2001 pwrite().

static int XrdPosixXrootd::QueryChksum ( const char *  path,
time_t &  mtime,
char *  buff,
int  blen 
) [static]

QueryChksum() is a POSIX extension and returns a file's modification time and its associated checksum value.

Parameters:
path path associated with the file whose checksum is wanted.
mtime where the file's modification time (st_mtime) is placed.
buff pointer to the buffer to hold the checksum value.
blen the length of the buffer.
Returns:
Upon success returns the length of the checksum response placed in buff. Otherwise, -1 is returned and errno appropriately set.
static long long XrdPosixXrootd::QueryOpaque ( const char *  path,
char *  buff,
int  blen 
) [static]

QueryOpaque() is a POSIX extension and returns a file's implementation specific information.

Parameters:
path path associated with the file whose information is wanted.
buff pointer to the buffer to hold the information.
blen the length of the buffer.
Returns:
Upon success returns the length of the checksum response placed in buff. Otherwise, -1 is returned and errno appropriately set.
static ssize_t XrdPosixXrootd::Read ( int  fildes,
void *  buf,
size_t  nbyte 
) [static]

Read() conforms to POSIX.1-2001 read().

static struct dirent* XrdPosixXrootd::Readdir ( DIR *  dirp  )  [static, read]

readdir() conforms to POSIX.1-2001 readdir() and is normally equivalent to readdir64(). The latter is provided for those platforms that require a specific 64-bit interface to directory information, which is now rare.

static struct dirent64* XrdPosixXrootd::Readdir64 ( DIR *  dirp  )  [static, read]
static int XrdPosixXrootd::Readdir64_r ( DIR *  dirp,
struct dirent64 *  entry,
struct dirent64 **  result 
) [static]
static int XrdPosixXrootd::Readdir_r ( DIR *  dirp,
struct dirent *  entry,
struct dirent **  result 
) [static]

readdir_r() conforms to POSIX.1-2001 readdir_r() and is normally equivalent to readdir64_r(). The latter is provided for those platforms that require a specific 64-bit interface to directory information, which is now rare.

static ssize_t XrdPosixXrootd::Readv ( int  fildes,
const struct iovec *  iov,
int  iovcnt 
) [static]

Readv() conforms to POSIX.1-2001 readv().

static int XrdPosixXrootd::Rename ( const char *  oldpath,
const char *  newpath 
) [static]

Rename() conforms to POSIX.1-2001 rename().

static void XrdPosixXrootd::Rewinddir ( DIR *  dirp  )  [static]

Rewinddir() conforms to POSIX.1-2001 rewinddir().

static int XrdPosixXrootd::Rmdir ( const char *  path  )  [static]

Rmdir() conforms to POSIX.1-2001 rmdir().

static void XrdPosixXrootd::Seekdir ( DIR *  dirp,
long  loc 
) [static]

Seekdir() conforms to POSIX.1-2001 seekdir().

static void XrdPosixXrootd::setCache ( XrdOucCache2 cP  )  [static]
static void XrdPosixXrootd::setCache ( XrdOucCache cP  )  [static]
static void XrdPosixXrootd::setDebug ( int  val,
bool  doDebug = false 
) [static]
static void XrdPosixXrootd::setEnv ( const char *  kword,
int  kval 
) [static]
static void XrdPosixXrootd::setIPV4 ( bool  userv4  )  [static]
static void XrdPosixXrootd::setLogger ( XrdSysLogger logP  )  [static]
static void XrdPosixXrootd::setN2N ( XrdOucName2Name pN2N,
int  opts = 0 
) [static]
static void XrdPosixXrootd::setNumCB ( int  numcb  )  [static]
static void XrdPosixXrootd::setSched ( XrdScheduler sP  )  [static]
static int XrdPosixXrootd::Stat ( const char *  path,
struct stat *  buf 
) [static]

Stat() conforms to POSIX.1-2001 stat().

static int XrdPosixXrootd::Statfs ( const char *  path,
struct statfs *  buf 
) [static]

Statfs() generally conforms to the platform-specific definition of statfs(). There is no specific POSIX specification for this call.

static int XrdPosixXrootd::Statvfs ( const char *  path,
struct statvfs *  buf 
) [static]

Statvfs() conforms to POSIX.1-2001 statvfs().

static long XrdPosixXrootd::Telldir ( DIR *  dirp  )  [static]

Telldir() conforms to POSIX.1-2001 telldir().

static int XrdPosixXrootd::Truncate ( const char *  path,
off_t  offset 
) [static]

Telldir() conforms to POSIX.1-2001 telldir().

static int XrdPosixXrootd::Unlink ( const char *  path  )  [static]

Unlink() conforms to POSIX.1-2001 unlink().

static ssize_t XrdPosixXrootd::VRead ( int  fildes,
const XrdOucIOVec readV,
int  n 
) [static]
static void XrdPosixXrootd::VRead ( int  fildes,
const XrdOucIOVec readV,
int  n,
XrdPosixCallBackIO cbp 
) [static]

VRead() is a POSIX extension and allows one to read multiple chunks of a file in one operation.

Parameters:
fildes file descriptor of a file opened for reading.
readV the read vector of offset/length/buffer triplets. Data at each offset of the specifiued length is placed in buffer.
n the number of elements in the readV vector.
cbp pointer to the callback object for async execution.
Returns:
Upon success returns the total number of bytes read. Otherwise, -1 is returned and errno is appropriately set.
static ssize_t XrdPosixXrootd::Write ( int  fildes,
const void *  buf,
size_t  nbyte 
) [static]

Write() conforms to POSIX.1-2001 write().

static ssize_t XrdPosixXrootd::Writev ( int  fildes,
const struct iovec *  iov,
int  iovcnt 
) [static]

Writev() conforms to POSIX.1-2001 writev().


Member Data Documentation

int XrdPosixXrootd::baseFD [static, private]

Referenced by fdOrigin().

int XrdPosixXrootd::initDone [static, private]
const int XrdPosixXrootd::isStream = 0x40000000 [static]

Open() conforms to POSIX.1-2001 open() when extensions are not used.

Extensions:

Parameters:
cbP Pointer to a callback object. When specified, the open is performed in the background and the Comp[lete() is called when the Open() completes. See XrdPosixCallBack.hh for complete details.
Returns:
-1 is always returned when cbP is specified. If the Open() was actually scheduled then errno will contain EINPROGRESS. Otherwise, the Open() immediately failed and errno contains the reason.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Apr 2019 for xrootd by  doxygen 1.6.1