Changeset ef90843 for lib/format_erf.c


Ignore:
Timestamp:
10/21/05 10:43:29 (16 years ago)
Author:
Shane Alcock <salcock@…>
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:
0675ea1
Parents:
194d49b
Message:

Updated documentation for trace_get_capture_length
Corrected error where erfhdr.rlen was being set to trace_get_capture_length
in erf_write_packet
Corrected erf_get_capture_length to not include capture format headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rfe7b292 ref90843  
    647647                // Flags. Can't do this
    648648                memset(&erfhdr.flags,1,1);
    649                 // Packet length
    650                 erfhdr.rlen = trace_get_capture_length(packet);
     649                // Packet length (rlen includes format overhead)
     650                erfhdr.rlen = trace_get_capture_length(packet) + sizeof(dag_record_t);
    651651                // loss counter. Can't do this
    652652                erfhdr.lctr = 0;
     
    747747        dag_record_t *erfptr = 0;
    748748        erfptr = (dag_record_t *)packet->buffer;
    749         return ntohs(erfptr->rlen);
     749        return (ntohs(erfptr->rlen) - sizeof(dag_record_t));
    750750}
    751751
Note: See TracChangeset for help on using the changeset viewer.