|
xrootd
|
A bunch of useful functions. More...
#include <Utils.hh>
Static Public Member Functions | |
| static bool | CRC32TextToInt (uint32_t &result, const std::string &text) |
| static ssize_t | GetRandomBytes (char *buffer, size_t size) |
| static uint32_t | GetInitialCRC32 () |
| Get initial CRC32 value. More... | |
| static uint32_t | ComputeCRC32 (const void *buffer, uint64_t len) |
| static uint32_t | UpdateCRC32 (uint32_t crc, const void *buffer, uint64_t len) |
| static uint32_t | CombineCRC32 (uint32_t crc1, uint32_t crc2, uint64_t len2) |
A bunch of useful functions.
|
inlinestatic |
Combine two crc32 checksums
| crc1 | checksum of the first data block |
| crc2 | checksum of the second data block |
| len2 | size of the second data block |
Referenced by ThreadingTest::ReadTestFunc().
|
inlinestatic |
Compute crc32 checksum out of a buffer
| buffer | data buffer |
| len | size of the data buffer |
References GetInitialCRC32().
Referenced by XrdClTests::ClientHandler::ClientHandler(), FileTest::ReadTest(), ThreadingTest::ReadTestFunc(), runChild(), SocketHandler::UpdateTransferMap(), FileTest::VectorReadTest(), and FileTest::WriteTest().
|
static |
Convert string representation of a crc checksum to int
| result | the resulting integer |
| text | input sting |
References XrdCl::Utils::splitString().
|
inlinestatic |
Get initial CRC32 value.
Referenced by ComputeCRC32(), and ThreadingTest::ReadTestFunc().
|
static |
Fill the buffer with random data
| buffer | the buffer to be filled |
| size | size of the buffer |
References close(), open(), and read().
Referenced by RandomHandler::HandleConnection(), RandomPumpHandler::HandleConnection(), SocketTest::TransferTest(), and FileTest::WriteTest().
|
inlinestatic |
Update a crc32 checksum
| crc | old checksum |
| buffer | data buffer |
| len | size of the data buffer |
Referenced by DataReader(), XrdClTests::ClientHandler::UpdateReceivedData(), XrdClTests::ClientHandler::UpdateSentData(), SocketHandler::UpdateTransferMap(), and FileTest::WriteTest().
1.8.3.1