Changeset c561c76 for examples


Ignore:
Timestamp:
07/16/04 17:48:24 (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:
27615e9
Parents:
90e4aa4
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/protocol/protocol.c

    ra79ddbe rc561c76  
    3737
    3838struct libtrace_t *trace;
     39struct libtrace_filter_t *filter;
    3940
    4041char *buffer[4096];
     
    5960        trace = create_trace(hostname);
    6061        if (filterstring) {
    61                 libtrace_bpf_setfilter(trace,filterstring);
     62                filter = libtrace_bpf_setfilter(filterstring);
    6263        }
    6364
     
    6768                        break;
    6869                }
    69                 if (!libtrace_bpf_filter(trace, buffer, 4096)) {
     70                if (filter) {
     71                        if (!libtrace_bpf_filter(trace, filter, buffer, 4096)) {
    7072                        continue;
     73                        }
    7174                }
    7275                ipptr = get_ip(trace,buffer,4096);
Note: See TracChangeset for help on using the changeset viewer.