H5PTread_packets reads nrecords packets starting with the "current index" from a packet table specified by table_id. The packet table's index is set and reset with H5PTset_index and H5PTcreate_index. data is a buffer into which the data should be read.
For a packet table holding variable-length records, the data returned in the buffer will be in form of a hvl_t struct containing the length of the data and a pointer to it in memory. The memory used by this data must be freed using H5PTfree_vlen_buff.