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_pcapng.c

    r509ee47 rd439067  
    840840        /* May as well cache the capture length now, since we've
    841841         * already got it in the right byte order */
    842         packet->capture_length = caplen;
     842        packet->cached.capture_length = caplen;
    843843
    844844        if (pcapng_prepare_packet(libtrace, packet, packet->buffer,
     
    899899        /* May as well cache the capture length now, since we've
    900900         * already got it in the right byte order */
    901         packet->capture_length = caplen;
     901        packet->cached.capture_length = caplen;
    902902
    903903        if (pcapng_prepare_packet(libtrace, packet, packet->buffer,
     
    13491349                }
    13501350        }
    1351         packet->capture_length = -1;
     1351        packet->cached.capture_length = -1;
    13521352        return trace_get_capture_length(packet);
    13531353}
Note: See TracChangeset for help on using the changeset viewer.