Next: , Previous: bpipe_map_alloc, Up: BPipe Manipulations


A.1.5 bpipe_new

Allocate and initialize a binary pipe structure.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
BPipe *bpipe_new(void);

Description

bpipe_new allocates and initializes a binary pipe structure. It sets up the linked-lists and binary trees for the header parameter and data packet field definitions.

Returns

It returns a pointer to a dynamically allocated binary pipe structure. It prints a message to stderr and exits upon error. Upon failure it returns NULL, and sets bpipe_errno.

Errors

Upon error bpipe_errno is set to one of the following:

BPENOMEM
a memory allocation failed