Ignore:
Timestamp:
05/29/06 14:08:00 (16 years ago)
Author:
Perry Lorier <perry@…>
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:
0eef5d4
Parents:
f208f92
Message:

Migrate tools to the new API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracestats/tracestats.c

    r4e65f42 r853603a  
    2929 */
    3030
    31 //
    32 // This program takes a series of traces and bpf filters and outputs how many
    33 // bytes/packets
     31/*
     32 * This program takes a series of traces and bpf filters and outputs how many
     33 * bytes/packets
     34 */
    3435
    3536#include <stdio.h>
     
    8889
    8990                for(i=0;i<filter_count;++i) {
    90                         if(trace_bpf_filter(filters[i].filter,packet)) {
     91                        if(trace_apply_filter(filters[i].filter,packet)) {
    9192                                ++filters[i].count;
    9293                                filters[i].bytes+=trace_get_wire_length(packet);
     
    137138                                filters=realloc(filters,filter_count*sizeof(struct filter_t));
    138139                                filters[filter_count-1].expr=strdup(optarg);
    139                                 filters[filter_count-1].filter=trace_bpf_setfilter(optarg);
     140                                filters[filter_count-1].filter=trace_create_filter(optarg);
    140141                                filters[filter_count-1].count=0;
    141142                                filters[filter_count-1].bytes=0;
Note: See TracChangeset for help on using the changeset viewer.