Ignore:
Timestamp:
08/20/04 11:45:32 (17 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:
d2e3359
Parents:
d907ff5
Message:

Added asn1 parsing
Started fixing bug with tcp option parsing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/tracedump/tracedump-libtrace.cc

    rd907ff5 r5d6ebe1  
    99        struct libtrace_t *trace = trace_create(argv[1]);
    1010        struct libtrace_packet_t packet;
    11 
     11        struct libtrace_filter_t *filter=NULL;
     12       
    1213        if (!trace) {
    1314                errx(1,"Failed to open trace");
    1415        }
    1516
     17        if (argc>2)
     18                filter=trace_bpf_setfilter(argv[2]);
     19
    1620        while(trace_read_packet(trace,&packet)!=-1) {
    1721                time_t sec = (time_t)trace_get_seconds(&packet);
    1822                char *link=(char *)trace_get_link(&packet);
     23                if (filter && !trace_bpf_filter(filter,&packet))
     24                        continue;
     25
    1926                printf("%s",ctime(&sec));
    2027                per_packet(trace_get_link_type(&packet),
Note: See TracChangeset for help on using the changeset viewer.