From 35df6c9abbeb6f61d5ebf22c470ea2cb87310513 Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Sat, 17 Mar 2018 08:48:49 -0700 Subject: [PATCH] Update files for libpcap-1.8.1 import --- contrib/libpcap/README.DRAGONFLY | 5 ++++ lib/libpcap/Makefile | 24 +++++++++++----- lib/libpcap/config.h | 62 +++++++++++++++++++++++++++++----------- 3 files changed, 67 insertions(+), 24 deletions(-) diff --git a/contrib/libpcap/README.DRAGONFLY b/contrib/libpcap/README.DRAGONFLY index 7c94c28940..7d975a8eb0 100644 --- a/contrib/libpcap/README.DRAGONFLY +++ b/contrib/libpcap/README.DRAGONFLY @@ -4,3 +4,8 @@ http://www.tcpdump.org/release/ A list of files and directories removed is in README.DELETED Remember to update lib/libpcap/config.h. + +Configure with: + +./configure --disable-universal --disable-usb --disable-bluetooth \ + --disable-dbus --disable-packet-ring diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile index e515fa481d..f018f641fb 100644 --- a/lib/libpcap/Makefile +++ b/lib/libpcap/Makefile @@ -7,21 +7,26 @@ SRCS= pcap-bpf.c \ savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \ bpf_image.c bpf_dump.c \ scanner.l grammar.y bpf_filter.c version.c \ - version.h tokdefs.h + fad-helpers.c sockutils.c \ + pcap_version.h tokdefs.h INCS= pcap.h \ pcap-bpf.h \ pcap-namedb.h PCAPINCS= \ - pcap/bpf.h \ pcap/bluetooth.h \ + pcap/bpf.h \ + pcap/can_socketcan.h \ + pcap/dlt.h \ + pcap/export-defs.h \ pcap/ipnet.h \ pcap/namedb.h \ + pcap/nflog.h \ pcap/pcap.h \ pcap/sll.h \ - pcap/vlan.h \ - pcap/usb.h + pcap/usb.h \ + pcap/vlan.h PCAPINCSDIR= ${INCLUDEDIR}/pcap INCSGROUPS= INCS PCAPINCS @@ -52,6 +57,7 @@ MAN+= pcap_activate.3 \ pcap_findalldevs.3 \ pcap_freecode.3 \ pcap_get_selectable_fd.3 \ + pcap_get_tstamp_precision.3 \ pcap_geterr.3 \ pcap_inject.3 \ pcap_is_swapped.3 \ @@ -65,10 +71,12 @@ MAN+= pcap_activate.3 \ pcap_open_live.3 \ pcap_set_buffer_size.3 \ pcap_set_datalink.3 \ + pcap_set_immediate_mode.3 \ pcap_set_promisc.3 \ pcap_set_rfmon.3 \ pcap_set_snaplen.3 \ pcap_set_timeout.3 \ + pcap_set_tstamp_precision.3 \ pcap_setdirection.3 \ pcap_setfilter.3 \ pcap_setnonblock.3 \ @@ -95,11 +103,11 @@ MLINKS= pcap_datalink_val_to_name.3 pcap_datalink_val_to_description.3 \ pcap_open_offline.3 pcap_fopen_offline.3 \ pcap_setnonblock.3 pcap_getnonblock.3 -CLEANFILES=tokdefs.h version.c version.h +CLEANFILES=tokdefs.h version.c pcap_version.h CLEANFILES+=${MAN} WARNS?= 2 -LFLAGS+=-Ppcap_ +LFLAGS+=-Ppcap_ --header-file=${.OBJDIR}/scanner.h --nounput YFLAGS+=-p pcap_ CFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR} -I${.OBJDIR} CFLAGS+=-D_U_="__attribute__((unused))" -DYYBISON @@ -119,9 +127,11 @@ CFLAGS+=-I${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR}/bpf/net version.c: VERSION + echo '#include ' > ${.TARGET} + echo 'PCAP_API_DEF' >> ${.TARGET} sed -e 's/.*/char pcap_version[] = "&";/' ${.ALLSRC} > ${.TARGET} -version.h: VERSION +pcap_version.h: VERSION sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' \ ${.ALLSRC} > ${.TARGET} diff --git a/lib/libpcap/config.h b/lib/libpcap/config.h index ec3911765b..79d97f93be 100644 --- a/lib/libpcap/config.h +++ b/lib/libpcap/config.h @@ -1,5 +1,5 @@ /* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ +/* config.h.in. Generated from configure.ac by autoheader. */ /* Enable optimizer debugging */ /* #undef BDEBUG */ @@ -59,6 +59,15 @@ /* if libnl exists and is version 2.x */ /* #undef HAVE_LIBNL_2_x */ +/* if libnl exists and is version 3.x */ +/* #undef HAVE_LIBNL_3_x */ + +/* libnl has NLE_FAILURE */ +/* #undef HAVE_LIBNL_NLE */ + +/* libnl has new-style socket api */ +/* #undef HAVE_LIBNL_SOCKETS */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -68,12 +77,18 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_ETHTOOL_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IF_BONDING_H */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_IF_PACKET_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_NET_TSTAMP_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_SOCKIOS_H */ + /* if tp_vlan_tci exists */ /* #undef HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI */ @@ -110,16 +125,13 @@ /* if there's an os_proto.h for this platform, to use additional prototypes */ /* #undef HAVE_OS_PROTO_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_PATHS_H 1 - /* define if net/pfvar.h defines PF_NAT through PF_NORDR */ /* #undef HAVE_PF_NAT_THROUGH_PF_NORDR */ -/* define if you have a Septel API */ +/* define if you have the Septel API */ /* #undef HAVE_SEPTEL_API */ -/* define if you have Myricom SNF API */ +/* define if you have the Myricom SNF API */ /* #undef HAVE_SNF_API */ /* Define to 1 if you have the `snprintf' function. */ @@ -155,6 +167,9 @@ /* Define to 1 if you have the `strlcpy' function. */ #define HAVE_STRLCPY 1 +/* Define to 1 if you have the `strtok_r' function. */ +#define HAVE_STRTOK_R 1 + /* Define to 1 if the system has the type `struct BPF_TIMEVAL'. */ /* #undef HAVE_STRUCT_BPF_TIMEVAL */ @@ -173,6 +188,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCCOM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKIO_H 1 @@ -182,6 +200,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 +/* define if you have the TurboCap API */ +/* #undef HAVE_TC_API */ + /* if if_packet.h has tpacket_stats defined */ /* #undef HAVE_TPACKET_STATS */ @@ -191,9 +212,6 @@ /* if struct usbdevfs_ctrltransfer has bRequestType */ /* #undef HAVE_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE */ -/* define if version.h is generated in the build procedure */ -#define HAVE_VERSION_H 1 - /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 @@ -204,7 +222,7 @@ #define HAVE___ATTRIBUTE__ 1 /* IPv6 */ -/* #undef INET6 */ +#define INET6 1 /* if unaligned access fails */ /* #undef LBL_ALIGN */ @@ -245,33 +263,40 @@ /* target host supports Bluetooth sniffing */ /* #undef PCAP_SUPPORT_BT */ -/* target host supports CAN sniffing */ -/* #undef PCAP_SUPPORT_CAN */ +/* target host supports Bluetooth Monitor */ +/* #undef PCAP_SUPPORT_BT_MONITOR */ -/* target host supports canusb */ -/* #undef PCAP_SUPPORT_CANUSB */ +/* support D-Bus sniffing */ +/* #undef PCAP_SUPPORT_DBUS */ /* target host supports netfilter sniffing */ /* #undef PCAP_SUPPORT_NETFILTER */ +/* use Linux packet ring capture if available */ +/* #undef PCAP_SUPPORT_PACKET_RING */ + /* target host supports USB sniffing */ /* #undef PCAP_SUPPORT_USB */ /* include ACN support */ /* #undef SITA */ +/* if struct sockaddr_hci has hci_channel member */ +/* #undef SOCKADDR_HCI_HAS_HCI_CHANNEL */ + /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Enable parser debugging */ /* #undef YYDEBUG */ +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ -/* needed on HP-UX */ -/* #undef _HPUX_SOURCE */ - /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ /* #undef _LARGEFILE_SOURCE */ @@ -281,6 +306,9 @@ /* define on AIX to get certain functions */ /* #undef _SUN */ +/* define if your compiler allows __attribute__((format)) without a warning */ +#define __ATTRIBUTE___FORMAT_OK 1 + /* to handle Ultrix compilers that don't support const in prototypes */ /* #undef const */ -- 2.11.4.GIT