xlate_pro_disk_next_block - get translation byte stream pointers
int xlate_pro_disk_next_block(xlate_table_pro pro_table_ptr,
This function gets pointers to the blocks making up the stream of data.
The xlate functions do not write the stream to disk. Typically the
transformation-tool will use libelf to write the bytes to disk.
xlate_pro_disk_next_block gets the contents and size of the next block
thru the pointer arguments.
pro_table_ptr must be a valid open producer translate table handle and
xlate_pro_disk_header must have been called to create the byte stream and
count the number of blocks..
It is essential that if the data stream gets written to a data file (an
Elf file) for later reading that the data stream be given a proper Elf
d_align of 4 for a 32-bit stream and 8 for a 64-bit stream.
data The pointed at memory is set to a pointer to a set of bytes which
form part of the translation table byte stream. The caller must
free(3) the memory pointed-to.
The pointed at memory is set to the number of bytes in this block
of the byte stream.
For an example of use, see xlate_pro_disk_header(3) and libelfutil(5).
This function returns XLATE_TB_STATUS_NO_ERROR (0) on success. In case
of error, a negative number is returned indicating the error. In case of
error nothing is returned thru the pointer arguments.
Error codes which may be returned:
means that that the table is not a valid open producer handle.
means that xlate_pro_disk_header has not been called yet, and it
must be called before calling xlate_pro_disk_next_block.
means that xlate_pro_disk_next_block was called more times than
it should have been since the last call to xlate_pro_disk_header.
means malloc failed trying to allocate memory for the stream
libelfutil(5), xlate(4), xlate_pro_init(3), xlate_pro_finish(3),
PPPPaaaaggggeeee 2222 [ Back ]