Commit Graph

170 Commits

Author SHA1 Message Date
Michael Mann 1474f49f19 new_register_dissector -> register_dissector for remaining uses.
Mostly plugins, but also LUA and generated skinny dissector.

Change-Id: Ifeb4205442f9a60875266b4e82841ff38b4fdb63
Reviewed-on: https://code.wireshark.org/review/12515
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-11 03:42:37 +00:00
Michael Mann 3606f80d9e Officially remove tvb_get_string and tvb_get_stringz.
Almost all replacements were done awhile ago, just put the final nail in the coffin.

Change-Id: I0a708d886da5a500c2a1e2c9ee2736794bdb9411
Reviewed-on: https://code.wireshark.org/review/12206
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-27 05:11:25 +00:00
Michael Mann 10261d1202 Remove manual setting of pinfo->current_proto.
Calling a protocol dissection function will properly set/restore pinfo->current_proto, so there's no need to duplicate it.

Change-Id: Ic2ec0b35fa4d46a98f3410bf238056425076e4a9
Reviewed-on: https://code.wireshark.org/review/12205
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-27 05:00:37 +00:00
Graham Bloice eaac7de007 Developers Guide updates for plugins with CMake
Remove references to nmake, add references to CMake.

Change-Id: Iea2d2b2fbdbab131bae823d5d6a5306630a70347
Reviewed-on: https://code.wireshark.org/review/12079
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-24 06:04:57 +00:00
Michael Mann 159227a14b register_dissector -> new_register_dissector for plugins.
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: Ie98e071a7cb568c13c8958de56b1fc25a4ce2ce9
Reviewed-on: https://code.wireshark.org/review/11831
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14 21:54:39 +00:00
Gerald Combs b05803db4b CMake: Add /WX
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off,
similar to config.nmake.

We haven't compiled C++ code with -Wshorten-64-to-32 for quite 
some time so there's no need to add -Wno-shorten-64-to-32 in
ui/qt/CMakeLists.txt.

Additionally, squelch

----
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled
        with
        [
            _Iter=QList<QString>::iterator
,            _RanIt=QList<QString>::iterator
,            _Diff=int
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
----

in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp
so that we'll compile successfully.

Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357
Reviewed-on: https://code.wireshark.org/review/10533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 21:32:22 +00:00
Graham Bloice e280df605f Fix CMake warnings
Newer versions of CMake generate warnings about the use of
@variable@ references, replace @CPACK_PACKAGE_NAME@ with
${CPACK_PACKAGE_NAME}

Set the policy for CMP0026 to be old to squelch warnings about the
use of target LOCATION

Change-Id: I424083260c51875dde80f98a23d6528c31ff0aec
Reviewed-on: https://code.wireshark.org/review/7977
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-04-17 16:09:22 +00:00
Evan Huus 32d0fc0673 irda: remove tvb_length calls
Change-Id: I5ea9ed7226217ab272d957ae3240a286c6a26de9
Reviewed-on: https://code.wireshark.org/review/7912
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-05 12:27:34 +00:00
Gerald Combs 6e6a1291d0 CMake: Set an output directory for plugins.
Redefine PLUGIN_DIR similar to DATAFILE_DIR and use it on all
platforms. Add WiresharkPlugin.cmake so that we can start defining common
macros for plugins/*/CMakeLists.txt. Load plugins in out-of-tree builds.

Change-Id: I8c1359ed3cf8a71788b8320ff89dfe2d3969def2
Reviewed-on: https://code.wireshark.org/review/6640
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-20 16:12:20 +00:00
Graham Bloice 528a857258 Fix CMake generation and use of Windows .rc files
CMake now generates local copies of .rc files for all the Windows
components and uses the files in the build of the components.

The .rc.in files that include an icon were modified to allow the icon
path to be set by CMake.  The path is removed for nmake builds.

Updated build architecture detection, required for wireshark.manifest.in

Change-Id: I7b1ff43050e9b0efb861d1041636fb4aef49a4f8
Reviewed-on: https://code.wireshark.org/review/6482
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-01-11 20:22:32 +00:00
Bill Meier d245f38c12 packet-irda.c: Add editor modelines
Change-Id: I626b60a185e750af94306892cd41dc8729920cfd
Reviewed-on: https://code.wireshark.org/review/6393
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-08 01:52:56 +00:00
Bill Meier 5c529c95c5 Add '*.nativecodeanalysis.xml' to 'clean' targets
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6
Reviewed-on: https://code.wireshark.org/review/6220
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 01:45:16 +00:00
Bill Meier 998a84774b plugins: Cleanup #includes
Change-Id: Ic839f2995532d68308f8b5908c185acc7acaaa9c
Mostly: remove '#include <glib/glib.h>' and certain
         other #includes already included in packet.h
Reviewed-on: https://code.wireshark.org/review/5971
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-22 05:00:20 +00:00
Michael Mann e50095c600 Remove use of pinfo->private_data (which doesn't appear to be used anyway) and pass it as dissector data.
Some other minor cleanup while in the neighborhood.

Change-Id: I1b0c0567488fa350c14d21c5f5e4cb9746177af1
Reviewed-on: https://code.wireshark.org/review/5447
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-11-23 05:13:52 +00:00
Pascal Quantin f7f19f0291 IrDA: always initialize buffer before accessing it
Bug: 10716
Change-Id: I8e54f750b70076758d5fd0d7f35f9c782f5d0bf9
Reviewed-on: https://code.wireshark.org/review/5398
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-11-20 12:28:29 +00:00
Michael Mann 0ce3640cab Replace pinfo->circuit_id will passing data through functions.
Change-Id: I5b35ad57c5c40a1393cbc174384b8a275abd763c
Reviewed-on: https://code.wireshark.org/review/4903
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-22 05:00:19 +00:00
Gerald Combs bea24cfdad CMake: Bundle our plugins.
plugins/*/CMakeLists.txt has a lot of repitition. We might want to
create a module or include file to simplify things.

Change-Id: Iadd453c286a4127beacd80edf6dc200aa9148852
Reviewed-on: https://code.wireshark.org/review/4582
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-09 23:57:43 +00:00
Bill Meier 0111e46193 plugins: Add editor modelines; Adjust whitespace as needed.
Change-Id: I36124f6021d46a228721bdc976f6b9fef1c8c088
Reviewed-on: https://code.wireshark.org/review/4488
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 01:42:32 +00:00
Роман Донченко 4a3e62cd54 Don't show the echo/python command lines when making plugin.c
For consistency with epan/dissectors/Makefile.am. Also, remove the
"with python" parts, since that's the only option now.

Change-Id: I761e1bf7995c1cc1ebd790013181fd6116b289a1
Reviewed-on: https://code.wireshark.org/review/3925
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-08-31 22:14:54 +00:00
Роман Донченко 549f5c401c Remove obsolete comments regarding the shell version of make-dissector-reg
Change-Id: I93470e8c6e9afd6c1ebf735eb13141586964be0e
Reviewed-on: https://code.wireshark.org/review/3818
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-24 20:45:26 +00:00
Joerg Mayer 65ac652a07 Remove make-dissector-reg and require python for autotool builds as well
Change-Id: I6239063a08ba37199a4e95302a3650a80544c750
Reviewed-on: https://code.wireshark.org/review/3562
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-08-12 21:31:34 +00:00
Роман Донченко dc748b1e7f Now that Python is mandatory on Windows, remove checks for it from nmakefiles
Change-Id: I2ca6abb372ec4bda0af1aa40089082533a61df3a
Reviewed-on: https://code.wireshark.org/review/3392
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-09 20:23:39 +00:00
Роман Донченко afa8f21f56 make-dissectors-reg: optimize by factoring out the loops
Instead of calling the grep/sed pipelines for each file, build the
list of files in the beginning and call each pipeline only once,
passing the list to the first grep.

This results in a massive speedup in Cygwin; in my test, the time
it takes to run make-dissector-reg . dissectors packet-*.c in dissectors/epan
is reduced from ~116 to ~3 seconds. I also tried it on NetBSD, where
the time do to the same goes from ~6 to ~0.5 seconds.

Amend makefile comments to elide mentions of invoking multiple processes
per file.

Change-Id: Iad441e7d2b6cc3669dada57646e2f8f6b987fd34
Reviewed-on: https://code.wireshark.org/review/2826
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:08:20 +00:00
Peter Wu 16f8ba1bed catapult,irda: Fix ASAN crashes due to buffer underrun
The catapult dissector tripped on this random file I had. A quick look
at other dissectors which use a construct like "-1] *= '*\\[rn]" showed
packet-irda too, so fix that as well.

Change-Id: I4b5fadcacd0b09d0fb29bdefc3dd1f28aef9b593
Reviewed-on: https://code.wireshark.org/review/2802
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-03 13:02:24 +00:00
Joerg Mayer c11ae8ac82 Add .rc files to the sources to have them included in the build
Change-Id: I84dda519e617b24d92fcf374670a4a6ee6f488ee
Reviewed-on: https://code.wireshark.org/review/2506
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-20 23:58:22 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Stig Bjørlykke bd38b3152d Support out-of-source checkapi
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.

Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 04:23:46 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +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
Anders Broman 451c30ef81 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54528
2014-01-01 12:17:57 +00:00
Anders Broman d0915cabb3 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54473
2013-12-27 10:49:35 +00:00
Jakub Zawadzki 82e2675f45 Avoid including <wiretap/wtap.h> in dissectors.
svn path=/trunk/; revision=53655
2013-11-29 20:53:00 +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
Graham Bloice 9c4ee86784 Add CMake properties to targets so that they are logically organised when using a Visual Studio solution.
Add CMake properties to group the source files in epan into logical blocks when using a Visual Studio solution.

svn path=/trunk/; revision=52580
2013-10-13 09:21:55 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Pascal Quantin 953c6fed13 emem -> wmem
svn path=/trunk/; revision=52130
2013-09-17 21:34:05 +00:00
Evan Huus 53c6595bd9 Add our license header to plugin moduleinfo.h files. Cleans up a batch of
licensecheck warnings.

svn path=/trunk/; revision=50407
2013-07-06 13:31:31 +00:00
Evan Huus d0bd2097f0 Fix another dozen or so files with bad FSF addresses as caught by licensecheck.
svn path=/trunk/; revision=48869
2013-04-16 00:00:09 +00:00
Bill Meier 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Bill Meier f784806968 Comment out numerous unused hf_.... instances found by checkhf.
svn path=/trunk/; revision=47617
2013-02-10 20:52:21 +00:00
Guy Harris e30d2b5001 Make the other plugin makefiles use the new style introduced in the MATE
makefiles.

svn path=/trunk/; revision=47579
2013-02-09 05:31:15 +00:00
Michael Mann 86d690880f replace "unsigned" datatype with "guint". Some mpeg files needed "unsigned int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825)

svn path=/trunk/; revision=46928
2013-01-04 05:22:43 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 3d4b3f2784 Set Makefile.common as a plugin.c dependency so plugin.c is rebuilt if Makefile.common is changed
svn path=/trunk/; revision=42972
2012-06-01 14:44:35 +00:00
Bill Meier 1caa79ad80 Windows: Set Makefile.common as a plugin.c dependency so plugin.c is rebuilt if Makefile.common is changed
ToDo: ditto for Makefile.am ?

svn path=/trunk/; revision=42971
2012-06-01 14:08:12 +00:00
Jeff Morriss 6aa32cb03a As suggested in http://www.wireshark.org/lists/wireshark-dev/201204/msg00062.html :
Don't use ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN with ENC_ASCII: ASCII has no
endianism, so ENC_NA is more appropriate.

svn path=/trunk/; revision=42300
2012-04-27 19:45:35 +00:00