Commit Graph

204 Commits

Author SHA1 Message Date
Dario Lombardo 963707ab3c extcap: add command line debug function to extcap-base.
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-27 15:19:47 +00:00
Dario Lombardo 3e9b256238 androiddump: check return value of localtime() before dereference (CID 1400829).
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-21 12:41:52 +00:00
Pascal Quantin 725b7ef175 androiddump: add a cast to please MSVC x64
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-21 11:50:38 +00:00
Dario Lombardo 420aab387f androiddump: use actual buffer length instead of pointer sizeof.
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-20 21:42:47 +00:00
Mikael Kanstrup 9830b7b261 androiddump: Reduce code duplication
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-07 23:17:58 +00:00
Mikael Kanstrup f9fd438b6d androiddump: Close socket on failure path
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-01 01:24:44 +00:00
Mikael Kanstrup 91e512985f androiddump: Fix null dereference if linktype not found
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-07-01 01:24:31 +00:00
Mikael Kanstrup b3453b9be4 androiddump: Fix leaked linktype string
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-30 22:43:11 +00:00
Stig Bjørlykke 064e34b215 androiddump: Fix printf format for size_t
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-28 15:46:51 +00:00
Mikael Kanstrup 564445f799 androiddump: Support packet capture on any interface that is up
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-27 12:43:44 +00:00
Mikael Kanstrup 129a84df60 androiddump: Use Android tcpdump reported data link type
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-27 12:42:58 +00:00
Guy Harris f27699c746 The 3rd argument to recv() is an int on Windows.
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-27 08:26:55 +00:00
Mikael Kanstrup d84da1eb97 androiddump: Let adb_send funcs generate string length prefix
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-27 04:12:58 +00:00
Mikael Kanstrup 707b789074 androiddump: Add helper functions for data link type conversions
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-26 14:16:33 +00:00
Mikael Kanstrup faf100ecc5 androiddump: Introduce adb_connect_transport helper function
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 14:16:14 +00:00
Mikael Kanstrup 66507b9052 [RFC]androiddump: Only filter CR/LFs on Windows
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-26 11:17:30 +00:00
Michael Mann 828e1f07a8 udpdump.c: Don't include epan headers.
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-06-15 04:18:20 +00:00
Guy Harris 7321183716 Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.
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-11 19:58:15 +00:00
Guy Harris 79eab8ca07 Force HAVE_REMOTE to be defined when including pcap.h with remote support.
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-05-11 10:57:22 +00:00
Guy Harris 67a5d9bebe Use the cfile_ failure_message routines in androiddump.
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-21 06:50:21 +00:00
Guy Harris 804d3f6245 Use cfile_write_failure_message() in the randpkt code.
Change-Id: I32ef7ff85f854782e5dd02c3e7f12436a120bc13
Reviewed-on: https://code.wireshark.org/review/21259
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 21:07:35 +00:00
Alexis La Goutte ff6058039a udpdump: fix indent (use tab)
Change-Id: Ibfe9ad19d12a84794f5e84ebaf3b9de5d4e419e8
Reviewed-on: https://code.wireshark.org/review/20733
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-03-27 07:37:35 +00:00
Michael Mann 677e103d10 udpdump.c: warning C6262: Function uses '65608' bytes of stack: exceeds /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-27 03:13:02 +00:00
Mikael Kanstrup bb017f3eb3 androiddump: Fix tcpdump op prec bug with used_buffer_length calc
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-23 04:48:23 +00:00
Stig Bjørlykke b56afb1211 androiddump: Fix a type
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-07 07:57:38 +00:00
Michal Labedzki cec782cb29 androiddump: Add ignore log-buffer and custom-options for logcat-text
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-07 05:38:15 +00:00
AndersBroman 2f6ba75347 Use glib-compat
Change-Id: I510af18d433c4db360243dda72260e59eb84355f
Reviewed-on: https://code.wireshark.org/review/20336
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-02 15:20:05 +00:00
Dario Lombardo 929e0e897c udpdump: fix recvfrom error on windows.
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-03-01 19:47:09 +00:00
Michal Labedzki 5c6f633376 androiddump: Use only non-blocking connect() instead of the socket
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>
2017-02-28 05:24:50 +00:00
Michael Mann 043ed1f6b3 androiddump: Set connect socket to non-blocking on Windows
Bug: 13104
Change-Id: I05248dad8e72272cf0933c766ec0bf5160075e1e
Reviewed-on: https://code.wireshark.org/review/20275
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-26 03:14:44 +00:00
Dario Lombardo 43487d825b udpdump: fix help.
Change-Id: Iad0e802f8c5d3920104751fab5135d71f02b29b8
Reviewed-on: https://code.wireshark.org/review/20264
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-24 15:39:19 +00:00
Michal Labedzki 147d0c2e36 androiddump: Use nonblocking connect
Release as version 1.0.5:
All connects to ADB are now non-blocking.
Try to connect up to 10 times with 1ms delays,
so in worst-case it takes ~10ms (for example 14ms)

Bug: 13104
Change-Id: I791909c9c951b62195b48acd82490e1b9ebf2be0
Reviewed-on: https://code.wireshark.org/review/19968
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
2017-02-24 13:57:21 +00:00
AndersBroman 16c3ecbd4c g_slist_free_full requires glib 2.28
Change-Id: I4f9ce7f65da0349b962f6be317635c5acb2daf73
Reviewed-on: https://code.wireshark.org/review/20148
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-16 21:03:44 +00:00
Pascal Quantin bc29b8c9b6 androiddump: fix compilation with ANDROIDDUMP_USE_LIBPCAP define
Change-Id: I6edc4ff9f4db5fab9b80cb0be56639443ab22518
Reviewed-on: https://code.wireshark.org/review/20105
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-02-14 17:23:58 +00:00
Dario Lombardo 7c0c580c4b wiretap: add cleanup routine.
The cleanup routine has been added to exit section of the applications.
Those which required a exit restyle have been patched as well.

Change-Id: I3a8787f0718ac7fef00dc58176869c7510fda7b1
Reviewed-on: https://code.wireshark.org/review/19949
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-14 10:22:20 +00:00
Guy Harris 6a99a2ce43 Cast arguments to socklen_t.
That should squelch some warnings on Windows.

Change-Id: I55b394be12203e14af023fdcc5d46564d0fcfa34
Reviewed-on: https://code.wireshark.org/review/19797
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-26 07:15:54 +00:00
Guy Harris 5fbcfd632a Clean up some UN*X-vs-Windows socket issues.
Have a wsutil/socket.h file, for inclusion by everything that uses
sockets, that contains the UN*X-vs-Windows #includes and #defines to
hide some UN*X-sockets vs. Winsock API differences.  That stuff mostly
comes from from extcap/extcap-base.h; have that file just include
wsutil/socket.h rather than defining that stuff itself.

Include it in sharkd_daemon.c.  Use socklen_t for the size of things to
pass to bind() as the last argument; wsutil/socket.h defines it as int
on Windows.

Ignore sharkd in Git.

Change-Id: I3f2171b7aa613717f52305f62bfd7d43e0172dc6
Reviewed-on: https://code.wireshark.org/review/19796
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-01-26 07:00:06 +00:00
Dario Lombardo c6cb16bef6 sshdump: add sudo option.
Basic installation of tcpdump (the default remote capture binary)
don't have setcap option. Give the user the option to run tcpdump
with sudo (already possible with a custom remote capture command).

Change-Id: I273798b5f7dc63b468b03eb633bfc60f53e30743
Reviewed-on: https://code.wireshark.org/review/19672
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-01-20 15:33:26 +00:00
Frank Carpenter 3b6fe2bfb4 Populate logcat year based on localtime
Change-Id: If7c790c25ed24da1b1442ee86e3a2f75bd3f8856
Reviewed-on: https://code.wireshark.org/review/19658
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-19 04:40:04 +00:00
Peter Wu 2009dcc98d extcap: fix memleak via data_file_url
Commit v2.1.0rc0-2181-ga4e2263ac4 introduced a helppage parameter, but
all callers were NULL. In a later change, callers would use the
data_file_url() function, but this needs to be freed, so do that.

Fixes: v2.3.0rc0-1825-ge5596b74bd ("extcap: set help page for all extcaps.")
Change-Id: I967c0f8c6b50d9e78ac227575de24a81f97d376a
Reviewed-on: https://code.wireshark.org/review/19570
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-01-07 20:32:43 +00:00
Baruch Siach 3761ef3785 androiddump: add missing sys/time.h header
struct timeval requires sys/time.h. Fixes the following musl libc build error:

androiddump.c: In function 'useSndTimeout':
androiddump.c:262:18: error: variable 'socket_timeout' has initializer but incomplete type
     const struct timeval socket_timeout = {
                  ^

Change-Id: I52e204f32a012aabea2e54877e564576c072fe08
Reviewed-on: https://code.wireshark.org/review/19460
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-12-30 09:02:47 +00:00
Guy Harris 14603ea376 Fix some narrowing warnings.
Don't narrow values until it's necessary, and then put in explicit casts
to indicate that the narrowing is intentional.

Change-Id: I8afc2a457822febbed33cee573953993013a7185
Reviewed-on: https://code.wireshark.org/review/19423
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-25 08:26:21 +00:00
Dario Lombardo 194433a503 udpdump: remove libwireshark dependancy.
Export pdu routines have been rewritten here on purpose.

Change-Id: If4879de4c98b6f20a75df158cae0cf9a80ffae57
Reviewed-on: https://code.wireshark.org/review/19384
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-25 03:33:01 +00:00
Dario Lombardo b97af3af2c udpdump: set default value for payload
Change-Id: Iad8624cbb9102611f806cdcce152b8ed14ce4474
Reviewed-on: https://code.wireshark.org/review/19383
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-22 19:34:52 +00:00
Dario Lombardo e5596b74bd extcap: set help page for all extcaps.
They've been set to the manpage of the local filesystem.

Ping-Bug: 13218
Change-Id: Iacd5d2ba7ae39ee1718b59747c245d1c07785e8f
Reviewed-on: https://code.wireshark.org/review/19179
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-12-20 08:23:11 +00:00
Michal Labedzki a7d404a972 androiddump: Add support for Bluetooth on Android 7.0
Now "ps" command does not support process name as parameter,
use grep instead.

Change-Id: I0c35bc7d560e237e4140000e67af097744cb2c1b
Reviewed-on: https://code.wireshark.org/review/19087
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-12-05 11:44:00 +00:00
Guy Harris ab07f8e0f8 Have a routine to do all the work of initializing libwiretap.
Have programs that use libwiretap call that routine rather than
separately calling some or all of init_open_routines(),
wtap_register_plugin_types(), and wtap_opttypes_initialize().

Also don't have routines internal to libwiretap call those.  Yes, this
means doing some initialization work when it isn't necessary, but
scattering on-demand calls throughout the code is a great way to forget
to make those calls.

Change-Id: I5828e1c5591c9d94fbb3eb0a0e54591e8fc61710
Reviewed-on: https://code.wireshark.org/review/19069
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-04 21:42:44 +00:00
Dario Lombardo 6a91e8aba7 androiddump: check return value in useSndTimeout() (CID 1394378).
Change-Id: I14109ffe1b9930c464ce2c42767f96b8ba4e5b67
Reviewed-on: https://code.wireshark.org/review/18855
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-11-18 09:26:41 +00:00
Michal Labedzki 720927a10e androiddump: Set socket connect() timeout to 500ms
This should avoid neverending or long time to obtain timeout
in some cases like firewall's drop rules, etc.

Bump version to 1.0.4

Bug: 13104
Ping-Bug: 13114

Change-Id: I9bef714b6d92b3516a2a95ebdbe1ba594fa60e34
Reviewed-on: https://code.wireshark.org/review/18728
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-11-10 12:41:06 +00:00
Dario Lombardo 9e2a9d0eaf sshdump: use g_shell_quote in the right way.
Change-Id: I3f71dabe92d3b00192f36fc57ebb7673b2327620
Reviewed-on: https://code.wireshark.org/review/18623
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-11-02 19:36:39 +00:00