aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
AgeCommit message (Collapse)AuthorFilesLines
2017-11-22sshdump: remove extra option check.Dario Lombardo1-5/+0
This looked a bit odd since the capture filter is variable length. Removing it makes sshdump work. Change-Id: I454c6263c04019d5e8ecbecd2490dd10185f5c67 Reviewed-on: https://code.wireshark.org/review/24531 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-22sshdump: add option to prevent promiscuous mode.Dario Lombardo1-9/+23
Bug: 14237 Change-Id: I5cecca8ed638c3935c7c77e3a304e4b0527d7fa3 Reviewed-on: https://code.wireshark.org/review/24530 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-19Fix (and chop) static build optionJoão Valverde1-30/+0
This sets the scope of the static build option to Wireshark support libraries only. Before the patch: Static plugins don't work with CMake and autotools. autotools static build is broken, and most likely will always be, as building Wireshark all-static is difficult and time-consuming. After the patch: For CMake Wireshark will be built with static or shared libraries and dynamic plugins. Everything just works. CMake apparently doesn't want you building static and shared libraries at the same time. For autotools Wireshark will be built with shared libraries by default. --disable-shared and --enable-static options work as usual. Dlopened plugins are not built if --disable-shared is given to configure (to disable shared libraries). This is a limitations imposed by libtool. Tested on Linux. This removes broken support for building plugins statically. Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c Reviewed-on: https://code.wireshark.org/review/24241 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-11-15udpdump: add space.Dario Lombardo1-1/+1
Change-Id: I44960f64f16434ccdf033eaa2bfa96579da7cc4b Reviewed-on: https://code.wireshark.org/review/24439 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-11-12extcap: use SPDX identifiers for licences.Dario Lombardo10-130/+10
Change-Id: Id56687f86f4c60494dad0b6d58550ee45b0b203c Reviewed-on: https://code.wireshark.org/review/24381 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-09extcap: rename interface names.Dario Lombardo2-2/+2
The new names better reflect the utility. Change-Id: I54105fc8be6735d3febbcc68837990758a5e52c3 Reviewed-on: https://code.wireshark.org/review/24320 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-11-09Replace inet_addr() with our inet_pton() wrapperJoão Valverde2-6/+5
Error checking omitted like in original code. Change-Id: If8b4181d30ddf5717951aaf7ec61db25c0bc5322 Reviewed-on: https://code.wireshark.org/review/24309 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-11-08udpdump: don't call inet_addr() for every packet.Dario Lombardo1-1/+3
Change-Id: Id3d9229f5d61390f2f4127c8dfdf445935297e85 Reviewed-on: https://code.wireshark.org/review/24300 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-16[RFC]androiddump: Support extcap-dlts optionMikael Kanstrup1-3/+30
According to README.extcap documentation all extcap tools must support the --extcap-dlts option. For performance reasons support for this option was removed by commit: 9328eb6 androiddump: Register interfaces when list interfaces A side effect of not implementing the option is that dumpcap is then also called to try to retrieve interface capabilities for all androiddump interfaces. As extcap interfaces are not local network interfaces errors like these are logged whenever the interface list is refreshed: Capture Dbg sync_if_capabilities_open Capture Info sync_pipe_run_command() starts Capture Dbg argv[0]: /usr/local/bin/wireshark/dumpcap Capture Dbg argv[1]: -i Capture Dbg argv[2]: android-tcpdump-wlan0... Capture Dbg argv[3]: -L Capture Dbg argv[4]: -Z Capture Dbg argv[5]: none Capture Dbg sync_pipe_open_command Capture Dbg read 25 ok indicator: E len: 333 msg: E Capture Dbg sync_pipe_wait_for_child: wait till child closed Capture Dbg sync_pipe_wait_for_child: capture child closed after 0.000s Capture Info sync_pipe_run_command() ends, taking 0.012s, result=-1 Capture Msg Capture Interface Capabilities failed. Error -1, The capabilities of the capture device "android-tcpdump-wlan0..." could not be obtained (android-tcpdump-wlan0...: SIOCETHTOOL(ETHTOOL_GET_TS_INFO) ioctl failed: No such device). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified. () To avoid error prints and to fulfil the documented equirements for extcap tools register a fake interface with what would be the properties of such an interface. Change-Id: If174adbb64c66132be4225f854bbf9f66d2f5ed1 Reviewed-on: https://code.wireshark.org/review/23093 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-2/+1
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-14Some trivial fixes from running cppcheck.Martin Mathieson1-2/+2
The packet-per.c intialisation of ext_length is not really needed - idx could be -1 with or without extension_flag being set. But it'd be best not to have someone need to think this through again. Change-Id: If07f98ac7d7f2619149e35a2a0d75b765839a7ba Reviewed-on: https://code.wireshark.org/review/23905 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-25udpdump: Add missing include for timeval struct.Jakub Zawadzki1-0/+4
struct timeval is defined in <sys/time.h>, include it. It should fix building with musl: udpdump.c: In function 'setup_listener': udpdump.c:126:9: error: variable 'timeout' has initializer but incomplete type struct timeval timeout = { 1, 0 }; Change-Id: Id9be579e50ea2845ca609708e8ec4d1a3858ecc0 Reviewed-on: https://code.wireshark.org/review/23728 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-09-24autotools: Use package flags to configure libpcapJoão Valverde1-1/+1
Change-Id: Icd64014b597a8e60d2aff9d180c441c6ffccff26 Reviewed-on: https://code.wireshark.org/review/23329 Reviewed-by: João Valverde <j@v6e.pt>
2017-09-06plugins: config.h must not be included by public headersJoão Valverde1-0/+1
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-23Fix potential oob write crashesUlf1-4/+4
Bug: 13847 Change-Id: I3a706db25204fe4c1fd1b7be3b17b8c55365dccf Reviewed-on: https://code.wireshark.org/review/23169 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-08-18androiddump: Support 802.11 monitor and nlmon interfacesMikael Kanstrup1-0/+6
Some Android devices support 802.11 monitor mode and nlmon interfaces. Add linktype defines to be able to capture frames from such interfaces. Change-Id: I8b8b444ac2821542fc946694b71c8d9fb7ba1238 Reviewed-on: https://code.wireshark.org/review/23080 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-17androiddump: Fix bt snoop capturingMikael Kanstrup1-1/+1
Recent changes had the bt snoop capturing function stop working for Android API versions >= 21. One of the command strings used for detecting btsnoop server socket interface got messed up when refactoring code. Fix by using the correct command strings again. Fixes: faf100ec ("androiddump: Introduce adb_connect_transport helper function") Change-Id: Id645d24cfb0cb23f36484cfd6416768c89bce51b Reviewed-on: https://code.wireshark.org/review/23106 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-08-15androiddump: Avoid linktype/encap conversionMikael Kanstrup1-39/+15
Let androiddump's internal definition of encap types directly use linktype values from libpcap/wiretap. This way back and forth conversion between internal and public values can be avoided. Change-Id: I67522283cc3eb15cbdb1bfdd829bb1ff0031bb82 Reviewed-on: https://code.wireshark.org/review/23079 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-03extcap: skip custom log if filename is space.Dario Lombardo1-2/+4
Change-Id: I98b890316af05d9c5359dc38a30d07ac55f262fe Reviewed-on: https://code.wireshark.org/review/22932 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-08-02extcap: add debug log file feature to extcap-base.Dario Lombardo7-30/+89
Change-Id: I3bfc9b2fd7b73dcfef52c5101360384d205c0d12 Reviewed-on: https://code.wireshark.org/review/22835 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-27extcap: add command line debug function to extcap-base.Dario Lombardo7-12/+20
This function is helpful to debug the interaction between the calling UI and the extcap itself. All extcaps have been changed accordingly. Change-Id: I358caf4c50797501672bf77fdd91f7276897078c Reviewed-on: https://code.wireshark.org/review/22806 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-07-21androiddump: check return value of localtime() before dereference (CID 1400829).Dario Lombardo1-6/+8
Change-Id: I03c851e56f5bd967a35c668bcbc4e98170251b2c Reviewed-on: https://code.wireshark.org/review/22750 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-21androiddump: add a cast to please MSVC x64Pascal Quantin1-1/+1
Change-Id: I43cf913d48afabd826f7d6f861876e1cb62e7e7a Reviewed-on: https://code.wireshark.org/review/22751 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-07-20androiddump: use actual buffer length instead of pointer sizeof.Dario Lombardo1-2/+2
Change-Id: I3481c98377a31fbef2ef8ad931e2a8d66f507e58 CID: 1414110 CID: 1414058 Reviewed-on: https://code.wireshark.org/review/22743 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-07androiddump: Reduce code duplicationMikael Kanstrup1-103/+78
Some more repeated code patterns identified. Reduce code duplication by adding some helper functions. Change-Id: I0fecd511fd56049e9eae111cdad08252dffff6cb Reviewed-on: https://code.wireshark.org/review/22480 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-07-01androiddump: Close socket on failure pathMikael Kanstrup1-0/+3
Fix a few cases where socket is not closed on failure path. Change-Id: Id116a8e5f14979f962fdf725c62999758b79109e Reviewed-on: https://code.wireshark.org/review/22481 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-07-01androiddump: Fix null dereference if linktype not foundMikael Kanstrup1-0/+2
If linktype cannot be determined from tcpdump output the lookup function is handed a NULL which is then strcmp:ed. Handle NULL parameter by explicit check. Fixes Coverity CID 1413923 Change-Id: I290c116991d15cef0a1e954a9f8b76722a5f450c Reviewed-on: https://code.wireshark.org/review/22483 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-06-30androiddump: Fix leaked linktype stringMikael Kanstrup1-0/+1
The regex matching for linktype might be performed multiple times. Make sure string is freed before fetched again. Change-Id: Ice7812ff4a3a8e6a1497ab2ef5aa94976502c16f Reviewed-on: https://code.wireshark.org/review/22482 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-06-28androiddump: Fix printf format for size_tStig Bjørlykke1-1/+1
Change-Id: Ia4646b649881316350ee1aed7d8cc9626036dd30 Reviewed-on: https://code.wireshark.org/review/22442 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-27androiddump: Support packet capture on any interface that is upMikael Kanstrup1-32/+101
androiddump used to start tcpdump without specifying the interface to capture packets on. This works when only one interface is up but when multiple interfaces are up the output might be empty. This change let tcpdump list all available network interfaces and adds a unique extcap interface for each interface that is 'up' on the device. Change-Id: Icf0d7fa8f38320092579d4163dcdbcf2b687d8cc Reviewed-on: https://code.wireshark.org/review/22402 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-27androiddump: Use Android tcpdump reported data link typeMikael Kanstrup1-1/+54
Instead of treating all output from Android tcpdump as Ethernet data link type parse what tcpdump acually tells it to be. This is needed as there are cases when the output is not Ethernet. For example when starting packet capture on a device with multiple interfaces up. NOTE: As translation between tcpdump reported DLT and androiddump's internal type was needed for now support is only added for types used by network interfaces of tested devices (i.e. ETHERNET and LINUX_SSL). Change-Id: Ie3f9167176c336cb31f6e681f1daac6135a78883 Reviewed-on: https://code.wireshark.org/review/22401 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-27The 3rd argument to recv() is an int on Windows.Guy Harris1-2/+2
Make the variable used for it an int; that's large enough, and, on Windows, not so large that it provokes warnings. Change-Id: I00600d816f69d79f7a42eb09b1290ff7708b0bfc Reviewed-on: https://code.wireshark.org/review/22420 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-27androiddump: Let adb_send funcs generate string length prefixMikael Kanstrup1-37/+55
All strings sent to adb are prefixed with the length as a 4 byte hex string. The length info prefix was manually hard coded into strings. To avoid mistakes when updating code and to simplify reading the source code instead let the various adb_send functions calculate string lengths and generate the 4 byte hex string prefixes. Change-Id: I4178e9df5930a1c7904053e5a7750c943efddc84 Reviewed-on: https://code.wireshark.org/review/22399 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-26androiddump: Add helper functions for data link type conversionsMikael Kanstrup1-21/+26
Change-Id: I406f5cd6d979442014fdda01deacbcec2052ec18 Reviewed-on: https://code.wireshark.org/review/22400 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-26androiddump: Introduce adb_connect_transport helper functionMikael Kanstrup1-359/+96
Same code pattern is used over and over when connecting to an adb server. Introduce a helper function that perform the function of connecting to specified adb server and transport. Change-Id: Id2f72f1eb976fa0d742a6db1ef6d592264990ba1 Reviewed-on: https://code.wireshark.org/review/22398 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-26[RFC]androiddump: Only filter CR/LFs on WindowsMikael Kanstrup1-0/+2
Comments in code claim: "The data we are getting from the tcpdump stdoutput stream as the stdout is the text stream it is convertinng the 0A=0D0A; So we need to remove these extra character." This is not true on non-Windows systems at least so avoid the filter when not built for Windows. NOTE: A problem with the filter is that it operates on all bytes received on the socket, including packet data(!). Capturing data with CR/LFs (for example an HTTP request) will fail. Ideally the filter should be replaced with some other mechanism but as I don't have a Windows system to verify that the comment claims are valid, this change will at least make androiddump work on non-Windows systems. Bug: 13510 Change-Id: Ic00f44fa7516c0db7fc015ed8685deb365a347db Reviewed-on: https://code.wireshark.org/review/22397 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-15udpdump.c: Don't include epan headers.Michael Mann1-3/+0
udpdump has local copies of the tag values from exported_pdu.h, so the dependency isn't needed. exported_pdu.h required tv_buff.h and packet_info.h, whose inclusion caused link errors on SPARC. Bug: 13801 Change-Id: Icbf7b59b8af0d3a0fc73599baad6932e76dc3462 Reviewed-on: https://code.wireshark.org/review/22131 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-11Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.Guy Harris1-13/+1
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>
2017-05-11Force HAVE_REMOTE to be defined when including pcap.h with remote support.Guy Harris1-0/+12
WinPcap made the mistake of having stuff in its public header fines depend on a configuration #define, HAVE_REMOTE; this means that we need to forcibly define it when building with remote capture support. The tip of the libpcap master branch does not have that botch; hopefully future versions of libpcap-for-Windows will be based on that libpcap and thus lack that botch as well. Defining HAVE_REMOTE in config.h is not the right fix, as it makes it look like a *Wireshark* configuration option that code in Wireshark should test, rather than a *WinPcap* configuration option that the pcap.h that ships with the WinPcap SDK should have been changed, as part of the build process, to correctly define or not, so that users of WinPcap don't have to define it themselves. Change-Id: I62d1eca6d3c900d0dcc9fbc011db77f595a86313 Reviewed-on: https://code.wireshark.org/review/21593 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-21Use the cfile_ failure_message routines in androiddump.Guy Harris2-12/+39
Change-Id: Ic310eaafac054db7736c503252062c3dd3e00a99 Reviewed-on: https://code.wireshark.org/review/21265 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-04-20Use cfile_write_failure_message() in the randpkt code.Guy Harris1-0/+1
Change-Id: I32ef7ff85f854782e5dd02c3e7f12436a120bc13 Reviewed-on: https://code.wireshark.org/review/21259 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-27udpdump: fix indent (use tab)Alexis La Goutte1-1/+1
Change-Id: Ibfe9ad19d12a84794f5e84ebaf3b9de5d4e419e8 Reviewed-on: https://code.wireshark.org/review/20733 Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-03-27udpdump.c: warning C6262: Function uses '65608' bytes of stack: exceeds ↵Michael Mann1-1/+3
/analyze:stacksize '16384' Change-Id: I1d82c62dd30497db6a88ba3d3c973799ba7631ab Reviewed-on: https://code.wireshark.org/review/20730 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-23androiddump: Fix tcpdump op prec bug with used_buffer_length calcMikael Kanstrup1-1/+1
androiddump reads data from tcpdump in chunks that not necessarily match packet sizes. Whenever a partly read packet is found in buffers more data is read and the number of used bytes in buffer is updated. The calculation of used_buffer_length is wrong though leading to most packets are read and thrown away. Problem fixed by correcting an operator precedence mistake where used_buffer_length would only be increaded with 0 or 1 insted of actual number of read bytes. Change-Id: Ib5c4e1d96e7ba499f26796ffa5d7ce6a116b9a6e Reviewed-on: https://code.wireshark.org/review/20666 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-07androiddump: Fix a typeStig Bjørlykke1-1/+1
Change-Id: I839e7e7300af9b90e91548fa29157143ae00adee Reviewed-on: https://code.wireshark.org/review/20434 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-07androiddump: Add ignore log-buffer and custom-options for logcat-textMichal Labedzki1-21/+81
Logcat Text interfaces have now two new options: 1. Ignore log-buffer - this means you start capturing immediately and there will no logs from buffer 2. Custom-options - pass command line parameters to logcat, like tags For example: adb logcat -v threadtime -b main #now custom parameters starts# -T 20 -s Ads Wireshark Please note that some custom options are banned to avoid unexpected behaviour (like "not working") Change-Id: I015d1aeae35cfed712de59138288d82d3a491c38 Reviewed-on: https://code.wireshark.org/review/20358 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-02Use glib-compatAndersBroman2-10/+2
Change-Id: I510af18d433c4db360243dda72260e59eb84355f Reviewed-on: https://code.wireshark.org/review/20336 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-01udpdump: fix recvfrom error on windows.Dario Lombardo1-2/+19
Change-Id: Ia88d00593163b1c1e9a0e120aeff5e36f0135474 Reviewed-on: https://code.wireshark.org/review/20319 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-02-28androiddump: Use only non-blocking connect() instead of the socketMichal Labedzki1-0/+2
Architecture of androiddump based on "blocking" sockets, however for start-up it is better to use non-bloking connect() to avoid long waiting time then fail. Change-Id: I2bb8ea51e24db4dd1f5a6b97e1d2bc0156342d97 Reviewed-on: https://code.wireshark.org/review/20293 Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>