Changeset 3840760 for tools/tracertstats


Ignore:
Timestamp:
11/28/05 10:15:22 (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:
08594b8
Parents:
14d8a63
Message:

updated the examples/ and tools/ directories to correctly use trace_packet_create() now.

fixed a typo in format_wag (shouldn't use pcap_get_framing_length for wag!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracertstats/tracertstats.c

    re3b0188 r3840760  
    9191void run_trace(char *uri)
    9292{
    93         struct libtrace_packet_t packet;
     93        struct libtrace_packet_t *packet = trace_packet_create();
    9494        int i;
    9595        uint64_t count = 0;
     
    116116        for (;;) {
    117117                int psize;
    118                 if ((psize = trace_read_packet(trace, &packet)) <1) {
     118                if ((psize = trace_read_packet(trace, packet)) <1) {
    119119                        break;
    120120                }
    121                 ts = trace_get_seconds(&packet);
     121                ts = trace_get_seconds(packet);
    122122
    123123                for(i=0;i<filter_count;++i) {
    124                         if(trace_bpf_filter(filters[i].filter,&packet)) {
     124                        if(trace_bpf_filter(filters[i].filter,packet)) {
    125125                                ++filters[i].count;
    126                                 filters[i].bytes+=trace_get_wire_length(&packet);
     126                                filters[i].bytes+=trace_get_wire_length(packet);
    127127                        }
    128128                }
    129129
    130130                ++count;
    131                 bytes+=trace_get_wire_length(&packet);
     131                bytes+=trace_get_wire_length(packet);
    132132
    133133                if (packet_interval!=UINT64_MAX
Note: See TracChangeset for help on using the changeset viewer.