Commit Graph

135 Commits

Author SHA1 Message Date
Christoph Schlosser 690cb8ff65 EPL: Add Modular device flag
Add detection for the modular device flag in POWERLINK.

Change-Id: I3e21eec383f1bdf2fa491d415631cda146a0fdef
Reviewed-on: https://code.wireshark.org/review/22774
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>
2017-07-24 13:27:22 +00:00
Alexis La Goutte 68c0b8311c EPL: fix redundant redeclaration of ‘epl_profile_uat_fld_fileopen_check_cb’ [-Wredundant-decls]
Change-Id: I44ba825648eb707942c4ea576c850c94f4891fb1
Reviewed-on: https://code.wireshark.org/review/22102
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-12 21:40:07 +00:00
Alexis La Goutte 2d7d10ad1a epl: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ibe5d2e21fcda05fa8ee52157630d4896deaef440
Reviewed-on: https://code.wireshark.org/review/22003
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-08 14:44:45 +00:00
Alexis La Goutte 8aa84c630e epl: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Id5dde66c6473cd7ba3c7cc981d7b86f564f7ca9f
Reviewed-on: https://code.wireshark.org/review/22004
Reviewed-by: Ahmad Fatoum <ahmad@a3f.at>
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-07 17:41:57 +00:00
Alexis La Goutte 831828878d epl: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Id8e5c3622f5186fcab530b9d329a0ff1d42bd6f3
Reviewed-on: https://code.wireshark.org/review/22002
Reviewed-by: Ahmad Fatoum <ahmad@a3f.at>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-07 16:26:23 +00:00
Alexis La Goutte dd52b16537 epl: fix code will never be executed [-Wunreachable-code]
false positive when declare variable after a switch(){

Change-Id: Ief4770b2200a356b061cf84c7828c8ebe76a1fbb
Reviewed-on: https://code.wireshark.org/review/21983
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-06-06 16:14:26 +00:00
Alexis La Goutte a5a4a0bd55 epl: fix no previous prototype for function 'profile_load' [-Wmissing-prototypes]
Change-Id: I5c3119436984cc7de3dcf4dffd1961481cacc553
Reviewed-on: https://code.wireshark.org/review/21982
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-06 16:13:46 +00:00
Ahmad Fatoum 197e48bcee packet-epl.c: Make dissector oss-fuzz friendly
oss-fuzz invokes the dissector without IP layer, so we can't assume
the IP address to be available when dissecting POWERLINK/UDP packets.
Same goes for the "Exported PDU" functionality.

Bug: 13756
Change-Id: I038f0445ada3f764dcc72f7bce1d02cfa49791fb
Reviewed-on: https://code.wireshark.org/review/21894
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-06-02 15:05:53 +00:00
Ahmad Fatoum 3eaa62dee6 packet-epl.c: Prefix EPL UAT files with epl_
Unlike preferences, UATs are stored in their own files, so prefexing file
name with the protocol abbreviation makes sense to keep matters organized.

Change-Id: Ic7918f509e38da38cdb86ad70917923547f9c112
Reviewed-on: https://code.wireshark.org/review/21888
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-02 10:28:24 +00:00
Guy Harris 974f985bd9 Add SUBOBJECT_INITIALIZER and use it.
Just as we have OD_ENTRY_INITIALIZER, add SUBOBJECT_INITIALIZER, and use
it rather than memset().

Whether removing initializer warnings is a Good Thing is subject to
debate; remove a comment that implies it's been deemed a Good Thing.

Change-Id: Ife658d8bb1d4868789ca3b929aff6e4fccecb430
Reviewed-on: https://code.wireshark.org/review/21892
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-02 08:30:16 +00:00
Ahmad Fatoum 10e59dba2b packet-epl.c: Change CANopen Unicode_String to little endian
CANopen DS301 defines "Unicode_String" as "ARRAY [ length ] OF UNSIGNED16"
and states "For numerical data types the encoding is little endian style".

Change-Id: I146449d7eaafe58b337b505682b14cd672f8ad76
Reviewed-on: https://code.wireshark.org/review/21891
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-02 07:56:23 +00:00
Ahmad Fatoum 5a06efc29d packet-epl.c: Fixup missing initializer warnings
macOS Buildbot doesn't like {0} (probably because GNU C already provides {}
exactly for the purpose of initializing all members to zero/NULL/0.0.. etc)

Affected local type definitions now have a static intializer macro that uses
the correct amount of zeroes and braces (similar to PTHREAD_MUTEX_INITIALIZER)
Global type definitions have a memset to zero (Which isn't strictly correct,
but as the platforms we support all have all-bits-zero-nulls and IEEE 754
floats, it should be good enough. A separate change will attempt to disable
-Wmissing-field-initializers -Wmissing-braces globally and hopefully make
these workarounds unnecessary.

Change-Id: I30b0f679bbb8adb2dd7269c9f3bc19732e48212b
Reviewed-on: https://code.wireshark.org/review/21887
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-02 07:42:11 +00:00
Ahmad Fatoum 9a85e30668 packet-epl.c: Enhance dissection by ObjectMappings and device profiles
Cyclic PDOs are setup either by ObjectMappings in the asynchronous SDOs,
or by serialized ObjectMappings in device profile files.

We now keep track of ObjectMappings transmitted via SDOs or read from
XDC files and use those to correctly partition the PDO's payloads.

Additionally types and descriptions for Object Directory entries extracted
from the EDS and XDD profiles are used to select the correct Wireshark type
and a string representation for those partitoned PDOs. Other places where
indices and subindices are also enriched by this information.

EDS support leverages GKeyFile and is available unconditionally, XDD/XDC
parsing support depends on the availabilty of libxml2. A patch for
inclusion of the latter as optional dependency was submitted
as Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783

Electronic Data Sheet (EDS) is the CANopen standard for device profiles,
POWERLINK being based on CANopen, is occasionly used with EDS profiles.

XML Device Description (XDD) is the Ethernet POWERLINK standard for
device profiles. XDC have the same structure but contain actualValues
fields which can contain default ObjectMappings.

XML Device Descriptions can be 25k+ lines with much duplication,
so wmem_iarray_t is leveraged for saving space as well as faster lookups.

A side-effect of now organizing the capture in conversations is that
POWERLINK over UDP packets are now assigned proper destination and source
node IDs, which are displayed in the column view. The Referenced bug where
packets where erronously flagged as duplicates because the address wasn't
considered is also fixed as a result.

Bug: 13604
Bug: 13749
Change-Id: Ic33ff0be8f2eae7c24fe5877ad9258d1e550c227
Reviewed-on: https://code.wireshark.org/review/21112
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-06-01 22:04:02 +00:00
Ahmad Fatoum 855a05cd1e packet-epl.c: Fix bounds error on malformed packet
dissect_epl_payload is called with len retrieved from the packet payload,
so we've to ensure there are indeed at least len bytes remaining in the tvbuff.

Counting the remaining bytes has to start from the _current_ offset, not from
the start of the buffer.

Change-Id: I6f4a94e8503cde6c5eaadc43f560c15ef8c1c375
Reviewed-on: https://code.wireshark.org/review/21829
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>
2017-05-31 19:47:41 +00:00
Alexis La Goutte b933b8a4d3 EPL: remove unused hf (hf_epl_sdo_od_field)
Change-Id: I85b26a235874fa67c4f44251166353fadccd1eb5
Reviewed-on: https://code.wireshark.org/review/21659
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>
2017-05-15 10:21:31 +00:00
Alexis La Goutte 993a0afe56 epl: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Idb2ba4181a9affd8c9a71e52a1dd24fda56bd52c
Reviewed-on: https://code.wireshark.org/review/21658
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-15 10:21:09 +00:00
Guy Harris 871a8a2ccc Another shadowing fix for abort().
Change-Id: I991bd24ab8b64bdfeae275941d79b716da3309f9
Reviewed-on: https://code.wireshark.org/review/21592
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:50:45 +00:00
Guy Harris 804d0cdfa3 Squelch warning from some compilers.
Change-Id: Iacd5832e3b63fa24907423d2b7df40e81fafb0de
Reviewed-on: https://code.wireshark.org/review/21591
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:08:07 +00:00
Christoph Schlosser 1be20bc4c2 EPL: Dissect read/write multiple parameter SDOs
The dissector only dissected Write Multiple Parameter by Index requests
 correctly.
 Now it is possible to dissect the response to the request and
 Read Multiple Parameter by Index request and responses.

Bug: 13677

Change-Id: I13aae241690cd3ac9dfbe8129ef56d0fc9016301
Reviewed-on: https://code.wireshark.org/review/21034
Reviewed-by: Christoph Schlosser <christoph@schlosser.xyz>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-11 04:56:36 +00:00
Ahmad Fatoum 6c096f31ac packet-epl.c: Fix bigger-than-actual offset being reported
dissect_epl_asnd_nmtdna returns the offset + 27,
adding that to the original offset isn't correct,
unless the offset was 0 to begin with, which isn't the case.

Change-Id: Id0d5043b23a83aef8d07a6f6ee3b70486d913e9f
Reviewed-on: https://code.wireshark.org/review/21056
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-04-13 01:16:17 +00:00
Michael Mann af54b292e6 Register reassembly tables
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>
2017-01-29 13:29:04 +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 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
Peter Wu 71c41a0a13 epl: fix memleaks
Fixes a memleak that occurs on (re)loading a pcap. While at it, remove
some unnecessary variables.

Change-Id: Ibb662e5c608881bc7dfde9d12cdb77f699ff6542
Reviewed-on: https://code.wireshark.org/review/17639
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>
2016-09-12 01:20:55 +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
Christoph Schlosser 4176e1f4b7 EPL: Add support for DS302-E
* Add AN local and global flags to the SoA frame
 * Add NMT command for dynamic node assignment (DNA)

Change-Id: I7cc8c9ee26b0676727d28f32b056fbe1a153c8af
Reviewed-on: https://code.wireshark.org/review/15263
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Christoph Schlosser <christoph@schlosser.xyz>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-05-06 09:45:57 +00:00
Alexis La Goutte 643235d181 EPL: fix 'segmented' was marked unused but was used [-Werror,-Wused-but-marked-unused]
Change-Id: I90109f724c47684a2413fe3eca9fa73d2f637cbe
Reviewed-on: https://code.wireshark.org/review/15083
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2016-04-25 09:31:52 +00:00
Dario Lombardo 493f6e223b epl: change g_malloc to wmem_alloc.
Change-Id: I3d099047be2a4ef0e104f5f54b6b458387e7a1f0
Reviewed-on: https://code.wireshark.org/review/14928
Reviewed-by: Christoph Schlosser <christoph@schlosser.xyz>
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-22 04:41:52 +00:00
Christoph Schlosser 070ea6f587 EPL: Fix segmented transfer complete detection
In case of a segmented SDO transfer, the transfer complete response can
 contain additional data that should not be evaluated by the dissector.

Change-Id: I7016eb88b93aac8c318e703fe60a90c3adbf9eeb
Reviewed-on: https://code.wireshark.org/review/14692
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-03-29 19:42:11 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.

There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.

Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 17:38:03 +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
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 bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
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-01-08 20:04:56 +00:00
Guy Harris c2b7743264 Eliminate more unnecessary casting away of constness.
Change-Id: I3d2d83d60f798703ea3fa16ba2d6e95a00f88469
Reviewed-on: https://code.wireshark.org/review/12885
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-28 20:46:26 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
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-09 12:38:06 +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
Michael Mann 74541a9596 Don't allow multiple registrations of a protocol in dissector tables.
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing.

The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not.  It's just ENFORCED for Decode As.

Bug: 3949
Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127
Reviewed-on: https://code.wireshark.org/review/11405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:39:40 +00:00
Christoph Schlosser 0f05ab9ab1 epl: Put OD information into own subtree
Instead of displaying a long list of OD index, subindex and padding, group
 the information by parameters.

Change-Id: I03ea83f187b4bd4956361d33be674ec62e35bea1
Reviewed-on: https://code.wireshark.org/review/11398
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Christoph Schlosser <christoph.schlosser@yahoo.de>
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>
2015-10-29 17:44:31 +00:00
Alexis La Goutte d141562efb EPL: fix no previous prototype for epl_[gs]et_sequence_nr [-Wmissing-prototypes]
Change-Id: I794a26bd21494532629035a7d23751235ecec3db
Reviewed-on: https://code.wireshark.org/review/11289
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-26 20:48:37 +00:00
Pascal Quantin 5dffa81e8c EPL: add explicit casts to please OSX 10.5 x86 buildbot
Change-Id: I78b3a750f13c190cad1b6b560bd5104292e77ed5
Reviewed-on: https://code.wireshark.org/review/11276
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>
2015-10-26 10:23:00 +00:00
Roland Knall 5c97a4802f epl: Remove usage of subnum
pinfo->fd->subnum is not used in a way as it was documented
 in frame_data.h. This uses a more generic approach and also
 frees subnum in this case

Change-Id: I3aee0ffcdf1948c97a2d2f95c868e636362664a1
Reviewed-on: https://code.wireshark.org/review/11225
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-10-25 00:28:25 +00:00
Dario Lombardo 291bca0056 epl: fix bug in g_hash_table_lookup_extended() call (CID 1254382)
Change-Id: Iebf0fc5d3e86fba9a2ea4da5784256d820598e39
Reviewed-on: https://code.wireshark.org/review/10744
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-10-08 04:08:55 +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
Roland Knall 6aabad5b33 epl: Fix Payload sub-dissection
Current implementation gives all remaining data to sub-dissector.
 This is not correct, as with "Write Multiple by Index" the data
 given includes the following indeces and their datasets

Change-Id: I5343bf61431a7b5507b51f53f0de8c6e3dc72cf1
Reviewed-on: https://code.wireshark.org/review/9870
Reviewed-by: Roland Knall <rknall@gmail.com>
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>
2015-08-05 20:46:27 +00:00
Alexis La Goutte 3413ddf6cb EPL: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Id8fac193a2f3521986c0f91df84950ff581d4b6b
Reviewed-on: https://code.wireshark.org/review/9790
Reviewed-by: Roland Knall <rknall@gmail.com>
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-04 15:32:49 +00:00
Christoph Schlosser b191f7e3da epl: Fix epl write multiple parameter by index
Instead of interpreting the OD Index and OD Subindex as abort code now the
 correct offset is applied and the abort code is correctly evaluated.

Change-Id: Ic70e755d835c5f62f6cff8a8848a33ee8758faf4
Reviewed-on: https://code.wireshark.org/review/9736
Reviewed-by: Christoph Schlosser <christoph.schlosser@yahoo.de>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-23 15:56:41 +00:00
Peter Wu ba9aa3015f Split more init routines into init/cleanup functions
This patch is partially automatically generated, but are modified
manually. In particular, assignments and function calls have been
audited.

Some debugging comments and ifdef'd prints have been removed. The
lookup tables of the dcm and sip dissectors are now cleared. It is only
called on reopening files anyway.

The isakmp dissector is modified to use g_hash_table_new_full for
destruction of its keys and values.

Fix a memleak in ipsec dissector when libgcrypt is not enabled.

Generated using
https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=3c6128ee266024d164650955f93c7740484abd68
(with AUDIT = True).

Change-Id: I3fd910bdee663842ac0196334fe0189b67e251b0
Reviewed-on: https://code.wireshark.org/review/9225
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:37:40 +00:00
Roland Knall a7a7c689bc epl: Set Payload to remaining bytes
The payload dissection now only includes the remaining bytes,
 even if the actual number of payload bytes should be bigger.

 An expert Info is added, to inform the user, that the trace was
 truncated, but the payload is still given to a sub-dissector,
 as it may contain valid information

Change-Id: Iefef78e7c7aed7f87e40875f345ff5debf364f3a
Reviewed-on: https://code.wireshark.org/review/9124
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-26 08:49:00 +00:00
Roland Knall 963db3ad1f epl: Add config option for dupl. cmd layer
Allow the command layer to be shown for duplicated frames
 if needed for deep-packet analysis

Change-Id: I2e0026b6e448ebfd96f879f2f002a6f30a0a5031
Reviewed-on: https://code.wireshark.org/review/8874
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-10 12:44:52 +00:00