Commit Graph

2364 Commits

Author SHA1 Message Date
Dario Lombardo a60bc4da84 sshdump: allow for multiple instances.
sshdump can now be copied in multiple instances. Each instance will
show up a different interface and will have its own profile.

This will help users connecting to different hosts. Instead of changing
profiles, sshdump can be cloned, and each instance will be used for a
single host.

Change-Id: If4fb42cf78021c6f16213ae91cbf41ec7f61ca77
Reviewed-on: https://code.wireshark.org/review/37883
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-18 04:04:59 +00:00
Guy Harris 608835bf56 Don't call any routines from WinPcap/Npcap packet32.dll.
We aren't using them now; stick to libpcap APIs (including Windows-only
libpcap APIs).

Change-Id: I812eaa31ba1e6e611418853105d3e00c9130a420
Reviewed-on: https://code.wireshark.org/review/37852
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-14 07:30:59 +00:00
Gerald Combs 3b86e04c2d Doc: Have make-authors*.pl explicitly use UTF-8.
Our authors lists and man pages are encoded as UTF-8 and have been for
quite a while. Remove perlnoutf.pl and ensure that standard I/O uses
UTF-8 as described at

https://www.perl.com/pub/2012/05/perlunicook-make-all-io-default-to-utf-8.html/

Change-Id: I7016ec5e3a12934463b43bcfdde2c424069c20ac
Reviewed-on: https://code.wireshark.org/review/37817
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-10 06:29:21 +00:00
Gerald Combs 4dc3114c05 Windows: Set our locale to ".UTF-8".
In each of our executables we were calling "setlocale(LC_ALL, "")" at
startup. This told Windows that output was encoded using the current
system code page. Unless the code page was 65001 (UTF-8), this was a lie.

We write UTF-8 to stdout and stderr, so call "setlocale(LC_ALL, ".UTF-8)"
at startup on Windows. This lets the CRT translate our output correctly
in more cases.

Clarify and expand the OUTPUT section in the tshark man page.

Bug: 16649
Change-Id: If93231fe5b332c292946c7f8e5e813e2f543e799
Reviewed-on: https://code.wireshark.org/review/37560
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-06 16:20:25 +00:00
Jaap Keuter 5bd9a50e27 DOC: fix layout mergecap manual page
Bug: 16652
Change-Id: I2c0e0363b3ea77a616191476d6e27cca1204b7cc
Reviewed-on: https://code.wireshark.org/review/37564
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-29 08:05:23 +00:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Jaap Keuter 1f5c32ae73 doc: update README.idl2wrs to reflect current build system
Change-Id: I35d7420ee41b520437572a0e464ad1a9998bfd30
Reviewed-on: https://code.wireshark.org/review/37068
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-03 12:52:36 +00:00
Guy Harris 524baee94f Add string encoding values for various BCD encodings, and use them.
Add some ENC_ values for various flavors of packed BCD, and use that
instead of explicitly calling tvb_bcd_dig_to_wmem_packet_str() and
adding the result.

Change-Id: I07511d9d09c9231b610c121cd6ffb3b16fb017a9
Reviewed-on: https://code.wireshark.org/review/36952
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-27 01:53:09 +00:00
Guy Harris 94556ca7a2 doc: document another character encoding.
Change-Id: Ic997fa586e11a33abc2c2a054c7ccd415372b27a
Reviewed-on: https://code.wireshark.org/review/36954
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-27 01:49:50 +00:00
Guy Harris bf7aa7710c doc: Add some new character encodings.
They were added in the code, but weren't documented.

Change-Id: Iaa12e2d33aa4a4b889c00a7f10b12b4c9b6e8197
Reviewed-on: https://code.wireshark.org/review/36953
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-27 01:39:01 +00:00
Gerald Combs dddb086f58 Docs+help: Remove "-m".
Support for the -m (monospace font) flag was removed from Wireshark in
2.3/2.4 in g37252634c4. Remove it from the man page and help output.

Change-Id: Idaafeb6cd30d7deea6086a065168c91affd6f0ad
Reviewed-on: https://code.wireshark.org/review/36926
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2020-04-25 13:57:11 +00:00
Martin Mathieson ec781e9749 proto: Add a debug check to sanity-check range_string
Check is enabled by #ifdef ENABLE_CHECK_FILTER
Remaining issues found by this check are fixed here,
along with a documentation note that the entries
are checked in order and the first match is used.

The only issue not yet fixed is in packet-isup.c,
where the spec was not available to me.

Change-Id: Ife747cda9b91a265bc2b81ce0a53f55f3389919e
Reviewed-on: https://code.wireshark.org/review/36708
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-04-05 17:40:21 +00:00
Jaap Keuter f627f850b5 Dumpcap manual: remove duplicate '-i' in synopsis
Commit 3398c2898d duplicated the '-i'
option in the synopsis. Remove this again.

Change-Id: I85fb78515910b11e9dff9b3aa876746b2ff11fa4
Reviewed-on: https://code.wireshark.org/review/36678
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-05 09:19:34 +00:00
Guy Harris 3398c2898d Document the -k option.
Change-Id: Ia695e3edcf673495eb8e61edfa72709fda2f99af
Reviewed-on: https://code.wireshark.org/review/36663
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-01 21:55:32 +00:00
Guy Harris c268e9b0d5 Use "must" instead of "should" to avoid ambiguity.
As I said in

    https://ask.wireshark.org/question/10361/how-to-properly-use-heuristic-dissector-for-tcp/?answer=10363#post-id-10363

  "Should" has multiple meanings; there's "Used to indicate obligation,
  duty, or correctness, typically when criticizing someone's actions.", as
  in "I think we should trust our people more", and there's "Used to
  indicate what is probable.", as in "the bus should arrive in a few
  minutes". You're reading it in the latter sense; it was intended in the
  former sense.

  That sentence should probably be changed to "Wireshark must be then set
  up..." to avoid the ambiguity.

Make it so (over half a year later, sigh), and change another case where
"should" is meant in the first sense while we're at it.

Change-Id: I90198d1616619c75802deeeb703ceee0c8bac1bf
Reviewed-on: https://code.wireshark.org/review/36155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-23 04:36:23 +00:00
Jaap Keuter 9ea4bd2b96 doc: Apply proper capitalization to the Wireshark name
Change-Id: I9d29cd705c9af39bae6cffdefaba0b9c8b4bb2e6
Reviewed-on: https://code.wireshark.org/review/36081
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-17 04:40:16 +00:00
Jaap Keuter 597ca8aa38 DOC: Remove lingering references to autotools
In the README.plugins file there is still mention of autotools related items.
This change removes those lingering references.

Change-Id: I1fc7c6d478a6fc8bbe9481178d9f673aaebcad9f
Reviewed-on: https://code.wireshark.org/review/35843
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-17 04:49:27 +00:00
Gerald Combs b401c92615 [Automatic update for 2020-01-05]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I871629b91d38be26bfe448bf90dfbb47a97acdfa
Reviewed-on: https://code.wireshark.org/review/35652
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-05 08:20:10 +00:00
Gerald Combs 5e8d79fd69 WSUG: Update the Expert Information and Status Bar docs.
Update the Expert Information section of the User's Guide. Use the term
"Expert Information" to describe the dialog and "expert information
item" to describe each generated item. Update related text elsewhere.

Update the expert icon and other parts of the status bar docs.

Change-Id: I0c2cba0cbb3c74a1f6e3a37d4a2a592faccb350f
Reviewed-on: https://code.wireshark.org/review/35462
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-17 05:10:44 +00:00
Gerald Combs 6f9efa7583 More Qt minimum version updates.
Update the minimum version in various documents. Remove some
no-longer-needed code from scripts that call windeployqt.

Change-Id: I16da4bced9780c9f1b1969aae7c52e2fce1968aa
Reviewed-on: https://code.wireshark.org/review/35391
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-10 19:52:58 +00:00
Gerald Combs f2c2b9687d README.dissector: Add a note about integer promotion.
Change-Id: Ie3b6dfcea7b1cee3b0bda3d9ec2cc9a6857578fc
Reviewed-on: https://code.wireshark.org/review/35308
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-04 19:31:39 +00:00
Gerald Combs 63945535ac NSIS: The "Sshdump" option installs Ciscodump as well.
Use consistent capitalization while we're here.

Change-Id: I0591654b0e73d33528f9cfe990a1491ce6cccc8b
Reviewed-on: https://code.wireshark.org/review/35278
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-02 01:30:32 +00:00
Jaap Keuter 890e2bea2e Documentation: update (long) cmd line options
Documentation of the Tshark and dumpcap command line options between
help text, manual page and user's guide diverged over time. One aspect
of this is the implementation of more long options. This change tries to
update all documentation to be complete and in sync again.

Change-Id: Ie8bee013df8d209080fcf288072774f18f9ff51f
Reviewed-on: https://code.wireshark.org/review/35261
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-11-30 23:42:11 +00:00
Dario Lombardo bb7014731c doc: add reordercap to editcap references.
Ping-Bug: 16231
Change-Id: Id4fb9bab7230561e64fcdc49c02bcb2016ed23e7
Reviewed-on: https://code.wireshark.org/review/35249
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-11-28 16:00:02 +00:00
Dario Lombardo 40d822ed61 tools: add automatic C skeleton dissector generator.
Generate a dissector based on doc/packet-PROTOABBREV.c.

Change-Id: I9233c1212acb30f7166ba91e39d98bc3fb123731
Reviewed-on: https://code.wireshark.org/review/35062
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-11-14 12:33:10 +00:00
Jaap Keuter ca114508d1 Documentation: update (long) cmd line options.
Documentation of the Wireshark command line options between help text,
manual page and user's guide diverged over time. One aspect of this is
the implementation of more long options. This change tries to update
all documentation to be complete and in sync again.

Bug: 16168
Change-Id: Id833fbeb14fdb7b3dbc1564504a25d96f4367c91
Reviewed-on: https://code.wireshark.org/review/35047
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-11-11 06:16:07 +00:00
Dario Lombardo 69356f1b60 Document long command line options.
Bug: 16168
Change-Id: Ifdfa9092b632171c461430bc3e9de32ec1ed46f4
Reviewed-on: https://code.wireshark.org/review/34996
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-06 11:27:07 +00:00
Pascal Quantin b01f0febe2 Fix find_conversation_pinfo() description in documentation
Change-Id: I3956dd841ee29d1676dbe2d1927a31bae5249414
Reviewed-on: https://code.wireshark.org/review/34986
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-11-05 15:03:19 +00:00
João Valverde 97cb389a35 Revert "CMake: Don't install HTML manuals twice"
This reverts commit f1285fcf06.

NSIS package is broken with this commit.

Change-Id: Ief22a308edad188fa2d5fab79355f19493359fa6
Reviewed-on: https://code.wireshark.org/review/34758
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-10 15:58:41 +00:00
João Valverde f1285fcf06 CMake: Don't install HTML manuals twice
HTML docs are installed to both $docdir and $pkgdatadir. Fix that
to install to $docdir only.

Change-Id: I115158585b6df9170d9a01249adbc8548df91f14
Reviewed-on: https://code.wireshark.org/review/34640
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-09 13:24:58 +00:00
Peter Wu d2a660d805 QUIC: Add Follow QUIC Stream support to Qt and tshark
The QUIC transport protocol provides a stream, similar to HTTP/2. Make
it possible to look at the stream contents. This can be helpful while
HTTP/3 support is not yet complete.

Known issues that will be addressed in the future:

 - If a single packet contains multiple streams, then Follow QUIC Stream
   will wrongly include data from streams other than the selected one.
   This is tracked by bug 16093 and affects HTTP/2 as well.

 - The Substream index menu does not properly filter for available
   stream numbers. If a non-existing stream is selected, then changing
   to another (potentially valid) index results in the "Capture file
   invalid." error. As workaround, clear the display filter first.

 - Follow Stream always selects Stream ID 0 instead of the first or
   currently selected stream field in a packet. Users should manually
   update the stream index as needed.

Change-Id: I5866be380d58c96f0a71a29abdbd1be20ae3534a
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/34694
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-04 04:36:09 +00:00
João Valverde 071ca80d98 CMake: Fix sdjournal.html install destination
Change-Id: I0527a8ce19838c15811471eddce65310286eddb6
Reviewed-on: https://code.wireshark.org/review/34641
Reviewed-by: João Valverde <j@v6e.pt>
2019-09-27 22:14:21 +00:00
Alexander Gryanko 9fff62e2a8 Qt, http2: Add Follow HTTP/2 Stream functionality
The HTTP/2 protocol multiplexes a single TCP connection into multiple
independent streams. The Follow TCP output can interleave multiple
HTTP/2 streams, making it harder to analyze a single HTTP/2 stream.

Add the ability to select HTTP/2 Streams within a TCP stream.
Internally, the HTTP/2 dissector now stores the known Stream IDs in a
set for every TCP session which allows an amortized O(n) lookup time for
the previous/next/max Stream ID.

[Peter: make the dissector responsible for clamping the HTTP/2 Stream ID
instead of the Qt code, that should permit future optimizations.]

Change-Id: I5d78f29904ae8f227ae36e1a883155c0ed719200
Reviewed-on: https://code.wireshark.org/review/32221
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexander Gryanko <xpahos@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-22 05:29:30 +00:00
Devan Lai 42b72e149a README.dissector: fix proto_tree_add_bitmask_len signature
proto_tree_add_bitmask_len also expects an expert information field
to display in the event that the decodeable length is less than the
specified length.

Bug: 16061
Change-Id: If8061b0754cd6862799ab76bf9c10e16ed5d8f38
Reviewed-on: https://code.wireshark.org/review/34567
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-09-20 23:57:26 +00:00
Roland Knall 3d8fe9a705 extcap: Fix type in example
Change-Id: Id76fde0786dde466a13adea423ff349a2b7400e1
Reviewed-on: https://code.wireshark.org/review/34554
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-09-17 15:46:25 +00:00
Michael Mann c07e31c71d tshark: Add "ip" as alias for "ipv4" in -z hosts option.
Make it consistent with -z conv,ip and -z endpoints,ip

Bug: 15660
Change-Id: I9a3d2e95fed47231c0bab20e6cf069987eed142f
Reviewed-on: https://code.wireshark.org/review/34426
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-02 06:54:08 +00:00
Jaap Keuter ef014f76d5 tshark: Complement manual page synopsis
Add '-J' option to synopsis and reshuffle '-j' to correct place.

Change-Id: I351b3ce464fca3b52a75614e1e8f8c91f9a30df2
Reviewed-on: https://code.wireshark.org/review/34352
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-08-25 16:48:27 +00:00
Peter Wu 04c12dd67b doc: document WIRESHARK_CONFIG_DIR
WIRESHARK_CONFIG_DIR was introduced with Wireshark 3.0 and is more
cross-platform than WIRESHARK_APPDATA. The latter was presumably created
for use by PortableApps. Let's consider that an internal, undocumented
detail that might be change, and document WIRESHARK_CONFIG_DIR instead.

Change-Id: I0042d607b282cc6dee4b017b1e80b44087bd62e9
Reviewed-on: https://code.wireshark.org/review/34113
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2019-07-29 19:15:20 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Peter Wu c88e525168 Documentation: convert http URLS to https
Remove some dead links or point them to archive.org while at it. All
updated links have been verified.

Change-Id: Icf02167a13d5fe9dfce39ea57525b3f185554c9d
Reviewed-on: https://code.wireshark.org/review/34028
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-20 20:51:30 +00:00
Gerald Combs 8147af211d Editcap: Allow floating point split intervals.
Update the `-i` option to allow floating point values as suggested at
https://stackoverflow.com/questions/57004719/split-wireshark-to-miliseconds

Change-Id: I24028d409bc441ed3b45ac2179f7c42b2bc424bc
Reviewed-on: https://code.wireshark.org/review/33938
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>
2019-07-16 06:43:09 +00:00
Dario Lombardo 1af6e1f860 tap: add credentials tap.
This new tap collects credentials (username and paassword)
from the dissectors.

So far, few dissectors have been instrumented:
- http (basic auth)
- http (header auth)
- ftp
Others can be instrumented as well using the same technique.

Tshark has a new option (-z credentials) and Wireshark a new
"tools" menu: the documentation has been updated accordingly.

Change-Id: I2d0d96598c85bb3ea4fb5ec090dd8dc28b481fc9
Reviewed-on: https://code.wireshark.org/review/33453
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-06-26 07:09:54 +00:00
Dario Lombardo 7969c41519 Use I/O Graphs instead of IO graphs everywhere.
Change-Id: I6ce866b03632965dd1bad6eff361d91dd210c62b
Reviewed-on: https://code.wireshark.org/review/33680
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-20 20:01:00 +00:00
Dario Lombardo ed34c3de14 sshdump: fix bug in --remote-sudo.
Fix documentation as well.

Bug: 15845
Change-Id: I1b4e50c21887afa6a60b76de6cc169a1d0b5067a
Reviewed-on: https://code.wireshark.org/review/33658
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-19 13:00:55 +00:00
Peter Wu 94b211977a Add support for embedding WireGuard keys in a pcapng file
pcapng spec update is here: https://github.com/pcapng/pcapng/pull/62

Bug: 15571
Change-Id: I2f1921b1da70ac0bab8c38dd5138a9dfe7843fea
Reviewed-on: https://code.wireshark.org/review/33300
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-17 00:48:29 +00:00
Martin Kaiser 0d580ecee3 REAME.dissector: update the code snippet for Decode As
We removed the "title" member from decode_as_t.
Update the sample code snippet accordingly.

Change-Id: I5d4ba979c955de50287f5b4deea7c64bf96f7d9b
Reviewed-on: https://code.wireshark.org/review/33574
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-12 22:48:50 +00:00
João Valverde 63af1da7e7 Kill libwscodecs plugin library, just use plugins
Change-Id: I085d04840acb53b0b7681787429a2b4e10547cd5
Reviewed-on: https://code.wireshark.org/review/33068
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-11 20:59:39 +00:00
Michael Mann 6476ec79aa Document why extcap utilities can't be run "by hand" on Windows
Bug: 15591
Change-Id: Icb8246ba196df026736ce1e54eb2ace2c7cd49b0
Reviewed-on: https://code.wireshark.org/review/33530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-09 23:17:31 +00:00
Dario Lombardo 14553ee358 REAME.dissector: remove double spaces.
Change-Id: I87b9748bb14b148cfc7ffdc5fd5d9059fa2d2299
Reviewed-on: https://code.wireshark.org/review/33522
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-09 04:52:36 +00:00
Guy Harris ee35570e90 Improve handling of binary data that *might* be text.
Add a BASE_SHOW_ASCII_PRINTABLE flag for the "display" field, to use
with FT_BYTES and FT_UINT_BYTES fields; it specifies that, if the field
consists solely of printable ASCII characters, its value be displayed as
a string, in quotes.  Have a routine hfinfo_format_bytes() to do that
formatting, depending on the display field value.

Add routines to fetch the display value of string and
FT_BYTES/FT_UINT_BYTES fields; for strings, it's the result of
hfinfo_format_text(), and for byte arrays, it's the result of
hfinfo_format_bytes().

Use BASE_SHOW_ASCII_PRINTABLE for extended attribute data in SMB and
SMB2.  Use the routines in question for extended attribute names
(string) and data (bytes).  That keeps us from displaying non-text
extended attribute data as if it were text.

Document BASE_SHOW_ASCII_PRINTABLE.

Change-Id: I24dcf459c14f00985e4daaf9b58f5933964eabd8
Reviewed-on: https://code.wireshark.org/review/33517
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-06-07 21:15:23 +00:00
Dario Lombardo 01a30c1018 README.tapping: minor changes.
Change-Id: I0614d4c0cc8c9aada8660297b9d08f9d03129e29
Reviewed-on: https://code.wireshark.org/review/33433
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2019-05-31 17:35:59 +00:00
Gerald Combs 2eb1a0dd61 Use the HTTPS URL for our main site in a few places.
Fixup the encoding of plugins/plugin.rc.in while we're here.

Change-Id: I21b56ce68bc3d84298a846a991c72bf710b9ae8a
Reviewed-on: https://code.wireshark.org/review/33414
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-05-29 04:00:42 +00:00
Tomasz Moń a115d2b483 extcap: Fix Python 3 control data handling in example
Decode received payload as utf-8 string, replacing any invalid
characters with U+FFFD.

Change-Id: If80fbbec5c369f1098dbc1e46e092928aa0b0eb9
Reviewed-on: https://code.wireshark.org/review/33252
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-20 13:36:58 +00:00
Moshe Kaplan 14796202a8 Update tshark man pages for -j and -J
Change-Id: I221013d5948c4c699b1721441b54a05dc5ff2ce2
Reviewed-on: https://code.wireshark.org/review/33089
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-07 15:33:17 +00:00
Peter Wu 6c04a872da wireshark-filter: clarifications and update links in manual
Clarify *display* filter, add link to User's Guide, and update to https.

Change-Id: I9a2152213cf5b4cb3daf15e62c73074524d92f94
Reviewed-on: https://code.wireshark.org/review/32912
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-21 07:32:54 +00:00
Tomasz Moń 2dcc283be9 extcap: Improve example multicheck values
Multicheck values can be checkable or uncheckable depending on the
"enabled" option. Moreover, multicheck values can be stacked into a
tree by providing a "parent" option.

Modify the example extcap to illustrate these possibilities.

Bug: 13355
Change-Id: I0c50ff873c07eca5cc4ae8036b87cbb440d318b3
Reviewed-on: https://code.wireshark.org/review/32842
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-17 05:08:05 +00:00
Tomasz Moń d2a2698fd8 extcap: Fix Python 3 bytes handling in example
In Python 3 strings cannot be joined with bytes.
This change has no effect for Python 2.

Ping-Bug: 15694
Change-Id: I2eb62698ce323f8156ed98b7fe88e4e43e59c784
Reviewed-on: https://code.wireshark.org/review/32843
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-15 21:11:30 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document
them.

Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 04:03:38 +00:00
Guy Harris c750846e81 Document all the signed-integer tvbuff accessors.
Reorganize the lists of accessors, with a top-level heading for the byte
order and subheadings for each size.

Also document ENC_HOST_ENDIAN.

Change-Id: I10131e399f6c90624a387c89340f77ea769ab33f
Reviewed-on: https://code.wireshark.org/review/32701
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-03 18:57:26 +00:00
Guy Harris cdd6cbd18b Update documentation of -G plugins.
Change-Id: Id057003924475c3c1241b156f7da3455b00a3560
Reviewed-on: https://code.wireshark.org/review/32590
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-26 21:57:34 +00:00
Jeff Morriss a748f8f41a Clean up the new-file selection criteria in the GUI.
Inspired by looking into
https://ask.wireshark.org/question/8009/wireshark-ring-buffer-settings-from-command-line/

... in which the user was confused because a duration set on the command
line was not reflected in the GUI.  That's because
I0180c43843f5d2f0c2f50153c9ce42ac7fa5aeae added the `interval` ring-buffer
option and made the GUI use this rather than `duration`.  This was not at all
clear in the GUI, though.

Since `duration` and `interval` have quite different use cases, expose both in
the GUI.

Try to clean up and unify the tooltips at the same time.  I'm not entirely
convinced the tooltips need to be on the checkbox, the spinbox, and the
combobox but leave it that way for now.

Add some to the man page description of the interval option to hopefully make
it clearer what the option does.

Change-Id: I3b45fe71c33af64d980dffb5e5ba93e2a15a6b96
Reviewed-on: https://code.wireshark.org/review/32526
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-23 13:27:31 +00:00
Gerald Combs 7fbee2640c Docs: Mention Npcap in our man pages.
Mention Npcap whereever we mention WinPcap.

Change-Id: I6ee295ca88302e2516d5658a5d528f9675209da8
Reviewed-on: https://code.wireshark.org/review/32352
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-08 07:30:24 +00:00
Guy Harris a302d531e8 The non-flag arguments to tshark aren't necessarily a capture filter.
They're a capture filter if you're capturing live traffic; they're a
display (read) filter if you're reading a capture file.

Change-Id: Ia2f5bcdb0098bf3c2b4a3d99da5bfe768e09b5a0
Reviewed-on: https://code.wireshark.org/review/32207
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-26 22:17:26 +00:00
Guy Harris 28f49a0a9a Add --discard-all-secrets to remove decryption secrets.
Bug: 15435
Change-Id: I78503c9c31ab3eda39908b91dca3ef3fb9af34bf
Reviewed-on: https://code.wireshark.org/review/32100
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-19 09:57:52 +00:00
Guy Harris ab352c61fd Report counts of decryption secrets and resolved addresses.
Change-Id: I74e50db685b378afc706215fb9f8e5294aa77f94
Reviewed-on: https://code.wireshark.org/review/32089
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-19 01:36:58 +00:00
João Valverde 1bb1ffa9ca CMake: Install documentation to docdir
Change-Id: I6860f2ba8c09daff3a72e44f0c41a1b19fb79218
Reviewed-on: https://code.wireshark.org/review/31852
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-02-03 10:43:27 +00:00
João Valverde 21cbfef532 doc: Fix sdjournal podpath warning
Use the perpod syntax for manpages to remove this warning:

  Cannot find "tail" in podpath: cannot find suitable replacement
  path, cannot resolve link

Change-Id: I90cb4fe7d3b019e4bc5f5a8fbc7df347f966badb
Reviewed-on: https://code.wireshark.org/review/31770
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 12:24:10 +00:00
Peter Wu 089d7a05c8 doc: update sshdump manual to reflect the current state
Option --extcap-interface=ssh seems to give an error, update it.
Note that --remote-capture-command overrides other options. Perhaps some
form of template should be supported, but that is currently not
implemented.

Change-Id: Iee132941a460afca91e73cf3e3ec3501dc15f14d
Reviewed-on: https://code.wireshark.org/review/31753
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-27 09:46:59 +00:00
Peter Wu 198c5a2cac test/dfilter: be explicit with the expected error message
Instead of just reporting a mismatching error code, include the program
output. This should help tracking down unexpected errors. While at it,
check the expected error message too.

Change-Id: Ib8fe51cc06b795bb54bfe1e6eaa828c6ba1128ef
Reviewed-on: https://code.wireshark.org/review/31714
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-24 18:24:00 +00:00
Guy Harris 4f8b3f3d2a By default, don't stop after a read error.
For close to 10 years, we have defaulted not to stop processing on an
open error; default not to stop processing on a read error, either.  -C
causes us to stop for both.

Bug: 15433
Change-Id: I5cd239c160d0ff85eb0425ca4b172532a4659fd3
Reviewed-on: https://code.wireshark.org/review/31710
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-24 06:42:58 +00:00
Peter Wu 079fbb8b82 editcap: document --inject-secrets in --help
Change-Id: Icc027f3c53e1da580c2e49042134b1075ad65cf2
Reviewed-on: https://code.wireshark.org/review/31666
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-22 04:58:53 +00:00
Dario Lombardo c3d198c401 dfilter: add string() function.
This function can convert non-string fields into strings. This allows the
user to apply string functions (like contains and matches) to non-string fields.

Examples:

string(frame.number) matches "[13579]$" => for odd frames
string(eth.dst) matches "aa\.bb\.cc\.dd\.ee\..." => to match a group of stations
string(snmp.name) matches "^1.2.3.4" => for all OIDs under a specific node

Change-Id: I18173f50ba5314ecdcd1e4b66c7e8ba5b44257ee
Reviewed-on: https://code.wireshark.org/review/31427
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-14 16:00:29 +00:00
Guy Harris 6580499311 Use sentence case for the title, as we do for other documents.
Change-Id: I72b1676bdc2af41031535e75189c0c15fdf7e551
Reviewed-on: https://code.wireshark.org/review/31506
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-12 02:21:13 +00:00
Gerald Combs 69a7caac06 WSDG: Move README.packaging to the Developer's Guide.
Move doc/README.packaging to the Developer's Guide and update the
content.

Change-Id: I25fda6cade8f3cfd11af865745bedd0fb5a7c86f
Reviewed-on: https://code.wireshark.org/review/31474
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-10 05:17:48 +00:00
Gerald Combs 2b7615e603 [Automatic update for 2019-01-06]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I0e282baebc0cda0e54e49eff60827eec02f6f797
Reviewed-on: https://code.wireshark.org/review/31402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-06 08:26:31 +00:00
Dario Lombardo ec606cc59e doc: remove wrong trailing slash.
Change-Id: If6bcf2ce9754453cfff434dde67b682761b37231
Reviewed-on: https://code.wireshark.org/review/31394
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-05 23:03:35 +00:00
Jim Young 1cc4c15ef0 doc/README.display_filter: Fix typo: asser -> assert
Change-Id: If49baf3e2b4e01f4ca4ea85415a3a291f8c04c92
Reviewed-on: https://code.wireshark.org/review/31354
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-03 23:45:15 +00:00
Peter Wu 461264bc39 doc: update README.display_filter for new test location
Change-Id: I29bb00dbec43692d940ef6f389743af56dfd6995
Reviewed-on: https://code.wireshark.org/review/31341
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-03 19:16:34 +00:00
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +00:00
Jim Young e1c02bd920 Add jsonraw to tshark's -T man page synopsis
Change-Id: Icf3dacb143b19a55788a30dac297787ab3d2c3f0
Reviewed-on: https://code.wireshark.org/review/31242
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-29 09:10:48 +00:00
Jaap Keuter 5bf37f63a8 text2pcap: allow to set interface name
When generating a capture file from a text file it can be helpfull
to be able to set the capture interface name in the generated IDB.
This can be especially true if later on the generated captures are
merged and the individual IDB's have to be compared. Without a name
every IDB of the same datalink type will be equal and subject to
merge. Also it keeps the individual streams identifiable for the
end user.

Change-Id: I70224379d88f516a0a356bf0b46aebafb69665f0
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/31015
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-12-13 23:33:32 +00:00
Jaap Keuter a58904f387 PCAP/PCAPNG: Be consistent in documentation, etc
1) The default build configuration is to select PCAPNG as
output format, but it can be selected as PCAP. Some of the
command line tools have the option to select the output
format and default towards the build configuration.
This has to be reflected in their help output also.

2) Various documentation files are still stating that PCAP is
the default format of various tools. With the default build
configuration being PCAPNG these have to be adjusted as well.
(with lack of dynamic content the documentation can only refer
to the default build configuration format).

Change-Id: I51d19642a7ed8c99817971c1f25d20972095021e
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30951
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-07 06:00:14 +00:00
Jaap Keuter 0da8a3dbd3 Doc: add mentioning of ip link to get interfaces
With the introduction of the ip command (from iproute2) on modern
Linux systems it becomes common to see this tool available,
gradually replacing tools like netstat and ifconfig.

Change-Id: I1fb309e741c07c93271b61a35c4833d36bcc5cb8
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30924
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-06 06:26:20 +00:00
João Valverde c3741a653b CMake: Simplify CMAKE_INSTALL_DATADIR usage
Change-Id: I414aa551b8e9315a654f4da62b882e787d4f6d53
Reviewed-on: https://code.wireshark.org/review/30904
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-12-03 22:35:37 +00:00
Gerald Combs 74b0c08905 [Automatic update for 2018-12-02]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Idfe3eaa6b9abd2337590a09972ce44266c2893ca
Reviewed-on: https://code.wireshark.org/review/30880
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-12-02 08:21:32 +00:00
João Valverde f1cf2646aa plugins.example: Fix build on Windows
Change-Id: I30798a697bc14076cc3bd9e224714a6a3567046b
Reviewed-on: https://code.wireshark.org/review/30774
Reviewed-by: João Valverde <j@v6e.pt>
2018-11-24 02:09:29 +00:00
Jaap Keuter 36d26b38d7 Update text2pcap documentation
Various parts of the text2pcap documentation need some fixing up.
This change brings them back in line and up to date with current
features.

Change-Id: I038cf5c4943d2a4bbcc3d0fbd8f5e111dcf0d0a9
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30754
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-21 23:00:31 +00:00
Peter Wu e2e0fd1dbd editcap: add --inject-secrets option
Add a new option to insert decryption secrets into a pcapng file.

Change-Id: I0e024585cac9a8a328e88d32f9eb03d37d350e2a
Ping-Bug: 15252
Reviewed-on: https://code.wireshark.org/review/30693
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:13:37 +00:00
Gerald Combs 4ebe640ec1 Man pages: Update pipe input documentation.
Make sure the -i <pipe> documentation is consistent and correct.

Change-Id: I9019effb658f914ac754e4ae893eafbe7c4b4da1
Reviewed-on: https://code.wireshark.org/review/30675
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-16 23:40:23 +00:00
Vasil Velichkov ec95ae98ed tshark: Print the packets' comments in the expert info
Previously 'tshark -z expert' was failing with abort when a packet
contains a comment

- Add a new comment parameter and update the tshark's manual page
- Add a new comment_level severity and change the default lavel to it.
- Add various 'tshark -z expert' tests

Change-Id: I188317da5e00019b8f2b725f0fe84942f774520f
Reviewed-on: https://code.wireshark.org/review/30610
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-13 21:18:30 +00:00
Gerald Combs 11a9a501fb Dumpcap+Qt: Add support for `-a packets:NUM` and `-b packets:NUM`.
Add the ability to rotate files after a specified number of packets (`-b
packets:NUM`). Move some condition checks to capture_loop_write_packet_cb.

Add `-a packets:NUM` in order to be consistent. It is functionally
equivalent to the `-c` flag.

Add a corresponding "packets" option to the Capture Interfaces dialog
Output tab.

Add initial tests for autostop and ringbuffer conditions.

Change-Id: I66eb968927ed287deb8edb96db96d7c73526c257
Reviewed-on: https://code.wireshark.org/review/30534
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-11-09 05:55:11 +00:00
Gerald Combs 8b977a43d6 Move condition logic to dumpcap.c
Move the condition logic from capture_stop_conditions.c to dumpcap.c.
Remove capture_stop_conditions.[ch] and conditions.[ch].

Switch duration values to doubles.

Change-Id: Ifa74fb13ec8fc923b0721597a6cf071d72069ea0
Reviewed-on: https://code.wireshark.org/review/30440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-01 05:09:10 +00:00
João Valverde 681c175f90 Update plugins.example/README
Change-Id: Ib428859b75e1c196cf9fa81ebae4969bbce079f2
Reviewed-on: https://code.wireshark.org/review/30396
Reviewed-by: João Valverde <j@v6e.pt>
2018-10-27 23:58:31 +00:00
Tom Hughes 99c62bf797 Add support for extended 64 bit value to string matching
This adds val64_string_ext to parallel value_string_ext in the
same way that val64_string parallels value_string.

Change-Id: Iadbfc49f5a4540000ed92fd0469e8d273911e97e
Reviewed-on: https://code.wireshark.org/review/30385
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-27 05:34:59 +00:00
Vasil Velichkov 95614f219f tap-follow: fix memory leak
Register the follow_free as a finish callback.

Call the tap's finish callback in free_tap_listener which is called from
both remove_tap_listener and tap_cleanup.

Describe the finish callback in README.tapping

Change-Id: Ie79ce8f39b0ca6d84810d2e3307dcff38b18d3ac
Reviewed-on: https://code.wireshark.org/review/29309
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-10-21 11:37:49 +00:00
Michal Slavka 8079d64b02 Documentation fix.
Change-Id: I139f54f6eb62a82d3b31738966cade02d5a7c7b1
Reviewed-on: https://code.wireshark.org/review/30243
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-10-19 07:57:21 +00:00
Uli Heilmeier 8dfaa8fa7c *shark: Update help and manpage for name resolving
Add 'v' option for VLAN ID resolving and get rid of
deprecated 'C' option.

Bug: 14826
Change-Id: I63104f4a465d251048693ad02882ea7eb2c4d926
Reviewed-on: https://code.wireshark.org/review/30029
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05 13:19:05 +00:00
Gerald Combs f69108b84e Add a systemd Journal Export extcap.
Add an sdjournal extcap, which reads journal entries using the
sd-journal API and dumps them as journal Export Format records.

Change-Id: I17ccfa88ab5d053c16c869cd26e580d84022502e
Reviewed-on: https://code.wireshark.org/review/29479
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-01 08:58:13 +00:00
Gerald Combs cd95e197ca Start renaming SSL to TLS.
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS"
over "SSL" in user interface text and in the documentation.

Fix the test_tls_master_secret test while we're here.

Bug: 14922
Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8
Reviewed-on: https://code.wireshark.org/review/29649
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-13 22:37:52 +00:00
João Valverde a93698a4ff Remove the tshark -z compare feature
- It cannot support IPv6.
  - Non-standard use (specifically recommended against in the RFCs)
of the IPv4 fragment ID field.
  - Has a narrow and non-obvious use case, IMO.
  - It is not supported in the Qt GUI.
  - Significant maintenance burden for an obscure feature.

Change-Id: Icaf429269dc42f78c38b8d20001508132499faf8
Reviewed-on: https://code.wireshark.org/review/29239
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 23:55:19 +00:00
Gerald Combs 05d1742d35 Build the dpauxmon documentation.
Add dpauxmon entries to the doc targets.

Change-Id: I7a9ac76897c770892a9eac3c2de5da626e3f7ac4
Reviewed-on: https://code.wireshark.org/review/29466
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-09-08 07:08:20 +00:00
Nils Björklund 8332b718a2 editcap: add seed option
Implement a --seed option to be used in conjunction with -E. The option
allows the user to set the seed for the pseudo-random number generator,
which can be useful for recreating a particular sequence of errors.

Change-Id: Id427ab5fd7711652ad56c72271b2e0acb7380858
Reviewed-on: https://code.wireshark.org/review/29306
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-08-31 05:53:50 +00:00
João Valverde 4a4c6209a4 Update README.vagrant
Change-Id: I87fc8e98bd189052255b65a1a08591d175d31e3f
Reviewed-on: https://code.wireshark.org/review/29362
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-31 05:53:23 +00:00
João Valverde d0b97a420d CMake: Modernize config-file package support
A CMake config-file package provides support for downstreams using
CMake and Wireshark libraries to easily configure the libwireshark
dependency with:
  find_package(Wireshark CONFIG [REQUIRED])
  target_link_libraries(foo epan)

The FindWireshark.cmake file is no longer needed.

See cmake-package(7) for more details on CMake's package system.

Change-Id: Ie8af1d44417a99dd08d37959f7b2ffca88572ec2
Reviewed-on: https://code.wireshark.org/review/29208
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-25 18:07:21 +00:00
João Valverde 6b9beb6ca1 Fix comment.
Change-Id: Ib41b9a84333a3d3d34ae9c0797dbae10141f9e53
Reviewed-on: https://code.wireshark.org/review/29235
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-21 23:11:04 +00:00
João Valverde 65d9c473f0 plugins: Minor interface improvement
Change the plugin compatibility check to make it more convenient to
define and check the major.minor Wireshark version.

Change-Id: I2a6d2a746682c29504311cce5c457e0a852c3daf
Reviewed-on: https://code.wireshark.org/review/29224
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-21 19:56:12 +00:00
João Valverde 319186125c plugins: Fix CMake build example
Fix combination of pkg-config and CMake variables for feature
detection.

Remove non-system installation option. Just copy it manually for now.

Change-Id: Ia80c703c6ec3df0a49f8d56f1bd6da69471c523f
Reviewed-on: https://code.wireshark.org/review/29223
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-21 17:55:12 +00:00
Gerald Combs 3bb4ee5aaf Docs: AUTHORS formatting updates.
Switch the AUTHORS heading markup from underscores to equals. This makes
it easier to transform to Pod headings.

Update the AUTHORS-SHORT-FORMAT output so that the author lists are
verbatim paragraphs. Add a style for the author lists instead of
wrapping everything in a <pre>.

The AUTHORS files are UTF-8 and wireshark.pod sets "=encoding utf8".
There's no need to translate characters.

Change-Id: I43cf18ff86774421b08edb84d968a9410be177fe
Reviewed-on: https://code.wireshark.org/review/29181
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-08-18 21:44:00 +00:00
Gerald Combs dfc7fcc815 Docs: Make our Pod documentation encoding uniform.
We've set "=encoding utf8" in wireshark.pod for a long time. Do so in
the rest of our .pod files.

Change-Id: I3ef0fb3a88ed63275b4ff4362b6afbf13d79a0bc
Reviewed-on: https://code.wireshark.org/review/29182
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-08-18 14:29:41 +00:00
Alexis Green 620fc587e4 editcap: Add ability to skip radiotap header.
This is useful when processing packets that were captured by multiple radios on the same channel.

Change-Id: I9dacc35294a4ed4e817014e563e7c9a54ee05e40
Reviewed-on: https://code.wireshark.org/review/28843
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-06 04:22:18 +00:00
Roland Knall 28cb2d4394 extcap: Create docbook documentation
Move the information from README.extcap into docbook.

Change-Id: Ic6504787750d04fe6c66479896cba8d6148d804d
Reviewed-on: https://code.wireshark.org/review/28690
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2018-07-13 20:37:10 +00:00
Guy Harris 1075054a10 Add new encoding names for seconds/{micro,nano}second time stamps.
Add ENC_TIME_SECS_NSECS and ENC_TIME_SECS_USECS; they make it more
explicit (especially to those not familiar with UN*X data types) what
the representation is, allow for ENC_TIME_SECS_MSECS etc. if they're
needed, and match names such as ENC_TIME_SECS and ENC_TIME_MSECS.

Change-Id: I6ab36fb4da70563587141cd65ffff8523477b0c4
Reviewed-on: https://code.wireshark.org/review/28564
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-02 04:09:21 +00:00
Peter Wu f7b91633c4 randpktdump: add --delay option
For testing live capture mode in the Qt UI, it is useful to have a
continous capture source with some dummy packets.

Change-Id: Id76ecbf24828dd3212b208c96679524e4c25b00f
Reviewed-on: https://code.wireshark.org/review/28537
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-01 06:57:23 +00:00
João Valverde 1a80691ee7 Expand doc/pugins.example README a bit.
Change-Id: Ife25fe9aaa333ffcdce3f2a48faed565dc83aebf
Reviewed-on: https://code.wireshark.org/review/27746
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-23 14:32:07 +00:00
João Valverde 7f45158f96 Fixups to doc/plugins.example build
Set symbol visibility properly.

Add -Wall -Wextra GCC flags that were there previosuly.

Remove duplicate -I compiler flags. Remove useless "hello_EXPORTS" definition while at it.

Change-Id: Iac173f02e41b3b4f2999e5d71b95b910a9c2da11
Reviewed-on: https://code.wireshark.org/review/27744
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-23 13:53:44 +00:00
João Valverde 5d69755c50 Convert doc/plugins.example to use CMake
Change-Id: Ic290249569ea9bb435638a9cabd4d87ac7ef9323
Reviewed-on: https://code.wireshark.org/review/27699
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-22 06:11:12 +00:00
João Valverde ec421a07b5 Restore doc/plugins.example Makefile.am
This file was erroneously removed in 4a156da068.
This file is not part of Wireshark's (the application) build system.
We may want to convert the example to use CMake instead (purely for consistency) but until then configure.ac and Makefile.am are required files.

Change-Id: I7902ff71a44bba798e8dc7083103d4785095b374
Reviewed-on: https://code.wireshark.org/review/27684
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-21 15:55:56 +00:00
Dirk Eibach e0002b0427 extcap: Support for DisplayPort AUX channel monitors
Support for the generic netlink DisplayPort AUX channel monitor kernel driver.

Change-Id: Iab445229ecef082968355f604993292f5f2d8d69
Reviewed-on: https://code.wireshark.org/review/27313
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-14 10:44:37 +00:00
Roland Knall 0af6ba1a53 extcap: Group arguments
Group arguments together to better present them, as well as to
have the possibility to better facilitate settings categories.

The order of tabs is defined by the numbering of arguments and
their appearance. If no tab can be found or no group has been
defined for the argument, a default tab will be added.

Change-Id: I032881193e09d4ad5d65c9f73fede87695acdace
Reviewed-on: https://code.wireshark.org/review/27054
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-08 10:31:38 +00:00
Gerald Combs 58da452d22 Test: Remove the Bash test scripts.
They've been replaced by the Python scripts.

Change-Id: I8add9c9ea0a6bdd68b2fa3841977863c0ea9a761
Reviewed-on: https://code.wireshark.org/review/27243
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 04:09:26 +00:00
Peter Wu e39a30b691 Document "len" and "count" in wireshark-filter(4) and WSUG
Add missing section on display filter functions to WSUG and make it
consistent with the wireshark-filter(4) manual. "count" was added in
Wireshark 1.12 (bug 9480). "len" was added in Wireshark 1.6.x.

"size" (added in 1.8.x) is not documented since it works like "len",
except that it is not limited to strings and byte arrays. I think that
"len" should be extended to other types while removing "size".

Change-Id: I2c8e2b4a11f007de7852a797bed971af86840b47
Reviewed-on: https://code.wireshark.org/review/27146
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 19:57:15 +00:00
Guy Harris 067a67bd27 Remove some references to autotools from developer documentation.
Change-Id: I4c95e56e067eed98d269812225256462dfa46273
Reviewed-on: https://code.wireshark.org/review/27140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 04:40:04 +00:00
Guy Harris 9e8f8921a3 Get rid of a no-longer-needed README file.
Now that we only support CMake, that file would be reduced to

	Wireshark is built using CMake.

which doesn't justify keeping it around.

Change-Id: I07d0ce0689ab274fd6c7dff3d8e5a8b31e110cbb
Reviewed-on: https://code.wireshark.org/review/27139
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 04:29:25 +00:00
Dario Lombardo 04aedf3682 tshark: prepend tshark to all examples in doc.
The doc has a mixed way of providing example, both without executable
name and with it. Add it to all the provided examples. Add highlight of
tshark in examples, too.

Change-Id: I99d83201cc897629f186aabd20c0add9c7c53b93
Reviewed-on: https://code.wireshark.org/review/27034
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-19 17:15:07 +00:00
Dario Lombardo fc6b8ab698 tshark: improve -G elastic-mapping command by adding filters.
The generated elastic mapping file is huge and it can hassle softwares
like Kibana. This change adds the ability to append desired filters
that will appear in the mapping file.

This change adds the option --elastic-mapping-filter <protocols> to tshark.

Example: tshark -G elastic-mapping --elastic-mapping-filter ip,udp,dns

make only those 3 protocols to appear in the mapping file.

Change-Id: Ie2dcd6e44be2d084e8e50cd6554bd90178da4e38
Reviewed-on: https://code.wireshark.org/review/27001
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-19 15:54:47 +00:00
Dario Lombardo 511c2e166a tshark: add -G elastic-mapping report.
This option generates an ElasticSearch mapping file as described here:
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana

It leverages the Glib-json library.

Change-Id: Iff25f991e87d3da07bf06654e353fb785799dde9
Reviewed-on: https://code.wireshark.org/review/26848
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-18 08:57:39 +00:00
Peter Wu 699ee5dc52 dfilter: make spaces around ".." optional in display filter
For numeric values such as port numbers, "4430..4434" looks more
natural than "4430 .. 4434", so support that.

To make this possible, the display filter syntax needs to be restricted.
Assume that neither field names nor values can contain "..". The display
filter `data contains ..` will now be considered a syntax error and must
be written as `data contains ".."` instead. More generally, all values
that contain ".." must be quoted.

Other than the ".." restriction, the scanner deliberately accepts more
characters that can potentially form invalid input. This is to prevent
accidentally splitting input in multiple tokens.  For example, "9.2." in
"frame.time_delta in {9.2.}" is currently parsed as one token and then
rejected because it cannot be parsed as time. If the scanner was made
stricter, it could treat it as two tokens (floats), "9." and "2." which
has different meaning for the set membership operator.

An unhandled edge case is "1....2" which is parsed as "1 .. ..  2" but
could have been parsed as "1. .. .2" instead. A float with trailing dots
followed by ".." seems sufficiently weird, so rejection is fine.

Ping-Bug: 14180
Change-Id: Ibad8e851b49346c9d470f09d5d6a54defa21bcb9
Reviewed-on: https://code.wireshark.org/review/26960
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:31 +00:00
Peter Wu 1ff82572ca dfilter: add range support to set membership operator ("f in {x .. y}")
Allow "tcp.srcport in {1662 1663 1664}" to be abbreviated to
"tcp.srcport in {1662 .. 1664}". The range operator is supported for any
field value which supports the "<=" and "=>" operators and thus works
for integers, IP addresses, etc.

The naive mapping "tcp.srcport >= 1662 and tcp.srcport <= 1664" is not
used because it does not have the intended effect with fields that have
multiple occurrences (e.g. tcp.port). Each condition could be satisfied
by an other value. Therefore a new DVFM instruction (ANY_IN_RANGE) is
added to test the range condition against each individual field value.

Bug: 14180
Change-Id: I53c2d0f9bc9d4f0ffaabde9a83442122965c95f7
Reviewed-on: https://code.wireshark.org/review/26945
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:02 +00:00
Dario Lombardo 4a156da068 Remove autotools build system.
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-18 03:46:17 +00:00
Peter Wu 82e8aa33a7 dfilter-test.py: document parallelization support
Tests are independent and can be run in parallel using pytest-xdist
(https://github.com/pytest-dev/pytest-xdist), document it.

While at it, allow running the tests from other directories.

Change-Id: I3e55c549669f7d59d35cd64eca53680cea6dec2d
Reviewed-on: https://code.wireshark.org/review/26943
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:34:41 +00:00
Guy Harris 23f5b13369 Improve the documentation of tvb_new_subset_ routines.
First mention tvbuff_new_subset_remaining(), as that's good enough for
most uses.

Then mention tvb_new_subset_length(), which is what most of the
remaining cases should use; we weren't even documenting it.

Then mention tvb_new_subset_length_caplen(); we want that to be used
only when *absolutely* necessary.

Change-Id: I57a6c202d4a68b001ddca8bd4c7e1d271eb52ef9
Reviewed-on: https://code.wireshark.org/review/26864
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-10 18:01:50 +00:00
Gerald Combs 974a15bf74 Docs: Remove a bunch of GTK+ references.
Change-Id: Icab98813d0b81a7337562e9857429d4bb98dc44c
Reviewed-on: https://code.wireshark.org/review/26817
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-09 05:02:12 +00:00
Roland Knall 485cec5bdf extcap: Fix version request
The original implementation lead to multiple extcap interfaces
being loaded, as well as an error output from the default example.

This fixes both

Change-Id: Icb6fbda7bcb11ed0d14cb683ddcdabdc20a7070d
Reviewed-on: https://code.wireshark.org/review/26773
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-06 10:41:53 +00:00
Gerald Combs 0cb3176ab7 Remove some references to Qt4.
Change-Id: I50f5abafb8adf18a5407427f7feb260301df45cc
Reviewed-on: https://code.wireshark.org/review/26771
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-06 03:11:52 +00:00
Roland Knall eaeca718cf extcap: Extend documentation for new features
Explain the new behavior for reload and version

Change-Id: I80d0f3338ac2e6a588964ce052ed49640155bc71
Reviewed-on: https://code.wireshark.org/review/26754
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-05 11:01:45 +00:00
Roland Knall 6124ee2a1c extcap: Reload values on request
Allow certaing elements to be reloaded upon request. The way
this works is, certain elements can be configured to be reloadable.

By doing so, the extcap is asked once more just for the values
list of this item, together with all already set options, and
reloads the available options depending on the response.

Only supported for selector. Radio and Multiselect will need
additional patches, also moving those parts outside of extcap_argument.cpp
might make sense before hand.

Change-Id: I2e9e3d109b334bf878835a7cc9354f468bc22dee
Reviewed-on: https://code.wireshark.org/review/26223
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-05 09:31:23 +00:00
Roland Knall c2422d7828 extcap: Tell utilities the wireshark version
Add an optional argument to extcap-version, which tells the utilities
the wireshark version and therefore allows them to handle different
versions differently.

If no version is provided, the utility has to assume it is dealing
with a Wireshark 2.x version (default behavior).

Change-Id: I51658300f28f503ca8050d204b73749f1a54df16
Reviewed-on: https://code.wireshark.org/review/26752
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-05 08:40:04 +00:00
Roland Knall e2ca17adae extcap: Add missing compatibliity function
Otherwise the utility no longer works for Python 2.

Change-Id: Ibe2f09d26887603a971185253aeaf2521875770d
Reviewed-on: https://code.wireshark.org/review/26751
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-05 08:15:01 +00:00
Gerald Combs a63542fe33 Fixup extcap_example.py
Run 2to3. Convert our payload to bytes. Switch from tab to 4-space
indentation as described in PEP8, which fixes a "TabError" message.

Change-Id: Ic20b6bc1fc1a945758c8be1bb54435f3326fb605
Reviewed-on: https://code.wireshark.org/review/26744
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-04 23:22:52 +00:00
Dario Lombardo 9dde6d4b5f doc: minor changes in README files.
Change-Id: I5b21ade727f9c4bed6545e69d87082baafaefa2b
Reviewed-on: https://code.wireshark.org/review/26702
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-02 06:29:33 +00:00
Tadeusz Struk fbf1409719 README.dissector: update info about tvb_get_nstringz
Update invalid description for tvb_get_nstringz() and
tvb_get_nstringz0().

Change-Id: I03483bc1a2aa5a701b44cd895b91289716ef215d
Reviewed-on: https://code.wireshark.org/review/26598
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-25 18:59:02 +00:00
Gerald Combs 45a50ef41e Update some documentation to prefer CMake.
Change-Id: I8140edaee152ce1e9978d8df8a0f0e3dd077322e
Reviewed-on: https://code.wireshark.org/review/26490
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-16 06:08:53 +00:00
Gerald Combs a1da75c554 Transition from GeoIP Legacy to MaxMindDB.
MaxMind is discontinuing its legacy databases in April in favor of
GeoIP2, which use a newer database format (MaxMind DB). The reference C
library (libmaxminddb) is available under the Apache 2.0 license which
isn't quite compatible with ours.

Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin
and prints resolved information on stdout. Place it under a liberal
license (MIT) so that we can keep libmaxminddb at arm's length. Add
epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it
via stdio.

Migrate the preferences and documentation to MaxMindDB.

Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the
geographic coordinate fields to FT_DOUBLEs.

Bug: 10658
Change-Id: I24aeed637bea1b41d173270bda413af230f4425f
Reviewed-on: https://code.wireshark.org/review/26214
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:02:21 +00:00
Alexis La Goutte 2db0957d49 tshark(.pod): fix spelling-error-in-manpage found by lintian
inital => initial

Change-Id: Id92a853bd6b24e06b2f6074903f8e89249c6c2cc
Reviewed-on: https://code.wireshark.org/review/26168
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-28 08:28:35 +00:00
Gerald Combs 3576ca2cd8 Remove eproto2sgml.
IIRC this was used to generate a list of display filters for the User's
Guide. We stopped doing that a long time ago.

Change-Id: Ib18f3982169ebda133f05e5fcad4083f75051286
Reviewed-on: https://code.wireshark.org/review/25907
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-19 23:31:34 +00:00
Guy Harris e2d5c537df Reorganize and expand the description section.
Try to do a better job of explaining the behavior with various
combination of options.  There are a lot of different output options,
and combinations of those options, for TShark; try to cover more of them
- it's complicated.

Consistently refer to command-line "options" rather than "flags".

Change-Id: Idbe6d22a07920789b3d5ed46a700e654a5ac0ae3
Reviewed-on: https://code.wireshark.org/review/25902
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19 17:41:46 +00:00
Guy Harris 6a0a56ed07 Note that -P can override -Q's suppression of packet output.
Change-Id: I38da07fb68a3b8c62e2267a06a9ba41ff80e7497
Reviewed-on: https://code.wireshark.org/review/25893
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-18 23:15:22 +00:00
Gerald Combs 0fa1176c22 Add `-z http_ref,tree` to the tshark man page.
Change-Id: Ia7b229fc4c42bd967ee4315543f58f6c05be5510
Reviewed-on: https://code.wireshark.org/review/25827
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-17 08:27:14 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
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-08 14:57:36 +00:00
Jaap Keuter 903c143769 autotools: Rework the plugin Makefiles
The plugin.c generation in an autotools build comes in from an included
Makefile.am file. The various types of plugins need different parameters
for the generation script. Put the plugin.c production rule is a seperate
include file so each plugin type build can include its own variant.

Also amend the README.plugins file with regards to the new directory
structure and the fact that there are multiple types of plugins, not just
dissector plugins.

Change-Id: I3a815d0d767baa555356cf428861b18697401355
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25398
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-21 13:13:17 +00:00
Guy Harris af0f49e80d Use pcapng as the name of the file format.
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-09 00:38:51 +00:00
Dario Lombardo e80b40adbe extcap: remove conditional compilation.
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>
2018-01-08 05:50:15 +00:00
Gerald Combs a65391f901 TShark: Fix color handling on Windows.
Use SetConsoleTextAttribute to reset our colors on Windows. Update the
release notes and man page.

Change-Id: I2bc309787f9c2331324503092bd1c9ae6360eb55
Reviewed-on: https://code.wireshark.org/review/25170
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-01-06 14:30:45 +00:00
D. W. Poon 6ff295af01 Swapped expert item fields in sample dissector
The sample dissector was inconsistent with the definition of
expert_field_info in epan/expert.h.

Change-Id: I533537e52bbcfa7f0cd7ff42e4233f17f40f8bab
Reviewed-on: https://code.wireshark.org/review/24902
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-20 13:49:09 +00:00
João Valverde c9f54aa1c3 autotools: Fixup plugins Custom.*.example
plugin_ldadd was removed in 262a84c384.

Change-Id: I516aa1be3466433bf8db83ab3d1773bf88082e8c
Reviewed-on: https://code.wireshark.org/review/24850
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-17 13:34:38 +00:00
João Valverde f3444ed0f9 plugins: Remove moduleinfo.h
Micro version bump for mate to homogenize it between CMake and autotools.
The cmake macro doesn't handle the "a" suffix and it doesn't seem worth
implementing.

Change-Id: Ib022c6aa170623b83a9700e4fa098c60a9cddfab
Reviewed-on: https://code.wireshark.org/review/24847
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-17 11:47:17 +00:00
João Valverde adde937ed7 plugins: Remove redundant plugin.rc.in files
plugin.rc is Windows specific, also add condition to reflect that.

Change-Id: Ibbb7dab77dd1f277e2302c8f931218ca433f8c72
Reviewed-on: https://code.wireshark.org/review/24833
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-12-15 22:09:04 +00:00
João Valverde 995812c5f1 Refactor plugin registration and loading
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.

Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).

The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.

Currently we only distribute "epan" (libwireshark) plugins.

Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 08:43:57 +00:00
João Valverde cb748178fe Add doc/README.build-system with CMake and autotools information
Currently more autotools than CMake.

Change-Id: I167f0bdd49d70d72f6155a4d978975c034ce3b4a
Reviewed-on: https://code.wireshark.org/review/24773
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-13 23:14:30 +00:00
Michael Mann 5b55848789 README.dissector: Add note to add 2 encodings for FT_UINT_BYTES in proto_tree_add_item
Change-Id: I728091998c531c992aa1b741b03e653460a0e77f
Reviewed-on: https://code.wireshark.org/review/24499
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-20 02:26:35 +00:00
João Valverde 262a84c384 Fix (and chop) static build option
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-19 20:16:50 +00:00
Gerald Combs 4ec8ebcebb SPDX: Convert doc and docbook.
Replace the GPLv2+ blurbs in the doc and docbook directories with SPDX
headers as appropriate. This includes example code such as
packet-PROTOABBREV.c.

Remove dfilter2pod.pl and dfilter2xml.pl. We haven't used them since
2010.

Change-Id: I4adec02a9a4bc3e71e32bdf89f2754edaf696938
Reviewed-on: https://code.wireshark.org/review/24343
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-11-11 15:45:31 +00:00
Graham Bloice e4ac91091d tshark doc updates
After other changes, add info about -G help
and update output from -G dissector-tables.

Change-Id: I339d5c31a606720ef92e641e59ec5a45114321a8
Reviewed-on: https://code.wireshark.org/review/24188
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-10-30 19:26:13 +00:00
Michael Mann 3a6552744f Add find_conversation_pinfo
Convenience function to add the same parameters to find_conversation as
find_or_create_conversation.

Change-Id: I3a92541cb9c1e827a9de8248825636debbd989cd
Reviewed-on: https://code.wireshark.org/review/24118
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-27 21:51:49 +00:00
Gerald Combs 0d9b8eaf08 Warn the developer if we're building with GTK+.
Move The Slowest Migration In The History Of Ever a little further
along.

Change-Id: Ib8b49708e7036dd412a7ffc8660ded9f681374c0
Reviewed-on: https://code.wireshark.org/review/24006
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-21 08:23:45 +00:00
Michael Mann cb89fdd1f6 Add support for BASE_OUI
Modeled after BASE_PT_XXX, this will format a FT_UINT24 to look a OUI, in the form of:
XX:XX:XX (Manufacturer Name) for display.
For display filtering, it will treat the value as hexadecimal.

It requires that FT_UINT24 be the field type.

Change-Id: I8716ae4dfcd4e854764a2425e2ff13c50f571d52
Reviewed-on: https://code.wireshark.org/review/23869
Reviewed-by: Richard Sharpe
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-10-15 22:44:47 +00:00
João Valverde d0a4a614f9 plugins: Remove COPYING and NEWS
We don't need to be this strict for bundled plugins about following
the GNU Coding Standards.

Change-Id: I18ed1b81d428eea15ea387102823f588287daf81
Reviewed-on: https://code.wireshark.org/review/23918
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-15 16:51:12 +00:00
João Valverde 9764cd0a83 autotools: make maintainer-clean should allow rerunning 'configure'
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-15 14:17:20 +00:00
Christoph Wurm af09db8bd3 Tshark: Optional packet summary for Elasticsearch
Currently, the Elasticsearch output exports the packet details and,
if -x is specified, the raw hex data.

This change adds the option of exporting the packet summary as well.

The default stays the same (packet details only), but now the existing
-P switch turns on printing of the packet summary. It also turns off
printing packet details, which can be turned back on with -V to print
both, and combined with -x to print all three: summary, details and
raw hex.

The packet summary is especially useful when exploring and visualizing
the data in Kibana, e.g. by displaying the summary "Info" field/column
in a table, as in the Wireshark GUI.

Change-Id: I2030490cfdd905572397bc3d5457ba49d805a5c4
Reviewed-on: https://code.wireshark.org/review/22716
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-10-15 00:58:42 +00:00
Michael Mann 337f49243f Add ptvcursor APIs that return the values it retrieves
ptvcursor_add_ret_uint
ptvcursor_add_ret_int
ptvcursor_add_ret_string
ptvcursor_add_ret_boolean

Change-Id: I41fa91b1ab805778d34a61215830b12a1331e864
Reviewed-on: https://code.wireshark.org/review/23895
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-13 06:45:37 +00:00
Guy Harris 9551aca9a6 Add --print as an alias for -P, to match tcpdump.
tcpdump just got a --print option, which causes packet information to be
printed even if the raw packets are being saved to a file with -w.  We
have -P for the same purpose; make --print another name for it.

While we're at it:

	document --help and --version;

	just speak of -P/--print as causing printing even of the packet
	details, even though -V forces printing with -w, for consistency
	with how --print is documented for tcpdump;

	fix the description of -h/--help.

Change-Id: Idf650a202a09a2d1682edbd9d76123f1b1412b55
Reviewed-on: https://code.wireshark.org/review/23888
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-11 19:32:43 +00:00
João Valverde 2777003e12 Add version check for plugin compatibility
Only plugins built for the same feature release (X.Y) are assured binary
compatibility. Make sure we don't try to run unsuitable code and, if so,
warn the user. This might happen for example if the user manually copies
a binary plugin to the wrong folder, intentionally or by accident.

I'm using "release version" to loosely mean not a patch release
(i.e: a feature release).

Change-Id: I896e9cbbd2d3843623fff6af8ef51002ec06f1f8
Reviewed-on: https://code.wireshark.org/review/23807
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-03 10:09:24 +00:00
Gerald Combs c634f2b184 Capinfos: Add SHA256. Remove MD5.
Print the SHA256, RIPEMD160, and SHA1 hashes for each file instead of
SHA1, RIPEMD160, and MD5. SHA256 seems to be the preferred file hashing
algorithm these days and MD5 is actively discouraged. Note that we might
remove SHA1 (which is also discouraged) as well.

Change-Id: I74d972ae5f3484c83175cd3f3c7a55f99c171e20
Reviewed-on: https://code.wireshark.org/review/23761
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-27 08:08:44 +00:00
João Valverde f649064130 Add toy plugin to doc/ as an out-of-tree build example
Change-Id: I9b7abb27d30dbe83996a01b7f722693a974948c5
Reviewed-on: https://code.wireshark.org/review/23665
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-25 14:55:09 +00:00
Michael Mann 5f667694d3 Add Flow Graph functionality to TShark
Add flow graph functionality to tshark through -z option.
Output is same as ASCII format saved from GUI.

Change-Id: Iee0bfea7215858e6488b4728581be28287e9ea1a
Reviewed-on: https://code.wireshark.org/review/23652
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-09-22 04:49:48 +00:00
Håkon Øye Amundsen 018f6bff18 extcap: Interface Toolbar support on Windows
Add support for extcap control pipes on Windows.
Improved read loop in InterfaceToolbarReader.
Delay opening control pipes until extcap has opened the fifo pipe.
Make extcap_example.py work on Windows.

Bug: 13833
Change-Id: I4b47d25452637759b8a3be53be48eee5365bc0e4
Reviewed-on: https://code.wireshark.org/review/23211
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-08-28 05:48:01 +00:00
Ahmad Fatoum aca55a29f7 Add hardware timestamping support
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-08-22 07:55:26 +00:00
Gerald Combs 719adb4fdc Convert README to README.md.
Convert the contents of the top-level README to Markdown and give it a
.md extension. Most of our documentation is plain text or AsciiDoc, but
the top-level README file in a Git repository is special in that many
online browsers will show the README contents along with the directory
listing and those browsers tend to favor Markdown. This is true of
GitHub (which we're currently mirroring to), Gerrit via its Gitiles
plugin (which we're not yet using but likely will), and other places.

Add "foreign" to AM_INIT_AUTOMAKE. There is probably a joke to be
made here about the FSF and border walls.

Change-Id: I87c306d74864e1f0a432225b160a1b4483ee946c
Reviewed-on: https://code.wireshark.org/review/23049
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-15 14:48:29 +00:00
Gerald Combs 537b083e02 Sync some CMake and Autotools install behaviors.
Adjust the following CMake and Autotools behaviors in order to
synchronize their respective install behaviors:

- Disable tfshark by default in CMakeOptions.txt
- Add profiles/Bluetooth/preferences to Makefile.am
- Add missing captype and ciscodump entries to doc/Makefile.am
- Install help/faq.txt on all platforms in CMakeLists.txt
- Add BUILD_corbaidl2wrs, BUILD_dcerpcidl2wrs, and BUILD_xxx2deb
  options to CMake and use them to adjust the corresponding parts
  of the build.
- Pull the DCERPC idl2wrs build steps into the top-level
  CMakeLists.txt.

This change doesn't sync everything. Some installed content still
diverges, including the following:

- CMake installs a bunch of modules into lib/wireshark:
    FindGLIB2.cmake
    FindWireshark.cmake
    FindWSWinLibs.cmake
    LocatePythonModule.cmake
    UseAsn2Wrs.cmake
    UseMakeDissectorReg.cmake
    WiresharkConfig.cmake
    WiresharkConfigVersion.cmake

  Do we need any or all of these? If so, should the Autotools behavior
  be synced accordingly?

- Autotools installs libtool .la files. It also installs
  wireshark-gtk.desktop unconditionally.

Change-Id: I7846efe08f7139c31b6ceca6f08a1fa5168b3e22
Reviewed-on: https://code.wireshark.org/review/23041
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-12 13:53:59 +00:00
Darien Spencer f50d9fe1d6 Update heuristic dissectors documentation
Remove grep output of explict count of heuristic protocols because
it changes too often to bother updating.

Change-Id: I69b0dfbae32f9eb9ffef6c3200238819ddf522e6
Reviewed-on: https://code.wireshark.org/review/22793
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-26 01:32:38 +00:00
Guy Harris fe8508b8b3 More precise error message.
"Missing newline after '}'" suggests either that the "}" is the line
character in the file or that it's followed by a character other than a
newline.  What it actually appears to mean is "you didn't put a blank
line between one author entry and the next author entry".

Change-Id: Ic0e4dd02f04680ab84fbfcf1183c911d049ee2d2
Reviewed-on: https://code.wireshark.org/review/22746
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-20 21:54:25 +00:00
Pascal Quantin f26778c9c6 Add udpdump documentation to distribution
Bug: 13903
Change-Id: I7e7aadfbec3e66ebac892e20b5632afa9f7e5923
Reviewed-on: https://code.wireshark.org/review/22725
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-07-20 09:49:44 +00:00
Peter Wu 44c34ac777 Fix formatting of AUTHORS list, fix Perl warning
Fixes the following warning in Perl 5.26:

    Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/(.*){ <-- HERE / at doc/make-authors-short.pl line 36.

While at it, fix formatting of the AUTHORS-SHORT file, a newline must be
present after "}" or the file will be mis-parsed.

Change-Id: I76bc1a30714dafd703342d2d430dc1c90cf2bf82
Reviewed-on: https://code.wireshark.org/review/22637
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
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-07-17 07:57:38 +00:00
Sake Blok 3803e00367 Add option to use wall-clock intervals
Add the "interval" option to "-b". Each new capture starts at the
exact start of a time interval. For instance, using -b interval:3600
will start a new capture file at each whole hour.

Changed the duration option in the GUI interfaces to use the new
interval option.

Change-Id: I0180c43843f5d2f0c2f50153c9ce42ac7fa5aeae
Reviewed-on: https://code.wireshark.org/review/22428
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Sake Blok <sake.blok@SYN-bit.nl>
2017-07-03 16:41:37 +00:00
Guy Harris e0a9192ebc Don't worry about initializing auto aggregates with non-constant values.
On UN*X, you can get C99-or-later compilers, and we request that in the
autoconf script, so it's really a requirement.

At least as I read

	https://msdn.microsoft.com/en-us/library/34h23df8%28v=vs.100%29.aspx

Visual Studio 2010 (and earlier, going back to VS .NET 2003) supports
the "Use of block-scope variables initialized with nonconstant
expressions", with an example of an aggregate (array) initialization
involving function calls, so it sounds as if it's available on Windows
with any version of VS that we support.

(If I've missed something, it'll presumably show up when something is
built with MSVC, and we can update this at that point.)

So the only thing to avoid is initializing global or static variables
with a value that has to be evaluated at run time (the ability to do
that is probably present in most environments, as I think C++
constructors for variables with static storage duration might have to be
evaluated before main() is called, but I guess few C compilers bother to
use it).

Expand the example in the hopes of avoiding confusion between "static
storage duration" (which something declared "static" has, but which
anything declared with file scope, whether declared "static" or not,
also has) and "static storage duration and internal linkage", which is
what the "static" keyword specifies.

Change-Id: I338eb0892e656c2ab59519e4bf76e1dfbec2fa7d
Reviewed-on: https://code.wireshark.org/review/22434
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-28 01:35:39 +00:00
Guy Harris 7321df2a45 Fix the "don't initialize with non-constant variables" item.
It only applies to variables with static storage duration, i.e. global
and static variables.  Expand the example of how to do it, to make it a
bit clearer.

Change-Id: Ie0c473a35a77351dd10d6c9df2c34a39f077fca4
Reviewed-on: https://code.wireshark.org/review/22430
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-27 21:38:45 +00:00
Gerald Combs 7d67af661a Make "matches" case-insensitive.
Make the "matches" operator case-insensitive by default. Case
sensitivity can be switched back on using "(?-i)".

It might be nice to make "contains" case-insensitive as well, but we'd
need a caseless version of epan_memmem.

Change-Id: I5e39a52c148477c30c808152bcace08348df815a
Reviewed-on: https://code.wireshark.org/review/22330
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-22 19:32:06 +00:00
Daan De Meyer 07f576ffeb Add --no-duplicate-keys tshark option.
Adds the --no-duplicate-keys option to tshark. If -T json is specified,
this option can be specified in order to transform the duplicate keys
produced by -T json into single keys with as value a json array of all
separate values.

Specifying --no-duplicate-keys changes the function which groups node
children that is passed to write_json_proto_tree. Instead of a function
that puts each node in a separate group (proto_node_group_children_by_unique)
a function is passed that groups children that have the same json key
together (proto_node_group_children_by_json_key). This will lead to
some groups having multiple values. Groups with multiple values are
written to the output as a json array. This includes normal json keys
but also keys with the "_raw" and "_tree" suffix.

If --no-duplicate-keys is specified with an option other than "-T json"
or "-T jsonraw" or without -T an error is shown and tshark will exit.

"Export Packet Dissections -> As JSON" in the GUI is hardcoded to use
the duplicated keys format.

Fixes one regression in the output where a filtered json key (-j) with
both a value and children would not have the "_tree" suffix added to the
json key containing the children.

Includes a little code cleanup (removes one instance of code
duplication and simplifies a while loop).

Fixes a memory leak (I thought this fix was already included in the
previous refactor patch but something must have gone wrong when updating
the patch so I'm including it again in this patch).

Bug: 12958
Change-Id: I401f8fc877b5c590686567c3c44cdb832e9e7dfe
Reviewed-on: https://code.wireshark.org/review/22166
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-22 19:31:01 +00:00
Dirk Weise 9fe90b93ce Add notes about predefined strings not available to plugins
The documention refers dissector authors to helpful predifined string structures
that plugin authors unfortunately cannot use.

Bug: 13828
Change-Id: I62cdfeb200c9b354aed44d40c80a0e8f9e8f910b
Reviewed-on: https://code.wireshark.org/review/22339
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-22 12:25:38 +00:00
Michael Mann 585d17ae7f Add support for color xml attributes in psml and pdml formats.
Bug: 6682
Change-Id: I19330d06aa3d5692503c61369c3c650d595971f5
Reviewed-on: https://code.wireshark.org/review/22077
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stephen Donnelly <stephen.donnelly@endace.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-12 03:23:38 +00:00
Dave Goodell 2be411a215 tshark: add "--color" option emulating wireshark colors
With this commit, tshark will mimic the packet coloring present in the
Wireshark GUI whenever "--color" is passed.  This initial commit only
adds such support for the standard text output format.  A future commit
could potentially broaden this support to other output modes (such as
"-V" mode).

Bug: 5158
Change-Id: I59329e32475b0c67e28802e79610544d4868ea2d
Reviewed-on: https://code.wireshark.org/review/21325
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-11 13:36:19 +00:00
Michael Mann 6c44f2017c Qt: Add support to verify extcap capture filter
Bug: 11668
Change-Id: Ib218d87c1905e53ffdab4e3dd6f93ba2c3d07c8b
Reviewed-on: https://code.wireshark.org/review/21770
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-05-30 18:10:03 +00:00
Stig Bjørlykke 58a0026454 extcap: Update example help text
Change-Id: I1240af78664d6066650be67b95f0423a5353c711
Reviewed-on: https://code.wireshark.org/review/21508
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-05 13:40:49 +00:00
Hessam Jalali dd884611ac Auto reset epan session
Automatically resets intarnal epan session after reaching to
specified number of packets, for example
-M 1000
will reset the session every 1000 packets.

this is more like a proposal since the usage is very specific
it is useful for 24/7 live capture with dissection and sending
data directly to another application.

example:

tshark -Y "gtp" -M 100000 -T fields -e gtp.message -e gtp.teid

Change-Id: I8ee8b0380017c684120a93cb3fb43f41615a9c04
Reviewed-on: https://code.wireshark.org/review/21312
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-05 00:51:58 +00:00
Stig Bjørlykke 741d4f5898 Qt: Interface Toolbar improvements
- Select one of the capturing interfaces when start capture
- Only send user changed control values when start capture
- Don't show hidden interfaces
- Allow a toolbar with no interfaces
- Renamed button role "reset" to "restore"
- Improved control number validation
- Updated documentation

Change-Id: Icc8d04043c95c1f3ef8d7cdc3b251be4471cba0a
Reviewed-on: https://code.wireshark.org/review/21445
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-02 09:34:01 +00:00
Guy Harris 015d9194e1 Add proto_tree_add_item_ret_boolean().
It does what it says on the label.  You get back TRUE or FALSE in a
gboolean.

While we're at it, remove a copied-and-pasted comment that doesn't
apply, and update another comment.

Change-Id: I117391d2ffe44124a614a7f64dad1b389c1ebc6a
Reviewed-on: https://code.wireshark.org/review/21394
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-28 01:24:39 +00:00
Michael Mann 2c921eb83c Add proto_tree_add_item_ret_uint64
Just like proto_tree_add_item_ret_uint, but with 64-bit support

Change-Id: Ie0cbfda9e63bf21e85df2d674e391a6c0abe92f7
Reviewed-on: https://code.wireshark.org/review/21355
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-04-26 23:46:32 +00:00
Stig Bjørlykke 77751c94f1 Qt: Add interface toolbar support
An extcap utility can provide configuration for controls to use in a
GUI interface toolbar.  This controls are bidirectional and can be
used to control the extcap utility while capturing.

This is useful in scenarios where configuration can be done based on
findings in the capture process, setting temporary values or give other
inputs without restarting current capture.

Todo:
- Add support for Windows

Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d
Reviewed-on: https://code.wireshark.org/review/19982
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-25 06:19:39 +00:00
Guy Harris 913f9fb353 Rename BASE_VALS_NO_UNKNOWN to BASE_SPECIAL_VALS.
It makes it a bit clearer what its purpose is - to allow a value_string
to be used for numeric rather than enumerated fields, giving certain
values of the field a special meaning.

Change the explanation in the documentation to match as well.

Change-Id: Id07b22eee996b79ea5f3473928d29adcabe09bf3
Reviewed-on: https://code.wireshark.org/review/21209
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18 22:28:07 +00:00
Ahmad Fatoum b478df61f5 Qt: Provide both file save and open preferences
This is a breaking change.

prefs_register_filename_preference hasn't been differentiating
between files to be saved and ones to be opened.

On GTK, a neutral dialog is used, so no problems there.
On Qt, a save dialog has been always used, even in dissectors that
were reading configuration files without modification.

prefs_register_filename_preference now takes an argument to indicate
whether UI could be a save dialog with a warning on overwriting
a file, or whether it's a general purpose open file dialog.

Qt now does this. Previously no warning was shown on overwriting a file,
so it may be used for opening files too without irritating the user.
This has been changed, as non-destructive reads should now use
the open dialog.

Dissectors were changed accordingly.

Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018
Reviewed-on: https://code.wireshark.org/review/21086
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-17 10:51:10 +00:00
Guy Harris 067ef3e08a Clean up documentation and help messages for protocol enabling/disabling.
List all of --enable-protocol, --disable-protocol, --enable-heuristic,
and --disable-heuristic in the SYNOPSIS section of the man pages.

Undent after the list of taps for the -z option, so the following
options are at the same indentation as other options.

List --enable-protocol in the DESCRIPTION, above --disable-protocol.

Include --enable-protocol in the help message.

Change-Id: I680a54430789f3543b2d539fbded22b0b57f7f76
Reviewed-on: https://code.wireshark.org/review/21159
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17 03:48:14 +00:00
Alexis La Goutte 043df01c56 Add support for BASE_VALS_NO_UNKNOWN
BASE_VALS_NO_UNKNOWN is a special value_string value for only a single
(maybe 2) numerical value(s).  If a field has the numerical value
that doesn't match anything in the value_string, just the number
is supplied for the field (no "Unknown")

Dissectors that had this use case have been converted in the patch.

Change-Id: Ie63a36cceec2fe4436938ec7e3d7f9e690d2b8d9
Reviewed-on: https://code.wireshark.org/review/20736
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 20:31:37 +00:00
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X
10.0", for example.  It was "Mac OS X" until 10.8 (although 10.7 was
sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS
X" from 10.8 to 10.11.

Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3
Reviewed-on: https://code.wireshark.org/review/20933
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05 19:16:22 +00:00
AndersBroman 572b80d283 Add ENC_TIME_MSEC_NTP and use it in packet-gtpv2.c
While at it fix expert info a typo and an calculation.

Change-Id: I071a36edb7eed5f58708b98aebcb24bc6c34f2a8
Reviewed-on: https://code.wireshark.org/review/20766
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-03-29 05:09:54 +00:00
Martin Sehnoutka 8efd42c4aa Reflect new default value of snaplen in man pages.
Default value for snaplen is defined in wiretap/wtap.h:
 #define WTAP_MAX_PACKET_SIZE    262144

and used in capture_opts.c:
    capture_opts->default_options.snaplen         =
    WTAP_MAX_PACKET_SIZE;

but help and man pages don't reflect this change.

Change-Id: I35ddf1e8b7ffd657f4e01b3fe6b4c44c9acece2b
Reviewed-on: https://code.wireshark.org/review/20738
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2017-03-28 16:23:59 +00:00
Pascal Quantin bd486eb9b1 text2pcap: define max packet size to WTAP_MAX_PACKET_SIZE
Change-Id: I73ab87032e4a0c0259227622412be36aaf66a9d6
Reviewed-on: https://code.wireshark.org/review/20758
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28 10:32:53 +00:00
Guy Harris ed3b5e5764 Get rid of blanks at the ends of lines.
Change-Id: I10a756a4a42d4f27f59e12c11f12d71947191c92
Reviewed-on: https://code.wireshark.org/review/20760
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28 10:21:50 +00:00
Guy Harris 8f515b1a99 Fix up time encodings.
Add some new encodings for absolute time stamps, and use them as
appropriate; this fixes some cases where the time stamps in question
were being dissected incorrectly.

For the encodings with seconds and 1/2^32s of a second, don't
arbitrarily give only microsecond resolution; 2^32 is greater than 1
million, and, in fact, at least some NTP RFCs explicitly talk about time
resolution greater than 1 microsecond.

Update references in the RELOAD dissector to reflect the documents in
question having been updated and published as RFCs.

Change-Id: Icbe0b696d65eb622978eb71e99ddf699b84e4fca
Reviewed-on: https://code.wireshark.org/review/20759
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28 10:18:36 +00:00
Jim Young 81ad4cd3bd capinfos: Add -K option and report capture comments last
This patch adds a capinfos -K option to suppess printing of capture
comments.  This patch also changes when capture comments are printed
relative to the other enabled infos. Because capture comments are
freeform we will now defer their printing until all but the interface
detail infos are printed.

Change-Id: Ibb3df040c09e4c67d714c561869c00e08b83d6ed
Reviewed-on: https://code.wireshark.org/review/20643
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-23 11:53:28 +00:00
Joerg Mayer c87cf1a81a Remove a reference to deleted doc/README.epan_child
Change-Id: I521674267873fe32c3ff5b53c9fb6a9e971d8772
Reviewed-on: https://code.wireshark.org/review/20631
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-19 17:56:50 +00:00
Alexis La Goutte 78634bbe52 ciscodump (man): fix typo dependant -> dependent
found by lintian

Change-Id: I5ce951fca2213d3d18807cde061dea201a36999f
Reviewed-on: https://code.wireshark.org/review/20628
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>
2017-03-19 16:50:15 +00:00
Joerg Mayer 0b6b152694 Remove echld/.
It has been unsupported for some years and when talking about removing it
in the past I received some positive and no negative feedback.

There is one instance of echld left:
capchild/capture_sync.c:                 * echld might have already reaped the child.

Can that case be removed or should be comment be updated to something more
accurate? (left for a separate patch)

Change-Id: Idac397158dd86fd0728eb95379449ee4a463fc28
Reviewed-on: https://code.wireshark.org/review/20619
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-19 15:13:14 +00:00
Jim Young e66b05fa9d tshark: Optionally delimit packet summary columns with tabs
This patch augments tshark's -T report with a "tabs" option.
When the -T tabs option is enabled an ASCII horizontal tab character
is inserted between each column of the human-readable one-line
packet summary record.

Change-Id: Id10a6e21e231eb2e52b6342ed05399db1a5fcfdf
Reviewed-on: https://code.wireshark.org/review/20537
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-03-19 13:47:41 +00:00
Joerg Mayer 7f2a39f9ba rpcap URLs *require* the :<port> argument for remote capture - update manpage.
Change-Id: Iabae39347bc0058d106a9b00d81629899bc93249
Reviewed-on: https://code.wireshark.org/review/20526
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-12 22:32:05 +00:00
Michael Mann 4a703e01f4 Check profile directory before personal directory for services and subnets file
Bug: 11228
Change-Id: Id8bcc51ff694ef9f2019bc7509e440021d049d22
Reviewed-on: https://code.wireshark.org/review/19735
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: Peter Wu <peter@lekensteyn.nl>
2017-03-03 23:45:36 +00:00
Peter Wu c79b5e0eb7 Update documentation with reference to $XDG_CONFIG_HOME
Since v2.1.0rc0-184-gb0b53fa593, $XDG_CONFIG_HOME/wireshark (instead of
$HOME/.wireshark) is used, clarify this in the WSUG and manuals.

Change-Id: I74a6f9b86bd8d54ee326ca83d7536e091d6da08a
Reviewed-on: https://code.wireshark.org/review/20364
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-03 19:29:44 +00:00
Kim Bäckström f3d52cb534 Bugfix for extcap fileselect functionality, start button in extcap options dialog wouldn't
get enabled if the user had selected a file (and mustexist=true wasn't specified).

This commit also contains minor fixes to doc/README.extcap, it's now more aligned to the
actual implementation.

Added example usage of fileselect, radio and multiselect to doc/extcap_example.py.

Change-Id: Ibfe40a35a26f49322fbe64c0594506a2163f7e20
Reviewed-on: https://code.wireshark.org/review/20274
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-26 09:22:25 +00:00
Martin Kacer cd7d159c2e json2pcap support added
Modified tshark -T json -x output
Added tshark -T jsonraw output
json2pcap.py (can be used for basic packet editing by modifying json)

The modification in tshark -T json -x and new tshark -T jsonraw output
add into  hex-data output in JSON also information on which position
each field is dissected in the original frame, what is the field length,
bitmask (for not byte aligned fields) and type. This information can be
used for latter processing. One use-case is json2pcap script which
assembles the protocol layers back together from upper to lowers layers,
which allows the basic packet modification/editing/rewriting.

Change-Id: Ibf948eb8fc7e3b0b51c12df6c3855f705a9c7925
Reviewed-on: https://code.wireshark.org/review/19990
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-02-25 19:11:01 +00:00
Roland Knall 3697192ea2 pluginif: Add documentation for toolbar interface
Add the documentation for the new toolbar interface
to the README file

Change-Id: I9dd37dc4f31760ccd1c9a3e6ae379cd6f9ca1db9
Reviewed-on: https://code.wireshark.org/review/20261
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-24 09:04:48 +00:00
Gerald Combs 560a6c3823 Rawshark: Try to avoid a VC runtime crash.
The MSDN documentation for _read says

"If fd is invalid, the file is not open for reading, or the file is
locked, the invalid parameter handler is invoked, as described in
Parameter Validation."

This means that on Windows, if our parent has closed stdin when we call
_read we'll crash. Add a check to bail out early if that's happened.

Fix a sign cast while we're here.

Change-Id: I8afb75f6e56c6a6c2b62103ba7e2fb635dc85702
Reviewed-on: https://code.wireshark.org/review/20153
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-17 17:19:06 +00:00
Peter Wu 6b84ddee83 Make Libgcrypt a mandatory dependency
Removed all guards for HAVE_LIBGCRYPT, change autotools and CMake to
error out if it is not available. Update release notes, developer
documentation and README with the new status. Clarify relation with
GnuTLS in macosx-setup.sh. Install Libgcrypt via brew script.

Motivation for this change is that many dissectors depend on Libgcrypt
and having it optional increases the maintenance burden (there have been
several compile issues in the past due to the optional status).
Furthermore, wsutil has crypto code that can be replaced by Libgcrypt.

Change-Id: Idf0021b8c4cd5db70b8766f7dcc2a8b3acbf042f
Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html
Reviewed-on: https://code.wireshark.org/review/20030
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-02-13 18:35:47 +00:00
Jaap Keuter b28b07379f editcap: handle too short frames in frame comparison
With option -I one can ignore the first number of bytes from the frame
while doing duplicate frame removal. This doesn't handle shorter frames
correctly. Add safeguards for this, and update the help text.

Bug: 13378
Change-Id: Ia6b65d0797f4069f0b89fa134114d88d80988211
Reviewed-on: https://code.wireshark.org/review/20004
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-02-08 22:31:43 +00:00
Gianluca Borello 47ad059bd7 Rawshark: Add a memory limit (-m) option.
Add an option to rawshark that lets the user set a maximum memory limit.

Change-Id: Ie102ee5f6ba5aec90a35bd63297184c7dc37662c
Reviewed-on: https://code.wireshark.org/review/19911
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-02 16:11:00 +00:00
Stig Bjørlykke efb5c1537d Qt: Add extcap placeholder parameter
Added a parameter to set placeholder text in textBox.

Change-Id: Iccf92fe60abc78be8f0fa112c0c9eb78890674b5
Reviewed-on: https://code.wireshark.org/review/12463
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-02 10:33:14 +00:00
Uli Heilmeier 79f3d8f40d MAN wireshark-filter: Add ~ operator
The tilde (~) operator was missing as an alternative for matches.

Bug: 13320
Change-Id: Idb96c802145dcdd0d9ffc196b32370cadd8735b3
Reviewed-on: https://code.wireshark.org/review/19723
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-22 19:05:38 +00:00
Guy Harris 7cd6906056 Rename tvb_new_subset() to tvb_new_subset_length_caplen().
This emphasizes that there is no such thing as *the* routine to
construct a subset tvbuff; you need to choose one of
tvb_new_subset_remaining() (if you want a new tvbuff that contains
everything past a certain point in an existing tvbuff),
tvb_new_subset_length() (if you want a subset that contains everything
past a certain point, for some number of bytes, in an existing tvbuff),
and tvb_new_subset_length_caplen() (for all other cases).

Many of the calls to tvb_new_subset_length_caplen() should really be
calling one of the other routines; that's the next step.  (This also
makes it easier to find the calls that need fixing.)

Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b
Reviewed-on: https://code.wireshark.org/review/19597
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10 06:19:37 +00:00
Michael Mann a0be5ad6f1 Add interface for "pinos" (Protocols in name only)
This is for dissectors that need distinguishing names either for registering
multiple dissection functions in a single dissector table or for "internal"
dissectors whose just need a name associated with the dissection function.
Features like enable/disable are handled by the "parent" protocol.
This avoids clutter in the "official" protocol list.

Change-Id: I69e7d27d332ae85286f254e95e8d79920da7a9e2
Reviewed-on: https://code.wireshark.org/review/19464
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-31 13:08:41 +00:00
Michael Mann 13964595ad Add BASE_NO_DISPLAY_VALUE to allow field value to not be shown.
There are times when byte arrays don't want to show their value
in the packet tree or there is a field that is the "header" of
a subtree where showing the field value distracts from the tree
display.  For these cases, BASE_NO_DISPLAY_VALUE can be used
to not display the value.

Change-Id: I8c9f1f57cd2e663dbee07e2289e7f5e1f22d1e32
Reviewed-on: https://code.wireshark.org/review/19479
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-30 20:03:03 +00:00
Dario Lombardo 1c8223dbdf extcap: add info to extcap manpage (taken from README.extcap).
Ping-Bug: 13218
Change-Id: Ib43dc2ce8ae7991468b866aec3f03f6a5709f8b2
Reviewed-on: https://code.wireshark.org/review/19177
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-12-14 14:36:16 +00:00
Dario Lombardo 39050d3e2f README.extcap: impagination improvement.
Change-Id: I1cc0dc6496bea8e42c199dff116530ccec6fb591
Reviewed-on: https://code.wireshark.org/review/19089
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-12-14 10:11:55 +00:00
Michael Mann 4e97f74f11 Add support for adding unit names to hf_ fields.
This was inspired by the https://www.wireshark.org/lists/wireshark-dev/201505/msg00029.html thread.

Used TCP and NTP dissectors as the guinea pig with sample use.

Documentation updates includes some unrelated cleanup just because it was noticed.

Change-Id: I59b26e1ca3b95e3473e4757f1759d7ad82976965
Reviewed-on: https://code.wireshark.org/review/19211
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
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>
2016-12-13 13:08:39 +00:00
Dario Lombardo b7e7796e20 extcap: add new option type (timestamp).
Bug: 12787
Change-Id: I941833c55fb607c8af2ef832082af58d7b94e965
Reviewed-on: https://code.wireshark.org/review/18721
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-09 04:49:33 +00:00
Jim Young 50489fd279 tshark: Add -G folders report
Add a new tshark feature to generate a folders report.  The folders report
is essentially the information presented by Wireshark's About / Folders page
in a TAB delimited format.

Change-Id: Ic4b3d332b4bdaa7e6b7aad1e9cc5dd18413aada6
Reviewed-on: https://code.wireshark.org/review/19002
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-03 12:47:05 +00:00
Moshe Kaplan 20c57cb298 Enable exporting objects with tshark
A new "--export-object <protocol>,<destdir>" option is added to tshark.

This required refactoring Export Object behavior in all GUIs to give the
export object handling to the dissector, rather than the ui layer.
Included in the refactoring was fixing some serious memory leaks in Qt
Export Object dialog, crash due to memory scope issues in GTK Export
Object dialog, and addition sorting column feature in Qt dialog (set
up by creating a widget to manage the items that were previously
leaking memory)

Bug: 9319
Ping-Bug: 13174
Change-Id: I515d7662fa1f150f672b1476716f347ec27deb9b
Reviewed-on: https://code.wireshark.org/review/18927
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-02 16:07:35 +00:00
Dario Lombardo af7fc8b7e4 Qt: add fullscreen feature.
The feature activates/deactivates fullscreen mode of Qt UI.
A new menu item has been added as well as a shortcut (F11 or Ctrl+Cmd+F)
according to browsers common shortcut.

Change-Id: I01906b494d0a13ce70d27c00ebbe03e6ec87cbd7
Reviewed-on: https://code.wireshark.org/review/18332
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-23 23:25:49 +00:00
Pascal Quantin 321b756dc4 Add T.61 character set support
Bug: 13032
Change-Id: I6bf2cc2c43a6262d899a304df6576d9831115966
Reviewed-on: https://code.wireshark.org/review/18350
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-22 03:16:11 +00:00
Peter Wu c9fa9b51de cmake: add dependency to build manual pages
"add_custom_command" outputs are only available as dependency in the
same directory, so create a new target such it can be used from the main
directory.

This fixes the OS X build with no parallelism (-j1).

Change-Id: I66aa5ae307be38ee715456a05fd55f55e4fa76e9
Reviewed-on: https://code.wireshark.org/review/18299
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-20 13:06:17 +00:00
Peter Wu 9c3d81adde Officially require Qt 4.8 or newer
Since v2.3.0rc0-1002-g1cd2255, Qt 4.8 became mandatory, reflect this in
the version requirements. This will not affect a lot of distributions
(RHEL and SLES only had Qt 4.6).

For a more complete list of supported platforms, see
https://wiki.wireshark.org/Development/Support_library_version_tracking

While at it, correct some other minimum versions in documentation.

Change-Id: I11f2dfba72c75429f6838404a81ed3b3dc302d5f
Reviewed-on: https://code.wireshark.org/review/18314
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-20 05:03:07 +00:00
Michal Labedzki 5c8f4decd9 androiddump: Update help
Minor changes in androiddump implies minor changes in help file.

Change-Id: Ifbf4dbdca427e8b19272c2b4f28e06fd6a548834
Reviewed-on: https://code.wireshark.org/review/18316
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19 13:24:24 +00:00
Peter Wu 537705a8b2 wslua: prepare for split class/instance (meta)methods
Previously the metatables for classes were the same for the class and
its instances. This results in issues like calling __gc on the class
table on exit.

Make it possible to declare separate class methods (functions) and
instance methods. Observe that all attributes apply to the instances
only, so make these just available on the instance.

The attribute/methods lookup method (via __index/__newindex) have been
rewritten to use upvalues, removing the technical need for the
properties __getters/__setters/__methods. The "lua globals" test still
checks for these, but it could be removed in the future.

To fix bug 12968, the __gc method is removed from the class method.
Future patches should remove the WSLUA_REGISTER_CLASS,
WSLUA_REGISTER_META and WSLUA_REGISTER_ATTRIBUTES macros completely and
create split class functions/methods (such that __call for an instance
cannot accidentally be invoked on the class).

Removed duplicate "fragmented" property from Pinfo (which triggered an
error) and replaced exit() by g_error() for debugger friendliness.
Remove lua_shiftstring since checkstring always returns non-NULL.

Bug: 12968
Change-Id: I57f8a93d08bb84c79b0e94cf2c82d8402fc16646
Reviewed-on: https://code.wireshark.org/review/18026
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-10-18 20:41:34 +00:00
Peter Wu 763a059fe9 extcap_example.py: fix hang on exit
I guess that when SIGINT is intercepted, then the writes are restarted
and the doExit condition is never checked. Remove this racy check in
favor of catching the KeyboardInterrupt exception.

Test: tshark -i example1; kill tshark; check process list for python.

Bug: 11657
Change-Id: Ia8b1ee560b9dcd31dd91df27fbfb8e91237581c9
Reviewed-on: https://code.wireshark.org/review/18218
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-16 22:45:09 +00:00
Peter Wu 2176423b4a extcap_example.py: fixes for Python 3
Fixes trivial syntax error in try/except, ensure that the message are
bytes instead of a string and remove unnecessary use of an append_bytes
function.

Did not try to fix the other Python issues, at least it runs now.

Change-Id: Ib24f6116bc9d3cf177bc940da9f89aff90695a93
Reviewed-on: https://code.wireshark.org/review/18212
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-16 22:44:53 +00:00
Gerald Combs 37252634c4 UI: Free up the -m flag.
The -m (monospace font) flag was deprecated in 2.2. Go ahead and remove
it in 2.3 / 2.4.

Change-Id: I6b4911174675cedec979621c2776353314e73eb1
Reviewed-on: https://code.wireshark.org/review/18193
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-14 03:46:27 +00:00
Uli Heilmeier 9a6539990d CMakeLists: Add man files
Current Wireshark.app bundle on OS X doesn't include man pages.

This is the second try after commit 7da23ca1a5bba4af5e1104f4d3d3d44e918552b0
has been reverted. Now cmake gets the information that the man files
are generated.

Bug: 12746
Change-Id: I34dfec65bd57587ee048d7e1e2557fc9ab2b32eb
Reviewed-on: https://code.wireshark.org/review/18170
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-14 03:33:34 +00:00
Uli Heilmeier 5fba7f368d Revert "CMakeLists: Add man files"
This reverts commit 55148a2ea4.

Change-Id: If93b97933cae4d8ffd1e4cc9a635def031ab0cc6
Reviewed-on: https://code.wireshark.org/review/18123
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-08 19:07:26 +00:00
Michael Mann 268841f3e0 Combine Decode As and port preferences for tcp.port dissector table.
This patch introduces new APIs to allow dissectors to have a preference for
a (TCP) port, but the underlying data is actually part of Decode As functionality.
For now the APIs are intentionally separate from the regular APIs that register a
dissector within a dissector table.  It may be possible to eventually combine the
two so that all dissectors that register with a dissector table have an opportunity
to "automatically" have a preference to adjust the "table value" through the
preferences dialog.

The tcp.port dissector table was used as the guinea pig.  This will eventually be
expanded to other dissector tables as well (most notably UDP ports).  Some
dissectors that "shared" a TCP/UDP port preference were also converted. It also
removed the need for some preference callback functions (mostly when the callback
function was the proto_reg_handoff function) so there is cleanup around that.

Dissectors that has a port preference whose default was 0 were switched to using
the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference

Also added comments for TCP ports used that aren't IANA registered.

Change-Id: I99604f95d426ad345f4b494598d94178b886eb67
Reviewed-on: https://code.wireshark.org/review/17724
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08 02:44:53 +00:00
Jim Young 8b6de4c81e Add a little more info about vagrant and our Vagrantfile.
Change-Id: I2f24f869e6b7b819e50e3ea5ade5dbae5272ced2
Reviewed-on: https://code.wireshark.org/review/18102
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-07 07:37:24 +00:00
Uli Heilmeier 55148a2ea4 CMakeLists: Add man files
Current Wireshark.app bundle on OS X doesn't include man pages.

Change-Id: I4123105ae805c3f127dbfd74768b88d4da546c56
Ping-Bug: 12746
Reviewed-on: https://code.wireshark.org/review/17902
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-05 12:28:32 +00:00
Dario Lombardo d8fdf5454a sshdump: add remote capture command.
This new option adds the chance to use a custom capture command.
It must produce a PCAP stream that will be read by Wireshark,
written to STDOUT.

Change-Id: I34a72465eb369194f24ecf0594df143b8ad6555f
Reviewed-on: https://code.wireshark.org/review/18037
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-04 09:58:25 +00:00
Dario Lombardo 99367fc513 sshdump: use tcpdump as default capture binary.
This removes the option to specify a custom capture binary due to
incompatibilities between different binaries options. A following
change will add the chance to use a custom capture command that
will cover all the cases that the default doesn't.

Bug: 12952
Change-Id: Idbde3e27f34c28f4ce622c3a860994e25ce5f92f
Reviewed-on: https://code.wireshark.org/review/18040
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-04 09:57:51 +00:00
Gerald Combs 8ea52e2f49 Man pages: Update -D flag text.
Refer to "Windows" instead of "Windows 2000". Add an "ip link show"
breadcrumb.

Change-Id: Ie1faa1d30b0ac63de35b0385cbb1306f08828e61
Reviewed-on: https://code.wireshark.org/review/18056
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-10-04 00:09:48 +00:00
Peter Wu 46aba5a340 doc: add the -d (decode as) option to wireshark(1)
Text is partially copied from the tshark manual page.

Change-Id: I120e327f15394fc48fce6e4a122e7eab83e91c82
Reviewed-on: https://code.wireshark.org/review/17904
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-24 23:57:52 +00:00
Dirk Jagdmann 1a3f1d08fd update description of PDML file format by updating URLs to external documentation. Also mention the pdml2html.xsl file.
Change-Id: I44894f52771939bf9f861abf19bcb8bc589e37eb
Reviewed-on: https://code.wireshark.org/review/17894
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-24 05:42:11 +00:00
Gerald Combs e4a230aad2 Move the rest of README.qt to the WSDG.
Change-Id: I8ba0dc0170141db0b96cac996e5ad5f0bd3253ea
Reviewed-on: https://code.wireshark.org/review/17806
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-20 04:20:23 +00:00
Guy Harris d7fe514fc0 Improve support for single-character fields and filter expressions.
Add an FT_CHAR type, which is like FT_UINT8 except that the value is
displayed as a C-style character constant.

Allow use of C-style character constants in filter expressions; they can
be used in comparisons with all integral types, and in "contains"
operators.

Use that type for some fields that appear (based on the way they're
displayed, or on the use of C-style character constants in their
value_string tables) to be 1-byte characters rather than 8-bit numbers.

Change-Id: I39a9f0dda0bd7f4fa02a9ca8373216206f4d7135
Reviewed-on: https://code.wireshark.org/review/17787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-19 02:51:13 +00:00
Dario Lombardo 47650d357e extcap: add udpdump.
Udpdump is a generic UDP receiver that exports datagram in PCAP format.

Change-Id: I52620a92b12530b6f9b5449c43e692663acdfc14
Reviewed-on: https://code.wireshark.org/review/17195
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-09-16 08:07:30 +00:00
Roland Knall ee1a4109cf extcap: Add tool-specified helppage
Allow the tool to provide a link to a helppage, displayed
by clicking on help in the configuration dialog.

The URL will be opened using an URL based service, therefore local
as well as remote URLs are possible.

Change-Id: I58b30244e97919d5cf6892faf96536ddc30fb5a7
Reviewed-on: https://code.wireshark.org/review/17549
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-09-07 09:09:30 +00:00
Peter Wu 232a879429 Allow a lot more C99 features
Flexible array members are supported by gcc, clang and even MSVC2013.
Note, so far it was only used in the Windows-specific airpcap.h.

Trailing commas in enum declaration are already in use since for
these dissectors (commit ID is the first occurrence):
epan/dissectors/packet-gluster.h v2.1.0rc0-1070-g3b706ba
epan/dissectors/packet-ipv6.c v2.1.2rc0-81-ge07b4aa
epan/dissectors/packet-netlink.h v2.3.0rc0-389-gc0ab12b
epan/dissectors/packet-netlink-netfilter.c v2.3.0rc0-239-g1767e08
epan/dissectors/packet-netlink-route.c v2.3.0rc0-233-g2a80b40
epan/dissectors/packet-quic.c v2.3.0rc0-457-gfa320f8

Inline functions using the "inline" keyword are supported via all glib
versions we support (if it is missing, glib will define a suitable
inline macro).

Other c99 functions listed in the README.developer document were found
to be compatible with GCC 4.4.7, Clang 3.4.2 and MSVC 2013.

Change-Id: If5bab03bfd8577b15a24bedf08c03bdfbf34317a
Reviewed-on: https://code.wireshark.org/review/17421
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-06 02:42:27 +00:00
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Dario Lombardo 37649c4d0f doc: fix typos.
Change-Id: Id34affcb33c00e224dafbccc347b1d91b9e74c8d
Reviewed-on: https://code.wireshark.org/review/16914
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-06 00:31:23 +00:00
Graham Bloice 86cf94ffee Text2Pcap doc update
Minor docs update

Change-Id: Iea44e4963aab75db1d875d27af41e4f38ff74e2d
Reviewed-on: https://code.wireshark.org/review/16859
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-03 22:11:43 +00:00
Graham Bloice 472f789b73 Text2Pcap docs update
Minor update to docs

Change-Id: If9464f00d69bb9a8bb5638f3bb0d0f73a56aad50
Reviewed-on: https://code.wireshark.org/review/16856
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-08-03 12:50:51 +00:00
Roland Knall c611eded22 extcap: Use stderr to print error message
This patch reads out the stderr messages from an extcap
utility and displays it to an user. It was tested on Qt
but not on GTK, but should work their as well.

On Mac OS/X and Windows the child_watch does not behave
as it was intended. Therefore in extcap_cleanup, the callbacks
are called manually, if and only if, they have not been
called already.

The reason why it displays two error messages is, that
by the time the first one is being displayed, glib has not
returned from the spawned process on Linux yet. So there
is no way to add the stderr correctly, and putting a handler
to stderr into interface_opts will lead to memory errors,
cause then the code tries to access memory outside of its
protection.

Bug: 11892
Change-Id: I2db60dd480fed3e01428b91a705057e4f088bd15
Reviewed-on: https://code.wireshark.org/review/12954
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: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-30 21:15:39 +00:00
Uli Heilmeier 62ea2370f8 README.dissector: Add proto_tree_add_bitmask_with_flags()
Extend README with proto_tree_add_bitmask_with_flags() function.

Change-Id: Ia984080eda77ab93b063771d625bc45b5b0fc6d2
Reviewed-on: https://code.wireshark.org/review/16785
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-30 16:21:11 +00:00
Gerald Combs f5dff39232 Use xz to compress the source tarball.
Compress the source tarball using xz instead of bzip2. Other open source
projects (including many of our dependencies) have been using xz for a
while so hopefully this won't be too much of a shock.

Remove the patch-bzip2 Autotools target while we're here.

Change-Id: I456d27b6cd56a43aba829bd45938f98568eb7b1d
Reviewed-on: https://code.wireshark.org/review/16735
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-29 10:55:34 +00:00
João Valverde 9fa5617b17 Add IPv6 to the randpkt manpage
Change-Id: Ie8a46f727861319ec51b8390c53da8a0f36ab9ef
Reviewed-on: https://code.wireshark.org/review/16732
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2016-07-27 22:09:42 +00:00
Michael Mann 8b0e9c6672 Follow up for proto_tree_add_checksum.
Fill in the "gaps" so that all dissectors that verify checksums have both a
status and expert info field.

Also address comments from original proto_tree_add_checksum patch that didn't make it.

Ping-Bug: 8859
Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f
Reviewed-on: https://code.wireshark.org/review/16590
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>
2016-07-27 03:40:02 +00:00
Michael Mann ad6fc87d64 Add proto_tree_add_checksum.
This is an attempt to standardize display/handling of checksum fields for all dissectors.
The main target is for dissectors that do validation, but dissectors that just report the
checksum were also included just to make them easier to find in the future.

Bug: 10620
Bug: 12058
Ping-Bug: 8859
Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf
Reviewed-on: https://code.wireshark.org/review/16380
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-21 12:35:22 +00:00
Jeff Morriss 29a98d1c7f Allow BASE_NONE (with strings conversion) for integral values again.
This mostly reverts SVN rev 43412 (3fa645481f)
with the addition of documenting that FT_*INT*'s with BASE_NONE and a
FIELDCONVERT tells the Wireshark core that the field's numeric value is
meaningless and should not be shown to the user.

Use BASE_NONE again with the expert info group and severity fields.  This
(finally) resolves the complaint from:

https://www.wireshark.org/lists/wireshark-dev/201206/msg00188.html

(yes, this mail's been sitting in my "todo" pile since then! <sigh>)

Change-Id: I1c6dd2864e7a2e959c97c409f277853af74a8d93
Reviewed-on: https://code.wireshark.org/review/16518
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-20 03:00:52 +00:00
João Valverde f8b738016e Fix manpages typo.
Change-Id: Iac747655d09c94926e51c7ea1f23375650cd6641
Ping-Bug: 12305
Reviewed-on: https://code.wireshark.org/review/16446
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 01:15:15 +00:00
D. Ulis 25ba3dbc75 HTTP: Add request/response arrows
HTTP has multiple related packets, so seeing which are the actual request/response (related to the current selected packet) is helpful.

Change-Id: I833f4f620cfe8bfe9b1d7518c4e28fbd41b64e29
Reviewed-on: https://code.wireshark.org/review/16385
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-12 12:14:50 +00:00
João Valverde a16d401b25 Remove Makefile.common files
Now that nmake build system has been removed they are not needed anymore.

Change-Id: I88075f955bb4349185859c1af4be22e53de5850f
Reviewed-on: https://code.wireshark.org/review/16050
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>
2016-06-30 11:04:17 +00:00
Guy Harris b4e847996b Mention autotools, give some information for other UN*Xes.
For OS X, mention the use of CMake or autotools for building.

For Linux, mention autotools as well as CMake, and speak of Debian
derivatives other than Ubuntu.

Add a section for UN*Xes other than OS X and Linux.

Change-Id: I73bb7afe2d427333b10016aeb497ab32eee16d43
Reviewed-on: https://code.wireshark.org/review/16217
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-30 01:40:17 +00:00
João Valverde e1b1304334 Update README.qt
Change-Id: Icf7774098986da29efdf76af1dcf217bced428e4
Reviewed-on: https://code.wireshark.org/review/16206
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-06-29 20:48:24 +00:00
Martin Kacer ceae9e4d1f tshark fields filter added for other outputs
-e fields filter addded to ek|json|pdml output.

Bug: 12529
Change-Id: I1f0f8772eefceb5b71927925ce0c34af483571b9
Reviewed-on: https://code.wireshark.org/review/16193
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>
2016-06-29 08:29:16 +00:00
Gerald Combs bcae998048 Qt: Support the -j, -J, and -l command line flags
Add support for -j, -J, and -l. Mark the -m flag deprecated.

Bug: 12546
Change-Id: Ic44b3997840018e5d571aa1813a1646bce11d4a6
Reviewed-on: https://code.wireshark.org/review/16083
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-23 03:03:51 +00:00
Martin Kacer c3f3bd7fa8 tshark JSON and Elasticsearch output fix
Fixed json and ek escape function
Fixed -j protocol filter to do exact match
Fixed -T json to correctly close json
Added -j protocol filter also to pdml output

Bug: 11754
Change-Id: I02f274e4a5a02346922b37bbe946c10340c242ea
Reviewed-on: https://code.wireshark.org/review/16034
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-21 16:57:59 +00:00
Martin Kacer 42b060905e tshark JSON and Elasticsearch output
Added ouput -T for json|ek
Added -j switch fo filter EK json|ek fields.
Added -x switch to work with json|ek to insert raw fields.

Bug: 11754

Change-Id: Iad5a9092b843c074b0b774d1745fa14fca09f6b7
Reviewed-on: https://code.wireshark.org/review/15869
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-17 06:09:29 +00:00
Balint Reczey a8f73e92fd documentation: Suggest using prefixed public symbols
Change-Id: I9153756b0e921fd74d7df9d119337f5484856ba0
Reviewed-on: https://code.wireshark.org/review/15940
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15 21:21:54 +00:00
Pascal Quantin 6baa1b544c Remove Nmake build system
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61
Reviewed-on: https://code.wireshark.org/review/15777
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15 19:21:57 +00:00
Jeff Morriss b2845a6ac8 tshark man page: the first TCP stream is stream 0, not 1.
This fixes the example of the -z follow option.

Also fix up some formatting in the same section.

Bug: 12383
Change-Id: Ic9b2ef5e63ab31d70f2750f9cfdcbab76cf204b6
Reviewed-on: https://code.wireshark.org/review/15667
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>
2016-06-01 04:30:50 +00:00
Michael Mann 4d4190f127 Have wmem conform to checkAPIs.pl
Yes, the rename of structure members is a bit hacky.
Yes, catering to Windows since "GLib's v*printf routines are
surprisingly slow on Windows".
But it does pass checkAPIs.pl

Change-Id: I5b1552472c83aa2e159f17b5b7eb70b37d03eff9
Reviewed-on: https://code.wireshark.org/review/15404
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-13 16:00:58 +00:00
Gerald Combs d7cbea9428 TShark: Add a "-E bom=" option.
Add an option to print the UTF-8 BOM.

Change-Id: I3d30c67852b9b89d1548b0f957d97fd8e8741049
Reviewed-on: https://code.wireshark.org/review/15318
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-05-11 17:30:33 +00:00
AndersBroman 505bf5945b [tshark] Document -U option and create a list of tap names when entering
an empty name "".

Change-Id: I2b8332ff6900c8a88514a25a416f342d7b696d34
Reviewed-on: https://code.wireshark.org/review/15332
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>
2016-05-11 11:27:49 +00:00
Gerald Combs ae4a912af0 TShark: Convert TTY output.
If we detect that we're writing to a TTY and that it doesn't support
UTF-8, convert our output to the current code page on UNIX/Linux or
to UTF-16LE on Windows. This helps to ensure that we don't fill users'
screens with mojibake, along with scrubbing invalid output.

Add a note about our output behavior to the TShark man page. Add a note
about the glyphs we should and shouldn't be using to utf8_entities.h.

Bug: 12393

Change-Id: I52b6dd240173b80ffb6d35b5950a46a565c97ce8
Reviewed-on: https://code.wireshark.org/review/15277
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-09 04:11:29 +00:00
Evan Huus 66bea399cf Update README.wmem
It was getting stale in a few places, and I added a bunch of detail after
discussions on https://code.wireshark.org/review/15270.

Change-Id: Icd5ad954c4fbf592df0be63e6fb9440565a8efc1
Reviewed-on: https://code.wireshark.org/review/15280
Reviewed-by: Evan Huus <eapache@gmail.com>
2016-05-07 02:16:21 +00:00
Pascal Quantin ae316e2d88 Compile sshdump and ciscodump for Windows
Use libSSH 0.7.2 compiled with MinGW(32|64) and linked with zlib and gcrypt support

Change-Id: I7c17d1ba3dd1890e2f83c119f5ea851834807e43
Reviewed-on: https://code.wireshark.org/review/12117
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>
2016-04-25 07:22:28 +00:00
João Valverde eeded812f7 Add option to disable version.h
If the file '.git/wireshark-disable-versioning' exists then version.h
will be commented out.

Change-Id: If481b673463408a69c2ecf7c2e66d08c5855537f
Reviewed-on: https://code.wireshark.org/review/14932
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-21 18:59:24 +00:00
João Valverde e005bc819c Remove synchronous DNS name resolution
Change-Id: Ie5e670b769eb0674950f3679ef511047641c2873
Reviewed-on: https://code.wireshark.org/review/14751
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-04 06:49:55 +00:00
Jaap Keuter 1fe8d892dd Update min. GLib version and add Qt version checks
The document describes why and how to version check, but
1) is not up to date with respect to minimum GLib version
2) does not yet mention Qt version requirement and check.
This change addresses both issues.

Change-Id: Ibb56c02cf48f6a4c6270b20686ca4d6e8aaf99d1
Reviewed-on: https://code.wireshark.org/review/14669
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-03-29 15:21:19 +00:00
Dario Lombardo a6921c79ab extcap: add ciscodump.
Ciscodump is a new extcap that allows packet capture
on Cisco routers (IOS 12.4 and later) through SSH.

Change-Id: Ic9c5be01d3bd0112116f7fc9fa10e26c1552b007
Reviewed-on: https://code.wireshark.org/review/13886
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-24 12:07:28 +00:00
João Valverde 7a15af9dd3 Remove unnecessary make dependency in doc/Makefile.am
Change-Id: I3b8db4727d9674d4e573c5ccc739a3661ee14196
Reviewed-on: https://code.wireshark.org/review/14574
Reviewed-by: João Valverde <j@v6e.pt>
2016-03-23 00:23:52 +00:00
João Valverde 52dd4fb633 Fix building without extcap enabled
Using cmake -DENABLE_EXTCAP=no or ./configure --without-extcap.

Some documentation fixes too.

Change-Id: Iebf9c843d67e10a32de1a62904de8f88b872ec99
Reviewed-on: https://code.wireshark.org/review/14522
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>
2016-03-21 17:10:21 +00:00
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
João Valverde 11cd41d922 Add EditorConfig reference to README.developer
Change-Id: I595e94bd0274e3ee3c1d8764fc6c93f28993c30f
Reviewed-on: https://code.wireshark.org/review/14468
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-14 22:44:43 +00:00
Michal Labedzki 3c143d2846 androiddump 1.0.2: Fix a lot of usage of recv()
recv() can return negative value or 0 in "error cases".
There is need to check it. This also solved empty interfaces
list if there is unauthenticated device.

Bug: 12080
Change-Id: If6cd0e0933b64e9ac9bbb66b3b8138f7177451d1
Reviewed-on: https://code.wireshark.org/review/14316
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-03-12 18:26:33 +00:00
João Valverde 0ca383e529 cmake: Copy docs to build datafile dir for NSIS packaging.
Change-Id: Icc1f6dadc8bb082c4049cafc6a7e6c2d030ec85e
Reviewed-on: https://code.wireshark.org/review/14409
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>
2016-03-11 15:20:46 +00:00
João Valverde 1fad3334c6 Fix NSIS installer
Broken by gb7f6cf9.

Change-Id: I21a91cf56c16b7ffdf72da7bf68a556feb6a6c17
Reviewed-on: https://code.wireshark.org/review/14408
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>
2016-03-10 14:45:14 +00:00
João Valverde b7f6cf979c Add doc/CMakeLists.txt
Change-Id: I387e893dc5b8b38569f7189d078fdc1853ba012f
Reviewed-on: https://code.wireshark.org/review/14269
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-03-10 11:19:09 +00:00
João Valverde 6b54fbf3bf CMake: Add more structure to libwireshark build
Smaller epan/CMakeLists.txt is easier to work with and this structure
is well suited to CMake. It should make it easier to manage and configure
each epan module differently if necessary.

Change-Id: Ia649db3b7dcd405aa43dbdba3288699d5e375229
Reviewed-on: https://code.wireshark.org/review/14068
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2016-03-01 19:23:39 +00:00