gettimeofday(&header.starttime, NULL);
header.num_logic_probes = num_probes;
header.samplerate = samplerate;
gettimeofday(&header.starttime, NULL);
header.num_logic_probes = num_probes;
header.samplerate = samplerate;
for (i = 0; i < NUM_PACKETS; i++) {
/* TODO: Handle errors, handle incomplete reads. */
size = read(fd, buf, PACKET_SIZE);
for (i = 0; i < NUM_PACKETS; i++) {
/* TODO: Handle errors, handle incomplete reads. */
size = read(fd, buf, PACKET_SIZE);