Next: , Previous: bpipe_dpkt_cleanup, Up: Internal Functions


A.5.8 bpipe_dpkt_setup

initialize dpkt data structure

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
int bpipe_dpkt_setup(BPipe *bpipe);

Parameters

BPipe *bpipe
binary pipe

Description

This routine is called by bpipe_new to initialize the data packet structures in a new BPipe.

Returns

It returns zero upon success, non-zero upon failure. It sets bpipe_errno upon failure.

Errors

Upon error bpipe_errno is set to one of the following:

BPENOMEM
a memory allocation failed