xrootd
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
XrdOucPgrwUtils Class Reference

#include <XrdOucPgrwUtils.hh>

Classes

struct  dataInfo
 
struct  Layout
 Compute the layout for an iovec that receives network bytes applying. More...
 

Public Member Functions

 XrdOucPgrwUtils ()
 
 ~XrdOucPgrwUtils ()
 

Static Public Member Functions

static void csCalc (const char *data, off_t offs, size_t count, uint32_t *csval)
 
static void csCalc (const char *data, off_t offs, size_t count, std::vector< uint32_t > &csvec)
 
static int csNum (off_t offs, int count)
 Compute the required size of a checksum vector based on offset & length.
 
static int csNum (off_t offs, int count, int &fLen, int &lLen)
 Compute the required size of a checksum vector based on offset & length.
 
static bool csVer (dataInfo &dInfo, off_t &bado, int &badc)
 
static int recvLayout (Layout &layout, off_t offs, int dlen, int bsz=0)
 
static int sendLayout (Layout &layout, off_t offs, int dlen, int bsz=0)
 

Constructor & Destructor Documentation

◆ XrdOucPgrwUtils()

XrdOucPgrwUtils::XrdOucPgrwUtils ( )
inline

◆ ~XrdOucPgrwUtils()

XrdOucPgrwUtils::~XrdOucPgrwUtils ( )
inline

Member Function Documentation

◆ csCalc() [1/2]

static void XrdOucPgrwUtils::csCalc ( const char *  data,
off_t  offs,
size_t  count,
std::vector< uint32_t > &  csvec 
)
static

◆ csCalc() [2/2]

static void XrdOucPgrwUtils::csCalc ( const char *  data,
off_t  offs,
size_t  count,
uint32_t *  csval 
)
static

Compute a CRC32C checksums for a pgRead/pgWrite request.

Parameters
dataPointer to the data whose checksum it to be computed.
offsThe offset at which the read or write occurs.
countThe number of bytes pointed to by data.
csvalPointer to a vector to hold individual page checksums. The raw vector must be sized as computed by csNum(). When passed an std::vector, it is done automatically. On return, each element of csval holds the checksum for the associated page.

Referenced by XrdCl::EcHandler::PgWrite().

◆ csNum() [1/2]

static int XrdOucPgrwUtils::csNum ( off_t  offs,
int  count 
)
static

Compute the required size of a checksum vector based on offset & length.

Parameters
offsThe offset at which the read or write occurs.
countThe number of bytes read or to write.
Returns
The number of checksums that are needed.

Referenced by XrdCl::AsyncPageReader::AsyncPageReader(), and XrdCl::XRootDMsgHandler::XRootDMsgHandler().

◆ csNum() [2/2]

static int XrdOucPgrwUtils::csNum ( off_t  offs,
int  count,
int &  fLen,
int &  lLen 
)
static

Compute the required size of a checksum vector based on offset & length.

and last segments required in the iov vector.

Parameters
offsThe offset at which the read or write occurs.
countThe number of bytes read or to write excluding checksums.
fLenThe number of bytes needed in iov[0].iov_length
lLenThe number of bytes needed in iov[csnum-1].iov_length
Returns
The number of checksums that are needed.

◆ csVer()

static bool XrdOucPgrwUtils::csVer ( dataInfo dInfo,
off_t &  bado,
int &  badc 
)
static

◆ recvLayout()

static int XrdOucPgrwUtils::recvLayout ( Layout layout,
off_t  offs,
int  dlen,
int  bsz = 0 
)
static

◆ sendLayout()

static int XrdOucPgrwUtils::sendLayout ( Layout layout,
off_t  offs,
int  dlen,
int  bsz = 0 
)
static

The documentation for this class was generated from the following file: