Next: bpipe_hdrf_delete, Previous: bpipe_hdrf_array_add, Up: Header Field Manipulations
Get a pointer to a header field's data.
#include <bpipe/bpipe.h>void *bpipe_hdrf_data( BPipe *bpipe, char *name, size_t index );
BPipe *bpipe
- binary pipe with which this field is associated
char *name
- the field's name
size_t index
- the field's index. set to
BPHdrfIdx_LAST
to select the last one.
This routine looks up a header data field and returns a pointer to the data in the field. The calling routine may use this pointer to directly change the header field's data.
Returns a pointer to the data upon success. If the field doesn't
exist, it returns NULL
. If there's an error, it returns
NULL
and sets bpipe_errno
.
Upon error bpipe_errno
is set to one of the following:
BPEBADARG