Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: the-tcpdump-group/libpcap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: benzea/libpcap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 23 files changed
  • 1 contributor

Commits on Mar 27, 2025

  1. set break_loop in pcap.c when PCAP_ERROR_BREAK is returned

    The code is the same everywhere anyway, and there are just a few callers
    of read_op that need to deal with this. So let the caller handle it.
    
    This should be a bit nicer overall and will simplify the implementation
    to permit breaking the loop in a way that also flushes out the queue.
    benzea committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    229eb08 View commit details
    Browse the repository at this point in the history
  2. add pcap_breakloop_flush API and implement it on linux

    It is useful to get all the packets up to the current point in time. Due
    to input buffering this may not be the case. On Linux with tcpdump, one
    can get up to a second worth of packets that are not processed.
    
    Add a new pcap_breakloop_flush and set the internal break_loop variable
    to separate values depending on which version of pcap_breakloop was
    used. Then, on Linux, keep processing packets without polling if the
    break_loop variable is set to PCAPINT_BREAK_FLUSH, but abort immediately
    in the PCAPINT_BREAK_IMMEDIATE case.
    benzea committed Mar 27, 2025
    Configuration menu
    Copy the full SHA
    de3a961 View commit details
    Browse the repository at this point in the history
Loading