Next: bpipe_read_dpkts, Previous: bpipe_new, Up: BPipe Manipulations [Contents]
create a binary pipe output channel
#include <bpipe/bpipe.h> BPipeOutput *bpipe_output( BPipe *bpipe, const char *path );
BPipe *bpipe
a pointer to the binary pipe structure
const char *path
the path to the channel to attach to this output descriptor
bpipe_output
attaches an output stream and opens it.
The parameter output
is a string describing the output file or
device associated with the output channel. If it is the string
‘stdout’, the output channel is associated with the standard
output stream.
It returns an output handle upon success, NULL
upon failure.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADARG
The passed path could not be opened. Check errno
for more
information.
BPEBADPIPE
The BPipe
’s header has already been mapped or written. Output
channels can only be opened before mapping or writing the header
BPENOMEM
a memory allocation failed