aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dis.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-29DISv7: parse PDU Status fieldalpartis1-2/+218
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-01-14Present PDU header timestamps with microsecond resolution as exists in ↵alpartis1-7/+7
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>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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-10-21Add to DIS dissector many new PDU types, fixing issues, and richer information.Oren Koler1-224/+1692
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-01-08FT_DOUBLEs are 8 bytes; use FT_FLOAT for 4-byte floating-point values.Guy Harris1-12/+30
Change-Id: Ia39f8604229df18e1cdbbf81b78cd423e70f0f3c Reviewed-on: https://code.wireshark.org/review/6386 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-25/+25
(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-09-19Add editor modelines; Adjust indentation as needed.Bill Meier1-0/+12
Change-Id: Ie8d4056ab706bbc85c8247682b1a64ea98bc89f2 Reviewed-on: https://code.wireshark.org/review/4185 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-1/+1
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-08-05Eliminate proto_tree_add_text from some dissectors.Michael Mann1-13/+20
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-07-06Add printf-format annotations, fix garbagePeter Wu1-1/+1
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-06-25convert to proto_tree_add_subtree[_format]Michael Mann1-115/+52
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-05-22Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-2/+2
Change-Id: I2c7ed98e28a5149562d61f8005629f351a31c11b Reviewed-on: https://code.wireshark.org/review/1721 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21DIS: implement IFF PDUMark Weel1-0/+532
Change-Id: Ica5029ab31077f95cabde22ad7df42ced769a3d0 Reviewed-on: https://code.wireshark.org/review/1714 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-19DIS: update enumerations to SISO-REF-010-00v20-0Mark Weel1-172/+468
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-18Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
Change-Id: I9bf53014d90857b7d71efbb09b5ceb708b3df6ca Reviewed-on: https://code.wireshark.org/review/1683 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-17Add casts to fix OSX 10.6 buildbotEvan Huus1-3/+3
Change-Id: Ice852356201ba222290d2705d9f5526ce242b031 Reviewed-on: https://code.wireshark.org/review/1668 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-16Make (almost) all fields filterable and use "normal" dissection functions to ↵Michael Mann1-2805/+3082
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-14Update enums to SISO_REF_010-00v20-0 Annex A, section A.1 and A.2Mark Weel1-10/+10
Change-Id: Ic4099145d84541297d72b018b21f88b4a120b138 Reviewed-on: https://code.wireshark.org/review/1634 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-12Condense DIS dissector to a single file.Michael Mann1-88/+5992
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-11packet-dis: SISO-J Link 16 PDU dissector (SISO-STD-002)Peter Ross1-11/+80
Change-Id: Id2ed7b7786705ad5fa345b0d1904cec508d3161e Reviewed-on: https://code.wireshark.org/review/1552 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-11packet-dis: fix typosPeter Ross1-1/+1
Change-Id: I9a9cd3a03e174014e6ac677ff8f4e686de003d6e Reviewed-on: https://code.wireshark.org/review/1585 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-03-16[-Wmissing-prototypes]Anders Broman1-0/+1
Use explicit casts. svn path=/trunk/; revision=48341
2013-01-16From Hendrik Uhlmann via ↵Evan Huus1-0/+31
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8185 Support for Underwater Acoustic PDUs in packet-dis.c svn path=/trunk/; revision=47119
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-5/+5
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-09-26Get rid of check_col, while at it set ENC.Anders Broman1-38/+35
svn path=/trunk/; revision=39149
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
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-05-11From Paul J. Metzger: Add support for decoding DIS Electromagnetic Emission ↵Bill Meier1-0/+77
packets. svn path=/trunk/; revision=32758
2010-03-27#include <stdio.h> not req'd; cleanup whitespace & indentation.Bill Meier1-295/+294
svn path=/trunk/; revision=32308
2010-03-27Fix an "unused variable" warning: remove 'infoStrings'Bill Meier1-1/+0
svn path=/trunk/; revision=32307
2010-03-27From Chuck Kristofek:Anders Broman1-10/+417
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-01-13From Didier Gautheron:Anders Broman1-4/+1
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
2009-11-13From Michael Dishman:Jaap Keuter1-31/+171
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-06-02From Matt Deckard:Jaap Keuter1-0/+7
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-05-26Misc dissector cleanup:Bill Meier1-25/+27
- 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
2008-09-15proto_reg-handoff: Fix to properly delete/add port when pref changed; cleanup. Bill Meier1-2/+5
svn path=/trunk/; revision=26202
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2005-09-20Give them RCS IDs.Guy Harris1-0/+2
svn path=/trunk/; revision=15910
2005-07-30Make some funtions static. More char -> const char warning fixesJörg Mayer1-2/+2
svn path=/trunk/; revision=15146
2005-07-18DIS packets must be at least 12 bytes long. DIS uses port 3000, byGuy Harris1-2/+13
default, but the Cisco Redundant Link Management protocol can also use that port; RLM packets are 8 bytes long, so we use this to distinguish between them. svn path=/trunk/; revision=14950
2005-07-11From Jeremy j Ouellette:Anders Broman1-0/+196
DIS dissection. svn path=/trunk/; revision=14899