aboutsummaryrefslogtreecommitdiffstats
path: root/caputils
AgeCommit message (Collapse)AuthorFilesLines
2018-08-21Clean up includes for SIOCGIFDESCR.Guy Harris1-5/+9
Change-Id: Ib92f7d85355540cff23f7bb08db911f200541f5f Reviewed-on: https://code.wireshark.org/review/29231 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21We use errno, so we need to include <errno.h>.Guy Harris1-0/+1
Change-Id: Ic6d88c508594aa9daf36bd0a6a9f2fe4f0db71bd Reviewed-on: https://code.wireshark.org/review/29230 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21Wrong snprintf() wrapper.Guy Harris1-1/+1
Change-Id: I7d8d83cd1829bed8cc940fa3d9c86cdc94f361af Reviewed-on: https://code.wireshark.org/review/29229 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21We need sys/sockio.h to define SIOCGIFDESCR.Guy Harris1-0/+4
Change-Id: Ief8830d7a5ce47ea7f486a4700f49859003519db Reviewed-on: https://code.wireshark.org/review/29225 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-13Put the interface descrptions into the IDB when capturing to pcapng.Guy Harris2-8/+156
capture_opts_add_iface_opt(), when called in a program acting as a capture child, will fetch the description for the interface, and will also generate a "display name" for the interface. In the process, we clean up capture_opts_add_iface_opt() a bit, combining duplicate code. We rename console_display_name to just display_name, as it may also be used in the title bar of Wireshark when capturing. Change-Id: Ifd18955bb3cb41df4c0ed4362d4854068c825b96 Reviewed-on: https://code.wireshark.org/review/29117 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-26Remove code specific to older versions of Visual Studio.Gerald Combs1-30/+0
Remove -DBUILD_WINDOWS and sections of code that we no longer use. Bug: 14715 Change-Id: Iae1a950e2f52f4ce45fcf0ae5dea06c1172c3a28 Reviewed-on: https://code.wireshark.org/review/28466 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-11Fix names in declarations to match definitions.Guy Harris2-5/+7
Change-Id: I7b3dd147b523fd3251d93dd1917d2e2c47433207 Reviewed-on: https://code.wireshark.org/review/28195 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-10Improve the secondary error messages for pcap errors.Guy Harris5-132/+193
On Windows, if WinPcap isn't installed, warn about that for errors other than failed attempts to start capturing. On HP-UX, if we appear to have an old version of libpcap, warn about that for errors other than failed attempts to start capturing. If we know the error is a permissions problem, don't make suggestions appropriate to other problems. If we know the error is *not* a permissions problem, don't make suggestions appropriate to permissions problems. For permissions problems, or possible permissions problems, on Linux, suggest doing dpkg-reconfigure wireshark-common if you've installed from a package on Debian or a Debian derivative such as Ubuntu. Change-Id: If4aac0343095ac0b984eebc21853920c3b6d3c63 Ping-Bug: 14847 Reviewed-on: https://code.wireshark.org/review/28189 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-23make our version of nla_for_each_nested() publicMartin Kaiser1-21/+2
caputils/ws80211_utils.c contains a re-definition of the linux kernel's nla_for_each_nested() macro that applies the correct casts to allow compilation with a C++ compiler. Make this definition public by moving it into a new wsutil/netlink.h file. Include the kernel's original definition before we overwrite it. This way, it's not necessary for a .c file to include wsutil/netlink.h after the system includes. Use our nla_for_each_nested() version in extcap/dpauxmon.c to squelch the following compiler warning: [1664/2251] Building C object extcap/CMakeFiles/dpauxmon.dir/dpauxmon.c.o ../extcap/dpauxmon.c: In function ‘family_handler’: ../extcap/dpauxmon.c:168:13: warning: request for implicit conversion from ‘void *’ to ‘struct nlattr *’ not permitted in C++ [-Wc++-compat] nla_for_each_nested(mcgrp, tb[CTRL_ATTR_MCAST_GROUPS], rem_mcgrp) { Change-Id: I6ba40ef6343c5d168c1b0c4554f13202911ded76 Reviewed-on: https://code.wireshark.org/review/27688 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18Older versions of Clang don't understand -Wpedantic.Guy Harris2-8/+8
Define DIAG_OFF_PEDANTIC and DIAG_ON_PEDANTIC, and have it do nothing on Clang prior to 4.0. Change-Id: Ic6b2e607659db66f3210401024bf3f2239665506 Reviewed-on: https://code.wireshark.org/review/27649 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16Eliminate some unneeded header checks.Guy Harris1-3/+1
sys/stat.h and sys/types.h date back to V7 UNIX, so they should be present on all UN*Xes, and we're assuming they're available on Windows, so, unless and until we ever support platforms that are neither UN*Xes nor Windows, we don't need to check for them. Remove the CMake checks for them, remove the HAVE_ values from cmakeconfig.h.in, and remove all tests for the HAVE_ values. Change-Id: I90bb2aab37958553673b03b52f4931d3b304b9d0 Reviewed-on: https://code.wireshark.org/review/27603 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-08Windows: prioritize Npcap over WinPcapPascal Quantin1-3/+3
It is now considered stable enough to be our default capture driver if present Change-Id: I7f3cdabcbaea526949afa47164e520202e6b93f2 Reviewed-on: https://code.wireshark.org/review/27393 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-01Fix comment end after SPDX identifierStig Bjørlykke15-15/+30
Move */ to a separate line below the SPDX identifier. Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f Reviewed-on: https://code.wireshark.org/review/27211 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01Use common indenting space in headingStig Bjørlykke1-9/+9
Change-Id: I47022f9c7d568ca6d9705ba63c669a980822818a Reviewed-on: https://code.wireshark.org/review/27229 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18Remove autotools build system.Dario Lombardo1-90/+0
It has been replaced by cmake. Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a Reviewed-on: https://code.wireshark.org/review/26969 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17glib: Use g_slist_free_full() in a couple of places.Anders1-8/+1
Change-Id: Iff833bf5c197959c8decb62d6ce794c6d0415fb7 Reviewed-on: https://code.wireshark.org/review/26978 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17Switch the Doxygen API reference build to CMake.Gerald Combs1-81/+0
Switch to a single Doyxgen configuration which was generated using a recent version of Doxygen and customized to suit our needs. Add wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup and documentation as needed. Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69 Reviewed-on: https://code.wireshark.org/review/26976 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17Remove some GTK+-only code.Gerald Combs1-2/+2
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1 Reviewed-on: https://code.wireshark.org/review/26958 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09spdx: more licenses converted.Dario Lombardo1-11/+1
Change-Id: I8f6693108c43959e54911d35b4fbf730c59add60 Reviewed-on: https://code.wireshark.org/review/26361 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07spdx: more licenses converted.Dario Lombardo1-13/+1
Change-Id: I3861061ec261e63b23621799e020e811ed78a343 Reviewed-on: https://code.wireshark.org/review/26333 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-01Windows: Remove cruft for unsupported versonsGraham Bloice1-91/+24
Remove all the existing LoadDLL\GetProcAddress combinations that allowed conditional Win32 API usage if supported on the running OS version. All the required functions are present in the versions we support. Change-Id: Ibc43e51cefcd1c7562d4e251784362509f224ed6 Reviewed-on: https://code.wireshark.org/review/26215 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-02-24Rename airpdcap to dot11decrypt.Gerald Combs2-2/+2
Our 802.11 decryption code isn't tied to any specific product. Change the file and API names to dot11decrypt. Change-Id: I14fd951be3ae9b656a4e1959067fc0bdcc681ee2 Reviewed-on: https://code.wireshark.org/review/26058 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-17Make all versions of add_unix_interface_ifinfo() static.Guy Harris1-1/+1
That routine is not used outside this file. Change-Id: I50bd1aee564df1b4bb38602a1a40377b5dd86d5f Reviewed-on: https://code.wireshark.org/review/25856 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris1-5/+1
Except for the one directory that (currently) has "not yet clean" files, epan/dissectors, we don't need a separate variable to keep track of the "clean" source files. In the cases where not all files were in CLEAN_FILES, put them into the variable used to enable -Werror or its equivalent. Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b Reviewed-on: https://code.wireshark.org/review/25830 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09caputils/tools: more SPDX convertions.Dario Lombardo1-13/+1
Change-Id: I44a8d1848f768acf4c3b31a68c845264c74e4bba Reviewed-on: https://code.wireshark.org/review/25709 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo15-15/+15
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-07caputils: use SPDX identifiers.Dario Lombardo16-225/+16
Change-Id: I7c30002025c31a74dfa60c10ca7f7c0dd384e1c9 Reviewed-on: https://code.wireshark.org/review/25559 Petri-Dish: Dario Lombardo <lomato@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-05Amend the comment with some background for the workaround.Jaap Keuter1-0/+4
The added comment only explains what the cause of the problem is, and the subsequent workaround, without going into how this could be properly addressed. Add some lines to add that information. Change-Id: I74e4df0e0c4b41fe8d52d9abf2d15335d2b327d6 Reviewed-on: https://code.wireshark.org/review/25614 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-03Add a comment explaining why err is volatile.Guy Harris1-0/+15
And also indicate that perhaps the right solution was just to close the CID as a false positive, as Coverity doesn't have a deep enough understanding of libnl to know that the loop isn't guaranteed to be infinite. Change-Id: Ieb0651c803a5939fb54f2bc68bdf8c5485dafaf2 Reviewed-on: https://code.wireshark.org/review/25582 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-09Use pcapng as the name of the file format.Guy Harris1-2/+2
At one point, I remember a discussion resulting in the official name of the next-generation replacement for pcap format being changed to "pcapng", with no hyphen. Make Wireshark reflect that. Change-Id: Ie66fb13a0fe3a8682143106dab601952e9154e2a Reviewed-on: https://code.wireshark.org/review/25214 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-08extcap: remove conditional compilation.Dario Lombardo2-9/+0
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9 Reviewed-on: https://code.wireshark.org/review/25186 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-18autotools: Library build products don't need explicit cleaningJoão Valverde1-3/+1
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff Reviewed-on: https://code.wireshark.org/review/24484 Reviewed-by: João Valverde <j@v6e.pt>
2017-10-26We don't need to define sockaddr_storage.Gerald Combs1-48/+0
Winsock2.h will do that for us via packet32.h. Change-Id: Ie834d49b052c3db6784481bb85d94d4eecff8287 Reviewed-on: https://code.wireshark.org/review/24082 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-26CMake: Don't check for windows.h or winsock2.h.Gerald Combs1-1/+1
If we're building on Windows we're going to have windows.h and winsock2.h. Don't bother checking for them. Change-Id: I0004c44d7364ab3f41682f34b8c84cd8617c9603 Reviewed-on: https://code.wireshark.org/review/24068 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-17autotools: remove macOS Frameworks supportJoão Valverde1-1/+1
This treats macOS/OSX like any other Unix-like build target (Darwin), thus removing autotools support for macOS-specific build options. Anyone needing that is advised to use the fully-supported-on-macOS CMake build. Change-Id: I88e2fa7a8eea42241efcf84223ac2362d38b1e12 Reviewed-on: https://code.wireshark.org/review/23951 Petri-Dish: João Valverde <j@v6e.pt> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15autotools: make maintainer-clean should allow rerunning 'configure'João Valverde1-3/+0
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d Reviewed-on: https://code.wireshark.org/review/23928 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-14/+6
NULL checks were removed for following free functions: - g_free "If mem is NULL it simply returns" https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free - g_slist_free(_full)? "NULL is considered to be the empty list" https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html - g_strfreev "If str_array is NULL, this function simply returns." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev - g_slice_free "If mem is NULL, this macro does nothing." https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free - g_match_info_free "not NULL... otherwise does nothing" https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free - dfilter_free defined in Wireshark code. Returns early when passed NULL epan/dfilter/dfilter.c They were also removed around calls to g_strdup where applicable: - g_strdup "If str is NULL it returns NULL." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04 Reviewed-on: https://code.wireshark.org/review/23406 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-13CMake: Allow user build flags to override default build flagsJoão Valverde1-1/+0
Autotools has the very useful feature by design of allowing the user to override the default build flags (you break it you keep it). Apparently CMake applies COMPILE_OPTIONS target property after CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those variables instead to make it work then. Specific target flag overrides can still be added with COMPILER_OPTIONS (e.g: generated files with -Wno-warning) but this is less effective and then we're back at the point where this overrides user flags. It's less of a concern though. Change-Id: I44761a79be4289238e02d4e781fef0099628817b Reviewed-on: https://code.wireshark.org/review/23675 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-09-24autotools: Use package flags to configure libpcapJoão Valverde1-1/+2
Change-Id: Icd64014b597a8e60d2aff9d180c441c6ffccff26 Reviewed-on: https://code.wireshark.org/review/23329 Reviewed-by: João Valverde <j@v6e.pt>
2017-09-06caputils: fix compilation without pcap.Dario Lombardo1-0/+2
Change-Id: I074d027cd2528b0438015ddd098c9f4f6542090a Reviewed-on: https://code.wireshark.org/review/23415 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-06plugins: config.h must not be included by public headersJoão Valverde3-0/+5
For a sane plugin build environment. Include config.h as the first header in the .c file instead. Fix by moving required compiler attribute macros to a new "ws_attributes.h" API header. Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1 Reviewed-on: https://code.wireshark.org/review/23400 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-08-25Fix leaked timestamp recordsMikael Kanstrup2-7/+8
Valgrind reports leaked timestamp records. A comment stated that the timestamp info members only contain static data. That claim was only true for some cases, not all so make all cases allocate memory and have them properly freed when removed. Fixes: aca55a2 ("Add hardware timestamping support") Change-Id: I31e4689070019ad1f531008394e7d6e48318c70c Reviewed-on: https://code.wireshark.org/review/23206 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-22Add hardware timestamping supportAhmad Fatoum2-7/+70
pcap provides a pcap_set_tstamp_type function, which can be used to request hardware timestamps from a supporting kernel. This patch adds support for aforementioned function as well as two new command line options to dumpcap, wireshark and tshark: --list-time-stamp-types List time stamp types supported for the interface --time-stamp-type <type> Change the interface's timestamp method Name choice mimics those used by tcpdump(1), which already supports this feature. However, unlike tcpdump, we provide both options unconditionally. If Wireshark was configured without pcap_set_tstamp_type being available, --list-time-stamp-types reports an empty list. Change-Id: I418a4b2b84cb01949cd262aad0ad8427f5ac0652 Signed-off-by: Ahmad Fatoum <ahmad.fatoum@siemens.com> Reviewed-on: https://code.wireshark.org/review/23113 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-05Allow bigger snapshot lengths for D-Bus captures.Guy Harris1-8/+8
Use WTAP_MAX_PACKET_SIZE_STANDARD, set to 256KB, for everything except for D-Bus captures. Use WTAP_MAX_PACKET_SIZE_DBUS, set to 128MB, for them, because that's the largest possible D-Bus message size. See https://bugs.freedesktop.org/show_bug.cgi?id=100220 for an example of the problems caused by limiting the snapshot length to 256KB for D-Bus. Have a snapshot length of 0 in a capture_file structure mean "there is no snapshot length for the file"; we don't need the has_snap field in that case, a value of 0 mean "no, we don't have a snapshot length". In dumpcap, start out with a pipe buffer size of 2KB, and grow it as necessary. When checking for a too-big packet from a pipe, check against the appropriate maximum - 128MB for DLT_DBUS, 256KB for everything else. Change-Id: Ib2ce7a0cf37b971fbc0318024fd011e18add8b20 Reviewed-on: https://code.wireshark.org/review/21952 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-03capture-pcap-util.c: fix a typoPascal Quantin1-1/+1
Change-Id: I674d02be665afc331e266725c0a0cbc0a33d9403 Reviewed-on: https://code.wireshark.org/review/21926 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-06-03Fix typo.Guy Harris1-1/+1
Change-Id: If4ac286fed29635ec085f9671c77abf6ed22766d Reviewed-on: https://code.wireshark.org/review/21919 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-03If has_snaplen isn't set, don't set the snapshot length with ↵Guy Harris1-9/+34
pcap_create()/pcap_activate(). Just let libpcap pick the snapshot length; that way, for link-layer types that need a really large snapshot length, such as D-Bus (which requires 128MB for the largest messages), it can pick that, but can otherwise pick something that doesn't require as much memory, e.g. 256KB. For pcap_open_live() and pcap_open(), which don't have a way of saying "give me what's appropriate", pick 256KB. Change-Id: Idef5694f7dfa85eaf3a61d6ca7a17d263c417431 Reviewed-on: https://code.wireshark.org/review/21917 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-12Include caputils/capture-wpcap.h whether HAVE_LIBPCAP is defined or not.Guy Harris1-1/+2
It declares what's defined here, so always include it. Change-Id: I1d7d5ed071e6f2d53af9ff147ede18b05b98ecd1 Reviewed-on: https://code.wireshark.org/review/21616 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-12Don't include headers that depend on pcap if you don't have it.Guy Harris1-5/+5
Change-Id: I17234ef60411f922678b900a6ac4fb264b9ce431 Reviewed-on: https://code.wireshark.org/review/21614 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.Guy Harris3-39/+3
Have a header file that defines HAVE_REMOTE if HAVE_PCAP_REMOTE is defined, and then includes pcap.h. Replace all other includes of pcap.h, and the definition of HAVE_REMOTE, with includes of that file. Check for anything other than wspcap.h including pcap.h in checkAPIs.pl. Change-Id: I3cbee8208944ad6f006f568b3fe3134e10b2a883 Reviewed-on: https://code.wireshark.org/review/21605 Reviewed-by: Guy Harris <guy@alum.mit.edu>