Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libpcap/dist Tuesday, Oct. 25, 2016 mcr@sandelm...



details:   https://anonhg.NetBSD.org/src/rev/16f06f33cfa7
branches:  trunk
changeset: 821103:16f06f33cfa7
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jan 24 21:55:26 2017 +0000

description:
Tuesday, Oct. 25, 2016 mcr%sandelman.ca@localhost
  Summary for 1.8.1 libpcap release
    Add a target in Makefile.in for Exuberant Ctags use: 'extags'.
    Rename configure.in to configure.ac: autoconf 2.59
    Clean up the name-to-DLT mapping table.
    Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS
    Clarify what the return values are for both success and failure.
    Many changes to build on windows
    Check for the "break the loop" condition in the inner loop for TPACKET_V3.
    Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493.
    Filter out duplicate looped back CAN frames.
    Fix the handling of loopback filters for IPv6 packets.
    Add a link-layer header type for RDS (IEC 62106) groups.
    Use different intermediate folders for x86 and x64 builds on Windows.
    On Linux, handle all CAN captures with pcap-linux.c, in cooked mode.
    Removes the need for the "host-endian" link-layer header type.
    Compile with '-Wused-but-marked-unused' in devel mode if supported
    Have separate DLTs for big-endian and host-endian SocketCAN headers.
    Reflect version.h being renamed to pcap_version.h.
    Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)!
    Properly check for sock_recv() errors.
    Re-impose some of Winsock's limitations on sock_recv().
    Replace sprintf() with pcap_snprintf().
    Fix signature of pcap_stats_ex_remote().
    Initial cmake support for remote packet capture.
    Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag.
    Clean up {DAG, Septel, Myricom SNF}-only builds.
    Do UTF-16-to-ASCII conversion into the right place.
    pcap_create_interface() needs the interface name on Linux.
    Clean up hardware time stamp support: the "any" device does not support any time stamp types.
    Add support for capturing on FreeBSD usbusN interfaces.
    Add a LINKTYPE/DLT_ value for FreeBSD USB.
    Go back to using PCAP_API on Windows.
    CMake support
    Add TurboCap support from WinPcap.
    Recognize 802.1ad nested VLAN tag in vlan filter.

Thursday Sep. 3, 2015 guy%alum.mit.edu@localhost
  Summary for 1.7.5 libpcap release
        Man page cleanups.
        Add some allocation failure checks.
        Fix a number of Linux/ucLinux configure/build issues.
        Fix some memory leaks.
        Recognize 802.1ad nested VLAN tag in vlan filter.
        Fix building Bluetooth Linux Monitor support with BlueZ 5.1+

Saturday Jun. 27, 2015 mcr%sandelman.ca@localhost
  Summary for 1.7.4 libpcap release
        Include fix for GitHub issue #424 -- out of tree builds.

Friday Apr. 10, 2015 guy%alum.mit.edu@localhost
  Summary for 1.7.3 libpcap release
        Work around a Linux bonding driver bug.

diffstat:

 external/bsd/libpcap/dist/CHANGES                            |    66 +-
 external/bsd/libpcap/dist/CMakeLists.txt                     |   520 +
 external/bsd/libpcap/dist/GenVersion.bat                     |    23 +
 external/bsd/libpcap/dist/INSTALL.txt                        |    59 +-
 external/bsd/libpcap/dist/Makefile-devel-adds                |     4 +-
 external/bsd/libpcap/dist/Makefile.in                        |   176 +-
 external/bsd/libpcap/dist/README.sita                        |     2 +-
 external/bsd/libpcap/dist/VERSION                            |     2 +-
 external/bsd/libpcap/dist/Win32/Include/Gnuc.h               |    36 -
 external/bsd/libpcap/dist/Win32/Prj/wpcap.sln                |    28 +
 external/bsd/libpcap/dist/Win32/Prj/wpcap.vcxproj            |   234 +
 external/bsd/libpcap/dist/Win32/Prj/wpcap.vcxproj.filters    |   107 +
 external/bsd/libpcap/dist/aclocal.m4                         |   114 +-
 external/bsd/libpcap/dist/cmake/preconfigure.cmake           |    55 +
 external/bsd/libpcap/dist/cmakeconfig.h.in                   |   345 +
 external/bsd/libpcap/dist/config.h.in                        |    40 +-
 external/bsd/libpcap/dist/config/have_siocglifconf.c         |     6 +
 external/bsd/libpcap/dist/configure                          |  1473 +++-
 external/bsd/libpcap/dist/configure.ac                       |  1821 ++++++
 external/bsd/libpcap/dist/extract.h                          |   221 +
 external/bsd/libpcap/dist/fad-helpers.c                      |   884 +++
 external/bsd/libpcap/dist/gen_version_c.sh                   |    11 +
 external/bsd/libpcap/dist/gen_version_header.sh              |    19 +
 external/bsd/libpcap/dist/lbl/os-aix7.h                      |    23 +
 external/bsd/libpcap/dist/missing/getopt.c                   |   126 +
 external/bsd/libpcap/dist/missing/getopt.h                   |     7 +
 external/bsd/libpcap/dist/missing/snprintf.c                 |    20 +-
 external/bsd/libpcap/dist/missing/strtok_r.c                 |    87 +
 external/bsd/libpcap/dist/missing/win_snprintf.c             |    31 +
 external/bsd/libpcap/dist/msdos/bin2c.c                      |    86 +-
 external/bsd/libpcap/dist/msdos/common.dj                    |    17 +-
 external/bsd/libpcap/dist/msdos/makefile                     |   368 +-
 external/bsd/libpcap/dist/msdos/makefile.dj                  |   126 +-
 external/bsd/libpcap/dist/msdos/makefile.wc                  |   265 +-
 external/bsd/libpcap/dist/msdos/ndis2.c                      |  1720 ++--
 external/bsd/libpcap/dist/msdos/ndis2.h                      |  1118 +-
 external/bsd/libpcap/dist/msdos/ndis_0.asm                   |   376 +-
 external/bsd/libpcap/dist/msdos/pkt_rx0.asm                  |   394 +-
 external/bsd/libpcap/dist/msdos/pkt_rx1.s                    |   310 +-
 external/bsd/libpcap/dist/msdos/pktdrvr.c                    |  2872 +++++-----
 external/bsd/libpcap/dist/msdos/pktdrvr.h                    |   306 +-
 external/bsd/libpcap/dist/msdos/readme.dos                   |    60 +-
 external/bsd/libpcap/dist/nametoaddr.h                       |    48 +
 external/bsd/libpcap/dist/pcap-filter.manmisc.in             |    13 +-
 external/bsd/libpcap/dist/pcap-linktype.manmisc.in           |     2 +-
 external/bsd/libpcap/dist/pcap-new.c                         |  1265 ++++
 external/bsd/libpcap/dist/pcap-rpcap.c                       |  2127 +++++++
 external/bsd/libpcap/dist/pcap-rpcap.h                       |   465 +
 external/bsd/libpcap/dist/pcap-savefile.manfile.in           |     2 +-
 external/bsd/libpcap/dist/pcap-tc.c                          |  1284 ++++
 external/bsd/libpcap/dist/pcap-tc.h                          |    54 +
 external/bsd/libpcap/dist/pcap-tstamp.manmisc.in             |     2 +-
 external/bsd/libpcap/dist/pcap/can_socketcan.h               |    54 +
 external/bsd/libpcap/dist/pcap/dlt.h                         |  1340 ++++
 external/bsd/libpcap/dist/pcap/export-defs.h                 |   108 +
 external/bsd/libpcap/dist/pcap_compile.3pcap.in              |     2 +-
 external/bsd/libpcap/dist/pcap_datalink.3pcap.in             |     2 +-
 external/bsd/libpcap/dist/pcap_get_tstamp_precision.3pcap.in |     2 +-
 external/bsd/libpcap/dist/pcap_list_datalinks.3pcap.in       |     2 +-
 external/bsd/libpcap/dist/pcap_list_tstamp_types.3pcap.in    |     2 +-
 external/bsd/libpcap/dist/pcap_open_dead.3pcap.in            |     2 +-
 external/bsd/libpcap/dist/pcap_set_tstamp_precision.3pcap.in |     2 +-
 external/bsd/libpcap/dist/pcap_set_tstamp_type.3pcap.in      |     2 +-
 external/bsd/libpcap/dist/pcap_version.h.in                  |    13 +
 external/bsd/libpcap/dist/portability.h                      |   216 +
 external/bsd/libpcap/dist/remote-ext.h                       |   467 +
 external/bsd/libpcap/dist/sockutils.c                        |  1230 ++++
 external/bsd/libpcap/dist/sockutils.h                        |   241 +
 external/bsd/libpcap/dist/tests/CMakeLists.txt               |    42 +
 external/bsd/libpcap/dist/tests/can_set_rfmon_test.c         |    92 +
 70 files changed, 18832 insertions(+), 4807 deletions(-)

diffs (truncated from 25122 to 300 lines):

diff -r dd4fb40acb11 -r 16f06f33cfa7 external/bsd/libpcap/dist/CHANGES
--- a/external/bsd/libpcap/dist/CHANGES Tue Jan 24 21:33:37 2017 +0000
+++ b/external/bsd/libpcap/dist/CHANGES Tue Jan 24 21:55:26 2017 +0000
@@ -1,15 +1,77 @@
+Tuesday, Oct. 25, 2016 mcr%sandelman.ca@localhost
+  Summary for 1.8.1 libpcap release
+    Add a target in Makefile.in for Exuberant Ctags use: 'extags'.
+    Rename configure.in to configure.ac: autoconf 2.59
+    Clean up the name-to-DLT mapping table.
+    Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS
+    Clarify what the return values are for both success and failure.
+    Many changes to build on windows
+    Check for the "break the loop" condition in the inner loop for TPACKET_V3.
+    Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493.
+    Filter out duplicate looped back CAN frames.
+    Fix the handling of loopback filters for IPv6 packets.
+    Add a link-layer header type for RDS (IEC 62106) groups.
+    Use different intermediate folders for x86 and x64 builds on Windows.
+    On Linux, handle all CAN captures with pcap-linux.c, in cooked mode.
+    Removes the need for the "host-endian" link-layer header type.
+    Compile with '-Wused-but-marked-unused' in devel mode if supported
+    Have separate DLTs for big-endian and host-endian SocketCAN headers.
+    Reflect version.h being renamed to pcap_version.h.
+    Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)!
+    Properly check for sock_recv() errors.
+    Re-impose some of Winsock's limitations on sock_recv().
+    Replace sprintf() with pcap_snprintf().
+    Fix signature of pcap_stats_ex_remote().
+    Initial cmake support for remote packet capture.
+    Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag.
+    Clean up {DAG, Septel, Myricom SNF}-only builds.
+    Do UTF-16-to-ASCII conversion into the right place.
+    pcap_create_interface() needs the interface name on Linux.
+    Clean up hardware time stamp support: the "any" device does not support any time stamp types.
+    Add support for capturing on FreeBSD usbusN interfaces.
+    Add a LINKTYPE/DLT_ value for FreeBSD USB.
+    Go back to using PCAP_API on Windows.
+    CMake support
+    Add TurboCap support from WinPcap.
+    Recognize 802.1ad nested VLAN tag in vlan filter.
+
+Thursday Sep. 3, 2015 guy%alum.mit.edu@localhost
+  Summary for 1.7.5 libpcap release
+       Man page cleanups.
+       Add some allocation failure checks.
+       Fix a number of Linux/ucLinux configure/build issues.
+       Fix some memory leaks.
+       Recognize 802.1ad nested VLAN tag in vlan filter.
+       Fix building Bluetooth Linux Monitor support with BlueZ 5.1+
+
+Saturday Jun. 27, 2015 mcr%sandelman.ca@localhost
+  Summary for 1.7.4 libpcap release
+       Include fix for GitHub issue #424 -- out of tree builds.
+
+Friday Apr. 10, 2015 guy%alum.mit.edu@localhost
+  Summary for 1.7.3 libpcap release
+       Work around a Linux bonding driver bug.
+
 Thursday Feb. 12, 2015 guy%alum.mit.edu@localhost/mcr%sandelman.ca@localhost
-  Summary for 1.8.0 libpcap release
+  Summary for 1.7.2 libpcap release
        Support for filtering Geneve encapsulated packets.
+       Generalize encapsulation handling, fixing some bugs.
+       Don't add null addresses to address lists.
+       Add pcap_dump_open_append() to open for appending.
+       Fix the swapping of isochronous descriptors in Linux USB.
+       Attempt to handle TPACKET_V1 with 32-bit userland and 64-bit kernel.
 
 Wednesday Nov. 12, 2014 guy%alum.mit.edu@localhost/mcr%sandelman.ca@localhost
   Summary for 1.7.0 libpcap release
        Fix handling of zones for BPF on Solaris
        new DLT for ZWAVE
        clarifications for read timeouts.
-       added bpf_filter1() with extensions
+       Use BPF extensions in compiled filters, fixing VLAN filters
        some fixes to compilation without stdint.h
        EBUSY can now be returned by SNFv3 code.
+       Fix the range checks in BPF loads
+       Various DAG fixes.
+       Various Linux fixes.
 
 Monday Aug. 12, 2014 guy%alum.mit.edu@localhost
   Summary for 1.6.2 libpcap release
diff -r dd4fb40acb11 -r 16f06f33cfa7 external/bsd/libpcap/dist/CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libpcap/dist/CMakeLists.txt  Tue Jan 24 21:55:26 2017 +0000
@@ -0,0 +1,520 @@
+cmake_minimum_required( VERSION 2.8.8 )
+
+project( pcap )
+#
+# Call the library "wpcap" on Windows, for backwards compatibility.
+#
+if( WIN32 )
+    set( LIBRARY_NAME wpcap )
+else()
+    set( LIBRARY_NAME pcap )
+endif()
+
+###################################################################
+#   Parameters
+###################################################################
+
+option (INET6 "Enable IPv6" ON)
+if( MSVC )
+    option (USE_STATIC_RT "Use static Runtime" ON)
+endif( MSVC )
+option (BUILD_SHARED_LIBS "Build shared libraries" ON)
+if( WIN32 )
+    set(PACKET_DLL_DIR "" CACHE PATH "Path to directory with include and lib subdirectories for packet.dll")
+endif( WIN32 )
+
+#
+# XXX - this should be an option, defaulting to "yes" for Windows and to
+# "no", for now, on UN*X.
+#
+if( WIN32 )
+    set( HAVE_REMOTE 1 )
+endif( WIN32 )
+
+######################################
+# Project settings
+######################################
+
+add_definitions( -DHAVE_CONFIG_H )
+
+include_directories(
+    ${CMAKE_CURRENT_BINARY_DIR}
+    ${pcap_SOURCE_DIR}
+)
+
+if( WIN32 )
+    if( NOT "${PACKET_DLL_DIR}" STREQUAL "" )
+        include_directories("${PACKET_DLL_DIR}/Include")
+        if( CMAKE_CL_64 )
+            link_directories("${PACKET_DLL_DIR}/Lib/x64")
+        else( CMAKE_CL_64 )
+            link_directories("${PACKET_DLL_DIR}/Lib")
+        endif( CMAKE_CL_64 )
+    endif()
+    include_directories(
+        ../Common/
+        Win32/Include
+    )
+endif( WIN32)
+
+add_definitions( -DBUILDING_PCAP )
+
+if( MSVC )
+    add_definitions( -D__STDC__ )
+    add_definitions( -D_CRT_SECURE_NO_WARNINGS )
+    add_definitions( "-D_U_=" )
+elseif( CMAKE_COMPILER_IS_GNUCXX )
+    add_definitions( "-D_U_=__attribute__((unused))" )
+else(MSVC)
+    add_definitions( "-D_U_=" )
+endif( MSVC )
+
+if( MSVC )
+    if (USE_STATIC_RT)
+        MESSAGE( STATUS "Use STATIC runtime" )
+        set(NAME_RT MT)
+        set (CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
+        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
+        set (CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+        set (CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+
+        set (CMAKE_C_FLAGS_MINSIZEREL       "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
+        set (CMAKE_C_FLAGS_RELWITHDEBINFO   "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
+        set (CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE} /MT")
+        set (CMAKE_C_FLAGS_DEBUG            "${CMAKE_C_FLAGS_DEBUG} /MTd")
+    else (USE_STATIC_RT)
+        MESSAGE( STATUS "Use DYNAMIC runtime" )
+        set(NAME_RT MD)
+        set (CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD")
+        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
+        set (CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} /MD")
+        set (CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
+
+        set (CMAKE_C_FLAGS_MINSIZEREL       "${CMAKE_C_FLAGS_MINSIZEREL} /MD")
+        set (CMAKE_C_FLAGS_RELWITHDEBINFO   "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD")
+        set (CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE} /MD")
+        set (CMAKE_C_FLAGS_DEBUG            "${CMAKE_C_FLAGS_DEBUG} /MDd")
+   endif (USE_STATIC_RT)
+endif( MSVC )
+
+###################################################################
+#   Detect available platform features
+###################################################################
+
+include(CheckIncludeFile)
+include(CheckFunctionExists)
+include(CheckStructHasMember)
+include(CheckTypeSize)
+
+#
+# Header files.
+#
+check_include_file( inttypes.h HAVE_INTTYPES_H )
+check_include_file( stdint.h HAVE_STDINT_H )
+check_include_file( unistd.h HAVE_UNISTD_H )
+if( NOT HAVE_UNISTD_H )
+    add_definitions( -DYY_NO_UNISTD_H )
+endif( NOT HAVE_UNISTD_H )
+check_include_file( bitypes.h HAVE_SYS_BITYPES_H )
+check_include_file( limits.h HAVE_LIMITS_H )
+
+#
+# Functions.
+#
+check_function_exists( strerror HAVE_STRERROR )
+check_function_exists( strlcpy HAVE_STRLCPY )
+check_function_exists( snprintf HAVE_SNPRINTF )
+check_function_exists( vsnprintf HAVE_VSNPRINTF )
+check_function_exists( strtok_r HAVE_STRTOK_R )
+
+if (WIN32)
+    #
+    # Check for Windows-only functions, such as packet.dll functions.
+    #
+    check_function_exists( PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER )
+endif()
+
+#
+# Data types.
+#
+# XXX - there's no check_struct() macro that's like check_struct_has_member()
+# except that it only checks for the existence of the structure type,
+# so we use check_struct_has_member() and look for ss_family.
+#
+check_struct_has_member("struct sockaddr_storage" ss_family sys/socket.h  HAVE_SOCKADDR_STORAGE)
+set(CMAKE_EXTRA_INCLUDE_FILES unistd.h sys/socket.h)
+check_type_size("socklen_t" SOCKLEN_T)
+set(CMAKE_EXTRA_INCLUDE_FILES unistd.h)
+
+#
+# Structure fields.
+#
+check_struct_has_member("struct sockaddr" sa_len sys/socket.h HAVE_SOCKADDR_SA_LEN )
+
+if( INET6 )
+    MESSAGE( STATUS "Use IPv6" )
+endif( INET6 )
+
+if( WIN32 )
+    add_definitions( -DHAVE_ADDRINFO )
+endif( WIN32 )
+
+######################################
+# External dependencies
+######################################
+
+######################################
+# Input files
+######################################
+
+set(PROJECT_SOURCE_LIST_C
+    bpf_dump.c
+    bpf_image.c
+    etherent.c
+    fad-helpers.c
+    gencode.c
+    inet.c
+    nametoaddr.c
+    optimize.c
+    pcap-common.c
+    pcap.c
+    savefile.c
+    sf-pcap-ng.c
+    sf-pcap.c
+    bpf/net/bpf_filter.c
+)
+
+if( WIN32 )
+    set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/win_snprintf.c )
+else()
+    if( NOT HAVE_SNPRINTF )
+        set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/snprintf.c )
+    endif( NOT HAVE_SNPRINTF )
+    if( NOT HAVE_STRTOK_R )
+        set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strtok_r.c )
+    endif( NOT HAVE_STRTOK_R )
+endif( WIN32 )
+
+if( HAVE_REMOTE )
+    set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C}
+        pcap-new.c pcap-rpcap.c sockutils.c)
+endif( HAVE_REMOTE )
+
+#
+# Determine the main pcap-XXX.c file to use.
+#
+if( WIN32 )
+    #
+    # WinPcap.
+    #
+    set( PCAP_TYPE win32 )
+else()
+    #
+    # UN*X - figure out what type of packet capture mechanism we



Home | Main Index | Thread Index | Old Index