Previous: bpipe_write_dpkts, Up: BPipe Manipulations


A.1.11 bpipe_write_hdr

Write header information to a binary pipe's output channels.

Synopsis

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

Parameters

BPipe *bpipe
the binary pipe for which to output the header

Description

bpipe_write_hdr writes header information to a binary pipe's output channels. It must be called after a call to bpipe_map and before any data packets are written to the output channel(s). no manipulation of header parameter definitions and data or data packet field definitions should be done after invoking this function.

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 errors:

BPEBADARG

BPEIOERR
an I/O error occurred
BPENOMEM
a memory allocation failed