Commit Graph

88 Commits

Author SHA1 Message Date
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
Josef Baumgartner addf8f6012 epl: Add support for AMNI frame
The "EPSG Draft Standard 302-A: High Availability" introduces
the new frame "AMNI". This change adds support to correctly
dissect POWERLINK AMNI frames.

Change-Id: I9e402423296c4e82a25e897de964629bb695d566
Reviewed-on: https://code.wireshark.org/review/8215
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-04-28 09:51:21 +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
Roland Knall c0c2b45544 epl: Add Manufacturer subdissector
Allow manufacturer specific plugins, which will only
 be called for certain service IDs which are manufacturer
 specific as defined by the POWERLINK specification.

 As with e.g. udp.port, a plugin or subdissector may
 register with epl.asnd and a given service ID to implement
 a plugin for specific ASND Service IDs, which are part
 of the manufacturer specific object range (0xA0-0xFE).

 Also, all values for the ID fields have been changed to
 range_string

Change-Id: Ibfb9c035c16bce5322b13c42f30daf14e096712a
Reviewed-on: https://code.wireshark.org/review/6793
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 07:56:43 +00:00
Josef Baumgartner f90a10a0d5 epl: Rework POWERLINK (EPL) dissector
With this patch we want to enable a better support of POWERLINK
 as a protocol for people who have to perform network diagnostics using
 analyzing tools. Up until now, the main tool used was Omnipeek.
 Now wireshark will be used more and more, due to the new extcap
 infrastructure, which supports debug tools to be added as capture
 devices.

 To better facilitate that change, we have adapted the textual
 representation of the Omnipeek dissector for POWERLINK, as it
 allows for a faster and simpler diagnosis routine.

 Additionally the name of the protocol has been changed to it's
 correct name "POWERLINK" as this is the official name used by
 EPSG for describing the protocol.

Changelog:
 - Add error code definitions and string values.
 - Change name for protocol column to POWERLINK which is more commonly
   used than EPL.
 - Reformat output in info column to look like output the output of
   the POWERLINK plugin for Omnipeek. This facilitates the transition
   to Wireshark. The added information and changed output improves the
   debugging of POWERLINK nerworks.

Change-Id: I795e2487f2ae7af6b90c29366a1843c9fabffa85
Reviewed-on: https://code.wireshark.org/review/5581
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-19 07:18:48 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
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-21 05:46:22 +00:00
Guy Harris 2b006ad30e Have a heur_dissector_list_t be an opaque handle.
This allows dissector lists to be looked up by name, so they can be
shared by multiple dissectors.

(This means that there's no "udplite" heuristic dissector list, but
there shouldn't be one - protocols can run atop UDP or UDPLite equally
well, and they share a port namespace and uint dissector table, so they
should share a heuristic dissector table as well.)

Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7
Reviewed-on: https://code.wireshark.org/review/5936
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 04:14:24 +00:00
Bill Meier 94d7e8d838 Use ENC_LITTLE_ENDIAN when fetching FT_U?INT8 fields ...
(for some dissectors which fetch all other integral fields using
   ENC_LITTLE_ENDIAN).

Change-Id: Ica72a68ac560f2920d61e0769de83130557c46fd
Reviewed-on: https://code.wireshark.org/review/5752
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13 21:58:59 +00:00
Michael Mann 4f9af8608c Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
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-12-01 08:52:03 +00:00
Alexis La Goutte 5e932ada7b EPL: fix warning: no previous prototype for function ... [-Wmissing-prototypes]
Change-Id: I40de0c8c2bd40f18a33947367fdeec5a22a3093a
Reviewed-on: https://code.wireshark.org/review/5414
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-20 21:28:53 +00:00
Lukas Emersberger 9cc9028e36 epl: Duplicated Frames
Remake of the duplicated frames filter with
  less memory usage.

Change-Id: I7c8694b5ae69c919b866bbc661bad5e3f0a3e1d7
Reviewed-on: https://code.wireshark.org/review/4773
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-14 00:44:40 +00:00
Lukas Emersberger b5dead8e60 epl: Reassembly table fix
Fixed an error that retransmitted frames were added to the
 reassembly table.

Change-Id: I314412cb8f2ce49142e4b7f001613948f5e03bf6
Reviewed-on: https://code.wireshark.org/review/4916
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-07 03:52:03 +00:00
Alexis La Goutte 249d075cdd EPL: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I88b90302df0202d38b7c089cf243e7860766e653
Reviewed-on: https://code.wireshark.org/review/4464
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 20:34:39 +00:00
Lukas Emersberger 526259159a epl: FIX PDO_Mapping
The subindex of the R/TPDO frames was interpreted false.
  Now the subindex is correctly interpreted.

  ASend SDO Write Multiple Parameter by Index interpreted
  the mapping data false.

Change-Id: Icfb1896e96f5486c5479c1dd060eb1032695f9f6
Reviewed-on: https://code.wireshark.org/review/4397
Reviewed-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-02 21:09:46 +00:00
Bill Meier cc286bad25 Various minor changes:
- Create/use some extended value_strings
- Remove unneeded #includes;
- Do whitespace changes;
- Add editor modelines.

Change-Id: I2e1ea37dddfd5e8656c90c0d45a6596c4912bb2c
Reviewed-on: https://code.wireshark.org/review/4065
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-10 16:17:29 +00:00
Roland Knall f93c53efcb EPL: Fix offset calculation
The offset was calculated too high, as it was added
 to itself and sizes were added multiple times

Change-Id: I1a581e96e2ab66e40f5566074e8bd1089f55bdb0
Reviewed-on: https://code.wireshark.org/review/4049
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-09 20:00:03 +00:00
Bill Meier 93cc6f004f Fix some spelling & grammar.
Change-Id: Iedeaa411caa0823922dd79c27897a2349d4e6907
Reviewed-on: https://code.wireshark.org/review/4054
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-09 19:43:27 +00:00
Evan Huus d786ed8e5d Remove unused variable
Change-Id: I590d4c2d79ee44309cd512057c7eae6df15913e9
Reviewed-on: https://code.wireshark.org/review/3240
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:56:02 +00:00
Lukas Emersberger eece1c521d EPL: Fix for Write Multiple by index
Write multiple by index now correctly resolves OD names.

Change-Id: I4d2aad584a47e3682716b95bdda0bc49c3a29d96
Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Reviewed-on: https://code.wireshark.org/review/3223
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Lukas Emersberger <lukas.emersberger@br-automation.co.at>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:49:12 +00:00
Michael Mann f7987091ba convert to proto_tree_add_subtree[_format]
Change-Id: I525ac2aae2bdbfd5f3a2f3b35f1bf10dde053f66
Reviewed-on: https://code.wireshark.org/review/2667
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-26 11:41:10 +00:00
AndersBroman c44c15363f Try to please the OSX build bot
Change-Id: I4c7d5c6b91df2baae74f6970d0e333346be47238
Reviewed-on: https://code.wireshark.org/review/1944
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-04 07:27:16 +00:00
Roland Knall f0cf649b32 EPL: Reassemble the splitted payload
The data that is sent when downloading or uploading from a server is
  sent in segments to the client.To clearly display all the segments
  belonging together the splitted payload needs to be reassembled.

  The behaviour is described in the powerlink specification 301 v1.2.0
  chapter 6.3.2.4.1.1 Download Protocol and chapter 6.3.2.4.2 Upload
  Protocol. The payload of the download/upload is now reassembled.

Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Change-Id: I17c30f15e75da47bcaba8f1fda1e412849ec268c
Reviewed-on: https://code.wireshark.org/review/1120
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-04 06:14:44 +00:00
Lukas Emersberger 75531b6a40 EPL: Duplicated frames
The MN interprets the CMD layer data only if the CN increments
  the Send-Sequence-Counter => new data. The MN interprets the
  data only once, if the same frame is sent again the MN ignores
  the data.

  The behaviour is described in the powerlink specification 301 v1.2.0
  chapter 6.3.2.3.2.3 Error: Duplication of Frame
  Frames which duplicate previous sent data are now marked as
  duplicated frames.

Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Change-Id: I9ef24b52712bfd3c735856b0cd5747c47aeef72a
Reviewed-on: https://code.wireshark.org/review/992
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-30 13:16:46 +00:00
AndersBroman 2cfda31ff0 Change the signature of dissector_try_heuristic() to return hdtbl_entry
which can be used to call the found heuristic dissector on the next pass.

Introduce call_heur_dissector_direct() to be used to call a heuristic
dissector which accepted the frame on the first pass.

Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582
Reviewed-on: https://code.wireshark.org/review/1697
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21 20:17:29 +00:00
AndersBroman c68769765c Fix no previous prototype warnings.
Change-Id: I859597ebc957a58f659800ef63318f94e80feabf
Reviewed-on: https://code.wireshark.org/review/1104
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-14 12:50:31 +00:00
Guy Harris 172f5cd280 Sort the values in value_strings that we'll treat as extended.
This squelches a run-time warning.

Change-Id: I5b147530b7f9255c3564fe24b56e0ea3eab45852
Reviewed-on: https://code.wireshark.org/review/995
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-07 23:07:35 +00:00
Alexis La Goutte 49be990fd3 Make Mac OS X buildbot happy (fix index shadow variable)
packet-epl.c:2248: warning: declaration of 'index' shadows a global declaration
packet-epl.c: In function 'dissect_epl_sdo_command_write_multiple_by_index':
packet-epl.c:2380: warning: declaration of 'index' shadows a global declaration
packet-epl.c: In function 'dissect_epl_sdo_command_read_by_index':
packet-epl.c:2489: warning: declaration of 'index' shadows a global declaration

Change-Id: Ib1a1d1d2aa596df558162839e7594b7fd12559a3
Reviewed-on: https://code.wireshark.org/review/765
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-21 15:31:08 +00:00
Lukas Emersberger e0556fa47f EPL: Enable PLK to display OD entries
Each package is dissected using a reference to object indeces, so
  that in the view of the dissector output, a clear indication
  to what the index means and what the subindices mean is given.
  Additional special entries (mappings, timestamps) have their own hf
  fields, and can be searched for via display filter.

Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Change-Id: I928c11a9f4a5b762c8947713a0f70e03bd711158
Reviewed-on: https://code.wireshark.org/review/730
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Lukas Emersberger <lukas.emersberger@br-automation.co.at>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-21 14:39:31 +00:00
Roland Knall 0940595a98 openSAFETY, EPL: Fix heuristic for false-positives
- Adding a typedefinition which can be deactivated, so
   that certain types of frames are only detected in their
   respective transport protocols
 - Rename bytes array as it is a key-word for some IDEs and
   hinders syntax checking
 - Add node info to the time request from/by fields
 - EPL: add message type to heuristic dissection call

Change-Id: Ia572bb68fc1d24d70e72b77867f0dad323b055b9
Reviewed-on: https://code.wireshark.org/review/750
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-21 05:17:05 +00:00
Lukas Emersberger c45a15f211 EPL: Support SyncReq and SyncResp Frames
- For PollResponse-Chaining SyncReq and SyncResp frames were introduced.
    Those frame-types are not recognized by Wireshark yet.

  - Currently only the FeatureFlags 0-13 where interpreted by Wireshark.
    Flags 14-15 and all extended flags where missing.

    14 = SDO Read/Write All by Index
    15 = SDO Read/Write Multiple Parameter by Index
    16 = Multiple-ASend Support (TRUE = Device supports Multiple-ASend; FALSE = Device doesn’t support Multiple-ASend)
    17 = Ring Redundancy (TRUE = MN supports ring redundancy; FALSE = MN does not support ring redundancy)
    18 = PResChaining (TRUE = Device supports PResChaining; FALSE = Device does not support PResChaining)
    19 = Multiple PReq/PRes (TRUE = Device supports Multiple PReq/PRes; FALSE = Device does not support Multiple PReq/PRes)
    20 = Dynamic Node Allocation (TRUE = Device supports DNA; FALSE = Device does not support DNA)

Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Change-Id: I9ac19f8b71b1be1094f410141c0f806996b1cb25
Reviewed-on: https://code.wireshark.org/review/589
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-11 09:24:15 +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
Roland Knall 95190e4bd6 EPL + openSAFETY: Better handling of guint in EPL
This is a permanent solution for bug #9786. guint overflows
 are now prevented, and the remaining length is queried from
 tvb and taken into consideration.

 As a side-effect, the fix brought up two bugs in the openSAFETY
 dissector, which where fixed as well.

 Upd: Remove stdio.h and fix one encoding error found by
 fix-encoding-args.pl

Change-Id: Ic2d478a8ea15b0bcfd2536a074c217daf610fe08
Reviewed-on: https://code.wireshark.org/review/291
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-21 16:45:31 +00:00
Martin Kaiser 9e00e02598 fix endless loop
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9786

Change-Id: I336f2bcc14596d64ad2e3f3e8140269996e077f5
Reviewed-on: https://code.wireshark.org/review/260
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-02-19 22:18:05 +00:00
Roland Knall 627069c20c openSAFETY: Reduce overload and display gap data
Up until now, openSAFETY hooked into a heuristic filter for epl
 and dissected the whole package, handing back some epl header
 information by calling epl again. This was time-consuming and
 on a busy network led to an increase in dropped packages and
 memory usage, as well as unresponsivness.

 This patch only takes the payload data of epl frames, and
 therefore greatly reduces the dissection overhead of openSAFETY.

 On a second note, intergap data between safety frames is now
 being displayed as Data, but only if the option for doing so
 is specifically enabled in the openSAFETY preferences, as it
 changes the behaviour of the dissector output.

 Upd: Because of the gap handling, some frames where marked
 as being truncated, although they were not, or did not contain
 openSAFETY frames at all. In the course of the fix for this,
 the byte copying for the byte swap with MBTCP has been moved
 to only occur when needed, and is additionaly guarded.

 Upd2: Identation and comment fixes

 Upd3: Change memcpy to memdup and move find_dissector ( "data" )
 to proto_reg_handoff

PLK: Store data dissector pointer

 Move the if-clause to proto_reg_handoff as documented
 in comment of Change-id: 191

Change-Id: I3038ed465900a2b5e63b3a0967abd62a4c66f318
Reviewed-on: https://code.wireshark.org/review/191
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-14 16:12:22 +00:00
Roland Knall 96583cdf3e Powerlink: New heuristic payload dissection
Up until now, the heuristic dissector for epl allways passed the
 complete epl frame. Therefore a lot of information got passed,
 which was not needed, resulting in subdissectors to have to call
 the epl dissector again, if the epl data had to be dissected.

 This patch adds a second heuristic dissector (not breaking the
 way, the existing one is working), which only passes the payload
 of the epl frame to a sub-dissector, therefore reducing memory
 overhead and increasing dissection speed.

 Upd: Changes according to comments in patchset

Change-Id: I2ef309310f421f24d96dd1c188e188ccfa5935cd
Reviewed-on: https://code.wireshark.org/review/190
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-13 22:12:43 +00:00
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Michael Mann 9fa6c9fb80 Create new dissectors when a protocol goes across ethernet and "something else" instead a single dissector that uses pinfo->ethertype to determine if it's the "ethernet" or the "something else" case.
svn path=/trunk/; revision=53488
2013-11-21 19:51:17 +00:00
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

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


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +00:00
Michael Mann b752cfa88d Correct source code formatting. Bug 9146 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9146)
From Roland Knall

svn path=/trunk/; revision=52691
2013-10-19 16:50:52 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Michael Mann cf80442912 Convert some proto_tree_add_string_format calls to something more appropriate.
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)".  They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of  proto_tree_add_text.

svn path=/trunk/; revision=52296
2013-09-30 15:21:09 +00:00
Pascal Quantin e078770856 From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9047 :
EPL: Dissection for WriteMultipleParameter, Node Alias, SDO/ASND structuring

svn path=/trunk/; revision=52021
2013-09-13 19:27:53 +00:00
Jakub Zawadzki 5fa2a99087 Keep result of [new_]register_dissector in some dissectors.
svn path=/trunk/; revision=51156
2013-08-05 18:09:43 +00:00
Jörg Mayer 32b98e8524 Fix CID 1033205: Dead default in switch (DEADCODE)
svn path=/trunk/; revision=50030
2013-06-19 03:30:06 +00:00
Michael Mann 0f0c111119 Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49920
2013-06-14 01:02:11 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Bill Meier 7cd0417af5 Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402
2012-12-05 15:56:36 +00:00