Next: , Previous: hdrf_delete, Up: Internal Functions


A.5.44 hdrf_get

Get a pointer to a header field.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
static HdrField *hdrf_get( BPipe *bpipe, char *name, size_t index );

Parameters

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.

Description

Get a pointer to a header field.

Returns

It returns a pointer to the header field if it exists, NULL if it doesn't. Upon error it returns NULL and sets bpipe_errno.

Errors

Upon error bpipe_errno is set to one of the following:

BPEBADARG
the index specified was illegal