#include <XrdOucPgrwUtils.hh>
|
| static void | csCalc (const char *data, ssize_t offs, size_t count, uint32_t *csval) |
| |
| static int | csNum (ssize_t offs, size_t count) |
| | Compute the required size of a checksum vector based on offset & length. More...
|
| |
| static int | csVer (const char *data, ssize_t offs, size_t count, const uint32_t *csval, ssize_t &bado, size_t &badc) |
| |
| XrdOucPgrwUtils::XrdOucPgrwUtils |
( |
| ) |
|
|
inline |
| XrdOucPgrwUtils::~XrdOucPgrwUtils |
( |
| ) |
|
|
inline |
| static void XrdOucPgrwUtils::csCalc |
( |
const char * |
data, |
|
|
ssize_t |
offs, |
|
|
size_t |
count, |
|
|
uint32_t * |
csval |
|
) |
| |
|
static |
Compute a CRC32C checksums for a pgRead request.
- Parameters
-
| data | Pointer to the data whose checksum it to be computed. |
| offs | The offset at which the read or write occurs. |
| count | The number of bytes pointed to by data. |
| csval | Pointer to a vector to hold individual page checksums. The vector must be sized as computed by csNum(). |
| asnbo | Return checksum values in network bytes order. |
- Returns
- Each element of csval holds the checksum for the associated page.
| static int XrdOucPgrwUtils::csNum |
( |
ssize_t |
offs, |
|
|
size_t |
count |
|
) |
| |
|
static |
Compute the required size of a checksum vector based on offset & length.
- Parameters
-
| offs | The offset at which the read or write occurs. |
| count | The number of bytes read or to write. |
- Returns
- The number of checksums that are needed.
| static int XrdOucPgrwUtils::csVer |
( |
const char * |
data, |
|
|
ssize_t |
offs, |
|
|
size_t |
count, |
|
|
const uint32_t * |
csval, |
|
|
ssize_t & |
bado, |
|
|
size_t & |
badc |
|
) |
| |
|
static |
Verify CRC32C checksums for a pgWrite request.
- Parameters
-
| data | Pointer to the data whose checksum it to be verified. |
| offs | The offset at which the read or write occurs. |
| count | The number of bytes pointed to by data. |
| csval | Pointer to a vector of expected page checksums. The vector must be sized as returned by csNum(). |
| bado | The offset in error when return > 0. |
| badc | The length of erroneous data at bado. |
- Returns
- 0 if all the checksums match. Otherwise, the index+1 in the checksum vector containing the bad checksum (i.e. resumption point).
The documentation for this class was generated from the following file: