aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dnp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-05-21dnp3: fix parser when a packed variation is used with prefix value qualifierEric Wetzel1-5/+15
Bug: 13733 Change-Id: I4d490793b54816e731d72bf1317d3779a05ae011 Reviewed-on: https://code.wireshark.org/review/21722 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-04-02Use col_append_sep_str() for fixed stringsStig Bjørlykke1-4/+4
Change from col_append_sep_fstr() to col_append_sep_str() when appending strings without formatting. Change-Id: I315aca9b815c204a5bc78f7326402c40d1325f0e Reviewed-on: https://code.wireshark.org/review/20846 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-05DNP3: Fix reassembly of out of order fragmentsGraham Bloice1-130/+45
Rework Application Layer fragment reassembly to handle out of order fragments (seen over UDP). Change-Id: Ifd2bffba30f0a419a5f82ea6b9d2d221f7d6d276 Reviewed-on: https://code.wireshark.org/review/19947 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-02-02GHashtable -> wmem_map conversionsMichael Mann1-21/+5
Many of the register_init_routine/register_cleanup_routine functions are for initializing and cleaning up a GHashtable. wmem_map_new_autoreset can do that automatically, so convert many of the simple cases. Change-Id: I93e1f435845fd5a5e5286487e9f0092fae052f3e Reviewed-on: https://code.wireshark.org/review/19912 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-29Register reassembly tablesMichael Mann1-3/+3
Register all reassembly tables with a central unit, allowing the central unit to have the callback that initializes and destroys the reassembly tables, rather than have dissectors do it individually. Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4 Reviewed-on: https://code.wireshark.org/review/19834 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-14Remove add_item_textMichael Mann1-52/+20
It's a manual attempt at what proto_tree_add_bitmask can do anyway. Change-Id: If551e8afa346a33b8e15dc441aae75ba0752ab46 Reviewed-on: https://code.wireshark.org/review/19257 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-13Adjust proto_tree_add_uint_format_value calls to use unit stringMichael Mann1-3/+2
Several calls to proto_tree_add_uint_format_value could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. There also a few cases where proto_tree_add_uint_format_value could just be proto_tree_add_uint. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d Reviewed-on: https://code.wireshark.org/review/19242 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-30dnp3: improve data link layer dissectionGraham Bloice1-52/+78
Improve the dissection of the data chunks. Change-Id: Ic87c84f0c3ea2ccceecb376698eed6b2f6a4e614 Reviewed-on: https://code.wireshark.org/review/18566 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: Roland Knall <rknall@gmail.com>
2016-10-29dnp3: fix indent and variable namesGraham Bloice1-12/+12
Change-Id: I86339a47f78c7b54e57896cc42184a27b5326cb0 Reviewed-on: https://code.wireshark.org/review/18563 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-1/+1
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-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+1
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-07-26DNP dissector. Typo in commentsbartolootrit1-10/+10
Change-Id: Ie77c7bba0e97cca87b443552c8efe9aaed45734d Reviewed-on: https://code.wireshark.org/review/16545 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-4/+5
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-26conversation: rename shadow variableDario Lombardo1-1/+1
Change-Id: I8f738b2e01d7f448b21cdc1b488b16b7dd581911 Reviewed-on: https://code.wireshark.org/review/16104 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-06DNP: Make checkhf (ei ?) happyMichael Mann1-0/+4
ei_dnp3_buffering_user_data_until_final_frame_is_received is #if 0ed out in the code, so reciprocate that to the declaration/array. Change-Id: I65dc6bb6f93f736e3adc4f4134f3bdca1f890bf9 Reviewed-on: https://code.wireshark.org/review/15749 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-02-22Fix some hf_ field datatype conflicts.Michael Mann1-8/+8
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES 'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING 'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES 'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES 'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER 'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32 'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d Reviewed-on: https://code.wireshark.org/review/14070 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-01DNP3: dissector cleanupGraham Bloice1-130/+126
Cleaned up handling of the qualifier field. Sub-parts are now identified as the prefix and range rather than index and code. This has changed the field names; dnp3.al.objq.index -> dnp3.al.objq.prefix dnp3.al.objq.code -> dnp3.al.objq.range and the associated packet tree details text strings. Change-Id: I42d51b71233303eaf8b37982dd15b5090918630b Reviewed-on: https://code.wireshark.org/review/12998 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-12-30Prevent infinite loop in DNP3 dissector.Michael Mann1-0/+2
Bug: 11938 Change-Id: Icd59092a3139b8c22f3866017a093a8b1270f1b2 Reviewed-on: https://code.wireshark.org/review/12940 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_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
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-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-01udp_dissect_pdus follow-upMichael Mann1-14/+15
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-08-18Add udp_dissect_pdus.Michael Mann1-21/+16
It works similar to tcp_dissect_pdus, but only works on a single packet. Intended for protocols that go over TCP and UDP so that they can have a common dissection function. Will of course, also work on UDP-only protocols with a fixed length header and size. Used DNP3 as a guinea pig since "multiple PDU support" over UDP was just added. Change-Id: Ib7af8eaf7102c96b4f8b5c1b891ae2d8f0886f9d Reviewed-on: https://code.wireshark.org/review/10083 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-17DNP3: add support for udp multi frame packets.Dario Lombardo1-13/+25
Bug: 11435 Change-Id: I1f3006a4276e8a95d028294ebb9635f71be0f75e Reviewed-on: https://code.wireshark.org/review/10013 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-18/+32
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-2/+2
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu1-5/+8
This patch moves g_hash_table_destroy calls from the init routine to the cleanup routine. Besides that, the conditional check for the hash table has been removed, assuming that init is always paired with a cleanup call. If reassembly_table_init is found, a reassembly_table_destroy call is prepended to the cleanup function as well. Comments have been removed from the init function as well as these did not seem to have additional value ("destroy hash table" is clear from the context). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4d11f07180d9c115eb14bd860e9a47d82d3d1dcd Manually edited files (for assignment auditing): dvbci, ositp, sccp, tcp. Other files that needed special attention due to the use of register_postseq_cleanup_routine: - ipx: keep call, do not add another cleanup routine. - ncp: remove empty mncp_postseq_cleanup. mncp_hash_lookup is used even if a frame is visited before (see dissect_ncp_common), hence the hash table cannot be destroyed here. Do it in cleanup instead. - ndps: add cleanup routine to kill reassembly table, but do not destroy the hash table as it is already done in ndps_postseq_cleanup. Change-Id: I95a72b3df2978b2c13fefff6bd6821442193d0ed Reviewed-on: https://code.wireshark.org/review/9223 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-23Remove more deprecated tvb_lengthEvan Huus1-5/+5
Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2 Reviewed-on: https://code.wireshark.org/review/9042 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-22Fix make distcheck buildbotAlexis La Goutte1-5/+1
packet-dnp.c:2735:28: error: variable 'al_filename' set but not used [-Werror=unused-but-set-variable] packet-dnp.c:1843:32: error: variable 'al_filename_offs' set but not used [-Werror=unused-but-set-variable] Change-Id: Ia84b270aa8f56fb4104fb875339dc3d39c6105c6 Reviewed-on: https://code.wireshark.org/review/9020 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-22Eliminate proto_tree_add_text from some dissectors.Michael Mann1-26/+54
Change-Id: I979990e9385182870ce4809a7e6fa16e598cb2be Reviewed-on: https://code.wireshark.org/review/9016 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-08Remove RTAC Serial preference that doubled for Decode As.Michael Mann1-2/+1
Just use Decode As directly. Change-Id: Iab03a6ff8a70c3c6b0406f426e622eb52bb34ba7 Reviewed-on: https://code.wireshark.org/review/7902 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-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+2
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-01Added DNP3 support for g13 and g43, output command eventsGraham Bloice1-9/+117
Bug: 10347 Change-Id: Ic173f31d8cf3fd002454f4c22b85c19bae42d544 Reviewed-on: https://code.wireshark.org/review/6175 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-2/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-20/+22
Part 2 of many Change-Id: I50815e7738b011382392f3078a7107d3d9eec4ec Reviewed-on: https://code.wireshark.org/review/5542 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-10DNP3 Protocol Bugfix / Enhancementcbontje1-14/+17
- Fix for Single-bit Objects offset-pointer - Enhancement for Obj 12 Var 2 (Pattern Control Block) and Var 3 (Pattern Mask) Decoding Bug: 10558 Change-Id: I8d3f6cee4acbab09d0b93dab6b868cddd842b682 Reviewed-on: https://code.wireshark.org/review/4597 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-07Create subdissector table for RTAC Serial and have dissectors register with ↵Michael Mann1-1/+3
it, rather than have the RTAC Serial dissector go find all of the dissectors its interested in. Change-Id: I6b6a05ec242e4798fb56ffa43c661ec277aca955 Reviewed-on: https://code.wireshark.org/review/3984 Reviewed-by: Chris Bontje <cbontje@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>
2014-08-08Fix compiler warning.Guy Harris1-1/+1
Change-Id: Idf275d89591558fd2ea082c886ce07e62523807a Reviewed-on: https://code.wireshark.org/review/3506 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08Add routines for CRC-16 with a polynomial of 0x3D65.Guy Harris1-66/+12
There are routines that take a buffer and a length and that take a tvbuff, offset, and length; use those routines in the DNP dissector (which no longer needs its own table and loop), and use the tvbuff routine instead of calling tvb_get_ptr(). Change-Id: Ic67b0f3b65b94ea47c0fdc2f3d3b6f88df77f9c6 Reviewed-on: https://code.wireshark.org/review/3505 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-27Added function dnp3_header_check() to check the validity of a DNP3Graham Bloice1-10/+40
packet as far as possible, called from both dissect_dnp3_tcp and dissect_dnp3_udp. Bug: 10287 Change-Id: Iaa988258b3614cb1b408dec41a987fbd61c9727c Reviewed-on: https://code.wireshark.org/review/3096 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-17When DNP3 heuristics are disabled, relax the conditions onGraham Bloice1-2/+2
accepting a packet as DNP3. Bug: 10287 Change-Id: I222ec885186447c8a72eaf11cebacff8b9b79fad Reviewed-on: https://code.wireshark.org/review/3092 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-25convert to proto_tree_add_subtree[_format]Michael Mann1-43/+23
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-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-7/+7
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-7/+7
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-3/+3
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-16Convert a bunch of time_to_str functions to wmemEvan Huus1-6/+6
Change-Id: I24fe3cc4a3589dadc4528a77fe7ff13d06b1a983 Reviewed-on: https://code.wireshark.org/review/2245 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-17remove duplicated entries.AndersBroman1-4/+0
Change-Id: I1fcbda17cbc444eee04e975d60b371fc2fa4754c Reviewed-on: https://code.wireshark.org/review/1184 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-17From Graham Bloice:AndersBroman1-8/+12
Fix A mismatch in the dnp3_al_obj_vals value string fixes bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9945 Change-Id: I3d0a423d7d2e4a711533debbd950e2976dd5115e Reviewed-on: https://code.wireshark.org/review/1183 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-04-01Fixed display of IIN during reads and writes of IIN object.Graham Bloice1-17/+28
Added (hidden) dnp3.addr field set by both source and destination dnp3 addresses to allow easier filtering. Change-Id: I04980c24c1b9f30a2ee5a0d5ea4ac32ae877504e Reviewed-on: https://code.wireshark.org/review/908 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Graham Bloice <graham.bloice@trihedral.com>