XRootD
XrdOucPgrwUtils.hh File Reference
#include <cstdint>
#include <vector>
#include <sys/types.h>
+ Include dependency graph for XrdOucPgrwUtils.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Class Documentation

◆ XrdOucPgrwUtils::Layout

struct XrdOucPgrwUtils::Layout

Compute the layout for an iovec that receives network bytes applying.

Parameters
layoutReference to the layout parameter (see below).
offsrecvLayout: Offset at which the subsequent write occurs. sendLayout: Offset at which the preceding read occurs.
dlenrecvLayout: Nmber of sock bytes to receive with checksums.
dlensendLayout: Nmber of file bytes to read without checksums.
bszThe size of the buffer exclusive of any checksums and must be a multiple of 4096 (one page). If it's <= 0 then then the layout is computed as if bsz could fully accomodate the dlen.
Returns
The number of checksums that are needed. If the result is zero then the supplied offset/dlen violates requirements amd eWhy holds reason.
Note
The iovec layout assumes iov[0] reads the checksum and iov[1] reads only the data where the last such pair is iov[csnum*-2],iov[csnum*-1].
dataLen can be used to adjust the next offset for filesystem I/O while sockLen is the total number of network bytes to receive or send.

Definition at line 134 of file XrdOucPgrwUtils.hh.

+ Collaboration diagram for XrdOucPgrwUtils::Layout:
Class Members
off_t bOffset Buffer offset to apply iov[1].iov_base.
int dataLen Total number of filesys bytes the iovec will handle.
const char * eWhy Reason for failure when zero is returned.
int fLen Length to use for iov[1].iov_len.
int lLen Length to use for iov[csnum*2-1].iov_len)
int sockLen Total number of network bytes the iovec will handle.