Commit Graph

53 Commits

Author SHA1 Message Date
Michael Mann 2eb7b05b8c Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67,
convert dissectors that use "udp.port".

More cleanup done on dissectors that use both TCP and UDP dissector
tables, so that less preference callbacks exist.

Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3
Reviewed-on: https://code.wireshark.org/review/18120
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-13 02:51:18 +00:00
Michael Mann be1398c17c Convert uses of g_alloced data with tvb_new_child_real_data to use pinfo->pool instead.
Aldo update documentation to suggest using wmem pinfo->pool instead of glib memory

Change-Id: I5d34cc6c1515aa9f0d57784b38da501ffcb95ccc
Reviewed-on: https://code.wireshark.org/review/16551
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: Evan Huus <eapache@gmail.com>
2016-07-20 22:12:56 +00:00
Hendrik Uhlmann f5eaf538b0 DIS: Introduced support of Collision PDU
Parse all Attributes of Collision PDU and display them in wireshark HMI.

Change-Id: I3003c6dd709498cc6c1adf784800047d0984bafa
Reviewed-on: https://code.wireshark.org/review/16299
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: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-07-06 06:58:39 +00:00
Dario Lombardo 0b35075866 dis: cast to guint64 to avoid potential overflow (CID 1214480).
Change-Id: I24ae4a7a5ef8b4ed363ec849ac9c8aeeefe836dd
Reviewed-on: https://code.wireshark.org/review/16288
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-07-05 12:12:41 +00:00
Michael Mann 2ab4155794 tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_string
Also some other tricks to remove unnecessary tvb_get_string_enc calls.

Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914
Reviewed-on: https://code.wireshark.org/review/16158
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>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-27 15:20:06 +00:00
alpartis cb2627c77f format DIS header timestamp as mm:ss.nnnnnn
Older versions of this dissector displayed the header timestamp formatted to show
minutes, seconds, and milliseconds past the hour (the DIS spec actually defines the
timestamp in terms of microseconds).  This commit fulfills a feature request to
return to that format.

Bug: 12402
Change-Id: Ide4adf8f80306f2458e48e8b2f78c911782669e5
Reviewed-on: https://code.wireshark.org/review/15276
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-05-09 16:10:31 +00:00
Alexis La Goutte 55ac64ff3e dis: fix 'pinfo' was marked unused but was used [-Werror,-Wused-but-marked-unused]
Change-Id: I30e5384dff0d97ea32ea24c82a91d30c26e6023c
Reviewed-on: https://code.wireshark.org/review/14979
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-18 11:21:38 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector.  Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector.
"data" dissector was not considered to be a dependency.

Change-Id: I15d0d77301306587ef8e7af5876e74231816890d
Reviewed-on: https://code.wireshark.org/review/14509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 12:48:48 +00:00
alpartis d5f2db6a7f DISv7: parse PDU Status field
Section 6.2.67 in IEEE 1278.1-2012 defines PDU Status bit field in
the PDU Header.  The bit meaning varies with the PDU type.  This
change provides full parsing and presentation for all fields and
PDU types.

Bug: 12043
Change-Id: I8f4ef6606ff59a1ef0ed97630c4832b2b6a4dff7
Reviewed-on: https://code.wireshark.org/review/14232
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-29 05:49:48 +00:00
alpartis 0a0acd9aaa Present PDU header timestamps with microsecond resolution as exists in packet data.
On behalf of SimPhonics, Inc.

IEEE 1278.1-2012 DIS spec details the PDU header timestamp in section
6.2.88 as a 31-bit unsigned integer count of microseconds since the start
of the current interval.  Likewise, the DIS dissector should reflect this
information accurately, based on the actual complete contents of captured
packets.

Tested with DIS packets generated from VPlus for radio simulation by
SimPhonics.

Change-Id: I73b9689e1fb35900b7063746cac604a72a69ab16
Reviewed-on: https://code.wireshark.org/review/13210
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-14 05:31:18 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now.

Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f
Reviewed-on: https://code.wireshark.org/review/12484
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:37:36 +00:00
Oren Koler 99406bafe1 Add to DIS dissector many new PDU types, fixing issues, and richer information.
This is a massive changeset, developed by Oren Koler from IDF BattleLab, and is being integrated by me.
IDF BattleLab enhanced this dissector for its own popular PDUs, and was tested successfully by its own DIS scenarios.

We also fixed those issues:
* Only zero or one timestamp in DIS packet header (division of integer by integer)
* Bad datum values padding.

IDF BattleLab outputs the result of Oren Koler work to the community.

Sadly, because of information security, we couldn't share recorded captures with the community.
However, we brought basic PDU record outside from IDF BattleLab.

Change-Id: Iec425569da3842f7054a97be5f371cbe893ff482
Reviewed-on: https://code.wireshark.org/review/10710
Reviewed-by: Tal Hadad <tal_hd@hotmail.com>
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>
2015-10-21 12:15:20 +00:00
Guy Harris 6edb27b58e FT_DOUBLEs are 8 bytes; use FT_FLOAT for 4-byte floating-point values.
Change-Id: Ia39f8604229df18e1cdbbf81b78cd423e70f0f3c
Reviewed-on: https://code.wireshark.org/review/6386
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-08 00:50:56 +00:00
Bill Meier f412c9a01a Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...
(for some dissectors which fetch all other integral fields using
   ENC_BIG_ENDIAN).

Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56
Reviewed-on: https://code.wireshark.org/review/5748
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13 18:45:56 +00:00
Bill Meier cd7a11c0d1 Add editor modelines; Adjust indentation as needed.
Change-Id: Ie8d4056ab706bbc85c8247682b1a64ea98bc89f2
Reviewed-on: https://code.wireshark.org/review/4185
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 02:01:58 +00:00
Bill Meier 18d72987cb Do encoding-arg changes (all benign)
For:
- FT_BYTES: Always use just ENC_NA
- integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN

Also:
- FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...)
- Change one case of incorrect '||' to '|'

Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0
Reviewed-on: https://code.wireshark.org/review/4184
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 01:38:08 +00:00
Michael Mann 9d5f9141af Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the area.

Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967
Reviewed-on: https://code.wireshark.org/review/3427
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>
2014-08-05 07:36:26 +00:00
Peter Wu f2b4daf400 Add printf-format annotations, fix garbage
The WRETH dissector showed up some garbage in the column display. Upon
further inspection, it turns out that the format string had a trailing
percent sign which caused (unsigned)-1 to be returned by
g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is
called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows
up. ASAN could not even catch this error because EP is in charge of
this.

So, start adding G_GNUC_PRINTF annotations in each header that uses
the "fmt" or "format" paramters (grepped + awk). This revealed some
other errors. The NCP2222 dissector was missing a format string (not
a security vuln though).

Many dissectors used val_to_str with a constant (but empty) string,
these have been replaced by val_to_str_const. ASN.1 dissectors
were regenerated for this.

Minor: the mate plugin used "%X" instead of "%p" for a pointer type.

The ncp2222 dissector and wimax plugin gained modelines.

Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622
Reviewed-on: https://code.wireshark.org/review/2881
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 23:00:40 +00:00
Michael Mann 888f22de16 convert to proto_tree_add_subtree[_format]
Change-Id: I2ea1892b5963cc5578cbdd2b03029ca8424f2267
Reviewed-on: https://code.wireshark.org/review/2640
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-25 16:35:14 +00:00
Alexis La Goutte e92ee3590d Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I2c7ed98e28a5149562d61f8005629f351a31c11b
Reviewed-on: https://code.wireshark.org/review/1721
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-22 11:04:55 +00:00
Mark Weel 011a330b13 DIS: implement IFF PDU
Change-Id: Ica5029ab31077f95cabde22ad7df42ced769a3d0
Reviewed-on: https://code.wireshark.org/review/1714
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21 21:18:54 +00:00
Mark Weel eef176df4e DIS: update enumerations to SISO-REF-010-00v20-0
Change-Id: I99cd075bef5b8d3f2546032cc6ce9774bcf8efc1
Reviewed-on: https://code.wireshark.org/review/1695
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-19 22:01:06 +00:00
Alexis La Goutte fe053839f0 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I9bf53014d90857b7d71efbb09b5ceb708b3df6ca
Reviewed-on: https://code.wireshark.org/review/1683
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-18 20:28:37 +00:00
Evan Huus 8129c2d13d Add casts to fix OSX 10.6 buildbot
Change-Id: Ice852356201ba222290d2705d9f5526ce242b031
Reviewed-on: https://code.wireshark.org/review/1668
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 12:04:29 +00:00
Michael Mann 59eb8cf404 Make (almost) all fields filterable and use "normal" dissection functions to do it.
Removed the additional "parseFields" layer as it was unnecessary and IMO ends up creating more work for a developer if they want to add additional filterable fields.  That layer also hid the (large) number of unfilterable fields that were in the dissector that would normally be caught by counting the number of proto_tree_add_text function calls.

Change-Id: I6f9607938c2386de40bdd3dae652614f07dda31e
Reviewed-on: https://code.wireshark.org/review/1653
Reviewed-by: Peter Ross <peter.ross@rmit.edu.au>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-16 05:34:05 +00:00
Mark Weel b2055d73a8 Update enums to SISO_REF_010-00v20-0 Annex A, section A.1 and A.2
Change-Id: Ic4099145d84541297d72b018b21f88b4a120b138
Reviewed-on: https://code.wireshark.org/review/1634
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 15:41:32 +00:00
Michael Mann 9554b2fc62 Condense DIS dissector to a single file.
This doesn't appears to be "autogenerated", and it certainly isn't the biggest dissector even after the merge.  This avoid file pollution, makes less non-static variables/functions and makes the check* scripts job easier.

Change-Id: If94857e4a3e602c3d45201b1aebbf466ba3e1dd1
Reviewed-on: https://code.wireshark.org/review/1597
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-12 01:41:23 +00:00
Peter Ross df2dc9222b packet-dis: SISO-J Link 16 PDU dissector (SISO-STD-002)
Change-Id: Id2ed7b7786705ad5fa345b0d1904cec508d3161e
Reviewed-on: https://code.wireshark.org/review/1552
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-11 16:47:51 +00:00
Peter Ross 06657caa15 packet-dis: fix typos
Change-Id: I9a9cd3a03e174014e6ac677ff8f4e686de003d6e
Reviewed-on: https://code.wireshark.org/review/1585
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-11 12:45:26 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Anders Broman 263a9d0683 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48341
2013-03-16 16:25:41 +00:00
Evan Huus 3a64f93a00 From Hendrik Uhlmann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8185
Support for Underwater Acoustic PDUs in packet-dis.c

svn path=/trunk/; revision=47119
2013-01-16 17:27:03 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman b87f9143e4 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39149
2011-09-26 14:50:59 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier 6321e07f8e From Paul J. Metzger: Add support for decoding DIS Electromagnetic Emission packets.
svn path=/trunk/; revision=32758
2010-05-11 19:03:33 +00:00
Bill Meier 9290840c4d #include <stdio.h> not req'd; cleanup whitespace & indentation.
svn path=/trunk/; revision=32308
2010-03-27 17:06:22 +00:00
Bill Meier 45e2e811a4 Fix an "unused variable" warning: remove 'infoStrings'
svn path=/trunk/; revision=32307
2010-03-27 15:46:36 +00:00
Anders Broman 861ada7227 From Chuck Kristofek:
DIS update to introduce hf_ based filtering and radio family dissection.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4610

svn path=/trunk/; revision=32306
2010-03-27 15:23:16 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Jaap Keuter 0e4e74ef3d From Michael Dishman:
Fixed parser for DIS DataRequest PDU.
Added parser for DIS StartResume, StopFreeze, Acknowledge, ActionRequest,
ActionResponse, Comment, CreateEntity, DeleteEntity PDUs.
Added parser for "reliable" versions of the above DIS PDUs.
Added parser for DIS Application Control PDU.
Added parsers for DIS Persistent Object Family PDUs.

svn path=/trunk/; revision=30947
2009-11-13 06:53:15 +00:00
Jaap Keuter 38638f9fb1 From Matt Deckard:
Add support for the DIS protocol dissector to more fully interpret the PDU
types "Data Query", "Data", and "Set Data". It should interpret the
originating and receiving entity IDs, request ID, number of fixed and variable
datum fields, and the ID and values of each datum field in the PDU.

svn path=/trunk/; revision=28583
2009-06-02 06:37:21 +00:00
Bill Meier 548e468959 Misc dissector cleanup:
- Make some fcns & vars static
- hf[] blurbs: "" and repeated text --> NULL
- Move proto_register & proto_reg_handoff to end of source
- packet-catapult-dct2000: simplify proto_reg_handoff
- Use consistent indentation

svn path=/trunk/; revision=28488
2009-05-26 16:01:12 +00:00
Bill Meier 4f2845d9a0 proto_reg-handoff: Fix to properly delete/add port when pref changed; cleanup.
svn path=/trunk/; revision=26202
2008-09-15 18:48:28 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Guy Harris c4d9915be6 Give them RCS IDs.
svn path=/trunk/; revision=15910
2005-09-20 22:51:42 +00:00