aboutsummaryrefslogtreecommitdiffstats
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2015-12-11new_create_dissector_handle -> create_dissector_handle for plugins.Michael Mann1-1/+1
Change-Id: I0d485b1337c669291ad58b6c096657ce2db353c8 Reviewed-on: https://code.wireshark.org/review/12516 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-10Convert ASN.1 dissectors to remove "new" from "new-style" dissector function ↵Michael Mann1-40/+19
names that were generated from asn2wrs.py This includes: 1. new_create_dissector_handle -> create_dissector_handle 2. new_register_dissector -> register_dissector 3. new_register_ber_oid_dissector -> register_ber_oid_dissector 4. new_register_ber_syntax_dissector -> register_ber_syntax_dissector Also remove PDU_NEW, SYNTAX_NEW and REGISTER_NEW as there is no need for the distinction anymore. Change-Id: I82c7de7c8ffeeab3259d1b55bb4afc5f6a1e0329 Reviewed-on: https://code.wireshark.org/review/12491 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09Skinny: packet-skinnyDiederik de Groot1-3/+5
Fix messages generated by 894X phones, which do not always include all fields Revert accidental change by using of an older packet-skinny.c.in file Change-Id: I4c6f0ef053579cbbd0c15e90b44dda6a6b173d0d Reviewed-on: https://code.wireshark.org/review/12478 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-07Spelling fixes for errors found by lintianBalint Reczey2-2/+2
Change-Id: I889283902875193f4d3f3fd59788f59f8d9bcc20 Reviewed-on: https://code.wireshark.org/review/11945 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-05Use noyywrap rather than defining our own yywrap functions.Guy Harris1-0/+2
Tweak lemonflex-tail.inc to fix an issue this reveals. It appears that, at least on the buildbots, the Visual Studio compiler no longer issues warnings for the code generated with %option noyywrap. Change-Id: Id64d56f1ae8a79d0336488a4a50518da1f511497 Reviewed-on: https://code.wireshark.org/review/12433 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-02eCMP Dissector - Extensible Control & Management ProtocolJames Lynch1-0/+1
Developed by Emerson Industrial Automation (Control Techniques Division) eCMP is a protocol for setting up and controlling the devices in a factory automation system. eCMP has about 30 commands; most are embedded into TCP/IP messages, but cyclic data messages use the UDP protocol. Bug: 10562 Change-Id: I9a421f39dfbdbc9e28d8f7cba72c22e270064641 Reviewed-on: https://code.wireshark.org/review/3157 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-29Support building the X11 dissector outside the source tree.Jeff Morriss2-40/+54
Use relative path names for the script names and mesa/xcbproto directories so different paths (from different users) don't cause deltas. Also, with help from Peter Wu and Graham, get generation of the X11 dissector working from cmake. Change-Id: I95cd2a0f973dcbc67f457ff94c28e46a666afb74 Reviewed-on: https://code.wireshark.org/review/12213 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-27Officially remove tvb_get_string and tvb_get_stringz.Michael Mann1-2/+0
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-25asn2wrs.py: always use relative pathsPeter Wu1-6/+10
Avoids absolute paths when using cmake and doing an in-tree build. Before (source directory is /tmp/wireshark): /*--- Included file: /tmp/wireshark/asn1/t38/packet-t38-exp.h ---*/ After: /*--- Included file: packet-t38-exp.h ---*/ Change-Id: Id5c98bff7b97447479e1a09751701f2f52132b20 Reviewed-on: https://code.wireshark.org/review/12118 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-23lemon (tools): Fix Dereference of null pointer found by Clang analyzerAlexis La Goutte1-23/+33
Change-Id: I6be51833b4268dbfde5c78820004a4714779b0c5 Reviewed-on: https://code.wireshark.org/review/9515 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-22asn2wrs.py: fix path substitution when generating ASN.1 dissectors with ↵Pascal Quantin1-2/+2
CMake on Windows Change-Id: I48e7d48544274f27d276e7128f8d2a2727c0b9cd Reviewed-on: https://code.wireshark.org/review/12031 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-21Fix Windows hardening check (x64)Graham Bloice1-0/+9
Fix the x64 ones missed on commit f1efeb1eba8329 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-21Fix Windows hardening checkGraham Bloice1-2/+56
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-21autotools: Fix extra-compiler-warnings for system headersJoão Valverde3-16/+0
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-20More spelling fixes found by lintianBalint Reczey2-3/+3
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-12[GTK] Replace deprecated gdk_pixbuf_new_from_inline()João Valverde2-1/+78
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-11Update user guide for upcoming 2.0 releasePascal Quantin1-4/+4
Change-Id: Id27365d6bd7085f498edd78111d85de0fbd0abd3 Reviewed-on: https://code.wireshark.org/review/11738 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-10Initial Sysdig syscall (event) support.Gerald Combs2-0/+346
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-10Make the dfilter time tests work regardless of what time zone the tests areJeff Morriss1-18/+23
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-01tools/pidl: avoid trailing tabsStefan Metzmacher1-1/+4
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-10-30Remove build-qt-sdk.bat.Gerald Combs2-95/+0
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-30Explain why Get-HardenFlags currently fails.Gerald Combs1-0/+15
Change-Id: I4a956b2479a482a9262e6e67f6c7611fad9dde84 Reviewed-on: https://code.wireshark.org/review/11448 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-30Add a few new negative dfilter tests.Jeff Morriss1-2/+17
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-29tools/checkAPIs.pl: improve the hf_ error messagesStefan Metzmacher1-6/+6
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-25Bail out immediately if we can't allocate a buffer for carving up $PATH.Guy Harris1-11/+10
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-25lemon: move free() to avoid mem leak (CID 718529)Dario Lombardo1-8/+11
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-24lemon: add free() to avoid mem leak (CID 1309088)Dario Lombardo1-1/+2
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-21x11 generator: Fix indent (use always 4 spaces) and add modelinesAlexis La Goutte2-608/+634
Change-Id: I91739bb6f4acc4da060cf389ec288ee910965b2a Reviewed-on: https://code.wireshark.org/review/11113 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-20X11 generator: avoid extraneous parens in conditionals.Jeff Morriss1-3/+16
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-19x11 generator: Support new XCB paramrefPeter Harris1-5/+39
Change-Id: I8ae38785bd0f2f81fa2164b5bc29274bd7e940f5 Reviewed-on: https://code.wireshark.org/review/11105 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-10-19x11 generator: Don't crash when a switch is in a structPeter Harris1-1/+4
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-19x11 generator: Fix struct size with arrayPeter Harris1-1/+0
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-19x11 generator: Allow perl 5.20 and newerPeter Harris1-1/+0
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-19x11 generator: some blacklisted structs are now used.Jeff Morriss1-9/+9
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-16CMake: Add /WXGerald Combs1-2/+2
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-16Add OUI-28 to make-manuf.Gerald Combs1-2/+34
Change-Id: I95b9a4422dab6efbc2d94be49aba5f42784ff3e8 Reviewed-on: https://code.wireshark.org/review/11064 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-15Add missing CMake files to the tarball.Gerald Combs1-0/+1
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-08Add USBPcap 1.1.0.0-g794bf26 to Windows installerPascal Quantin1-2/+4
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-09-29NCP2222: change ncp.nds_return_all_classes filter type from FT_STRING to ↵Pascal Quantin1-1/+1
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-28idl2wrs: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangMichael Mann1-14/+33
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-25ncp2222: Use BASE_CUSTOM for date and time fields.Michael Mann1-18/+15
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-25Convert dissect_nds_request and dissect_nds_reply to use proto_tree_add_xxx ↵Michael Mann1-13/+24
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-25CMake: Add a hardening-check target.Gerald Combs2-3/+88
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-25Refactor NCP Python data so that INFO column can be generated on the fly ↵Michael Mann1-462/+498
(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-22Revert "Refactor NCP Python data so that INFO column can be generated on the ↵Michael Mann1-471/+455
fly." This reverts commit 38b6f306a70905be8b29ffaeb75288d315ff9b04. Change-Id: I6ec83b94811be7699880e9a741c68faaac175bd0 Reviewed-on: https://code.wireshark.org/review/10613 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-21Remove proto_tree_add_text API.Michael Mann1-64/+0
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-19Refactor NCP Python data so that INFO column can be generated on the fly.Michael Mann1-455/+471
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-19Some more ncp2222 improvementsMichael Mann1-544/+568
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-17ncp2222 - Convert process_bitfield -> proto_tree_add_bitmask and other cleanup.Michael Mann1-10/+121
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-15ncp2222 Updatesgmor1207@gmail.com1-195/+516
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>