Next: , Previous: bpipe_output, Up: BPipe Manipulations


A.1.7 bpipe_read_dpkts

Read data packets from the input channel of a binary pipe.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
size_t bpipe_read_dpkts( BPipe *bpipe, void *buf, size_t n_pkts );

Parameters

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

Description

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.

Returns

It returns the number of data packets read. Upon error it returns ‘0’ and sets bpipe_errno to BPEIOERR.