Changeset 7c8eacf for lib/trace.c


Ignore:
Timestamp:
10/27/05 14:05:36 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
2458162
Parents:
0d82205
Message:

updated changelog
added trace_get_framing_length() to return the capture-format framing (eg, ERF or pcap headers).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r6f75b9d r7c8eacf  
    10071007}
    10081008
     1009/* Get the length of the capture framing headers.
     1010 * @param packet        the packet opaque pointer
     1011 * @returns the size of the packet as it was on the wire.
     1012 * @author Perry Lorier
     1013 * @author Daniel Lawson
     1014 * @note this length corresponds to the difference between the size of a
     1015 * captured packet in memory, and the captured length of the packet
     1016 */
     1017SIMPLE_FUNCTION
     1018int trace_get_framing_length(const struct libtrace_packet_t *packet) {
     1019        if (packet->trace->format->get_framing_length) {
     1020                return packet->trace->format->get_framing_length(packet);
     1021        }
     1022        return -1;
     1023}
     1024
     1025
    10091026/* Get the type of the link layer
    10101027 * @param packet        a pointer to a libtrace_packet structure
Note: See TracChangeset for help on using the changeset viewer.