Commit Graph

1696 Commits

Author SHA1 Message Date
Pascal Quantin d61c3d592b asn2wrs.py: fix path substitution when generating ASN.1 dissectors with CMake on Windows
Change-Id: I48e7d48544274f27d276e7128f8d2a2727c0b9cd
Reviewed-on: https://code.wireshark.org/review/12031
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-22 11:30:54 +00:00
Graham Bloice a648921027 Fix Windows hardening check (x64)
Fix the x64 ones missed on commit f1efeb1eba

Change-Id: Iec432c81511c64145711052bb29f6484c6c1c5b1
Reviewed-on: https://code.wireshark.org/review/12020
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-11-21 22:43:46 +00:00
Graham Bloice f1efeb1eba Fix Windows hardening check
The hardening check runs on all binaries and quite a few third party binaries
are not hardened, thus leading to a warning on the buildslave.
The change reduces the noise by not counting the binaries that are known to be
"soft".  They are still printed in the output though, for reference.

Also fixed the search directory passed to the script.

Change-Id: I1619066c687c9ba934ab38fccbbf2011108328e4
Reviewed-on: https://code.wireshark.org/review/12016
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-11-21 18:20:55 +00:00
João Valverde 67d9daa65b autotools: Fix extra-compiler-warnings for system headers
Use -isystem instead of -I for external headers with GCC/clang to squash
all the noise.

cmake already uses -isystem by default for supported platforms/compilers.

Change-Id: Ia6c9d1eb9b894fda6f48c531094d792e16fd39fc
Reviewed-on: https://code.wireshark.org/review/11947
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-21 13:50:54 +00:00
Balint Reczey c297df134b More spelling fixes found by lintian
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56
Reviewed-on: https://code.wireshark.org/review/11946
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Diederik de Groot <dkgroot@talon.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-20 05:47:29 +00:00
João Valverde 2d7b0fc7d0 [GTK] Replace deprecated gdk_pixbuf_new_from_inline()
Use GResource instead, if available. Add autotools and cmake compile time
checks for build requirements (GIO >= 2.32 and GDK-Pixbuf >= 2.26).

Merge all the various static pixbuf csource header files into
a single pixbuf-csource.h header with external linkage through use of the
tools/make-pixbuf-csource.pl script.

Fix inline pixbuf build target for some image paths (broken for GTK
in gb4a4de7).

Add missing 'expert_ok.png' file to distribution (GTK only).

Minor improvements to style/structure of ui/gtk/Makefile.am.

Bug: 10750
Change-Id: I031296b666ee8b92730400dfa6f71f9ee4304863
Reviewed-on: https://code.wireshark.org/review/10992
Petri-Dish: Anders Broman <a.broman58@gmail.com>
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>
2015-11-12 07:14:32 +00:00
Pascal Quantin 978d7a8f05 Update user guide for upcoming 2.0 release
Change-Id: Id27365d6bd7085f498edd78111d85de0fbd0abd3
Reviewed-on: https://code.wireshark.org/review/11738
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-11 18:00:31 +00:00
Gerald Combs 0d497e8125 Initial Sysdig syscall (event) support.
Add a dissector for reading Sysdig event blocks. It only handles plain
events but it's usable for reading trace files on hand here.

Use a script to generate various parts of the dissector. As an experiment,
update parts in-place instead of using a template.

Ultimately there should probably be a top-level "Syscall" or "Event"
dissector alongside the "Frame" dissector, which could then call this.
You could then directly compare an executable's system calls alongside
its network traffic.

For now leverage the pcapng_block dissector and keep everything under
"Frame".

Next steps:
- Items listed at the top of packet-sysdig-event.c.

Change-Id: I17077e8d7f40d10a946d61189ebc077d81c4da37
Reviewed-on: https://code.wireshark.org/review/11103
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-10 20:59:53 +00:00
Jeff Morriss 630ccbe2d7 Make the dfilter time tests work regardless of what time zone the tests are
being run in.

Do this by forcing the time zone to be UTC (by modifying the environment).

Change-Id: I13c47deada82b55a464006f9c3cc60115b2e4f20
Reviewed-on: https://code.wireshark.org/review/11378
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-10 09:04:48 +00:00
Stefan Metzmacher 4f04a3cc31 tools/pidl: avoid trailing tabs
Change-Id: I293dd6f2d7ff3b0e27bc3cc49e69977604f12260
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/11433
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-01 09:00:13 +00:00
Gerald Combs 5ab8b8d793 Remove build-qt-sdk.bat.
The buildbots have been using pre-built packages from The Qt Company for
a while now and it's unlikely we'll have to compile our own in the future.

Change-Id: Iee93ab05af46f40585256f991b176392f018727a
Reviewed-on: https://code.wireshark.org/review/11449
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-30 18:31:18 +00:00
Gerald Combs ad1f7f4677 Explain why Get-HardenFlags currently fails.
Change-Id: I4a956b2479a482a9262e6e67f6c7611fad9dde84
Reviewed-on: https://code.wireshark.org/review/11448
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-30 18:31:00 +00:00
Jeff Morriss 7a78d4113e Add a few new negative dfilter tests.
For example, to ensure that "field = value" is not a valid dfilter (as was
recently a problem).

As suggested by Alexis.

Change-Id: Ibf498c30325579e3d5474bb2d397f1bbb9ffc07f
Reviewed-on: https://code.wireshark.org/review/11339
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-30 08:37:49 +00:00
Stefan Metzmacher 8c48529d3a tools/checkAPIs.pl: improve the hf_ error messages
Change-Id: Ie8132f317f2d1c27af83218c48874941bd3cc5d0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/11390
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-29 12:29:48 +00:00
Guy Harris ad52d7d83a Bail out immediately if we can't allocate a buffer for carving up $PATH.
Quit immediately, don't even bother allocating a buffer for the pathname
of the file we found.

Revert some other cosmetic changes, to reduce the differences between us
and upstream.

Change-Id: I217fecee64c7e6bac9272486d0cc334e192b501e
Reviewed-on: https://code.wireshark.org/review/11253
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-25 02:02:16 +00:00
Dario Lombardo 2d2b129493 lemon: move free() to avoid mem leak (CID 718529)
Change-Id: I3b0740f5ccc3b9b87ed351e26f198152bbb1e599
Reviewed-on: https://code.wireshark.org/review/10801
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-25 00:21:48 +00:00
Dario Lombardo 24b5300411 lemon: add free() to avoid mem leak (CID 1309088)
Change-Id: Id32864d324f72ffee9c1033f0f36a79eb2651334
Reviewed-on: https://code.wireshark.org/review/10797
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-24 16:48:09 +00:00
Alexis La Goutte 2b8caf31cc x11 generator: Fix indent (use always 4 spaces) and add modelines
Change-Id: I91739bb6f4acc4da060cf389ec288ee910965b2a
Reviewed-on: https://code.wireshark.org/review/11113
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-21 12:18:16 +00:00
Jeff Morriss 4a5977b587 X11 generator: avoid extraneous parens in conditionals.
This is to avoid complaints from clang of the form:

wireshark/epan/dissectors/x11-extension-implementation.h:17021:18: error:
equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
        if ((f_class_id == 0)) {
             ~~~~~~~~~~~^~~~

Change-Id: I91d629ad47677b71909d7da517c4a6198c276186
Reviewed-on: https://code.wireshark.org/review/11186
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-20 23:44:06 +00:00
Peter Harris 2bde91330a x11 generator: Support new XCB paramref
Change-Id: I8ae38785bd0f2f81fa2164b5bc29274bd7e940f5
Reviewed-on: https://code.wireshark.org/review/11105
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-10-19 18:24:50 +00:00
Peter Harris 4ff02903a6 x11 generator: Don't crash when a switch is in a struct
The size calculation for the struct will be wrong (too small) which looks
strange in the GUI when the children elements extend past the region
marked by their parent. But it doesn't seem to cause any actual problems,
there is only one request affected by this, and correct size calculation
(by recursing the switch) would take a fair amount of work.

Change-Id: I1847f736153daf59b8dbf3299005a772ffe9673a
Reviewed-on: https://code.wireshark.org/review/11107
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-10-19 14:52:21 +00:00
Peter Harris 0f2eb385f0 x11 generator: Fix struct size with array
my $count here shadows my $count in the outer scope, preventing the size
of constant sized arrays from being calculated correctly.

Change-Id: I89c989ee2d288d4828871ebab650807fbde747dd
Reviewed-on: https://code.wireshark.org/review/11106
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-10-19 14:52:01 +00:00
Peter Harris 31b627fc82 x11 generator: Allow perl 5.20 and newer
Despite promises from the Perl maintainers to remove or at least
drastically change given/when and smartmatch, that still hasn't happened
as of 5.22.

We can cross that bridge when we come to it. Until then, assume they're
never going to break given/when.

Change-Id: If9270bd6fd819d24c58f31f2dfe0d88e831b19fe
Reviewed-on: https://code.wireshark.org/review/11104
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-10-19 14:48:37 +00:00
Jeff Morriss a9fa699d1e x11 generator: some blacklisted structs are now used.
Also, die more gracefully than:

    Can't use string ("1") as a HASH ref while "strict refs" in use at
    ../../tools/process-x11-xcb.pl line 675.
    at ../../tools/process-x11-xcb.pl line 1859
    at ../../tools/process-x11-xcb.pl line 1859

when blacklisted (previously unused) structures start being used in the
xcbproto source.

(It's still not possible to regenerate the X11 dissector but this is a step...)

Change-Id: I1dec16a7a479d5f453c5f54e561aa8238eb21280
Reviewed-on: https://code.wireshark.org/review/10972
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-10-19 14:47:04 +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
Gerald Combs 71398e26f7 Add OUI-28 to make-manuf.
Change-Id: I95b9a4422dab6efbc2d94be49aba5f42784ff3e8
Reviewed-on: https://code.wireshark.org/review/11064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 18:43:20 +00:00
Gerald Combs b212a4eb43 Add missing CMake files to the tarball.
Make sure we can build from the tarball using CMake. Tested on Windows.

Change-Id: Iffc1ac964279e573aa2a8280b9bb4e799f10a974
Reviewed-on: https://code.wireshark.org/review/11066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-15 21:07:40 +00:00
Pascal Quantin 7d252d4b55 Add USBPcap 1.1.0.0-g794bf26 to Windows installer
Change-Id: Idb88cd41436e49b7a29bd4a8e896c92d8489318d
Reviewed-on: https://code.wireshark.org/review/10868
Reviewed-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: Anders Broman <a.broman58@gmail.com>
2015-10-08 04:18:39 +00:00
Pascal Quantin 1a949ba87b NCP2222: change ncp.nds_return_all_classes filter type from FT_STRING to FT_UINT32
Otherwise a call to proto_tree_add_uint_format_value will trigger an assert

Bug: 11550
Change-Id: Ic30b07a424cd94b861cee8999b91154ceeb72469
Reviewed-on: https://code.wireshark.org/review/10689
Reviewed-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: Michael Mann <mmann78@netscape.net>
2015-09-29 21:48:42 +00:00
Michael Mann a9445a4d36 idl2wrs: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
It looks like "items" could have contributed to fields/data being at an incorrect level off of a tree.

Change-Id: I93616ef8b6b364c578f989882045dee42cb6d3c3
Reviewed-on: https://code.wireshark.org/review/8558
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: 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-09-28 20:11:05 +00:00
Michael Mann 3b04a89828 ncp2222: Use BASE_CUSTOM for date and time fields.
This simplifies some of the logic required for field formatting.

Change-Id: I2f9a612b18e3e4ca01311683d9cf61cbad9950f4
Reviewed-on: https://code.wireshark.org/review/10649
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: 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-09-25 20:20:44 +00:00
Michael Mann a4a453b13d Convert dissect_nds_request and dissect_nds_reply to use proto_tree_add_xxx directly instead of the homegrown nds_val.
Change-Id: Ie67892caec2cddee591631045233f8a3f1cc0bc6
Reviewed-on: https://code.wireshark.org/review/10648
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-25 20:20:34 +00:00
Gerald Combs ff1dbba6ec CMake: Add a hardening-check target.
On Windows, add a hardening-check target which checks for DYNAMICBASE
and NXCOMPAT using the PowerShell script Get-HardenFlags.ps1.
For a Visual Studio solution, run the check by calling:

    msbuild /m /p:Configuration=RelWithDebInfo hardening-check.vcxproj

using the config as appropriate for your build.

Otherwise if we find the Debian/Fedora hardening-check script add a
target which runs it for each of our executables.

Change-Id: I62263e81d155c66e8c8edc751ffab535bf9f3b96
Reviewed-on: https://code.wireshark.org/review/10641
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-25 20:04:42 +00:00
Michael Mann ea2fcb552c Refactor NCP Python data so that INFO column can be generated on the fly (TAKE 2)
The "old" method of populating the INFO column was to dissect all fields of a function/subfunction, then do a search in the tree to find the hf_ values of interest to then format into something for the INFO column.  This is very expensive and requires "low level" APIs (for tree manipulation) which really shouldn't be used in a dissector.

The "new" method populates the INFO column at the same time a field is parsed, so nothing has to be revisited (and allows for more fields to be displayed on some malformed packets).

There are still expert infos (and possibly column APIs) under if (tree)s, but I'm not sure how FAKE_TREE_IS_VISIBLE factors into that.  Removing the FAKE_TREE_IS_VISIBLE seems to negatively affect dissection.

Change-Id: Ie487e851c2f6558dd12f0c7010757b4a5f36226b
Reviewed-on: https://code.wireshark.org/review/10631
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-25 11:36:41 +00:00
Michael Mann 961e0c0a25 Revert "Refactor NCP Python data so that INFO column can be generated on the fly."
This reverts commit 38b6f306a7.

Change-Id: I6ec83b94811be7699880e9a741c68faaac175bd0
Reviewed-on: https://code.wireshark.org/review/10613
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-22 20:06:12 +00:00
Michael Mann e2735ecfdd Remove proto_tree_add_text API.
Its time has finally come.

Technically I just renamed it to proto_tree_add_text_internal and removed the WS_DLL_PUBLIC (so it shouldn't link outside of epan).  It's still (legitimately) used by expert.c otherwise I would have made it static within proto.c (and the rename wouldn't have been necessary).

Change-Id: I9bdf888d5e92bc7b70a3f5461b9297a66d994b80
Reviewed-on: https://code.wireshark.org/review/10594
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-09-21 14:11:43 +00:00
Michael Mann 38b6f306a7 Refactor NCP Python data so that INFO column can be generated on the fly.
The "old" method of populating the INFO column was to dissect all fields of a function/subfunction, then do a search in the tree to find the hf_ values of interest to then format into something for the INFO column.  This is very expensive and requires "low level" APIs (for tree manipulation) which really shouldn't be used in a dissector.

The "new" method populates the INFO column at the same time a field is parsed, so nothing has to be revisited.

There are still expert infos (and possibly column APIs) under if (tree)s, but with the FAKE_TREE_IS_VISIBLE "hacks" removed, there should be less fear in removing the tree checks.

Change-Id: I847827395fc28704f468df8bc8b47b297dde8479
Reviewed-on: https://code.wireshark.org/review/10572
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-09-19 08:15:10 +00:00
Michael Mann 2758114e0a Some more ncp2222 improvements
Including:
1. Using ENC_BIG_ENDIAN and ENC_LITTLE_ENDIAN instead of self made macros

2. Creating an "expert info hook" so that fields can be parsed "in real time" and added as expert info instead of searching by field name and manually getting values.  Most of the expert info is still under if (tree)s, but this is another step closer to removing all of the "manual labor" done that requires "special handling" of all tree functionality.  Once the "manual labor" is removed, this dissector can behave like every other dissector and the if (tree)s can be removed with more abandon.

Change-Id: If2c6a4c723e12e070e68d6df2d492d4b5ac35123
Reviewed-on: https://code.wireshark.org/review/10555
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-19 08:13:05 +00:00
Michael Mann 6646b00b5f ncp2222 - Convert process_bitfield -> proto_tree_add_bitmask and other cleanup.
The dissector is doing a lot of unnecessary "manual" operations.  Start the process of simplifying that to encourage use of general APIs and put control of the "field name" in the hands of the hf_ entry it belongs with.

Change-Id: I5b048c04858ac4a846a276ba12d61c665deb66f8
Reviewed-on: https://code.wireshark.org/review/10547
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-17 18:24:09 +00:00
gmor1207@gmail.com 5395a42ae4 ncp2222 Updates
Modifications to ncp2222.py

Add absolute time values eptime for file/volume info
Add support for 64 bit File Transfer NCP's (22/54, 22/55, 22/56, 22/57, 22/58, 87/70, 87/71, 87/72, 87/73, 89/41, 123/35)
Fix numerous dissection errors in NWInfo and ExtNWInfo structures
Fix some indention (white space) in source

Modifications to packet-ncp2222.inc
Change seq count rollover value to 16 instead of 255 to make it more robust
Add ncp 87,72 reply
Add ncp 8x20 request
Fix ncp 8x20 reply

Change-Id: I80bdcc5854c02edd4ea51c74aa0bbc9c0e062bc1
Reviewed-on: https://code.wireshark.org/review/10017
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-15 06:29:04 +00:00
Diederik de Groot cf49f71c59 dissector-skinny: Update skinny dissector to fix ServerRes Message
ServerRes message does not follow other message when it comes to
provinding the list of ip-addresses. The type of ip-address (IPv4
or IPv6 does not depend on the protocol version but the length of
the message.

Fix: ipv4 address displayed as ip-address

Change-Id: Ie16f81c9482b30a80da37b9327b09e933d7808f8
Reviewed-on: https://code.wireshark.org/review/10513
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-13 19:24:00 +00:00
Michael Mann 722174359e Eliminate proto_tree_add_text from packet-ncp2222.inc
Change-Id: I551204d7546c05ab277bbb299a44b4625475d1a0
Reviewed-on: https://code.wireshark.org/review/10501
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-12 20:00:20 +00:00
Diederik de Groot 9e9506e068 dissector-skinny: Update skinny dissector to include new messages and enums
Some new firmware has come out for sccp devices which contains the use of
1 new message and some extended enums

Fix: UserToDeviceData was reusing the hf_skinny_data flag which had a side effect of showing the label as 'Statistics' which was incorrect.

Change-Id: I84f31f5f170dee075df64b5e7187f8742b6768af
Reviewed-on: https://code.wireshark.org/review/10483
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-12 13:49:20 +00:00
Peter Wu 28128ca41c tools/pre-commit: compare files instead of mtime
Instead of unconditionally checking for the file mtime, compare file
contents instead. Perform this check only for invocations via a hook.

While at it, simplify setting defaults for the git directory and the
commit identifier. Support executions via relative paths and update the
help messages on top of the file.

Change-Id: I89c015fe6553ad52e07795683dd88cb219a26ed2
Reviewed-on: https://code.wireshark.org/review/8923
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-08 11:01:18 +00:00
Pascal Quantin e9614ad7ba Windows: update GeoIP library to 1.6.6
Change-Id: I56f58e52fa39fdddd35bcc7ef6d96cfa4042892d
Reviewed-on: https://code.wireshark.org/review/10333
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-31 20:14:53 +00:00
Pascal Quantin 00087b4751 Add Lua 5.2.3 built with MSVC2015
Change-Id: I9b173f5136f858e4f95fb5b0688ef02c08a8d9e4
Reviewed-on: https://code.wireshark.org/review/10313
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-30 15:33:23 +00:00
Michael Mann 0af048b7e4 Remove calls of tvb_ensure_length_remaining.
The remaining calls seem to fall into 3 categories:
1. passing it to tvb_find_line_end when -1 (for length) will do.
2. duplicating the checking of tvb_reported_length_remaining, which is already in use near the tvb_ensure_length_remaining call.
3. Those that (probably) need tvb_ensure_capture_length_remaining

Change-Id: I1e77695251e055644bcbbb89f3c181c65d1671ca
Reviewed-on: https://code.wireshark.org/review/10268
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-08-27 04:34:10 +00:00
Michael Mann 0d61321f69 Correct logic for finding shadow variables.
Change-Id: Ide03c3b92f70d5dad8d0dceca179ea6f3b9e1fd6
Reviewed-on: https://code.wireshark.org/review/10037
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-22 12:31:06 +00:00
Alexis La Goutte 71e08dd0de lemonflex: fix warning: no previous prototype for 'df_scanner_*' [-Wmissing-prototypes]
lemonflex-tail.inc:44:1: warning: no previous prototype for 'df_scanner_text' [-Wmissing-prototypes]
lemonflex-tail.inc:50:1: warning: no previous prototype for 'df_scanner_file' [-Wmissing-prototypes]
lemonflex-tail.inc:59:1: warning: no previous prototype for 'df_scanner_cleanup' [-Wmissing-prototypes]

Change-Id: If0476b430592df225234c5c685c8009ab08b5ab6
Reviewed-on: https://code.wireshark.org/review/10162
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:51:54 +00:00
Jeff Morriss 300bb98049 Install GTK3 too.
It was in the list of packages but not in the final command line.

Change-Id: I361e660cc4ac91121314a3f8a7388b48fb2c61b7
Reviewed-on: https://code.wireshark.org/review/10081
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-08-17 20:53:58 +00:00
Anders 738cf424d6 Make building with MSVC2015 work
TODO:

- LUA is commented out probably needs to be built with MSVC 2015.
- GeoIP is commented out, causes packet-ip* to not build.
- Qt not built, needs Qt with MSVC 2015

Change-Id: I1658077931b89b9a22ee32e5ed7de38e07fb6a55
Reviewed-on: https://code.wireshark.org/review/8683
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-13 12:03:53 +00:00
Dario Lombardo 6087f2a260 fuzz-test.sh: added missing option in help.
Change-Id: I7651e18ec6e8338cddc82be90257c5f183804c7c
Reviewed-on: https://code.wireshark.org/review/10011
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-13 11:24:08 +00:00
Dario Lombardo 0b7d1611d0 editcap: add change offset.
This option skips some bytes when fuzzing, that prevents some headers from being changed. This focuses fuzzer to a smaller part of the packet.

Change-Id: I1db83235e93f2774a9991e3af70f633487b816fa
Reviewed-on: https://code.wireshark.org/review/9982
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-12 21:23:30 +00:00
Alexis La Goutte 9a16a693cf NCP2222.py : fix generate indent (use 4 spaces)
Change-Id: Ibe55260e837f0a839649675c08e1bf66d8bcdb52
Reviewed-on: https://code.wireshark.org/review/9924
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-08 14:26:17 +00:00
Evan Huus 08e80b1653 Skip files larger than 8MB in valgrind fuzzing
Follow-up to g2eabd35 which added a 20MB limit, this lowers it quite a bit since
we're still seeing out-of-memory failures with files slightly larger than 8MB.

Based on a quick scan of the menagerie this only excludes another dozen or so
files so we won't lose much coverage.

Ping-Bug: 11395
Change-Id: I8d684bebad553408c68b125330f2878deedc3bff
Reviewed-on: https://code.wireshark.org/review/9849
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-08-02 22:29:35 +00:00
Alexis La Goutte 3ea89e6155 lemon (tools): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ibfa0bfd589e77a58b7b242c7c2fe25ef052a874e
Reviewed-on: https://code.wireshark.org/review/9516
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-07-25 18:07:34 +00:00
Graham Bloice e2561da034 Fix CMake 7zip search
A further fix for the CMake Windows search for 7-zip.

Add the destination\bin path to the search path.

When downloading from anonsvn only pass the path within the destination
not the whole path.

Change-Id: I2beec925730fae21d6a63bee5332e1002f49d6ae
Reviewed-on: https://code.wireshark.org/review/9770
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-07-24 16:03:00 +00:00
Evan Huus 2eabd353ad Skip large files when fuzzing with valgrind
They run the buildbot out of memory, so just skip them, we don't want to remove
them from the menagerie entirely.

("large" here is > 20000 KB, but that could change)

Change-Id: I58dd9a981be6e6fc661ea624cc0c5258a5986a9f
Ping-Bug: 11395
Reviewed-on: https://code.wireshark.org/review/9768
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-24 11:52:00 +00:00
Graham Bloice 99b58131d8 Fix 7-zip search
The path for a Chocolatey 7zip.commandline install is
$env:ChocolateyInstall\bin

and the version installed by Chocolatey for its own use is in
$env:ChocolateyInstall\tools

Change-Id: I2f1ee78e93f861075f8c06ed74d81d8173911299
Reviewed-on: https://code.wireshark.org/review/9762
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-07-23 21:38:56 +00:00
Alexis La Goutte 1ddf1cfeb0 CheckAPI: Add a shadow variable check
Check if there is index, time or strlen variable

Change-Id: I530a35d6e1cf13f0795b35579ce76ee373ed4b1a
Reviewed-on: https://code.wireshark.org/review/8724
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-23 15:53:38 +00:00
Gerald Combs f38d976cbe Be more careful about variable scope and quoting.
Change-Id: Ica226178cb43b82a87441fe11e8c2093e01db8a5
Reviewed-on: https://code.wireshark.org/review/9738
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-21 15:54:46 +00:00
Gerald Combs 19b28488ac Fixup make-usb.py
SourceForge (which is where the Linux USB project is hosted) is
currently under maintenance. As a result this morning's update-numbers
run clobbered usb.c. Add a minimum vendor and product count check to
make-usb.py.

Change-Id: Ia18bcd9c0eb365bd97b735795e9ad39cd85093a8
Reviewed-on: https://code.wireshark.org/review/9706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-19 20:24:08 +00:00
AndersBroman 88302f267c Try to fix OSX build boot
lemon.c:1784: warning: implicit conversion shortens 64-bit value into a 32-bit value
lemon.c:1790: warning: implicit conversion shortens 64-bit value into a 32-bit value
1790: warning: implicit conversion shortens 64-bit value into a 32-bit value
1928: warning: implicit conversion shortens 64-bit value into a 32-bit value
2707: warning: implicit conversion shortens 64-bit value into a 32-bit value

Change-Id: Ief1b64009891de6885c2c9a6cb0e290752de889f
Reviewed-on: https://code.wireshark.org/review/9463
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02 11:09:36 +00:00
Alexis La Goutte 9d8b810127 Lemon: Update lemon tools
Update from SQLite trunk (19 April 2015)

Add include <config.h>

Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_)

Fix implicit conversion loses integer precision

Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]

Fix function declaration isn’t a prototype [-Wstrict-prototypes]

Fix warning: old-style function definition [-Wold-style-definition]

Fix trailing whitespace

Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake

Fix -Wmissing-prototypes Remove unused function (acttab_free)

Add basename the filename with only filename (no path...)

Fix lemon.c:3435: warning: implicit conversion shortens 64-bit value into a 32-bit value

Add "new" version of lempar.c (3 November 2009).

LEMPAR: fix trailing whitespace

LEMPAR: fix -Wunused-parameter

Change-Id: I2df7e39c9a6846de26743a981fb76aca423fe813
Reviewed-on: https://code.wireshark.org/review/6502
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02 08:49:02 +00:00
Peter Wu b1ab36a813 tools/asn2wrs.py: fix isdn-sup generation with Py3
Python 3 has removed the cmp function for sort functions, relying on a
key function instead.

Tested with Python 2.7.10 and 3.4.3.

Change-Id: Id571b836304528ecc3b23a0f8a2843c4538c3e1b
Reviewed-on: https://code.wireshark.org/review/9212
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-29 22:46:58 +00:00
Peter Wu 149d0b7e91 tools/asn2wrs.py: handle windows-1252 encoding
The RRC ASN.1 definitions resulted in a decode error in Python because
the file is encoded as windows-1252 instead of UTF-8. This patch makes
the tool more forgiving in handling windows-1252 encodings.

Tested with Python 2.6.9, 2.7.10, 3.4.3.

Change-Id: I9c9269e1065c98b8bcfb57ab4bfd21d5e183a656
Reviewed-on: https://code.wireshark.org/review/9133
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-29 09:36:34 +00:00
Martin Kaiser 48f7ce79e2 checkAPIs.pl: check how ui class files are included
flag up a warning if a ui class file is included from the current
directory by using #include ""

Visual Studio needs #include <> to make sure that we always pick up
these files from the build directory if we're building with CMake

combine this check with the other check for gcrypt.h so that included
files are checked in one common subroutine

Change-Id: If8420ff5886f8eb2a71aa8fbfe6bc5d2bda607ce
Reviewed-on: https://code.wireshark.org/review/9189
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-27 16:25:41 +00:00
Evan Huus 4ee22e88cd Update valgrind script for the UI
Plain 'wireshark' is now the Qt version, and 'wireshark-gtk' is the GTK version.

Change-Id: I893d6ae9a205998e191cbf6160cf27fcfd09bb4d
Reviewed-on: https://code.wireshark.org/review/9181
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-26 21:17:39 +00:00
Evan Huus 8f40e2cd8d tools: permit setting BIN_DIR in the environment
For out-of-tree builds you have to pass the location of your build to our tools
like the fuzz script, valgrind script etc. Modify them so that the value can be
set in the environment rather than requiring a shell script flag.

Set the environment variable in the vagrant provision step, so that the scripts
Just Work (TM) in the VM.

Change-Id: If8ce6b278176085ba6dd994137b82fc989b80124
Reviewed-on: https://code.wireshark.org/review/9168
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-26 06:52:58 +00:00
Gerald Combs 419f67209d Replace Folder.CopyHere with 7-Zip.
Server Core editions of Windows don't have shell.application. As a result
CopyHere and its unzip capabilities aren't guaranteed to be available.
Plus, CopyHere is just plain slow.

Remove the CopyHere code. Search for 7z and 7za in various places and
download the standalone 7za if needed.

Bug: 11151
Change-Id: Ie719effbdcee3141764183bf3535ec9bd1c3e97a
Reviewed-on: https://code.wireshark.org/review/8226
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-25 18:58:30 +00:00
Peter Wu 3f5d183a44 Stop using atof/strtod (fixes column sorting of float types)
atof is locale-dependent. In locales such as Swedish, German and Dutch,
the dot is a thousand separator, resulting in wrong conversions for
floats.

While at it, make the mate dissector also be independent of locale.
Blacklist atof in checkAPIs. Lemon is still using strtod, but that is
not our problem for now.

Bug: 11297
Bug: 8964
Change-Id: I6fe3e45eb1d6d95d41aa4f3af1f81a6204a60c63
Reviewed-on: https://code.wireshark.org/review/9116
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 15:38:45 +00:00
Evan Huus 95ac3908d8 Remove the last deprecated tvb_length calls
And remove the shims themselves!

Change-Id: I511c06eb21eaf68d1dc36bbb9558408807472f9c
Reviewed-on: https://code.wireshark.org/review/9088
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 17:32:40 +00:00
Pascal Quantin 45872b9f7b checkAPIs.pl: proto_tree_add_bytes_item takes an encoding parameter
Change-Id: Iebe0e2483d9fd1661bf87ea5efaeb4ae14f6e105
Reviewed-on: https://code.wireshark.org/review/9027
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-22 18:41:03 +00:00
Guy Harris b950c0849c Use %zu, not %zd, to print a size_t value (%zd would be for ssize_t).
Change-Id: I3aee7028cc43ca487492b0c5c6872be5c52d1a80
Reviewed-on: https://code.wireshark.org/review/8799
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-06 19:20:19 +00:00
Graham Bloice 7780159c03 Fix zlib cmake
Add support for the locally modified version of zlib to suppress
a CMake warning and disable building of the zlib examples.

Change-Id: I9ae08b49d149951e8626d506f69f1757a1ec7e23
Reviewed-on: https://code.wireshark.org/review/8706
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-05-31 18:15:06 +00:00
Michael Mann a25c46bc7b Remove proto_tree_add_text from some dissectors.
Change-Id: Id7ef95a56d9d8cc01f9a1a4556ad056b8bb7f8bc
Reviewed-on: https://code.wireshark.org/review/8654
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-05-26 15:20:46 +00:00
Michael Mann f735d4b3ec Need to generate hf_ variable for aliases in structs.
Change-Id: I6bd995d42cf54aaf2ad90d0322056c7ff0830ea9
Ping-Bug: 11156
Reviewed-on: https://code.wireshark.org/review/8324
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-05-07 06:07:37 +00:00
Michael Mann 718e900824 Remove proto_tree_add_text from idl2wrs generation.
Change-Id: Iab9df3e68d2a3878c3081c6352c45f7c329b983e
Reviewed-on: https://code.wireshark.org/review/8323
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-07 06:05:50 +00:00
Michael Mann 64c2bf7727 Fix the need to manually adjust packet-gias.c (take 2)
Need to have packet-gias.c in the DIRTY_CORBA_IDL_DISSECTOR_SRC grouping to work around the warnings still generated.

Change-Id: I08ea1f7d90577cc112b85e7fc00171827f58d6d2
Reviewed-on: https://code.wireshark.org/review/8266
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-06 06:09:20 +00:00
Gerald Combs cd204b5bdb Try to keep capinfos+ASan from failing.
Set ASAN_OPTIONS=detect_leaks=0, otherwise all captures show up as
invalid in capinfos.

Change-Id: I4c2c1e52e9cd8b253cd4c01d0f8770294b66102e
Reviewed-on: https://code.wireshark.org/review/7757
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-05-02 14:02:01 +00:00
Alexis La Goutte 0d7087cc4c Revert "Fix the need to manually adjust packet-gias.c"
This reverts commit 3ca9318d82.

Mac OS X buildbot are not happy

packet-gias.c:356: warning: 'hf_UCO_InvalidInputParameter_details' defined but not used
packet-gias.c:359: warning: 'hf_UCO_ProcessingFault_details' defined but not used
packet-gias.c:360: warning: 'hf_UCO_SystemFault_details' defined but not used
packet-gias.c:5275: warning: 'decode_UCO_Ratio_st' defined but not used
packet-gias.c:5303: warning: 'decode_UCO_DirectAccessLocation_st' defined but not used
packet-gias.c:5588: warning: 'decode_UCO_Coordinate3d_st' defined but not used
packet-gias.c:5612: warning: 'decode_UCO_Circle_st' defined but not used
packet-gias.c:5625: warning: 'decode_UCO_Ellipse_st' defined but not used
packet-gias.c:5656: warning: 'decode_UCO_SimpleGSImage_st' defined but not used
packet-gias.c:5671: warning: 'decode_UCO_SimpleCImage_st' defined but not used
packet-gias.c:5694: warning: 'decode_UCO_CompressedImage_st' defined but not used
packet-gias.c:5836: warning: 'decode_GIAS_ImageSpec_st' defined but not used

Change-Id: Iee076c00eb4e48571a99f6b854b7e3e52983c2f8
Reviewed-on: https://code.wireshark.org/review/8265
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-01 09:38:29 +00:00
Michael Mann 3ca9318d82 Fix the need to manually adjust packet-gias.c
Change-Id: I11beada78d2f2b4359d3638cdbcb6f43623fd10c
Reviewed-on: https://code.wireshark.org/review/8262
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>
2015-05-01 08:36:42 +00:00
Michael Mann 91515a0081 Add tshark -z "ncp,srt"
Change-Id: Iab2559c2bac5550987c108c6e917506fcec525e9
Reviewed-on: https://code.wireshark.org/review/8221
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-05-01 06:04:12 +00:00
Guy Harris 8b5a50e2b0 Fix some cases where we're shifting a signed 1 left.
Shift 1U instead, to make sure it's unsigned; the result of, for
example, the result of shifting a signed value left is undefined if the
value times 2^{shift count} doesn't fit in the *signed* type of the
shifted value.  That means, in particular, that the result of shifting 1
left by {number of bits in an int - 1} is undefined.  (In *practice*,
it'll probably be -2^32, with the bit you want set, but that's not
guaranteed, and GCC 5.1 seems not to like it.)

This fixes the *other* generator for the X11 header files; we manually
fix the file in question, because life's too short to spend very much of
it trying to debug Perl issues that cause a

	Can't use string ("1") as a HASH ref while "strict refs" in use at
	../../tools/process-x11-xcb.pl line 675.
	 at ../../tools/process-x11-xcb.pl line 1859
	 at ../../tools/process-x11-xcb.pl line 1859

failure.

Change-Id: I3dd46025b2ae461e63034b36ab11cdbc9380b696
Reviewed-on: https://code.wireshark.org/review/8263
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-01 02:55:29 +00:00
Guy Harris 510777cf78 Fix some cases where we're shifting a signed 1 left.
Shift 1U instead, to make sure it's unsigned; the result of, for
example, the result of shifting a signed value left is undefined if the
value times 2^{shift count} doesn't fit in the *signed* type of the
shifted value.  That means, in particular, that the result of shifting 1
left by {number of bits in an int - 1} is undefined.  (In *practice*,
it'll probably be -2^32, with the bit you want set, but that's not
guaranteed, and GCC 5.1 seems not to like it.)

This fixes the generator for the X11 header files; we manually fix the
header file in question, because life's too short to spend very much of
it trying to debug Perl issues that cause a

	Can't use string ("1") as a HASH ref while "strict refs" in use at
	../../tools/process-x11-xcb.pl line 675.
	 at ../../tools/process-x11-xcb.pl line 1859
	 at ../../tools/process-x11-xcb.pl line 1859

failure.

Change-Id: Ia903e9dacad49021bc0dfe129b9393ad426de9eb
Reviewed-on: https://code.wireshark.org/review/8261
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-01 00:53:53 +00:00
Christoph Schlosser e3785f7aff win-setup.ps1 Make setup script aware of proxies
This will allow the powershell setup script to utilize the system
 proxy configuration, allowing for a download behind a company
 firewall

Change-Id: Id0bfaf4ded219374be6e60a08d620a519f5e4820
Reviewed-on: https://code.wireshark.org/review/8182
Reviewed-by: Roland Knall <rknall@gmail.com>
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: Christoph Schlosser <christoph.schlosser@br-automation.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-27 15:20:35 +00:00
Jeff Morriss 741cfe71af Move some checks so they're executed after the comments are removed.
We shouldn't complain if someone says "don't use __func__, it's not portable"
in a comment.

Change-Id: Ib712a00a68c14048eb5d97413a5d5bc0e0812e24
Reviewed-on: https://code.wireshark.org/review/8179
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-04-23 18:54:24 +00:00
Jeff Morriss 3a42b55ac9 idl2wrs: don't use -1 for the protocol-item length.
It doesn't work any more for empty (length==0) PDUs.

Similar to bug 10646/Ifb96768969a43c59367b73e7bb940ceeb02cf6b0 (for RPC).

Untested as I'm not set up to build IDL dissectors now.

Bug: 11134
Change-Id: I77aacc2590acbacbe02edb1768e754f92f87bc23
Reviewed-on: https://code.wireshark.org/review/8163
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-23 02:09:16 +00:00
Jeff Morriss 97499c1f25 Add VALS_EXT_PTR to decorate pointers to value_string_ext's in hfinfo.
This allows checkAPIs to continue checking the 'convert' field for correctness
when dissectors use value_string_ext_new() to build their value_string_ext's
(without resorting to tricks like getting the address of the dereferenced
pointer).

This will be used to resolve the checkAPIs failure in patch set 3 of
Ia5c96b1f6f1fe3a9521b3d70142889e3881fae5e .

Change-Id: I700d86b9076f077706d34000f5a6aa5c96351f69
Reviewed-on: https://code.wireshark.org/review/8162
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-22 06:08:58 +00:00
Gerald Combs 1404605513 Start moving win-setup to PowerShell.
Add win-setup.ps1, which duplicates the following tasks performed by
config.nmake + Makefile.nmake + win-setup.sh:

- Create the windows library directory.
- Download files.
- Download and unpack zip files.
- Check and set current-tag.txt

Don't verify applications or libraries. CMakeLists.txt does that.

Update the Developer's Guide.

Have POWERSHELL_COMMAND use dot sourcing instead of "-File", which
appears to be a synonym for "-IgnoreTheExitStatusReturnedByThisScript".

This removes our dependencies on unzip and wget and reduces our dependency
on bash.

Change-Id: Ia9def24acbe183d81b9d477fa42e655e4a3a6614
Reviewed-on: https://code.wireshark.org/review/7990
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: Gerald Combs <gerald@wireshark.org>
2015-04-14 19:09:30 +00:00
Gerald Combs 7b60d2bb48 Pass HTTP URLs to wget.
Not all wgets are equal. Revert part of 7787c1b so that wget fetches
over HTTP instead of HTTPS.

Change-Id: Iced263380429795975cf239cba7dac54bd729d38
Reviewed-on: https://code.wireshark.org/review/8005
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-09 19:56:19 +00:00
Michal Labedzki b99cf21c25 extcap: Add support for Android - androiddump
androiddump is extcap program that can be used with Android devices
(need Android SDK in system PATH). Supported is Logcat/Logger logs and
Bluetooth interfaces for all Android to this day (Lollipop).

Please note that it will work also for FirefoxOS.

Interfaces:
1. Logcat Main (binary or text)
2. Logcat System (binary or text)
3. Logcat Events (binary or text)
4. Logcat Radio (binary or text)
5. Logcat Crash (text; Lollipop)
6. Bluetooth Hcidump (<Kitkat)
7. Bluetooth Bluedroid External Parser (Kitkat)
8. Bluetooth BtsnoopNet (Lollipop)

Change-Id: I26e4cd1a37a6af805f8b932399b4aa44ee7b5a80
Reviewed-on: https://code.wireshark.org/review/7475
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-04-08 09:57:24 +00:00
Gerald Combs f90699c676 Don't commit translation updates for now.
Doing so conflicts with the weekly update script.

Change-Id: I3ffbe9cbae9b8efdc8369de2054d9f8b8a8d5c5e
Reviewed-on: https://code.wireshark.org/review/7921
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-05 15:56:30 +00:00
Alexis La Goutte f1803dbbb7 Add update-tx tools (Resync translation between repo and Transifex)
Change-Id: Ica2902fbc8a089b3b877b00c1fd72397f2c08146
Reviewed-on: https://code.wireshark.org/review/7314
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-04 17:06:20 +00:00
Gerald Combs 7787c1b464 Fixup our anonsvn URLs.
Change-Id: Id18d392bf7ff948fc78b684d8222c5c3725d302a
Reviewed-on: https://code.wireshark.org/review/7886
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-02 19:21:41 +00:00
Pascal Quantin 9aa624d117 LTE RRC: upgrade dissector to v12.5.0
Change-Id: I9e3dfb17b4b7f96be999ccea88fec754a936d312
Reviewed-on: https://code.wireshark.org/review/7869
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-31 21:40:10 +00:00
Peter Wu 13c486c33f html2text.py: Python 2.5 compatibility, improve Unicode support
Add support for Python 2.5 (remove unicode_literals import which does
not seem to be necessary), check before using break_on_hyphens (without
this option in Python 2.5, the output is uglier though) and avoid the
'with' keyword.

While at it, fix reading Unicode text from file in Python 2 (tested
with: echo € | tools/html2text.py) and support reading from stdin using
the '-' filename.

Tested against Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3 with the
commands from the previous html2text.py commit message, and additionally
with the Unicode character € as input (instead of the faq.py output).

Change-Id: I3de3f7a4e7cf7d702463c3a59758803843338a54
Reviewed-on: https://code.wireshark.org/review/7823
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-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: Anders Broman <a.broman58@gmail.com>
2015-03-26 07:14:20 +00:00
Peter Wu dbef80f5c7 dfilter-test.py: add OOT support and Python 3 compat
Support WS_BIN_PATH and SOURCE_DIR (modelled after test/config.sh) to
support out-of-tree builds (including cmake). Add Python 3 support and
mention this in the documentation.

Tested with Python 2.7.9, 3.2.6, 3.4.3:

    WS_BIN_PATH=/tmp/wsbuild/run SOURCE_DIR=/tmp/wireshark \
        tools/dfilter-test.py testBytesIPv6

(2.7.9 and 3.4.3 were also tested fully, but some cases seem to fail
even before this patch. 2.5.6 and 2.6.6 do not work because the unittest
module is outdated.)

Change-Id: I13074579f6f74206edb5cd7be8e7a8406de49c56
Reviewed-on: https://code.wireshark.org/review/7793
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-25 07:15:36 +00:00
Peter Wu 1ba4191c70 indexcap.py: fix tmpdir handling, python 3 compat
Add Python 3 compatibility to indexcap.py and only create a tmpdir for
actions that need it. Only remove tmpdir for the compare action and
try to remove the temp dir even if an exception occurs.

In list_protos_in_cap.sh, rename BIN_DIR to WS_BIN_PATH (matching
test/config.sh) and allow it to be overridden from the environment.

Tested with Python 2.6.6, 2.7.9, 3.2.6, 3.4.3 as follows (with tshark
built using cmake and '-b /tmp/wsbuild/run'):

    tools/indexcap.py out pop-ssl.pcapng;
    tools/indexcap.py out pop-ssl.pcapng --list-all-proto;
    tools/indexcap.py out pop-ssl.pcapng --list-all-files;
    tools/indexcap.py out pop-ssl.pcapng --list-all-proto-files=ssl;
    rm out;

Python 2.5.6 does not work (there is no multiprocessing module). The
dict output in Python 3.4.3 is different (has the hash function
changed?)

Change-Id: I592d8c4458a20d5088d815c6dd1cf90c9d3df9d3
Reviewed-on: https://code.wireshark.org/review/7792
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-25 07:09:41 +00:00
Peter Wu 68698db8cc Always use html2text.py for FAQ, improve output
A recent commit broke compilation with Python 3. The original author of
html2text.py is deceased and the fork has increased the number of files
for this "simple" helper.

The html2text.py script in this patch was rewritten and its output
matches with lynx (except for a few newlines around lists). This means
that indentation has been added for headings, paragraphs and lists.
Also, since it was written from scratch, a new license could be chosen
that matches Wireshark.

Since now the in-tree html2text.py script provides nicer output, remove
detection of the alternative programs (elinks, links). lynx/w3m is
somehow still necessary for asciidoc though.

(I also looked into reusing html2text.py for the release notes to
replace asciidoc, but the --format=html output produces different output
(HTML adds a ToC and section numbers). For now still require lynx for
release notes)

Tested with Python 2.6.6, 2.7.9, 3.2.6 and 3.4.3 under LC_ALL=C and
LC_ALL=en_US.UTF-8 on Linux. Tested reading from stdin and file, writing
to file, pipe and tty. Tested with cmake (Ninja) and autotools on Arch
Linux x86_64. Test:

    # For each $PATH per python version, execute (with varying LC_ALL)
    help/faq.py -b | tools/html2text.py /dev/stdin | md5sum
    help/faq.py -b | tools/html2text.py | md5sum
    help/faq.py -b | tools/html2text.py
    help/faq.py -b | tools/html2text.py >/dev/null

Change-Id: I6409450a3e6c8b010ca082251f9db7358b0cc2fd
Reviewed-on: https://code.wireshark.org/review/7779
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-25 07:08:52 +00:00