Next: , Previous: bpipe_hdrf_delete, Up: Header Field Manipulations   [Contents]


A.2.5 bpipe_hdrf_matrix

Retrieve a copy of a header data field’s matrix specification.

Synopsis

#include <bpipe/bpipe.h>

BPMatrix *bpipe_hdrf_matrix(
  BPipe *bpipe,
  const char *name,
  size_t index
);

Parameters

BPipe *bpipe

binary pipe with which this field is associated

const char *name

the field’s name

size_t index

the field’s index. set to BPHdrfIdx_LAST to select the last one.

Description

This routine makes a copy of the matrix specification associated with a header data field and returns a pointer to it.

Returns

This routine returns a pointer to a BPMatrix structure upon success. If the field doesn’t exist, it returns NULL. If an error occurs, it returns NULL and sets bpipe_errno.

Errors

Upon error bpipe_errno is set to one of the following:

BPENOMEM

a memory allocation failed

BPEBADARG

the index specified was illegal