![]() |
XRootD
|
#include <XrdOucCRC.hh>
Public Member Functions | |
XrdOucCRC () | |
~XrdOucCRC () | |
Static Public Member Functions | |
static void | Calc32C (const void *data, size_t count, uint32_t *csval) |
static uint32_t | Calc32C (const void *data, size_t count, uint32_t prevcs=0) |
static uint32_t | CRC32 (const unsigned char *data, int count) |
static bool | Ver32C (const void *data, size_t count, const uint32_t *csval, bool *valok) |
static int | Ver32C (const void *data, size_t count, const uint32_t *csval, uint32_t &valcs) |
static bool | Ver32C (const void *data, size_t count, const uint32_t *csval, uint32_t *valcs) |
static bool | Ver32C (const void *data, size_t count, const uint32_t csval, uint32_t *csbad=0) |
Definition at line 38 of file XrdOucCRC.hh.
|
inline |
Definition at line 150 of file XrdOucCRC.hh.
|
inline |
Definition at line 151 of file XrdOucCRC.hh.
|
static |
Compute a CRC32C page checksums using hardware assist if available.
data | Pointer to the data whose checksum it to be computed. |
count | The number of bytes pointed to by data. |
csval | Pointer to a vector to hold individual page checksums. The vector must be sized: (count/XrdSys::PageSize + (countXrdSys::PageSize != 0)). On return, each element of csval holds the checksum for the associated page. |
Definition at line 200 of file XrdOucCRC.cc.
References crc32c(), and XrdSys::PageSize.
|
static |
Compute a CRC32C checksum using hardware assist if available.
data | Pointer to the data whose checksum it to be computed. |
count | The number of bytes pointed to by data. |
prevcs | The previous checksum value. The initial checksum of checksum sequence should be zero, the default. |
Definition at line 190 of file XrdOucCRC.cc.
References crc32c().
Referenced by XrdOfsCPFile::Append(), XrdOssCsiPages::apply_sequential_aligned_modify(), XrdOssCsiPages::BasicConsistencyCheck(), XrdXrootdPgwBadCS::boInfo(), XrdOssCsiCrcUtils::crc32c_combine(), XrdOssCsiCrcUtils::crc32c_extendwith_zero(), XrdOssCsiCrcUtils::crc32c_split2(), XrdOfsCPFile::Create(), XrdOucPgrwUtils::csCalc(), XrdOssCsiPages::FetchRangeAligned(), XrdOssCsiPages::FetchRangeUnaligned(), XrdOssCsiPages::FetchRangeUnaligned_postblock(), XrdOssCsiPages::FetchRangeUnaligned_preblock(), XrdCl::PgReadSubstitutionHandler::HandleResponse(), XrdCl::EcPgReadResponseHandler::HandleResponse(), main(), XrdOssCsiTagstoreFile::Open(), XrdOssCsiPages::pgDoCalc(), XrdOssCsiPages::StoreRangeUnaligned_postblock(), XrdOssCsiPages::StoreRangeUnaligned_preblock(), XrdOssCsiPages::truncate(), XrdCl::XRootDTransport::UnMarchalStatusMore(), XrdCl::XRootDTransport::UnMarshalStatusBody(), and XrdCksCalccrc32C::Update().
|
static |
Compute a CRC32 checksum.
data | Pointer to the data whose checksum it to be computed. |
count | The number of bytes pointed to by data. |
Definition at line 171 of file XrdOucCRC.cc.
Referenced by XrdOfsHanKey::XrdOfsHanKey(), XrdOucReqID::XrdOucReqID(), XrdOucReqID::Index(), and XrdCmsKey::setHash().
|
static |
Verify a CRC32C page checksums using hardware assist if available.
data | Pointer to the data whose checksum it to be verified. |
count | The number of bytes pointed to by data. |
csval | Pointer to a vector of expected page checksums. The vector must be sized (count/PageSize+(countPageSize != 0)). |
valok | Pointer to a vector of the same size as csval to hold the results of the comparison (true matches, o/w false). |
Definition at line 274 of file XrdOucCRC.cc.
References crc32c(), and XrdSys::PageSize.
|
static |
Verify a CRC32C page checksums using hardware assist if available.
data | Pointer to the data whose checksum it to be verified. |
count | The number of bytes pointed to by data. |
csval | Pointer to a vector of expected page checksums. The vector must be sized: (count/XrdSys::PageSize + (countXrdSys::PageSize != 0)). |
valcs | Where the computed checksum is returned for the page whose verification failed; otherwise it is untouched. |
Definition at line 236 of file XrdOucCRC.cc.
References crc32c(), and XrdSys::PageSize.
|
static |
Verify a CRC32C page checksums using hardware assist if available.
data | Pointer to the data whose checksum it to be verified. |
count | The number of bytes pointed to by data. |
csval | Pointer to a vector of expected page checksums. The vector must be sized (count/PageSize+(countPageSize != 0)). |
valcs | Pointer to a vector of the same size as csval to hold the computed checksum. |
Definition at line 309 of file XrdOucCRC.cc.
References crc32c(), and XrdSys::PageSize.
|
static |
Verify a CRC32C checksum using hardware assist if available.
data | Pointer to the data whose checksum it to be verified. |
count | The number of bytes pointed to by data. |
csval | The expected checksum. |
csbad | If csbad is not nil, the computed checksum is returned. |
Definition at line 222 of file XrdOucCRC.cc.
References crc32c().
Referenced by XrdOucPgrwUtils::csVer(), XrdOssCsiPages::pgWritePrelockCheck(), and XrdOfsCPFile::RestoreInfo().