Changeset 195a044


Ignore:
Timestamp:
03/25/05 16:44:08 (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:
6a4997b
Parents:
d86b8d7
Message:

comments on pcap_next etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r1b67314 r195a044  
    670670                /* pcap_next doesn't return enough information for us
    671671                 * newer libpcap has pcap_next_ex, which does, but we'd
    672                  * really rather have it all the time. Also, pcap_next
    673                  * works differently under freebsd! */
     672                 * really rather have it all the time. */
     673               
    674674                //if ((pcappkt = pcap_next(libtrace->input.pcap, &pcaphdr)) == NULL) {
    675675                /*
     
    677677                                                &pcaphdr,
    678678                                                &pcappkt)) < 0 ) {
    679                                                 */
     679                */
     680                /* Instead of pcap_next/pcap_next_ex, we do this ourselves
     681                 * with a trivial callback function. This lets us
     682                 * catch the same errors as pcap_next_ex, but removes
     683                 * the requirement for libpcap >= 0.8.x
     684                 */
    680685                while ((pcapbytes = pcap_dispatch(libtrace->input.pcap,
    681686                                                1, /* number of packets */
Note: See TracChangeset for help on using the changeset viewer.