Next: write_defn, Previous: read_hdr_defs, Up: Internal Functions [Contents]
Read the header section of a binary pipe data stream.
#include <bpipe/bpipe.h> static int read_hdr(BPipe *bpipe);
BPipe *bpipe
the binary pipe from which to read
This routine reads and parses the header information of a binary pipe input data stream. The header consists of header parameter and data packets field definitions and header parameter data. The pipe I/O channel must already have been opened.
It returns zero upon success, non-zero otherwise. Upon error
bpipe_errno
is set.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADPIPE
the header data definitions had errors
BPEIOERROR
an error occurred whilst reading the pipe
BPENOMEM
a memory allocation failed