Next: bpipe_hdrf_matrix, Previous: bpipe_hdrf_data, Up: Header Field Manipulations
Remove a header field.
#include <bpipe/bpipe.h>int bpipe_hdrf_delete( 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 delete the last one,BPHdrfIdx_ALL
to delete all of them
This routine will remove a field from the header and free the memory used by the header data. It does not renumber the indices of the fields which have the same name as the field. If requested, it can delete all of the fields of a given name.
It returns zero upon success, non-zero if the field didn't exist.
If an error occurs (the index was bad), it returns non-zero and sets
bpipe_errno
.
Upon error bpipe_errno
is set to one of the following:
BPEBADARG