struct packet_index {
off_t offset; /* offset of the packet in the file, in bytes */
off_t data_offset; /* offset of data within the packet, in bits */
struct packet_index {
off_t offset; /* offset of the packet in the file, in bytes */
off_t data_offset; /* offset of data within the packet, in bits */
size_t content_size; /* content size, in bits */
uint64_t timestamp_begin;
uint64_t timestamp_end;
size_t content_size; /* content size, in bits */
uint64_t timestamp_begin;
uint64_t timestamp_end;
char *base; /* mmap base address */
ssize_t offset; /* offset from base, in bits. EOF for end of file. */
size_t cur_index; /* current index in packet index */
char *base; /* mmap base address */
ssize_t offset; /* offset from base, in bits. EOF for end of file. */
size_t cur_index; /* current index in packet index */
void ctf_move_pos(struct ctf_stream_pos *pos, size_t bit_offset)
{
printf_debug("ctf_move_pos test EOF: %zd\n", pos->offset);
void ctf_move_pos(struct ctf_stream_pos *pos, size_t bit_offset)
{
printf_debug("ctf_move_pos test EOF: %zd\n", pos->offset);
printf_debug("ctf_move_pos_slow (before call): %zd\n",
pos->offset);
ctf_move_pos_slow(pos, bit_offset, SEEK_CUR);
printf_debug("ctf_move_pos_slow (before call): %zd\n",
pos->offset);
ctf_move_pos_slow(pos, bit_offset, SEEK_CUR);
if (pos->offset == pos->content_size) {
printf_debug("ctf_move_pos_slow (before call): %zd\n",
pos->offset);
if (pos->offset == pos->content_size) {
printf_debug("ctf_move_pos_slow (before call): %zd\n",
pos->offset);