Next: , Previous: Attaching to input and output streams, Up: Accessing the data stream


4.3 Manipulating Header Fields

The header packet is automatically read and parsed when bpipe_input opens up the input data stream. A header field is accessed by its name and its index. An index of ‘0’ will retrieve the first field with a given name; an index of ‘BPHdrfIdx_LAST’ will retrieve the last field. The number of fields with a given name is returned by bpipe_hdrf_n. If the program needs to go through the list of header fields sequentially, repeated calls to bpipe_hdrf_next will step through the the header data fields in the order that they appear in the header. Fields added by the application before an input data stream is attached to the BPipe will appear first in the list; those added after the header is read will appear last.

See bpipe_hdrf_n and bpipe_hdrf_next.