Changeset 7fe6dfa for lib


Ignore:
Timestamp:
10/02/15 11:59:07 (5 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
32a3ec5
Parents:
01619eb
Message:

Enforce immediate mode for pcap if available

This will prevent pcap from buffering packets internally, which can really
mess with any real-time analysis (especially since pcap seems to ignore
the timeout (observed in Debian Jessie)).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    r5478d3d r7fe6dfa  
    267267                return -1; /* failure */
    268268        }
     269
     270#ifdef HAVE_PCAP_IMMEDIATE
     271        if ((pcap_set_immediate_mode(INPUT.pcap, 1) == PCAP_ERROR_ACTIVATED)) {
     272                trace_set_err(libtrace,TRACE_ERR_INIT_FAILED,"%s",errbuf);
     273                return -1; /* failure */
     274        }
     275#endif
    269276
    270277        if ((ret = pcap_activate(INPUT.pcap)) != 0) {
Note: See TracChangeset for help on using the changeset viewer.