Permalink
Commits on Jul 7, 2016
Commits on Jul 3, 2016
  1. Fix some errors on HP-UX.

    guyharris committed Jul 3, 2016
Commits on Jul 2, 2016
  1. Fix warnings with 'strlcpy' macro

    The warnings were:
    right-hand operand of comma expression has no effect [-Wunused-value]
    fxlb committed Jul 2, 2016
Commits on Jul 1, 2016
  1. Merge pull request #511 from hsluoyz/master

    Remove the "HAVE_TC_API" macro from the MSVC project.
    guyharris committed on GitHub Jul 1, 2016
  2. Clean up {DAG, Septel, Myricom SNF}-only builds.

    In the core code, treat them similarly to other builds.  In the
    configure script, ensure that no other pcap-XXX.c file is built, so we
    have only the entries for the capture mechanism in question in the
    tables for pcap_findalldevs() and pcap_create(), so that those routines
    are the only ones called.  If XXX_ONLY is defined in pcap-XXX.c, define
    a stub pcap_platform_finddevs() that finds no regular interfaces and a
    stub pcap_create_interface() that fails with a "we only support XXX"
    error message.
    guyharris committed Jul 1, 2016
Commits on Jun 30, 2016
  1. Merge pull request #510 from hsluoyz/master

    Now MSVC will automatically generate scanner.c/h and grammar.c/h via WinFlexBison before each build.
    guyharris committed on GitHub Jun 30, 2016
  2. Now MSVC will automatically generate scanner.c/h and grammar.c/h via …

    …WinFlexBison before each build.
    hsluoyz committed Jun 30, 2016
  3. Merge pull request #508 from hsluoyz/master

    Rename "Pcap-win32.c" to "pcap-win32.c" in the MSVC project files.
    guyharris committed on GitHub Jun 30, 2016
  4. Don't bother with YY_NO_UNISTD_H.

    That doesn't fix the problem with scanner.h, and CMake already generates
    MSVC project files that define it, so it's not necessary with CMake.
    Other build processes should arrange either that it be defined or that
    the code protected by it doesn't get generated.
    guyharris committed Jun 30, 2016
  5. Fix tpo.

    guyharris committed Jun 30, 2016
  6. Fix copy-and-pasteo.

    guyharris committed Jun 30, 2016
  7. flags is used even if we don't have PacketIsLoopbackAdapter().

    Fixes GitHub issue #506.
    guyharris committed Jun 30, 2016
  8. pcap_create_interface() needs the interface name on Linux.

    So pass it the interface name, and use the name passed to it rather than
    the name in the pcap_t - which hasn't yet been set at that point.
    guyharris committed Jun 30, 2016
  9. make more pcap_create_common() fixes

    * CAN bus over USB on Linux
    * DAG
    * D-Bus
    * Septel
    * SNF
    * TurboCap
    infrastation committed Jun 30, 2016
  10. Don't have pcap_create_common() set opt.device.

    Instead, have pcap_create() do so.
    
    Also have pcap_create() on Windows handle converting a little-endian
    UCS-2/UTF-16 string to ASCII.
    guyharris committed Jun 30, 2016
  11. Rename opt.source to opt.device.

    For local captures, it's jut the device.  If we add remote capture
    support, we'll be handed a URL, and will split the URL into multiple
    components, and will store the various components in the opt structure,
    with the path of the URL being opt.device.
    guyharris committed Jun 30, 2016
  12. Move the private-to-DAG-cards definitions to pcap-dag.c.

    Have pcap-dag.h just declare the functions called from pcap.c, as is the
    case with the header files for other pcap modules.
    guyharris committed Jun 30, 2016
Commits on Jun 28, 2016
  1. Let the platform decide how to check capturable interfaces.

    (Git's annoying policy of expecting a short one-line description of every
    change means that the first line isn't very explanatory.)
    
    Make pcap_findalldevs_interfaces() take as an argument a function that's
    used to check whether an interface can be captured on or not, rather
    than doing the check by trying to open the device for capturing.
    
    This lets pcap_findalldevs() find interfaces even if you don't have
    permission to capture on them; that way, instead of users saying "why
    isn't {tcpdump -D, tshark -D, dumpcap -D, Wireshark, etc.} showing me
    any interfaces?", they'll say "why am I getting a 'you don't have
    permissions' error when I try to capture on this interface?", which is a
    better description of the underlying problem.
    
    On some platforms, it also avoids a bunch of extra work when getting a
    list of interfaces.
    guyharris committed Jun 28, 2016
Commits on Jun 27, 2016
  1. Merge pull request #503 from hsluoyz/master

    Add x64 build configurations for the MSVC project.
    guyharris committed on GitHub Jun 27, 2016
  2. Merge pull request #502 from hsluoyz/master

    Rename the project files and the output binary on Windows from "libpcap" to "wpcap" for backwards compatibility.
    guyharris committed on GitHub Jun 27, 2016
  3. Rename the project files and the output binary on Windows from "libpc…

    …ap" to "wpcap" for backwards compatibility.
    hsluoyz committed Jun 27, 2016
  4. Add some more DL_ types from Solaris 11.

    Also, print unknown DL_ types as hex, as that's how they're defined in
    the Solaris dlpi.h header file.
    guyharris committed Jun 27, 2016
  5. Handle no -i argument, report success.

    If no -i argument was given, use pcap_lookupdev().
    
    If the open succeeds, report it.
    guyharris committed Jun 27, 2016