1 #ifndef __XRDOUCPGRWUTILS_HH__
2 #define __XRDOUCPGRWUTILS_HH__
35 #include <sys/types.h>
54 static void csCalc(
const char* data, off_t offs,
size_t count,
57 static void csCalc(
const char* data, off_t offs,
size_t count,
58 std::vector<uint32_t> &csvec);
70 static int csNum(off_t offs,
int count);
85 static int csNum(off_t offs,
int count,
int &fLen,
int &lLen);
106 dataInfo(
const char* dP,
const uint32_t* cP, off_t o,
int n)
110 static bool csVer(dataInfo &dInfo, off_t &bado,
int &badc);
static void csCalc(const char *data, off_t offs, size_t count, uint32_t *csval)
off_t bOffset
Buffer offset to apply iov[1].iov_base.
int dataLen
Total number of filesys bytes the iovec will handle.
static int sendLayout(Layout &layout, off_t offs, int dlen, int bsz=0)
int fLen
Length to use for iov[1].iov_len.
static bool csVer(dataInfo &dInfo, off_t &bado, int &badc)
int sockLen
Total number of network bytes the iovec will handle.
const char * eWhy
Reason for failure when zero is returned.
static int csNum(off_t offs, int count)
Compute the required size of a checksum vector based on offset & length.
int lLen
Length to use for iov[csnum*2-1].iov_len)
static int recvLayout(Layout &layout, off_t offs, int dlen, int bsz=0)
Compute the layout for an iovec that receives network bytes applying.
const char * data
Pointer to data buffer.
int count
Number of bytes to check.
const uint32_t * csval
Pointer to vector of checksums.
off_t offs
Offset associated with data.
dataInfo(const char *dP, const uint32_t *cP, off_t o, int n)