Next: bpipe_write_dpkt_n, Previous: bpipe_output, Up: BPipe Manipulations
Read data packets from the input channel of a binary pipe.
#include <bpipe/bpipe.h>size_t bpipe_read_dpkts( BPipe *bpipe, void *buf, size_t n_pkts );
BPipe *bpipe
- the binary pipe from which to read
void *buf
- pointer to a user-allocated memory buffer into which the data packet core images will be placed
size_t n_pkts
- the number of data packets to read
bpipe_read_dpkt
reads a user specified number of data packets
from a binary pipe input channel into a user-provided memory buffer.
It converts the input data packet images into core data packet
images.
It returns the number of data packets read. Upon error it
returns `0' and sets bpipe_errno
to BPEIOERR
.