Changeset d5879cc for lib/format_pcap.c


Ignore:
Timestamp:
02/27/06 16:40:19 (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:
8a8e54b
Parents:
ab4cb04
Message:

Fix various issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    rab4cb04 rd5879cc  
    111111        DATA(libtrace)->promisc = 0;
    112112
    113         return 1;
     113        return 0;
    114114}
    115115
     
    124124        }
    125125        if (DATA(libtrace)->filter) {
    126                 trace_bpf_compile(DATA(libtrace)->filter);
     126                pcap_compile(INPUT.pcap, &DATA(libtrace)->filter->filter,
     127                                DATA(libtrace)->filter->filterstring, 1, 0);
    127128                if (pcap_setfilter(INPUT.pcap,&DATA(libtrace)->filter->filter)
    128129                                == -1) {
     
    278279}
    279280
    280 static int pcap_start_output(libtrace_out_t *libtrace)
    281 {
    282         assert(!OUTPUT.trace.dump);
    283         OUTPUT.trace.dump = pcap_dump_open(OUTPUT.trace.pcap,
    284                         libtrace->uridata);
    285         fflush((FILE *)OUTPUT.trace.dump);
    286 }
    287 
    288281static int pcap_write_packet(libtrace_out_t *libtrace, const libtrace_packet_t *packet) {
    289282        struct pcap_pkthdr pcap_pkt_hdr;
     
    293286                        libtrace_to_pcap_dlt(trace_get_link_type(packet)),
    294287                        65536);
     288                OUTPUT.trace.dump = pcap_dump_open(OUTPUT.trace.pcap,
     289                                libtrace->uridata);
     290                fflush((FILE *)OUTPUT.trace.dump);
    295291        }
    296292        if (libtrace->format == &pcap ||
     
    457453        pcap_init_output,               /* init_output */
    458454        NULL,                           /* config_output */
    459         pcap_start_output,              /* start_output */
     455        NULL,                           /* start_output */
    460456        pcap_fin_input,                 /* fin_input */
    461457        pcap_fin_output,                /* fin_output */
Note: See TracChangeset for help on using the changeset viewer.