Ignore:
Timestamp:
11/28/05 10:15:22 (15 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/tracestats/tracestats.c

    r130a0e4 r3840760  
    6868void run_trace(char *uri)
    6969{
    70         struct libtrace_packet_t packet;
     70        struct libtrace_packet_t *packet = trace_packet_create();
    7171        int i;
    7272        uint64_t count = 0;
     
    7979        for (;;) {
    8080                int psize;
    81                 if ((psize = trace_read_packet(trace, &packet)) <1) {
     81                if ((psize = trace_read_packet(trace, packet)) <1) {
    8282                        break;
    8383                }
    8484
    8585                for(i=0;i<filter_count;++i) {
    86                         if(trace_bpf_filter(filters[i].filter,&packet)) {
     86                        if(trace_bpf_filter(filters[i].filter,packet)) {
    8787                                ++filters[i].count;
    88                                 filters[i].bytes+=trace_get_wire_length(&packet);
     88                                filters[i].bytes+=trace_get_wire_length(packet);
    8989                        }
    9090                }
    9191
    9292                ++count;
    93                 bytes+=trace_get_wire_length(&packet);
     93                bytes+=trace_get_wire_length(packet);
    9494        }
    9595
Note: See TracChangeset for help on using the changeset viewer.