Commit Graph

2235 Commits

Author SHA1 Message Date
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
Jeff Morriss 289ca20fe1 Update documentation of hf fields.
- Specify the valid characters in hf abbreviations as suggested in
  https://ask.wireshark.org/questions/50444/braces-inside-abbreviated-name-fieldabbrev-of-header_field_info
- Update the valid characters for protocol abbreviations too.
- Remove a couple old (ancient?) hf substitutions (things to replace in the
  dissector template).  I don't think PARENT_SUBFIELD or ID_VALUE have been
  used in quite a while.
- We no longer automatically add the protocol's abbreviation to the field's
  abbreviation (it's now the dissector-writer's job).
- Abbreviations can no longer be empty strings (since
  a146f5a2e2).
- When talking about hf fields reference the substitution names (to make it
  easier to find additional documentation).

Change-Id: Ic80dc6a230dc727ba544e68c4a0cc746768e5081
Reviewed-on: https://code.wireshark.org/review/14107
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-28 23:50:53 +00:00
Graham Bloice 7bd6bae799 Update README.plugins to remove deprecated nmake references
Change-Id: I259fe24e6dca7679f22492161b0c4cd97c7521de
Reviewed-on: https://code.wireshark.org/review/14145
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-02-26 13:10:53 +00:00
Graham Bloice 4fec250ed9 Update README.plugins
Update docs to include steps for CMake builds.

Change-Id: Iefbe038ab93311bb3b2e9fd21bcdc674290dba45
Reviewed-on: https://code.wireshark.org/review/14121
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-25 04:28:51 +00:00
Pascal Quantin fd52f92947 Update list of field types compatible for comparisons
Change-Id: Ic356773f780b88f0a7d8735167dec240fa5bdbc2
Reviewed-on: https://code.wireshark.org/review/13670
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-02-02 22:04:00 +00:00
Roland Knall 927ffaa794 extcap: Add Save functionality to options dialog
This patch creates the functionality of saving all parameters
for extcap devices in the general preference section.

For now, multiselect and fileselect do not save their values
but patches for this will be provided in the future

Also, all preferences are stored as strings to make handling
easier. This might change in the future, but for the first version
it will stick.

Restore to Defaults is not implemented as of yet, and will be
in a future version, once the preference storing is finalized

Bug: 11666
Change-Id: I178346405146d2e43f4f3481c05c92c0b3595af5
Reviewed-on: https://code.wireshark.org/review/13451
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-01 12:12:41 +00:00
Dario Lombardo 0c1878c1ac sshdump: fix documentation issues.
Change-Id: I338842e8e66faf883e2533be195a79f34d5d1ee6
Reviewed-on: https://code.wireshark.org/review/13560
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-31 15:52:29 +00:00
Roland Knall 97a1a50e20 extcap: Cleanup complex types and add save option
Cleanup handling of complex data types and use only
glib defined datatypes while handling argument values.

Add a save parameter, which (additionally) can set, that
a parameter is not saved in a configuration file. Passwords
are by default not saved, which may be overwritten using
this parameter

Change-Id: I67eff0f3286170f082d532e806a39511c40df647
Reviewed-on: https://code.wireshark.org/review/13573
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: Roland Knall <rknall@gmail.com>
2016-01-28 14:51:14 +00:00
Mike78 ef752689da Allow/Create an option to use "capture filter" labels defined in wireshark GUI from CLI
Move ui/filters.[ch] to filter_files.[ch] because dumpcap is using functionality.

Bug: 8091
Change-Id: I195c82fc023f97d6f331b8718c45a2d83d30faea
Reviewed-on: https://code.wireshark.org/review/5925
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-01-27 13:40:24 +00:00
Michael Mann 850f5d3be0 Remove the deprecated column types so users don't think they still exist.
Bug: 11559
Change-Id: I51836dc9a4fa399835c7bdabcba577ebd40327ad
Reviewed-on: https://code.wireshark.org/review/13538
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-01-27 07:54:24 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Guy Harris 8e5dfa5905 More pinfo->fd->num to pinfo->num.
Change-Id: Ic56b1e9be4886be9985c4b7082fbd330dbf297df
Reviewed-on: https://code.wireshark.org/review/13510
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:47:23 +00:00
Dario Lombardo ff033c6a2f extcap: add masked to options.
This allows an option to be masked (like a password), by using
the argument-type password.

Change-Id: I2eae1be2e6672bff28ba5f749d7a3f687ebd4631
Reviewed-on: https://code.wireshark.org/review/13385
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-18 15:04:33 +00:00
Alexis La Goutte 409914a143 doc: fix spelling-error-in-manpage found by lintian
Change-Id: I848159f0c960e0e8ece09c7c96dda6deb0ec6046
Reviewed-on: https://code.wireshark.org/review/13329
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-16 17:55:12 +00:00
Roland Knall 75ff25f285 extcap: Add list of extcaps to about dialog
Adds the list of available extcaps to the plugin list in the
About dialog of Wireshark (Qt only). To do this, and additional
sentence is provided in the extcap arguments list, which allows
for additional information to be passed (as of right now, just
version and display is used)

Additionally, cleans up the code when using g_free.

Bug: 11683
Change-Id: I04a958e2b73c9a707ab1cb4f2fc8345833a854a9
Reviewed-on: https://code.wireshark.org/review/13224
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-15 11:30:39 +00:00
Roland Knall 7423a91e81 extcap: Documentation for the new features
Add documentation for regular expression usage, required
 and fileextension arguments

Change-Id: I9a27c4263a87774cb997a6f4e1f8783a69d818df
Reviewed-on: https://code.wireshark.org/review/12949
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-07 19:30:07 +00:00
Roland Knall cfd5457ec0 extcap: Add regular expression validation support
Regular expressions follow the Qt Regex syntax, which is
 formulated after the Perl Regex syntax. A more detailed
 overview of the possible rules can be found at:
 http://doc.qt.io/qt-4.8/qregexp.html

 If a required option is present, even the double-click on
 the interface will first start the options dialog (Qt only)

 Required fields are marked bold and put first in the dialog.
 Additionally if validation failes (which it will if a required
 field is kept empty, but also if a non-required textfield is
 violating the defined regex), the label of the field is marked
 with red.

Change-Id: If04a1146d0dfa778332ab2a39122c7a6ee1e93d2
Reviewed-on: https://code.wireshark.org/review/12914
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>
2016-01-05 14:41:12 +00:00
Guy Harris f9df9ffb3f Note that variadic macros *can* be sued.
Change-Id: I15bfda76256e5d1084ad7c64006f93afaf071a9e
Reviewed-on: https://code.wireshark.org/review/13010
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-02 23:18:49 +00:00
Barbu Paul - Gheorghe cef51084f2 improved the developer documentation
* tvb_*_length mentioned in README.dissector
* fixed typos in README.dissector
* using stats_tree_register_plugin in the stats_tree examples both in README.stats_tree and the dev guide
* removed the version information and the #endif from the stats tree section in README.dissector

Change-Id: I27df0b5dfd66a7c0ac5b0fe1bdc882b3e9ffda74
Reviewed-on: https://code.wireshark.org/review/12908
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-30 00:07:47 +00:00
Alexis La Goutte 05e2ec32e8 randpktdump: Add randpktdump.pod to extra_dist list
for fix make distcheck

Change-Id: I20888b5ae719d2b9f361529f8fe6534bd7a01822
Reviewed-on: https://code.wireshark.org/review/12825
Reviewed-by: Dario Lombardo <lomato@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>
2015-12-22 16:29:27 +00:00
Dario Lombardo ac0eb6043b extcap: add randpktdump, a random packet generator.
This new extcap is for testing and educational purpose.
It relies on rankpkt-core functions to generate random packets.

Change-Id: If6890f0673545682995a2079458108edc0913b30
Reviewed-on: https://code.wireshark.org/review/11764
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>
2015-12-22 12:24:16 +00:00
Michael Mann 12f6311b20 "new" dissector API -> dissector API for docs/examples
Change-Id: If862aadbd483933782d5979a3c0be2cb3c08a480
Reviewed-on: https://code.wireshark.org/review/12481
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 03:12:44 +00:00
Stig Bjørlykke ca9970cd27 extcap: Fix extcap_example.bat arguments wildcard
Change-Id: I3aa1b14e8047e4eec14464db80d7e03fa7a5dc57
Reviewed-on: https://code.wireshark.org/review/12464
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-07 13:54:33 +00:00
Paul Offord 30c77364d4 Incorrect information in README.plugins Section 6
The examples showing how to add menu entries are based on
older versions of some of the related functions.  This change
corrects those examples.

Bug: 11819
Change-Id: Iad9beb2e87d3d1efe5f9dfa93a0e7110b8d9f53a
Reviewed-on: https://code.wireshark.org/review/12308
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-01 11:09:08 +00:00
Michael Mann dc9f782017 Add BASE_ALLOW_ZERO for byte arrays that are validly zero sized.
<MISSING> implies that the field should be there and isn't.  Allow dissectors to specify when a zero-sized array for a field is perfectly valid.

Ping-Bug: 11803
Change-Id: I3fd60e3c6f832c6b4a3a8837ebc52c3e74e795ae
Reviewed-on: https://code.wireshark.org/review/12271
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: João Valverde <j@v6e.pt>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-30 18:28:10 +00:00
Michael Mann 2cf37ea0a0 Document tvb_get_guintXXX and tvb_get_ieee_XXX
Change-Id: I498c0ca39befa0c0117ee78c23714bf7af193ce9
Reviewed-on: https://code.wireshark.org/review/12164
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-26 06:31:02 +00:00
Dario Lombardo d6da95231e extcap: add sshdump.
sshdump is an extcap module that allows dumping from a remote host using an ssh connection.
It goes with the existing extcap plugin interface.

Change-Id: I8987614fdd817b8173a50130812bc643a4833bca
Reviewed-on: https://code.wireshark.org/review/11402
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-19 15:29:18 +00:00
Guy Harris 0b05086754 Apple calls it just "OS X" these days.
Change-Id: I98905988ceb394d27307d1cbe883d8fe95ac23e4
Reviewed-on: https://code.wireshark.org/review/11703
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-10 21:08:45 +00:00
Guy Harris 11bdadacc2 Update to reflect current reality.
Change-Id: I98a104407feb21d038653e41c547c7ebc27771cb
Reviewed-on: https://code.wireshark.org/review/11636
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-08 10:00:00 +00:00
Stig Bjørlykke 9c0d550a4a extcap: Provide capture filter to extcap binary
Added the option --extcap-capture-filter to extcap to send the capture filter
from the main screen to the extcap binary.

Change-Id: I75f0d7dbec810551225377f9221053298488cdd5
Reviewed-on: https://code.wireshark.org/review/11423
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-05 07:42:35 +00:00
Michael Mann 8571dbb908 Document dissector "Decode As" functionality in README.dissector
Change-Id: I82d97a9fb770455d57d47cef8c616d2d4ff41d3c
Reviewed-on: https://code.wireshark.org/review/11488
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03 12:19:54 +00:00
Michael Mann ad1b785fe8 udp_dissect_pdus follow-up
Add heuristic support
Better documentation

Change-Id: I236c1f4d3613aa58d608aee0e5edc40c3b158d25
Reviewed-on: https://code.wireshark.org/review/10120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-01 21:42:51 +00:00
Dario Lombardo f220250d14 extcap: add missing types in doc.
Change-Id: Ieefa91df20fc460ae9e64ed94ffe7bca3ead63d1
Reviewed-on: https://code.wireshark.org/review/11284
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-26 13:36:03 +00:00
Dario Lombardo 28e8f184df androiddump: fix doc.
Change-Id: If11a9095ab20e84f61eb0194a64f33dbee6cc70e
Reviewed-on: https://code.wireshark.org/review/11223
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-23 09:01:01 +00:00
Dario Lombardo 47c626fd4e doc: add README.extcap
Change-Id: I0c9b6b5c16a10d13860a0a7bd4c0ace3005bc893
Reviewed-on: https://code.wireshark.org/review/11210
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-23 08:03:50 +00:00
João Valverde a459ac72a2 Add BASE_PT_ field display types
Avoid displaying duplicate port numbers with transport name resolution disabled and
make some dissector code simpler.

Introduces port_with_resolution_to_str_buf() function and amends UDP/TCP/DCCP/SCTP to
use the new field display type.

Change-Id: Ifb97810b9c669ccbb1a310a2c0ffd6e2b63af210
Reviewed-on: https://code.wireshark.org/review/10625
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05 18:10:48 +00:00
Peter Wu 6d7b29592a Allow use of variadic macros
Remove variadic macros restriction (c99, c++11 feature) from
README.developer. GCC, Clang, MSVC 2005 all support it.

Enable -Wno-variadic-macros in configure.ac and CMakeLists.txt when
-Wpedantic is enabled (which would enable -Wvariadic-macros).

For all files matching 'define\s*\w+[0-9]\(', replace "FOO[0-9]" by
"FOO" and adjust the macro definition accordingly. The nbap dissector
was regenerated after adjusting its template and .cnf file. The
generated code is the same since all files disabled the debug macros.

Discussed at:
https://www.wireshark.org/lists/wireshark-dev/201209/msg00142.html
https://www.wireshark.org/lists/wireshark-dev/201510/msg00012.html

Change-Id: I3b2e22487db817cbbaac774a592669a4f44314b2
Reviewed-on: https://code.wireshark.org/review/10781
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-05 07:57:14 +00:00
Gerald Combs cc9de69b49 Set the minimum Qt version to 4.7.
We've been using QElapsedTimer for a while now with no complaints. It
was introduced in Qt 4.7, which was first released in September 2010.

Change-Id: I21ca768c6a7bab8a08626957583d81fd771c64b4
Reviewed-on: https://code.wireshark.org/review/10732
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-01 22:28:51 +00:00
Jeffrey Smith 57d954e168 Treat IPv4 subnet masks as distinct from addresses
While IPv4 subnet masks are obviously related and similar to IPv4
addresses, they are distinct enough that they need to be treated
seperately in some aspects.  For instance, there is no value in
attempting to resolve a subnet mask.

This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4
(and possible name resolution) where appropriate.

Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7
Reviewed-on: https://code.wireshark.org/review/10438
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>
2015-10-01 20:49:42 +00:00
Jeff Morriss cd7387d22b Add a "fieldcount" report to tshark -G to let us easily see how many fields
are registered.

Change-Id: I06f10d96916640cb9a782cae87898a5dd6c9c6e3
Reviewed-on: https://code.wireshark.org/review/10601
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: Anders Broman <a.broman58@gmail.com>
2015-09-23 04:38:01 +00:00
Jeffrey Smith 80322d88da dfilter: Add membership operator
Added a new relational test: 'x in {a b c}'.  The only LHS entity
supported at this time is a field.  The generated DFVM operations are
equivalent to an OR'ed series of =='s, but with the redundant existence
tests removed.

Change-Id: Iddc89b81cf7ad6319aef1a2a94f93314cb721a8a
Reviewed-on: https://code.wireshark.org/review/10246
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-11 06:31:33 +00:00
Jeff Morriss d57bfceca3 Update documentation to reflect new heur_dissector_add() arguments.
Change-Id: I791071644f591bd8f526a077ecdeb7e68d2fea6e
Reviewed-on: https://code.wireshark.org/review/10445
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-08 15:50:44 +00:00
Gerald Combs 54d2ff1c3e Convert the WSP stats to generic stat API.
Add support for multiple tables to SimpleStatisticsDialog.

Change-Id: I843d901db092d2f2856d3d1a16f29f85fb41374b
Reviewed-on: https://code.wireshark.org/review/10339
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-01 01:01:32 +00:00
Pascal Quantin 1772416170 tshark.pod: fix typo
Change-Id: Iba5f12637e0f494805f2d9aab370fb42a32c1cb9
Reviewed-on: https://code.wireshark.org/review/10335
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-31 20:12:41 +00:00
Gerald Combs fbadcdd36b Add notes about using CMake + Qt Creator.
Change-Id: Ib10cc0a407721d62b39628af858f14e749c94d22
Reviewed-on: https://code.wireshark.org/review/10237
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-24 18:06:04 +00:00
Gerald Combs dd2a2d432a Multicast and wireless lan statistics fixups.
Make sure "-z multicast,stat[,filter]" and "-z wlan,stat[,filter]" work.

Add some missing "-z" items to the man page.

Try to fix some MSVC++ warnings.

Change-Id: Ie18e5355d595e351f000f14d82781dcdf33141c3
Reviewed-on: https://code.wireshark.org/review/10184
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-21 17:13:11 +00:00
Hadriel Kaplan d64ad1de91 capinfos: add more info about file and interfaces
Add more information about the capture file, and about the interface
descriptions in it. Also remove long-unused g_options code.

Change-Id: I93cbd70fc7b09ec1b8b2fd6c85bb885c7f749543
Reviewed-on: https://code.wireshark.org/review/10073
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-19 04:26:24 +00:00
Gerald Combs 0e8cc9ab0a UDP multicast stream dialog.
Add the UDP multicast stream dialog. Abuse TapParameterDialog a bit more
so that we can edit parameters.

Remove some unused struct members and an unused function.

Change-Id: I962c70344e792f0959527e4bcba8a20bd7e8acf9
Reviewed-on: https://code.wireshark.org/review/10084
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-18 20:17:20 +00:00
Hadriel Kaplan 8fcdcb9c95 Improve file merging for mergecap and wireshark
Refactor the file merging code by removing the duplicate logic from mergecap.c
and file.c's cf_merge_files(), into a new merge_files() function in merge.c.
Also the following user-visible changes:

 * Removed the '-T' encap type option from mergecap, as it's illogical for
   mergecap and would complicate common merge code.

 * Input files with IDBs of different name, speed, tsprecision, etc., will produce
   an output PCAPNG file with separate IDBs, even if their encap types are the same.

 * Added a '-I' IDB merge mode option for mergecap, to control how IDBs are merged.

 * Changed Wireshark's drag-and-drop merging to use PCAPNG instead of PCAP.

Bug: 8795
Bug: 7381
Change-Id: Icc30d217e093d6f40114422204afd2e332834f71
Reviewed-on: https://code.wireshark.org/review/10058
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 14:52:00 +00:00
Dario Lombardo 0b7d1611d0 editcap: add change offset.
This option skips some bytes when fuzzing, that prevents some headers from being changed. This focuses fuzzer to a smaller part of the packet.

Change-Id: I1db83235e93f2774a9991e3af70f633487b816fa
Reviewed-on: https://code.wireshark.org/review/9982
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>
2015-08-12 21:23:30 +00:00
Gerald Combs 5c80f08648 Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC
service response time statistics. Try to make it as lightweight as
possible, since we might want to pull this into the RPC dissectors
similar to the other SRT statistics.

Allow program names on the command line in place of numbers or UUIDs. Make
matches case-insensitive. E.g. the following are equivalent:

    -z rpc,srt,100003,3
    -z rpc,srt,nfs,3
    -z rpc,srt,NFS,3

as are the following:

    -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56
    -z dcerpc,srt,nspi,56
    -z dcerpc,srt,NSPI,56

Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4
Reviewed-on: https://code.wireshark.org/review/9981
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 20:17:35 +00:00
Guy Harris 36c50fe462 Document Colasoft Capsa file support.
Change-Id: I89374413f3e08e2a35923b8bd4c128b3c659158a
Reviewed-on: https://code.wireshark.org/review/9987
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-12 01:32:49 +00:00
Gerald Combs 9557c73f81 Make sure per-packet tap callbacks return gbooleans.
The tap API changed the return type of per-packet listener callbacks
from int to gboolean back in 2009. Update a bunch of functions and some
documentation accordingly.

Change-Id: I79affe65db975caed3cc296a7e2985b7b9cdf4cc
Reviewed-on: https://code.wireshark.org/review/9853
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-03 03:06:00 +00:00
Hadriel Kaplan 190e313e9d DNS: move DNS name resolution pref to Name Resolution prefs
Move the boolean flag for using captured DNS packet info for name resolution
to the Name Resolution preferences settings, as it was rather surprising to
disable Name Resolution preferences and still have names being resolved. Also
disble them all if the '-n' command line switch is used, and re-enable it for
a 'd' character in the '-N' option.

Bug: 10337
Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917
Reviewed-on: https://code.wireshark.org/review/9786
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-25 17:05:01 +00:00
Michael Mann 120ed14f34 Add documentation for new enable/disable protocol and heuristic dissector options.
Change-Id: Ia31326105cf559c2196d45369270552fb78da6c7
Reviewed-on: https://code.wireshark.org/review/9692
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>
2015-07-22 07:12:28 +00:00
Hadriel Kaplan 0caf0616ba Lua: split up wslua files into class-based files
The size of some of the wslua source files has grown large, and it's hard
to quickly find things. So split them up based on class name, as much as
seems reasonable. Also have the make-wsluarm.pl Perl script handle this.

Change-Id: Ib495ec5c2a4df90495c0a05504856288a0b09213
Reviewed-on: https://code.wireshark.org/review/9579
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-12 02:08:24 +00:00
Gerald Combs fdb85029fd Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog,
similar to StatsTreeDialog. Add initial plumbing for statistics menu
items and command line invocation.

Don't append "..." to menu item names. Don't add menu icons. In each
case this avoids repetitive UI clutter.

Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c
Reviewed-on: https://code.wireshark.org/review/8864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:09:13 +00:00
Martin Mathieson 1141033884 editcap: add new option (-a) to help
Change-Id: Ic1a07e29d30d96bf1dd86e10b198c42dd9349838
Reviewed-on: https://code.wireshark.org/review/9198
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-29 02:41:54 +00:00
Pascal Quantin 2c9a9aff5a Replace pinfo->fd->flags.visited calls by PINFO_FD_VISITED(pinfo) in documentation
Change-Id: If92787ddf3444edc466f04d7c2d9327cb8a50fba
Reviewed-on: https://code.wireshark.org/review/9173
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-26 17:41:11 +00:00
Evan Huus 4b1f364168 Basic vagrant readme
Change-Id: Iad77ad54e5a810bde35af076c5e9b91c43405b77
Reviewed-on: https://code.wireshark.org/review/9149
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-06-25 20:30:11 +00:00
Roland Knall acc581081e Plugin Interface: Add GUI callbacks
Rename ext_menubar to a more appropriate plugin_if.

 External menus can be implemented by plugins to present
 additional menus for deep-packet analysis. One side-effect
 of such menus being implemented as plugins is, that they
 are being executed in different threads and therefore can
 only use limited access to the main GUI. Also, there is
 no safe cross-gui (GTK and Qt) way for many features.

 This patch implements a first functionality, by which a
 plugin implemented using ext_menubar can apply a display
 filter to the main view.

 For now the implementation supports filtering, as well as
 saving a preference.

Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9
Reviewed-on: https://code.wireshark.org/review/8773
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 16:23:08 +00:00
Pascal Quantin e28339e590 tshark: add ability to display streams in EBCDIC
As requested in https://ask.wireshark.org/questions/42958/tshark-follow-tcp-stream-for-ebcdic

Change-Id: Ia8d93f59aa038bd6328adea137c92ea5a52361b5
Reviewed-on: https://code.wireshark.org/review/8844
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: Anders Broman <a.broman58@gmail.com>
2015-06-09 04:00:01 +00:00
Gerald Combs 6a2bf34001 Update some items.
Update some (but not all) content to match current reality.

Change-Id: Id7618067ed49a309fdace4f1eaa2c5d12cbfb6ad
Reviewed-on: https://code.wireshark.org/review/8687
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-29 21:25:22 +00:00
Jeff Morriss 2772a11bd5 Document the services file in the man pages.
Bug: 11227
Change-Id: Id9cc64820b238bd8c82a758a553e1352398ad885
Reviewed-on: https://code.wireshark.org/review/8664
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-28 04:10:08 +00:00
Jeff Morriss d9c13fab51 Document the subnets file in the man pages.
Text adapted from that in the WSUG documentation of the same.

Ping-Bug: 1445
Ping-Bug: 11227
Change-Id: I4d07cba437e70324d19c5ae23e44b86c47b749a8
Reviewed-on: https://code.wireshark.org/review/8662
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-28 04:08:06 +00:00
Alexis La Goutte 3d3c854215 Doc (packet-PROTOABBREV): fix quote for config include
Following https://code.wireshark.org/review/#/c/8204/

Change-Id: I7850c10d9d3ca9ad63a85c9c6ef98d70bf4201b8
Reviewed-on: https://code.wireshark.org/review/8647
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-05-26 12:46:35 +00:00
Gerald Combs 1e3be59fbe WildPackets → Savvius.
Change-Id: I2494c2b1dcc9e324535b3f659b51b44059c478bd
Reviewed-on: https://code.wireshark.org/review/8304
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-06 16:48:03 +00:00
Joerg Mayer 58c890d93f Fix a small typo
Change-Id: I1c5464a0344d46d01eee140723d179a7adacd0f6
Reviewed-on: https://code.wireshark.org/review/8243
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-04-30 08:28:49 +00:00
Roland Knall eeed4d1121 UI: Implementing menus for plugins
Plugins may utilize the tap interface to provide special tools
 or analysis options, not otherwise available in Wireshark, or
 perhaps not allowed to be distributed freely. Up until now, those
 tools either had to start automatically, or could not be started
 at all, or had to be started separately.

 It should be possible, that those tools may be started using a
 menu entry directly from Wireshark. This interface tries to achieve
 exactly that.

 This interface uses a clean interface, which can be implemented in
 any plugin or dissector. Documentation for this has been added to
 README.plugins.

 Separators are only supported for now in the Qt interface, but
 URLs can now be added as a simple item, and the UI will use the
 same methods used for other URL calls to open them.

Change-Id: I170107dafb66f6badaa864d05a9091e5cbbf52c2
Reviewed-on: https://code.wireshark.org/review/7865
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-14 04:00:39 +00:00
Michal Labedzki 56470cc801 Add missing androiddump stuff
Add missing androiddump stuff like:
- release notes
- documentation
- Windows nmake support
- running androiddump as a windows application instead of console on Windows
- addition of androiddump to the Windows installer

Change-Id: I3bc6cc70e4dc96c0cd776f3d965dd2aa0309995d
Reviewed-on: https://code.wireshark.org/review/7981
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
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>
2015-04-12 16:34:46 +00:00
Gerald Combs 0394b01479 Retire ws-manifest.pl.
We haven't used it in a while and we won't use in the CMake environment.

Change-Id: Iecfb8c418bddf1ed1fcd38b189babf082101662e
Reviewed-on: https://code.wireshark.org/review/8014
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-10 22:10:34 +00:00
Michael Mann 9721a2a509 Add section to README.dissector about dissector tables
Bug: 8985
Change-Id: I9245fb556a55da681fe53dd5c12bb549c83c89c6
Reviewed-on: https://code.wireshark.org/review/7926
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-08 04:22:11 +00:00
Herwin Weststrate 1df34d9a9c Typo fix in manpage of editcap
Positve => Positive

Change-Id: I09190b44783d8b7f4e8e90208d8a82d192a6a189
Reviewed-on: https://code.wireshark.org/review/7971
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-07 15:26:08 +00:00
Peter Wu dbef80f5c7 dfilter-test.py: add OOT support and Python 3 compat
Support WS_BIN_PATH and SOURCE_DIR (modelled after test/config.sh) to
support out-of-tree builds (including cmake). Add Python 3 support and
mention this in the documentation.

Tested with Python 2.7.9, 3.2.6, 3.4.3:

    WS_BIN_PATH=/tmp/wsbuild/run SOURCE_DIR=/tmp/wireshark \
        tools/dfilter-test.py testBytesIPv6

(2.7.9 and 3.4.3 were also tested fully, but some cases seem to fail
even before this patch. 2.5.6 and 2.6.6 do not work because the unittest
module is outdated.)

Change-Id: I13074579f6f74206edb5cd7be8e7a8406de49c56
Reviewed-on: https://code.wireshark.org/review/7793
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-25 07:15:36 +00:00
AndersBroman b307ffe0f9 Implement proto_tree_add_item_ret_int() and proto_tree_add_item_ret_uint() which
works as proto_tree_add_item(), but also returns the value of (u)ints
of 8,16,24 and 32 bits length in a 32 bit variable. It's based on Hadriels
previous work.

Change-Id: If3b4b8588b63251f1ee9b954a202acde7c02ce86
Reviewed-on: https://code.wireshark.org/review/7230
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>
2015-03-19 16:06:18 +00:00
Gerald Combs cac102eee3 Change a lot of http:// URLs to https://.
Most of our sites are now HTTPS-only. Update URLs accordingly. Update
other URLs while we're at it. Remove or comment out dead links.

Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33
Reviewed-on: https://code.wireshark.org/review/7621
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-10 19:30:50 +00:00
Peter Wu 4ca3dbae94 tcp: support variable-length tcp_dissect_pdus
Originally suggested by Bill Meier for the MQTT protocol[1], but the
Websocket protocol can also benefit from this. Since
DESEGMENT_ONE_MORE_SEGMENT is a valid packet length, use the zero length
instead as an indicator that the length is not yet known.

Updated documentation too and remove the function documentation from
packet-tcp.c since it is duplicated in packet-tcp.h.

A noteworthy WSDG change is that the get_pdu_len parameter of
tcp_dissect_pdus gained another void pointer since
v1.99.2rc0-890-gceb8d95 ("Lua: Expose tcp_dissect_pdus() to Lua").

 [1]: https://www.wireshark.org/lists/wireshark-dev/201405/msg00044.html

Change-Id: I4eba380e00cd757635eb5639c2857356dae3171e
Reviewed-on: https://code.wireshark.org/review/7279
Reviewed-by: Guy Harris <guy@alum.mit.edu>
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: Evan Huus <eapache@gmail.com>
2015-03-06 04:02:00 +00:00
Alexis La Goutte fe578d6a76 Readme.qt: Add information about Transifex !
Change-Id: I22780721dcc32caee0eae782142e7dad31e0ed07
Reviewed-on: https://code.wireshark.org/review/7313
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-05 15:25:20 +00:00
JC Wren e2bcee6ac4 Make FT_{U}INT64 behave more like FT_{U}INT32, add support for FT_{U}INT{40,48,56}
Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19
Reviewed-on: https://code.wireshark.org/review/5813
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-21 16:57:52 +00:00
Dario Lombardo d330cf717d Documentation fix (reported by Richard Sharpe).
Change-Id: Ie4979c1be0e325178e3c662e0b2c5bbfc58456d9
Reviewed-on: https://code.wireshark.org/review/7252
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 14:24:28 +00:00
Gerald Combs 3f765b3ef9 Add a CF_FUNC macro for casting BASE_CUSTOM functions.
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid
the following warning:

    warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic]

We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be
more consistent with the other macros in proto.h. Update each instance
of BASE_CUSTOM to use CF_FUNC.

Adjust a dummy variable name generated by asn2wrs.py that was triggering
an invalid error in checkhf.pl.

Fix an encoding arguement in packet-elasticsearch.c found by
fix-encoding-args.pl.

Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22
Reviewed-on: https://code.wireshark.org/review/7150
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 00:05:38 +00:00
Richard Sharpe bade5f31da A small correction to the documentation to bring it in line with the code.
Change-Id: I5818b9f3348a70d817bf885697cd67440d812889
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7121
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 19:48:07 +00:00
Gerald Combs d2aa2c610d WSDG: Start adding Qt material.
Move some text from README.qt to the Developer's Guide. Add an overview.

Change-Id: Ia20ed837939e34871b157566c38cd0c6e590bc38
Reviewed-on: https://code.wireshark.org/review/7087
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12 20:38:34 +00:00
Michal Labedzki 707522396c Little tuning of proto_tree_add_bytes_with_length
Change name from proto_tree_add_new_bytes to
proto_tree_add_bytes_with_length and other tweaks
pointed by Peter Wu.

Change-Id: I6058c28a74a154e2882e4eb04558bedcede6f508
Reviewed-on: https://code.wireshark.org/review/7039
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-12 09:22:55 +00:00
Jeff Morriss 0b0f7fa091 More emem removal.
Remove emem's 8-byte-memory-alignment configure check as well as references
to all the environment variables emem used.

Change-Id: I897aec9e9c68e064454561e7a9f066b18892ec66
Reviewed-on: https://code.wireshark.org/review/6950
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-06 08:11:49 +00:00
Evan Huus febc842521 Update README.wmem, release notes for emem removal
Change-Id: Iac5066ff97d26de1660c38b9cd3f17781a521823
Reviewed-on: https://code.wireshark.org/review/6949
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-04 15:03:45 +00:00
Michael Mann 7ced085550 emem is dead! Long live wmem!
Change-Id: Iddd1200e62bf3200cb1a68408378dd9d47120b77
Reviewed-on: https://code.wireshark.org/review/6939
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-04 06:59:55 +00:00
Peter Wu 6284040623 README.dissector: fixed p_add_proto_data params
frame_data has long been gone. struct _packet_info is the same as
packet_info, just use that for brevity.

Change-Id: Ieb02bf6b642d728a7f80087f5cd750b9691e34e9
Reviewed-on: https://code.wireshark.org/review/6865
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-31 08:24:59 +00:00
Gerald Combs 67b069e544 Qt: Add address conversion convenience routines
Add address_to_qstring and address_to_display_qstring, which wrap
address_to_string and address_to_display respectively and return
QStrings. Convert most of the instances in ui/qt to the new routines.

Fix a some memory leaks in the process.

Change-Id: Icda80bbfe0b2df723d54c8da84355255f819af89
Reviewed-on: https://code.wireshark.org/review/6848
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-29 22:51:43 +00:00
Hadriel Kaplan ceb8d954d2 Lua: Expose tcp_dissect_pdus() to Lua
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus()
to make TCP-based dissection easier.

Bug: 9851
Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3
Reviewed-on: https://code.wireshark.org/review/6778
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-27 15:14:12 +00:00
Dario Lombardo 9bbc337306 Added HPFEEDS stats_tree.
Change-Id: I256fd5395b062fa954ebd60598721323ea1d7ff1
Bug: 10875
Reviewed-on: https://code.wireshark.org/review/6713
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-27 13:19:20 +00:00
Hadriel Kaplan aec1bcf9a1 Lua can free tvbuffs too early
Lua-created tvbuffs should be kept around for the duration of pinfo's
lifetime, instead of only for the duration of frame dissection. So
instead of using the frame dissector's frame_end_routine, we'll register
a callback to wmem for pinfo pool's allocator.

Bug: 10888
Change-Id: I3e9db671c3f2a7cab9e258aca17f3be8acaf2417
Reviewed-on: https://code.wireshark.org/review/6768
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-25 19:11:01 +00:00
Bill Meier 5fa13c6a19 README.dissector: Minor update re date/time display.
Change-Id: Iae467efeccd2e51ea66aab029100c958de7d374e
Reviewed-on: https://code.wireshark.org/review/6662
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-19 20:51:14 +00:00
Guy Harris 23666badc5 Spaces separate bytes; they don't have to surround them.
I.e., you don't need a trailing blank, at least not with the current
version (and there shouldn't be a requirement for such an extra trailing
blank).

Change-Id: Ia2b732c74fc6020acc01a2c0c52ed3567d36d762
Reviewed-on: https://code.wireshark.org/review/6575
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-16 18:41:39 +00:00
Guy Harris fdd6554ccd Rename the FT_BYTES separator types to SEP_ from BASE_.
There's no requirement for "display" field values to have names
beginning with BASE_; use SEP_, to indicate that they're separators.

(And, yes, we should introduce SEP_NONE, with a value of 0, and use it.)

While we're at it, fix BASE_SEMICOLON - the separator is a colon, not a
semicolon - and document SEP_SPACE in doc/README.dissector.

Change-Id: I856aafda2c60b8320dffe287f0deb06a9604a2bf
Reviewed-on: https://code.wireshark.org/review/6486
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-11 00:27:28 +00:00
Evan Huus 3a9869d81a Remove/replace ep_strsplit()
Change-Id: I4a803d83844d937804849b2ad3b067381c9b96d0
Reviewed-on: https://code.wireshark.org/review/6448
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-10 01:56:08 +00:00
Dario Lombardo 1b4f96516c Some typos fixed.
Change-Id: I65df0c40d771c4854b73fd5c35d1af600f15f324
Reviewed-on: https://code.wireshark.org/review/6445
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-09 14:07:06 +00:00
Michael Mann d296c75247 Some more random removal of ep_ memory.
Change-Id: I6eccd20280e907bd9e6a5fcf873ccf80afddecac
Reviewed-on: https://code.wireshark.org/review/6416
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-09 05:54:38 +00:00
Michael Mann 67b1593921 Remove proto_tree_add_ax25
There isn't a legitimate use for the API, all cases can be covered with proto_tree_add_item.  As a bonus, a few more tvb_get_ptr calls can be removed.

Change-Id: I3bb86ba8f05ef3363407bcfe9b059ee27ebc135d
Reviewed-on: https://code.wireshark.org/review/6429
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-09 01:10:28 +00:00
Dario Lombardo 696fcdba21 Added DNS statistics support
This affects both the dissector (that has been added with a tap interface and a stats generator) and the UI (to recall the stats menu).

Change-Id: I90658f7aa6707aa39bdd787a51b20fed4dbddc53
Reviewed-on: https://code.wireshark.org/review/6236
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-05 09:06:32 +00:00
Michael Mann 553da37446 Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field type.
These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter.  FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter.

Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type.

Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values.

Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9
Reviewed-on: https://code.wireshark.org/review/6098
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04 16:32:03 +00:00
Michael Mann 860cb393d8 tshark: Add endpoints statistics
"stat name" has been official changed to "endpoints" for all dissectors, rather than a mixture of "host"/"endpoints" based on dissector.

Change-Id: If34bcb5165b493948e784ba038ab202803a59843
Reviewed-on: https://code.wireshark.org/review/6154
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2015-01-02 00:02:18 +00:00
Pascal Quantin 0d414e5d7f Add ability to follow UDP stream by index
-z "follow,udp" tshark cli command now supports a stream index
It is now possible to select the UDP stream displayed in Qt GUI (like for TCP)

Change-Id: Ia367f36ea4f60db0fddb997a7e0903c09e172f2d
Reviewed-on: https://code.wireshark.org/review/6083
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-29 22:17:47 +00:00
Michael Mann 71c02b20eb Create FT_FCWWN field type.
Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type.

Change-Id: I4ca77870499fd8239584a70874998b5d194a7167
Reviewed-on: https://code.wireshark.org/review/6036
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28 20:05:29 +00:00
Bill Meier 806ebca6a5 packet-PROTOABBREV.c: Update re #includeusage
- packet.h should be first Wireshark #include
  after config.h and "system" includes.
- '#include <glib.h>' not needed.

Change-Id: Ibec076818f3f509aabb4d240e939ef719f3798d6
Reviewed-on: https://code.wireshark.org/review/5939
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 07:18:28 +00:00
Pascal Quantin 33c26a09f4 doc: remove some references to the now defunct python support
Change-Id: Ibba3168516ef28ad050f5f70045acf3935f2b233
Reviewed-on: https://code.wireshark.org/review/5738
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-12 21:25:00 +00:00
Gerald Combs bcaa5d84b1 Qt: Update and rename the summary dialog.
Go back to a single view similar to the GTK+ UI. Apply layouts using Qt
Designer.

Rename the menu item and class to "Capture File Properties". It's not
really a summary if it contains details such as "marked average bits
per second". We might want to move this to a "Properties" item under
the "File" menu similar to other applications.

Add the GTK+ summary icon (for now) to the toolbar and open the
properties dialog on clicking.

Singleton dialogs delenda est[1]. Let the user open as many summaries on
as many capture files as he or she wishes. Also, global cfile delenda
est[2].

Don't blindly include QtGui. Add specific components instead.

Use consistent method names, variable names, and patterns. Try to
document what "consistent" means.

Adjust the way we display some statistics to match the summary bar, e.g.
displayed = captured if we don't have a filter applied.

[1] Not really.
[2] Yes, really.

Change-Id: I11793b1d79dd0c3f70414ac8592b86181da59916
Reviewed-on: https://code.wireshark.org/review/5274
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-09 19:02:41 +00:00
Bill Meier 08475ff673 README.heuristic: rework example code.
Specifically: show the use of tcp_dissect_pdus()
   for a TCP heuristic dissector

Change-Id: I02f184b2c8ef6ed128ef3d0bc59eed759aae54bb
Reviewed-on: https://code.wireshark.org/review/5399
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-21 22:13:06 +00:00
Guy Harris 25f950eca9 Add tshark -G dissector-tables to dump a list of dissector tables.
That list doesn't show the entries in the dissector tables, just
information about the tables themselves.

Clean up some tshark man page issues while we're at it.

Change-Id: I70beee34110f5c0d58105944dd71105a8400f5ca
Reviewed-on: https://code.wireshark.org/review/5360
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-17 02:26:57 +00:00
Michal Labedzki 5025bc258c Qt: Dynamic languages
- get language as soon as possible (before creating any Qt objects) to make all
  translations working
- dynamic list of supported languages
- runtime change of GUI language (no need to restart application)
- add flags icons support
- search for *.qm languages in buildin resources, then
  data dir called "languages" (main directory in sources or
  /usr/share/wireshark/languages), then user directory
  (UNIX: ~/.wireshark/languages); "languages" directory should contains
  files wireshark_xx.qm where xx is language code (en, en_GB, etc.),
  and optional xx.svg for flag icon
- try to fix some untranslated manually-created UI items
  (need manual reset text of those components)

Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229
Reviewed-on: https://code.wireshark.org/review/5041
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-04 08:21:55 +00:00
Dario Lombardo 9b7ee18f8b Typos in source code and in README.qt
Change-Id: I5aef31ef7ad604352f6e108835f0e9c2d10cdf8a
Reviewed-on: https://code.wireshark.org/review/4706
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-15 16:43:14 +00:00
Roland Knall 9ce5ca581d extcap: Catch unknown arguments to fix spaces
- If boolflags are being used, an extra space is added
   to the call of the extcap filter. This leads to the
   argumentparser of python to exit with an error-code,
   and the extcap filter will not start. This patch instead
   catches the unknown arguments and prints them on stdout,
   as well as running the dissection with the rest of the
   arguments list.

   Basically this is a work-around, for a behaviour not
   yet fixed in extcap, but it stabilizes the usage of the demo

Change-Id: I7589292692b0b3c839909fd09d62a4714cbe869e
Reviewed-on: https://code.wireshark.org/review/4638
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-13 18:48:35 +00:00
Daniel Mack ed0b19b94b Make boolean bitmask type 64-bit wide
There are protocols out there that have 64-bit wide bit mask fields, so
make the internal representation and bitfield decoders 64-bit aware.

For this, the ws_ctz() fallback and bits_count_ones() have to be tweaked
slightly.

Change-Id: I19237b954a69c9e6c55864f281993c1e8731a233
Reviewed-on: https://code.wireshark.org/review/4158
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
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>
2014-10-12 14:15:12 +00:00
Gerald Combs 5c5bf3b370 Update READMEs to reflect recent CMake environment changes.
Change-Id: Idbf879f20448eea0b69e793271439dec877832e9
Reviewed-on: https://code.wireshark.org/review/4602
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-10 22:05:10 +00:00
Tomasz Moń 0066776f72 Fix --extcap-dlts call in extcap_example.py.
There is regular expression that extracts only the number from
--extcap-interface argument and only that number (as string) is being
passed to extcap_dlts().

Change-Id: I5159f9405a766c1edff792213b2aef72b9a29ba4
Reviewed-on: https://code.wireshark.org/review/4550
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-08 21:32:40 +00:00
kardam ba8617f040 Add -I option in editcap to extend Duplicate packet removal
Description:
Ignore the specified bytes number at the beginning of the frame during MD5 hash calculation.
Useful to remove duplicated packets taken on several routers or SW(differents mac addresses for example).
e.g. -I 26 in case of Ether/IP/ will ignore ether(14) and IP header(20 - 4(src ip) - 4(dst ip)).
The default value is 0.
This option is only relevant when used with -d|-D|-w

Bug: 8511
Change-Id: I009a09d32778a182b2d88f372651f658a4938882
Reviewed-on: https://code.wireshark.org/review/4104
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-20 18:11:35 +00:00
Gerald Combs cbe7741926 Update the documentation to use "Wireshark.pro".
Change-Id: I024a882030e489cbd273a4245b0cd3be656f060f
Reviewed-on: https://code.wireshark.org/review/4191
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-19 15:46:43 +00:00
Joerg Mayer ec2a20fb37 Add a missing cast to the sample code
Change-Id: Id4f258e0e45e44c1ab63bd77a6fab10013a4810c
Reviewed-on: https://code.wireshark.org/review/4160
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-09-17 22:10:24 +00:00
Gerald Combs 175039128a Update the doc directory to use https://www.wireshark.org.
Change-Id: I9bfc57cb6b6ab6962b80ff58d98eb351d6f69829
Reviewed-on: https://code.wireshark.org/review/4140
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-17 00:12:26 +00:00
Joerg Mayer 6a7414f726 README.dissector was split from README.developer in 2013 - update some
documents referring to the split out sections.
Remove trailing whitespace while at this.

Change-Id: I36cfe0ac55e8f653bffbf850e01f582aacf85557
Reviewed-on: https://code.wireshark.org/review/4094
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-09-13 05:34:39 +00:00
Gerald Combs b7fb1167e3 Qt → wireshark. GTK+ → wireshark-gtk.
Make sure the Qt UI is named "Wireshark" and its executable is named
"wireshark" or "wireshark.exe". Make sure the GTK+ UI is named
"Wireshark 1" or "Wireshark (GTK+)" depending on how much the target
audience is likely to care about UI toolkits. Make sure the GTK+
executable is named "wireshark-gtk" or "wireshark-gtk.exe".

It looks like moving to Qt 5.3 (g978faf3) broke the PortableApps
package. It's likely even more broken now.

Autotools out-of-tree builds also broke on Ubuntu 12.02 (automake
1.11.3) at some point. The first attempt to compile in ui/qt returns
"error: source_file.cpp: No such file or directory". The second attempt
works. Out-of-tree builds work fine on Ubuntu 14.04 (automake 1.14.1).

Tested:

- Nmake builds

- NSIS packaging

- CMake builds (Windows, OS X)

- Autotools build and distcheck

- RPM packaging

To do:

- Test Debian packaging

- Fix PortableApps

Change-Id: I66429870e05fd2d6fc901942477959ed6164fce2
Reviewed-on: https://code.wireshark.org/review/3919
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-02 15:39:17 +00:00
Alexis La Goutte 021351f422 PROTOABBREV: minor fix
Fix typo PROTO_ABBREV -> PROTOABBREV
Uncomment FIELDCONVERT

Change-Id: I7b64c09ecf0c22a38042156d958e1c6c850c839a
Reviewed-on: https://code.wireshark.org/review/3914
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-30 09:51:36 +00:00
Gerald Combs a71f6807b8 Qt: Rework the "Manage Interfaces" dialog.
Convert QTableWidget to QTreeWidget.

It looks like the GTK+ version has a separate set of apply/save buttons
for each tab which *only* operates on that tab. This can result unexpected
behavior which throws away changes if the user updates more than one
tab. Use a single "OK" button that applies all of our changes instead.

Reorder the tabs. Put Local Interfaces first and select it by default.
Always show Remote Interfaces. Disable it on platforms that don't have
PCAP_REMOTE.

Automatically start editing when we add a new pipe. Don't immediately
update pipe interface settings. Wait until we hit "OK" instead.

Rename NewFileDelegate to PathChooserDelegate. Note that we might want
to move it use it elsewhere in the application.

Try switching the user-facing terminology from "Hide" to the more
positive "Show".

Tell the user that we don't save pipe or remote interface settings.

Add a help URL for the "Manage Interfaces" dialog box.

Use the GLib and Qt string functions and classes to split and join
comma-separated preferences. This makes sure capture_dev_user_descr_find
doesn't skip over the first interface. It also keeps the Qt code from
adding a leading comma to our capture preferences.

Add a note about strings to README.qt. Summary: Use QStrings.

For another day:

- If we *do* save remote settings we need to store credentials securely,
  e.g. with CryptProtectData.

- Get rid of the remote settings dialogs. Their controls should fit in the
  remote settings tab.

- Add an extcap tab.

- We need getter/setter functions for global_capture_opts.all_ifaces. We
  iterate over it *way* too much.

Change-Id: Ib7b61972f3ece4325e0230f725e7f2678acbb24b
Reviewed-on: https://code.wireshark.org/review/3873
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-29 00:24:02 +00:00
Jeff Morriss 87b2364a84 Add a license to this new file (GPLv2+) so we pass the license check.
(This change needs to be approved Roland Knall--by the file's author--in
Gerrit.)

Change-Id: I58285cb1d773a57fe7d087799bf6d2ffbd962364
Reviewed-on: https://code.wireshark.org/review/3773
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-21 23:51:14 +00:00
Roland Knall bed29af46d Extcap Capture Interface
Extcap is a plugin interface, which allows for the usage
 of external capture interfaces via pipes using a predefined
 configuration language which results in a graphical gui.

 This implementation seeks for a generic implementation,
 which results in a seamless integration with the current
 system, and does add all external interfaces as simple
 interfaces.

 Windows Note: Due to limitations with GTK and Windows,
 a gspawn-winXX-helper.exe, respective gspawn-winXX-helper-console.exe
 is needed, which is part of any GTK windows installation.

 The default installation directory from the build is an extcap
 subdirectory underneath the run directory. The folder used by
 extcap may be viewed in the folders tab of the about dialog.

 The default installation directory for extcap plugins with
 a pre-build or installer version of wireshark is the extcap
 subdirectory underneath the main wireshark directory.

 For more information see:

  http://youtu.be/Nn84T506SwU
  bug #9009

 Also take a look in doc/extcap_example.py for a Python-example
 and in extcap.pod for the arguments grammer.

 Todo:
   - Integrate with Qt - currently no GUI is generated, but
     the interfaces are still usable

Change-Id: I4f1239b2f1ebd8b2969f73af137915f5be1ce50f
Signed-off-by: Mike Ryan <mikeryan+wireshark@lacklustre.net>
Signed-off-by: Mike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: Roland Knall <rknall@gmail.com>
Reviewed-on: https://code.wireshark.org/review/359
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-21 03:34:02 +00:00
Bill Meier 2e3bc5790f packet-PROTOABBREV.c: various minor changes:
- Specify that proto_register...() and proto_reg_handoff...() prototypes are required;
- Indicate that certain #includes should be used only as needed;
- Don't use CamelCase (or CAPS) in variable names;
- Do some reformatting of certain lines;
- Futz hf[] array entry so checkAPIs and checkhf tests don't fail.

Change-Id: Ie03846f4bebd2a9bece464c85cc3c2ef46dd4fe5
Reviewed-on: https://code.wireshark.org/review/3724
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-19 18:30:17 +00:00
Michael Mann 0cda27c83e "Highly discourage" use of proto_tree_add_text.
Change-Id: I2e8d18df71688c654f7acaff51fae7823c08aa6a
Reviewed-on: https://code.wireshark.org/review/3677
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: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-19 16:20:34 +00:00
Guy Harris 067beb0210 Add a bunch of missing files to the distribution.
Files from the debian directory, documents from the doc directory,
graphics from the docbook/wsug_graphics directory, and the echld
Makefile.nmake.

Change-Id: Iccccc58811753581b0b180053defd937aea22f95
Reviewed-on: https://code.wireshark.org/review/3283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 07:43:41 +00:00
Bill Meier 77016503fe Update documentaion for p_(add|get)_proto_data(); There's been a 'key' arg for a while.
Change-Id: I1166a63d8896d0d5fc63b558ebb0df2e1e19bc63
Reviewed-on: https://code.wireshark.org/review/3197
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-25 11:45:04 +00:00
Gerald Combs 858558e619 Update README.qt and add todo items.
Change-Id: I69c080253cf7e861c575573e74a66b83e014cbb0
Reviewed-on: https://code.wireshark.org/review/2925
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-07 22:12:09 +00:00
Jeff Morriss e0461ecd43 Indicate tshark can read (-r) from stdin and named pipes now.
(Though it works only with certain formats.)  As requested in:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2874#c4

Change-Id: I2ce0509d8750b21ae0167d12459074ba0f9506f8
Reviewed-on: https://code.wireshark.org/review/2646
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-25 18:01:28 +00:00
Jeff Morriss 3773a7561c Add command-line argument to request the version to a number of the utilities.
In some cases "-v" was already used so "-V" is the option.
Note that the version information in these utilities is much shorter than what
is presented by the big programs.

As requested by https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5804

Bug: 5804
Change-Id: I35db35a4eace2797afd895f9be7322ef39928480
Reviewed-on: https://code.wireshark.org/review/2489
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 01:05:02 +00:00
Pascal Quantin 43c64c0ade Update the sample code dealing with desegmentation to new style dissector
Change-Id: I2e9f6341138e7305b849a754e28edfd322d44160
Reviewed-on: https://code.wireshark.org/review/2415
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-19 00:09:52 +00:00
Jeff Morriss f113306e0e More Python-bindings removal.
Change-Id: I4d82175781e65c73179f4c8e737a7900cb050bce
Reviewed-on: https://code.wireshark.org/review/2283
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-16 23:14:05 +00:00
Guy Harris 95065da33d Some more SVN->Git.
Change-Id: Iba5274ab5e653a0a3c0a56e62ee168ac957daf27
Reviewed-on: https://code.wireshark.org/review/2152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-11 23:57:23 +00:00
Bill Meier cc3931c797 FIELDDISPLAY can be or'd with BASE_VAL64_STRING.
Change-Id: I43014922fc51ddeed70235006296500ec00bd437
Reviewed-on: https://code.wireshark.org/review/1826
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-27 22:02:38 +00:00
Evan Huus d7f1ac33f6 wmem documentation updates
Change-Id: Ief20460ed8ec1b4bd1286cc2a5490d9aeefdf98f
Reviewed-on: https://code.wireshark.org/review/1643
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-14 20:05:14 +00:00
Pascal Quantin b2af5b066a Convert a few dissectors with simple request/response tracking from red/black tree to hash map
Update the readme file accordingly

Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83
Reviewed-on: https://code.wireshark.org/review/1420
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 10:23:32 +00:00
Hadriel Kaplan f52626cc83 Add tvb_get and proto_tree_add for string-encoded byte arrays
This commit adds tvb_get_string_bytes and proto_tree_add_bytes_item routines for
getting GByteArrays fields from the tvb when they are encoded in ASCII hex string form.

The proto_tree_add_bytes_item routine is also usable for normal
binary encoded byte arrays, and has the advantage of retrieving
the array values even if there's no proto tree.

It also exposes the routines to Lua, both so that a Lua script can take
advantage of this, but also so I can write a testsuite to test the functions.

Change-Id: I112a038653df6482a5d0ebe7c95708f207319e20
Reviewed-on: https://code.wireshark.org/review/1158
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-17 14:04:19 +00:00
Pascal Quantin cfe11b1097 Add ENC_ASCII_7BITS encoding
Change-Id: I01ec87ff4181afb5b2de487fd5f5200f8d62f17d
Reviewed-on: https://code.wireshark.org/review/1088
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-13 20:02:52 +00:00
Hadriel Kaplan c39060a21c Update README.wslua with latest info.
Change-Id: I20ea6c374f791054f16f0aaba33967b869348ff5
Reviewed-on: https://code.wireshark.org/review/857
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-28 19:58:03 +00:00
Hadriel Kaplan 7e423a3a1f Add read_format extension to manual pages
The -X read_format extension was added in code but in the manuals.

Change-Id: I21692120229ef531671fc3db247809ace69d23b3
Reviewed-on: https://code.wireshark.org/review/742
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-19 17:03:42 +00:00
Michael Mann d8265cd8c6 Remove Visual Studio solution and project files (and their existence from Makefiles)
There have been discussions on -dev about removing this and I believe I was the last holdout. Finally convinced that I should just have a local copy (ignored by git)

Change-Id: Ic72a22baf58e3412023cf851f0fce16eb07113b0
Reviewed-on: https://code.wireshark.org/review/681
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16 18:03:41 +00:00
Hadriel Kaplan f75f1d54c4 Fix README.heuristic wording to Bill Meier's correction
Change-Id: Ifeb61abdcc7aa049529d584ff3fe50b6fd79fe21
Reviewed-on: https://code.wireshark.org/review/662
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-15 08:17:04 +00:00
Hadriel Kaplan 04c39bb097 Add Lua heuristic dissector support
This adds the ability for Lua scripts to register heuristic dissectors
for any protocol that has registered a heuristic dissector list, such
as UDP, TCP, and ~50 others. The Lua function can also establish a
conversation tied to its Proto dissector, to avoid having to check the
heuristics for the same flow. The example dissector in the testsuite
has also been enhanced to include a heuristic dissector, to verify
the functionality and provide an example implementation.

Change-Id: Ie232602779f43d3418fe8db09c61d5fc0b59597a
Reviewed-on: https://code.wireshark.org/review/576
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-14 07:29:15 +00:00
Bill Meier 53dab8e1f1 Note that a dissector heuristic test *must not* cause an exception before returning FALSE.
Change-Id: I9f1ab000f7a2c554d1c20abf8ca4e4bab4b5ef27
Reviewed-on: https://code.wireshark.org/review/635
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-13 15:57:37 +00:00
Michael Mann 839b5b258c Update documentation about p_[add|get]_proto_data (new argument: scope)
Change-Id: Ic27b0e601967c90567fac58447d28b10c02a3888
Reviewed-on: https://code.wireshark.org/review/564
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-09 13:01:29 +00:00
Evan Huus df77e26485 Fix some wmem-related documentation.
Discovered while reviewing Ibd3efb92a203861f507ce71bc8d04d19d9d38a93

Change-Id: Ie4dfc1b9b7a99f14657148ed5a935bbb079c2b4e
Reviewed-on: https://code.wireshark.org/review/415
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-26 22:25:22 +00:00
Guy Harris 8d234a0d8c More tvbuff API deprecation, comment expansion, and documentation updates.
Do with tvb_get_stringz() what was done with tvb_get_string().

Redo the comments for the string get routines to try to give more detail
in a fashion that's a bit less hard to read.

Warn, in comments, of the problems with using
tvb_get_string()/tvb_get_stringz() (i.e., if your strings are non-ASCII,
all bytes with the 8th bit set are going be replaced by the Unicode
REPLACEMENT CHARACTER, and displayed as such).

Warn, in a comment, of the problems with tvb_get_const_stringz() (i.e.,
it gives you raw bytes, rather than guaranteed-to-be-valid UTF-8).

Update documentation and release notes appropriately.

Change-Id: Ibd3efb92a203861f507ce71bc8d04d19d9d38a93
Reviewed-on: https://code.wireshark.org/review/327
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-26 22:04:08 +00:00
Jeff Morriss cd02def632 Clean up some more subversion references in the documentation.
Change-Id: Id6cf1a617bff3e09e47933a69d505393502874d1
Reviewed-on: https://code.wireshark.org/review/370
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 18:04:55 +00:00
Evan Huus 2f239772e6 More explanation of example heuristic code.
Approach suggested by Jeff seems right to me:
https://www.wireshark.org/lists/wireshark-dev/201402/msg00198.html

Change-Id: I3d54cb49e2f0027ee79f68a633f57382101241b5
Reviewed-on: https://code.wireshark.org/review/350
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-25 13:38:18 +00:00
Evan Huus 83fc346853 Documentation updates
Change-Id: I6bd7fa40726fe7ffd68b9341c640874f2a0f1c7c
Reviewed-on: https://code.wireshark.org/review/314
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-23 15:30:35 +00:00
Evan Huus 22149c5523 TVB API deprecations and cleanup
- rename tvb_length and similar to tvb_captured_length and similar; leave
  #defines in place for backwards-compat, but mark them clearly as deprecated in
  code comments and in checkAPI
- remove tvb_get_string as C code and just leave a #define in place for
  backwards-compat; mark it clearly as deprecated in code comment and checkAPI
- update READMEs and sample dissector for all of the above
- while in the neighbourhood, make checkAPI skip (and warn) for missing files
  instead of bailing on the whole check, so subsequent files still get checked

Change-Id: I32fc437896ca86ca73e9b49d5f50400adf8ec5ad
Reviewed-on: https://code.wireshark.org/review/311
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-22 15:02:01 +00:00
Hadriel Kaplan 7f074364b6 Fix bug 9790: Lua: wslua allows duplicate field registration
As discussed in bug 3513 and 9709, one can register more than one new ProtoFields for
the same field name. Of course C-code can do that too, and does a LOT apparently, but
if they're not similar ftypes then things can get scrweed up in display filters.

So this change prevents duplicate field registration of dissimilar ftypes. The
similarity is based on the discussion on the mailing list, and the listing in
README.developer has been updated to refelect that as well.

Also, this change adds a testscript for Proto/ProtoFields.

Change-Id: I43bd323f785245941a21289647332a19adec2a9d
Reviewed-on: https://code.wireshark.org/review/285
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-21 20:57:43 +00:00
Jeff Morriss b6a9b8494c Remove $Id$ and other Subversion leftovers from the doc files.
Change-Id: I28a376f7e0fd90971f65ae9c1105a3ec85221470
Reviewed-on: https://code.wireshark.org/review/204
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-14 01:33:14 +00:00
Hadriel Kaplan 58fe488822 Lua: add ability for scripts loaded from command-line to be passed arguments
This change adds the ability to pass on to lua scripts loaded from the
command-line (tshark or wireshark) additional arguments supplied by the
command-line.  This will help us in our testsuites, but also might be
useful for user-created scripts.  The additional arguments are passed in
using the '-X' eXtension switch.

Change-Id: Ib94cdf1ffd194ca84692fee7816665e4ff95efbd
Reviewed-on: https://code.wireshark.org/review/156
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-13 22:32:58 +00:00
Evan Huus 3fd9a5e613 Licensecheck improvements, just two errors left.
Spawned from https://www.wireshark.org/lists/wireshark-dev/201402/msg00024.html

Add some ignore rules for files that can't/shouldn't include a license header.

Reorganize some ignore rules to group rules with similar motivations.

Add a header to autogen.sh and attribute it to just "The Wireshark Authors"
since while Gilbert wrote the original version it's gone through so many changes
over the years that sorting out proper authorship is unnecessarily complex.

Add headers to Graeme Hewson's two files as verified by private email, and
update his address in the AUTHORS file per his request.

Add header to one of Ulf Lamping's files, as verified by private email.

Only remaining problem is the reedsolomon code.

Change-Id: Ifb7de8c4b4d79012553e29d459a0145d39f51df5
Reviewed-on: https://code.wireshark.org/review/145
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-08 16:51:42 +00:00
Gerald Combs f966980937 Replace "svn" with "git" all over the place.
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.

Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-07 23:03:03 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Hadriel Kaplan a94d127b77 Fix for Bug-9709 Lua: class attribute descriptions in API docs don't say if an attribute is read/write/both.
Also added some minor text to README.wslua for developers.

Change-Id: I50b36f06710da6920ad98be6dde27d6091d91d54
Reviewed-on: https://code.wireshark.org/review/50
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-01-31 16:30:22 +00:00
Jörg Mayer bb21a09681 GPLv2 -> GPLv2+
svn path=/trunk/; revision=54969
2014-01-26 22:21:28 +00:00
Bill Meier ef935ca1de Remove some old obsolete text in the proto_tree_add_text() description.
svn path=/trunk/; revision=54943
2014-01-24 17:19:25 +00:00
Jörg Mayer 4cbe95e84f Update documentation to match change in r54630:
"The capabilities for dumpcap don't need to be inheritable."

svn path=/trunk/; revision=54639
2014-01-07 23:32:11 +00:00
Bill Meier 65ac347e0c Minor: update 'Conversation' intro to include find_or_create_conversation
svn path=/trunk/; revision=54595
2014-01-04 17:45:12 +00:00
Pascal Quantin 6ebc058f47 Add proto_tree_add_ts_23_038_7bits_item() / tvb_get_ts_23_038_7bits_string() functions and update dissectors to use it.
Remove gsm_sms_char_7bit_unpack() / gsm_sms_chars_to_utf8() functions.
Update documentation a bit.

svn path=/trunk/; revision=54534
2014-01-01 14:33:19 +00:00
Chris Maynard 8411568048 Since the documentation states that, "Text2pcap understands a hexdump of the form generated by od -Ax -tx1 -v.", supply an example that actually matches that format.
In addition, change the hex bytes so that they represent a valid, well-formed packet, rather than a malformed RSVP packet.  This should allow a user to more clearly verify that the text2pcap converstion worked as expected in the event he/she desires to test text2pcap using the example provided.


svn path=/trunk/; revision=54454
2013-12-26 03:45:12 +00:00
Bill Meier 8ab9c55618 From Ville Skyttä: Spelling Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9591


svn path=/trunk/; revision=54387
2013-12-23 15:53:13 +00:00
Jörg Mayer 0d479ec37f make it possible to compile the sample dissector.
Fix one trivial error found.
Add a missing forward declaration.

svn path=/trunk/; revision=54323
2013-12-21 09:43:02 +00:00
Guy Harris 9591364899 Update documentation to reflect the non-existence of
proto_tree_add_unicode_string().

svn path=/trunk/; revision=54321
2013-12-21 01:52:18 +00:00
Guy Harris ab9aa3c859 Update documentation to reflect removal of tvb_get_unicode_string*, full
support for (correct) UTF-16, and new string encodings.

svn path=/trunk/; revision=54320
2013-12-21 01:50:55 +00:00
Jakub Zawadzki 064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Guy Harris e21fd7c0ce Add a "captype" file that just reports the type of a capture file, based
on what libwiretap thinks it is.

Update some comments to reflect the death of the hack used to include
(libwiretap) plugin support in programs not built with libwireshark.

svn path=/trunk/; revision=54015
2013-12-13 02:59:16 +00:00
Chris Maynard 4c19d29b7c Improve tshark command-line error help. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9548 and adds addtional help, better formatting, sorting and some minimal documentation of the -u option to the tshark man page.
svn path=/trunk/; revision=53938
2013-12-11 16:52:40 +00:00
Pascal Quantin 0826029ec2 Add a reference to STR_ASCII and STR_UNICODE
svn path=/trunk/; revision=53868
2013-12-08 20:13:50 +00:00
Chris Maynard 93f15d640c Specify SI units for the max filesize autostop condition. For now, keep the capture buffer size in IEC units, but document it as such.
#BACKPORT(1.10, 1.8(?))

svn path=/trunk/; revision=53728
2013-12-02 19:17:12 +00:00
Michael Mann fd2f05446d Update documentation for tcp_dissect_pdus. Bug 9491 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9491)
From Peter Wu: update to README.dissector
From me: update to WSDG_chapter_dissection.xml

svn path=/trunk/; revision=53678
2013-11-30 20:48:46 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen

- Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open)
- Bug fix: correct sample code in README.stats_tree
- Add: slash in plug-in name now creates submenu as docs describe (was a bug?)
- Add: menu separator before the stat_tree registered plug-ins
- Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages.
- Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window)
- Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate.
- Add: preferences for stats_tree system (default sort column, burst calc params)
- Add: stats_tree window copy to clipboard and export and plain text, csv and XML.
- Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c
- Moved all stats_tree sample plug-ins to "IP Statistics" submenu.

svn path=/trunk/; revision=53657
2013-11-29 22:47:59 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +00:00
Gerald Combs d735fefcf4 Update the guidelines a bit.
svn path=/trunk/; revision=53331
2013-11-14 23:40:26 +00:00
Alexis La Goutte 8f1ba43e89 Add reference to qttools5-dev in README.qt documentation
There is following error message with cmake :

CMake Warning at CMakeLists.txt:490 (find_package):
  By not providing "FindQt5LinguistTools.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5LinguistTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5LinguistTools"
  with any of the following names:

    Qt5LinguistToolsConfig.cmake
    qt5linguisttools-config.cmake

  Add the installation prefix of "Qt5LinguistTools" to CMAKE_PREFIX_PATH or
  set "Qt5LinguistTools_DIR" to a directory containing one of the above
  files.  If "Qt5LinguistTools" provides a separate development package or
  SDK, be sure it has been installed.

CMake Error at ui/qt/CMakeLists.txt:205 (QT5_ADD_TRANSLATION):
  Unknown CMake command "QT5_ADD_TRANSLATION".

svn path=/trunk/; revision=53169
2013-11-08 16:35:42 +00:00
Guy Harris 2a088c1d53 Add support for displaying dates as year and day-of-year (1-origin).
In the process, fix various man page descriptions of the -t flag,
and add support for UTC absolute times in the iousers and iostat TShark
taps.

svn path=/trunk/; revision=53114
2013-11-06 20:39:09 +00:00
Bill Meier 2a69c2d05c Remove a phrase which implies that tab widths other than 8 are OK.
svn path=/trunk/; revision=53030
2013-11-01 20:39:11 +00:00
Pascal Quantin 5217ec489f Clarify which filter types can share the same name
svn path=/trunk/; revision=53017
2013-11-01 16:00:58 +00:00
Jeff Morriss 875dee28c4 Add some documentation to hopefully help dissector writers avoid the problem
in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9323 :

The string added to proto_tree_add_string*() must be NULL terminated.

svn path=/trunk/; revision=52984
2013-10-30 15:56:01 +00:00
Jeff Morriss 0690c4f490 More SVN properties cleanup.
svn path=/trunk/; revision=52884
2013-10-27 01:11:15 +00:00
Chris Maynard a049a2027c Sync up with packet-pana.c.
svn path=/trunk/; revision=52852
2013-10-25 21:16:39 +00:00
Chris Maynard 9fd46d8299 wmemify.
svn path=/trunk/; revision=52851
2013-10-25 21:04:22 +00:00
Michael Mann bb25fad9de Add the ability to collapse subtrees with Shift+Left + additional menu items. Bug 9008 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9008).
Currently this is only for GTK, but allows users to test it to see if its worth adding to Qt (my personal opinion is yes).

From Jiří Engelthaler

svn path=/trunk/; revision=52790
2013-10-23 14:24:17 +00:00
Chris Maynard 63e4539229 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9272
Add tshark -G column-formats report and document the missing ftypes, heuristic-decodes and plugins reports.

From me: Sort the reports.  Add modelines to epan/column.c.  Minor whitespace changes.

svn path=/trunk/; revision=52627
2013-10-15 18:27:35 +00:00
Evan Huus e7a0c26bec Subsume README.binarytrees into wmem doxygen. The README was out of date
anyways, since Michael made key operations non-destructive in r44380.

svn path=/trunk/; revision=52583
2013-10-13 13:13:24 +00:00
Michael Mann ba3e8e070a Make column "filter name" prefixed with _ws. to be the same as other "*shark application filters" created in r52462.
svn path=/trunk/; revision=52474
2013-10-09 19:43:02 +00:00
Evan Huus 2693e1243e Add some license headers after emailing the respective authors to confirm.
svn path=/trunk/; revision=52471
2013-10-09 17:30:50 +00:00
Michael Mann ee208c8dcc Add support for RELATIVE-OID ASN.1 type. Bug 9192 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192)
From Ed Beroset.

svn path=/trunk/; revision=52393
2013-10-06 02:31:10 +00:00
Gerald Combs b3f440f7bd Add a link to GammaRay.
svn path=/trunk/; revision=52389
2013-10-05 22:51:02 +00:00
Anders Broman 578ead425b From beroset@mindspring.com:
removed obsolete references to se_alloc

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9194

svn path=/trunk/; revision=52224
2013-09-26 21:08:49 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Gilbert Ramirez 4797eafddb Update dfilter-test.py to use a much more modern test harness,
the "unittest" module that comes with Python. Specifically, this
takes advantage of a couple of features in the "unittest" in
Python 2.7. The tests are all the same as before, but much
better managed.

This is in preparation for some work on the display filter code.

svn path=/trunk/; revision=52136
2013-09-18 05:07:46 +00:00
Jeff Morriss a4882cdcfe Add WIRESHARK_APPDATA description to the rawshark and tshark man pages.
svn path=/trunk/; revision=52024
2013-09-13 21:15:29 +00:00
Chris Maynard 02cec4d51b Allow an alternate application data location as specified by the new environment variable, WIRESHARK_APPDATA (chosen instead of my originally proposed WS_APPDATA name since most other Wireshark-specific environment variables were already named with the WIRESHARK_ prefix).
See also: http://www.wireshark.org/lists/wireshark-users/201309/msg00013.html

svn path=/trunk/; revision=52022
2013-09-13 20:15:46 +00:00
Chris Maynard 2d132d3a38 Add a link to IANA's Assigned Internet Protocol Numbers page.
svn path=/trunk/; revision=51950
2013-09-11 17:31:24 +00:00
Pascal Quantin 33beb2609a Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9116 :
README.stats_tree shows the wrong function parameters for stats_tree_register

svn path=/trunk/; revision=51944
2013-09-10 21:43:51 +00:00
Chris Maynard 9d49aa7dd7 Replace the simpler chop example with a more detailed example.
svn path=/trunk/; revision=51901
2013-09-09 21:32:03 +00:00
Chris Maynard fe4fc3cf51 Fix typo.
svn path=/trunk/; revision=51887
2013-09-09 19:43:37 +00:00
Chris Maynard 51ccb61256 Fix the "crossed chopping region" problem. Also, move chopping to its own function for both clarity and correctness since we need to compute chop offsets and lengths on a per-packet basis whereas previously this was not being done.
Lastly, try to improve the documentation a bit concerning chopping and provide another example depicting 2 separate chopping regions.  *Maybe* this is clearer?

One more example here for posterity:  Given the following 75 byte packet, there
are 8 different ways to chop the 2 regions marked as 10 and 20 in a single pass:

    <--------------------------- 75 ---------------------------->
 
    +---+-------+-----------+---------------+-------------------+
    | 5 |   10  |     15    |       20      |         25        |
    +---+-------+-----------+---------------+-------------------+

1) editcap -C 5:10 -C -25:-20 in.pcap out.pcap
2) editcap -C 5:10 -C 50:-20 in.pcap out.pcap
3) editcap -C -70:10 -C -25:-20 in.pcap out.pcap
4) editcap -C -70:10 -C 50:-20 in.pcap out.pcap
5) editcap -C 30:20 -C -60:-10 in.pcap out.pcap
6) editcap -C 30:20 -C 15:-10 in.pcap out.pcap
7) editcap -C -45:20 -C -60:-10 in.pcap out.pcap
8) editcap -C -45:20 -C 15:-10 in.pcap out.pcap


svn path=/trunk/; revision=51886
2013-09-09 19:39:45 +00:00
Alexis La Goutte 346ff86c0c Update README.qt after last change in QtShark translations (Add Preferences to select language)
svn path=/trunk/; revision=51879
2013-09-09 19:29:48 +00:00
Michael Mann e4025f4aba Add an example of filterable expert info.
Also cleanup references to README.developer that are now README.dissector.

svn path=/trunk/; revision=51858
2013-09-09 03:43:45 +00:00
Chris Maynard eeba21136c OK, allow either positive or negative offsets no matter if we're chopping from the beginning or the end.
Given the following example, it's now possible to chop the 10 bytes depicted from the 100 byte packet 4 different ways and achieve the exact same results:

    <-------- 100 -------->       Methods:
                                  1) editcap -C 20:10 in.pcap out.pcap
    +------+----+---------+       2) editcap -C -80:10 in.pcap out.pcap
    |  20  | 10 |   70    |       3) editcap -C -70:-10 in.pcap out.pcap
    +------+----+---------+       4) editcap -C 30:-10 in.pcap out.pcap


svn path=/trunk/; revision=51854
2013-09-09 01:04:13 +00:00
Chris Maynard ba3a77bb9a Specify the optional offset as a positive value, regardless of chopping from packet beginning or packet end. I *think* this will be easier syntax to remember.
svn path=/trunk/; revision=51848
2013-09-08 21:35:24 +00:00
Chris Maynard 54adc0d2ff Allow an optional offset to be specified when chopping bytes from packets.
svn path=/trunk/; revision=51845
2013-09-08 20:29:26 +00:00
Gerald Combs b5e4fd5a01 Document the current state of naming in ui/qt. Say it's OK to use C++
comments in C++ code.

svn path=/trunk/; revision=51739
2013-09-03 18:50:17 +00:00
Chris Maynard bc654875f0 Handle the 2GiB boundary case of the max filesize autostop condition properly so that we avoid overflow conditions and so that we ensure we don't capture more than 2GiB. Also, document the max filesize autostop value of 2GIB as well as indicating that it's truly GiB and not GB.
This fixes the problem reported on ask: http://ask.wireshark.org/questions/23891/wireshark-wont-run-with-multiple-capture-files

#BACKPORT(1.10) ... not sure about 1.8?

svn path=/trunk/; revision=51576
2013-08-29 18:15:13 +00:00
Gerald Combs 6d731a3e79 Add TCP sequence number (Stevens-style) graphs.
Add the QCustomPlot widget. Thanks to Emanuel Eichhammer for granting a
license change. Move some common code from ui/gtk/tcp_graph.c to
ui/tap-tcp-stream.[ch]. Get rid of tcp_graph_selected_packet_enabled().
It was only used in the menu code and didn't match what we were doing
elsewhere.

Still quite a bit of work to do but it's a promising start.

svn path=/trunk/; revision=51538
2013-08-27 18:13:20 +00:00
Chris Maynard 41f444ef87 Move the description of the -Y <displaY filter> option to maintain a proper sort.
svn path=/trunk/; revision=51238
2013-08-09 15:26:48 +00:00
Guy Harris ea72be8607 Speak of the "-d encap:" value as a linktype, rather than a DLT; if a
name is specified, it currently must be a DLT_ name rather than a
LINKTYPE_ name, as we use libpcap to do the mapping and it currently has
no API to map LINKTYPE_ names to values, but if a number is specified,
it could either be a LINKTYPE_ name or a DLT_ name if the two are
different, and we want to encourage the use of LINKTYPE_ values.

Note that in comments.

svn path=/trunk/; revision=51204
2013-08-08 04:29:08 +00:00
Martin Kaiser 11643ecc83 add --capture-comment to tshark's manpage
fix a typo in the dumpcap manpage

svn path=/trunk/; revision=51096
2013-08-01 21:21:35 +00:00
Guy Harris 7c3e7c9506 The argument to the -l flag to text2pcap is a LINKTYPE_ value, not a
DLT_ value, which is good because it's a numerical value and the
numerical values for some link-layer header types are OS-dependent, but
the numerical values for all LINKTYPE_ values are OS-independent.  Use
LINKTYPE_RAW, not the value for the DLT_RAW on some but not all OSes,
for raw IP.

Also, 7 is LINKTYPE_ARCNET_BSD, emphasis on the "_BSD"; there's also a
Linux encapsulation for ARCNet that is different.  Note that it's the
BSD flavor.

svn path=/trunk/; revision=51005
2013-07-29 08:30:42 +00:00
Guy Harris a4ad9e9f74 If a core Wireshark developer repeatedly can't remember that the
argument to the -F flag for pcap format is "libpcap", not "pcap", we
have a problem.  Make it "pcap", and add a backwards-compatibility hack
to support using "libpcap" as well.

Update the man pages to refer to it as pcap as well, and fix the
capitalization of "WinPcap" (see http://www.winpcap.org) while we're at
it.

Also, refer to http://www.tcpdump.org/linktypes.html for the list of
link-layer header types for pcap and pcap-ng.

svn path=/trunk/; revision=50989
2013-07-28 21:12:07 +00:00
Martin Kaiser 834b464844 add --capture-comment to dumpcap's manpage
svn path=/trunk/; revision=50947
2013-07-27 16:39:10 +00:00
Evan Huus 828eae73ce Document that pinfo-scoped memory is also needed for anything passed to
add_new_data_source().

svn path=/trunk/; revision=50911
2013-07-26 13:06:50 +00:00
Gerald Combs a05f55bffc Add a UAT dialog. Make UAT preferences uat_t * instead of void *.
C++-ize the UAT headers.

Add an ElidedLabel widget. Use it in the File Set, Profile, and UAT
dialogs.

Update the Qt README.

svn path=/trunk/; revision=50896
2013-07-25 23:49:47 +00:00
Guy Harris 9551f67595 The current version of Qt is 5.1.
Note that Qt Mac Extras won't necessarily build.

svn path=/trunk/; revision=50861
2013-07-24 00:51:09 +00:00
Alexis La Goutte d937adcc9e Fix typo (Missing .git in git clone URL)
svn path=/trunk/; revision=50823
2013-07-23 09:37:37 +00:00
Evan Huus 037fc022da Add wmem queue 'implementation' by wrapping wmem_list and wmem_stack.
Also a bit of misc. refactoring of the stack while I was there, and doc tweaks.

svn path=/trunk/; revision=50769
2013-07-21 21:13:30 +00:00
Evan Huus 6635f5ef67 Replace wmem slist (singly-linked) with wmem list (doubly-linked).
The overhead is not large, and it makes append much faster (O(1) vs O(n)).

It also will make a queue easy to add, which I need for a dissector I'm
writing...

svn path=/trunk/; revision=50744
2013-07-20 20:33:38 +00:00
Guy Harris bab8c3fdb9 Note that Qt builds are supported by autotools.
svn path=/trunk/; revision=50562
2013-07-14 00:10:17 +00:00
Evan Huus 9bdc911c29 From Dominic Spill via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8921
Update the README to reflect the value_string name changes in r48645.

From me: reorganize a bit to promote the use of val_to_str over try_val_to_str
in most cases.

svn path=/trunk/; revision=50557
2013-07-13 15:07:15 +00:00
Chris Maynard cab1f9fc0c Allow -C <choplen> to be used more than once so it is now possible to chop bytes from both the beginning and end of a packet in a single step.
svn path=/trunk/; revision=50536
2013-07-12 17:14:19 +00:00
Chris Maynard e7a7293bee Add -L option to allow adjustment of original frame length. This change was motivated by a question on ask where the user currently has to jump through hoops to accomplish the same thing which can now be done in 1 step via:
editcap -T wpan -C 16 -L -F libpcap test.pcap test_wpan.pcap

I thought it would be useful enough for others as well.

Ref: http://ask.wireshark.org/questions/22689/problems-with-editcap-and-wpan-encapsulation-option


svn path=/trunk/; revision=50491
2013-07-10 20:02:45 +00:00
Jeff Morriss 36d3734dcb From Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8906 :
This patch augments Wireshark's and tshark's augument usage reports (-? and
-t?) and the Wireshark and tshark man pages to list all available timestamp
options available for the -t option.

svn path=/trunk/; revision=50445
2013-07-08 16:25:13 +00:00