Ignore:
Timestamp:
12/10/18 15:59:45 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop
Children:
10fd24b
Parents:
418c78d
Message:

Move packet cached fields into a distinct structure.

This will help tidy up the packet structure a little, as well as
simplify the cache clearing process (and maybe even speed it up
a little).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    r509ee47 rd439067  
    425425        /* We may as well cache this value now, seeing as we already had to
    426426         * look it up */
    427         packet->capture_length = bytes_to_read;
     427        packet->cached.capture_length = bytes_to_read; 
    428428        return sizeof(libtrace_pcapfile_pkt_hdr_t) + bytes_to_read;
    429429}
     
    712712        }
    713713        /* Reset the cached capture length */
    714         packet->capture_length = -1;
     714        packet->cached.capture_length = -1;
    715715        pcapptr = (libtrace_pcapfile_pkt_hdr_t *)packet->header;
    716716        pcapptr->caplen = swapl(packet->trace,(uint32_t)size);
Note: See TracChangeset for help on using the changeset viewer.