Next: read_hdr_defs, Previous: outchannel_close_delete, Up: Internal Functions
Read data packet field definitions from a binary pipe.
#include <bpipe/bpipe.h>static int read_dpkt_defs( BPipe *bpipe, char **buf, size_t *buf_len );
BPipe *bpipe
- the binary pipe to read
char **buf
- the input buffer to use
size_t *buf_len
- the length of the input buffer
This routine reads in data packet field definitions from a binary
pipe, parses them, and stores th results in the binary pipe
structure. It requires a line count variable, which it increments
and uses for error output. It uses bpipe_proc_def
to parse
the input. an empty line is taken to signal the end of the data
packet field definition section.
It returns zero upon success, non-zero upon failure. It sets
bpipe_errno
upon failure.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADPIPE
BPENOMEM
The header parameter definitions must be read before this routine is called.