aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-23CMake: Allow setting per target compiler warningsJoão Valverde1-0/+1
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow using different flags per target. Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS and using the COMPILE_OPTIONS property to set them. This change is just setting mechanism and there should be no difference in generated warnings. The check_X_compiler_flag cmake test is changed to test each flag individually. We need a list, not a space separated string, and the aggregate test is not significant. Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25 Reviewed-on: https://code.wireshark.org/review/17150 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-08-05Add PI_DEPRECATED expert info groupJoão Valverde2-0/+13
Change-Id: Ibc43b1976d5827e8c40252a5200852fbcd00b70c Reviewed-on: https://code.wireshark.org/review/16763 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt>
2016-07-26Use ws_g_warning in wslua.Michael Mann6-39/+44
The g_warning calls seem legitimate, so "hide" them from checkAPIs.pl. Change-Id: I6d25b08e22aeeb0244e07836385f2b67d6261546 Reviewed-on: https://code.wireshark.org/review/16703 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-25Fix checkAPI.pl warnings about printfMichael Mann2-3/+5
Many of the complaints from checkAPI.pl for use of printf are when its embedded in an #ifdef and checkAPI isn't smart enough to figure that out. The other (non-ifdef) use is dumping internal structures (which is a type of debug functionality) Add a "ws_debug_printf" macro for printf to pacify the warnings. Change-Id: I63610e1adbbaf2feffb4ec9d4f817247d833f7fd Reviewed-on: https://code.wireshark.org/review/16623 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>
2016-07-21No need to check for string option values being null.Guy Harris1-2/+2
A string option, if present, always has a value; it might be a null *string*, but you won't get a null pointer (if the option isn't present, it simply isn't present). Fix some comments while we're at it. Change-Id: I9c1420f56998a7d04de5c5cc2e92631b181f303a Reviewed-on: https://code.wireshark.org/review/16564 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-14Redo the block options APIs.Guy Harris2-5/+38
A block can have zero or more instances of a given option. We distinguish between "one instance only" options, where a block can have zero or one instance, and "multiple instances allowed" options, where a block can have zero or more instances. For "one instance only" options: "add" routines add an instance if there isn't one already and fail if there is; "set" routines add an instance if there isn't one already and change the value of the existing instance if there is one; "set nth" routines fail; "get" routines return the value of the instance if there is one and fail if there isn't; "get nth" routines fail. For "multiple instances allowed" options: "add" routines add an instance; "set" routines fail; "set nth" routines set the value of the nth instance if there is one and fail otherwise; "get" routines fail; "get nth" routines get the value if the nth instance if there is one and fail otherwise. Rename "optionblock" to just "block"; it describes the contents of a block, including both mandatory items and options. Add some support for NRB options, including IPv4 and IPv6 option types. Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e Reviewed-on: https://code.wireshark.org/review/16444 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-04wslua: fail on tree:add(nil)Peter Wu1-0/+2
It is unlikely that tree:add(nil) or tree:add(nil, tvb) represents a valid invocation. Most likely the developer made a mistake and tried something like: local pf_thing = ProtoField.string("some.thing", "Description") some_proto.fields = { pf_thing } ... tree:add(some_proto.fields.thing, tvb()) which should have been: some_proto.fields = { thing = pf_thing } or: tree:add(pf_thing, tvb()) Save the developer some pain and bail out early. Change-Id: I59fc04153f02bb186b47b763676a68bb0271df76 Reviewed-on: https://code.wireshark.org/review/16177 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin2-6/+6
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo2-6/+6
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15capture info (wslua): Dereference of null pointerAlexis La Goutte1-0/+2
Change-Id: Iced579d5acaefa9d1c8e3775a53916773bf87659 Reviewed-on: https://code.wireshark.org/review/15929 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-06-15Remove Nmake build systemPascal Quantin2-131/+0
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-14wslua: remove FAIL_ON_NULL_MEMBER_OR_EXPIREDPeter Wu2-12/+16
Ensure that the member cannot be NULL at initialization, simplifies checkCaptureInfo and checkCaptureInfoConst logic. Change-Id: I2d9caa4a235310569ebbf0b30199dd3df7a4c093 Reviewed-on: https://code.wireshark.org/review/14791 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-14wslua: Drop unused "push_code" macro parameterPeter Wu24-38/+37
Reduce noise, no caller has used this parameter since its introduction. Msotly automated regex search and replace. Change-Id: I4b1180bfee8544b38d19c9c440ff5b9b0dc080b2 Reviewed-on: https://code.wireshark.org/review/14790 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>
2016-06-01Add data structures necessary to support multiple Section Header blocks.Michael Mann2-15/+19
This doesn't try to use any data from multiple Section Header blocks, it just converts single Section Header block usage into a GArray, so the potential is there to then use/support multiple Section Header blocks within a file format (like pcapng) Change-Id: I6ad1f7b8daf4b1ad7ba0eb1ecf2e170421505486 Reviewed-on: https://code.wireshark.org/review/15636 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-22Add wtap_optionblock_set_option_string_formatMichael Mann1-1/+2
Also add a length parameter to wtap_optionblock_set_option_string Change-Id: I8c7bbc48aa96b5c2a91ab9a17980928d6894f1ee Reviewed-on: https://code.wireshark.org/review/15505 Reviewed-by: Anthony Coddington <anthony.coddington@endace.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann1-7/+11
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-02Add checkAPI calls to CMake.Graham Bloice1-0/+9
This generates a top level target, checkAPI, that is excluded from the ALL build target, so must be run separately. On Windows using a Visual Studio generator, call msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj Change-Id: I44a57c564dcfc75499463b942436f4b920a82478 Reviewed-on: https://code.wireshark.org/review/14873 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-04-17wslua: fix crash on Lua errors in dissect_tcp_pdus get_len_funcPeter Wu1-3/+4
A similar problem was addressed in v1.99.10rc0-339-g82b2258, but that patch missed the get_pdu_len function. A crash could occur when get_pdu_len does not return a number or when it raises a Lua error. Change-Id: I1a42a95d88708ae3bf6e015ba8d7af4db5071a00 Reviewed-on: https://code.wireshark.org/review/14954 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-04-17make-taps.pl: Remove perl >= 5.14 requirementJoão Valverde1-1/+4
Follow up to 2226802826c4ba802696d5df274094cec3818af1. Change-Id: Icd199a692f13bf30a68f655e30d7353987b22a6c Reviewed-on: https://code.wireshark.org/review/14942 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-04-16make-taps.pl: Enable "use warnings" pragmaJoão Valverde1-18/+19
Replace sprintf to fix newly generated warning. Change-Id: I85e8b0989c0caa4c9b079883b8653c9892df171c Reviewed-on: https://code.wireshark.org/review/14677 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-04-11Lua: Fix add and remove Fields when reload Lua pluginsStig Bjørlykke3-13/+20
Reset wslua_dfilter and remove the Field tap_listener when reloading plugins. Check for tap listeners in rescan_packets() after ws_epan_new() because Lua may register the Lua field tap when adding Fields. Bug: 12328 Change-Id: Ibbd8339033132c6f3b61d7e9c9ced9ed2b9affec Reviewed-on: https://code.wireshark.org/review/14871 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-04-10wslua: Abort on out of memoryPeter Wu1-1/+9
The current wslua code does not properly handle out of memory conditions. Since recovering from OOM is difficult in many places, just abort the program (which is done by g_realloc). Change-Id: Idae68d08c90c82ba5df18a28cc1e507d61d20e78 Reviewed-on: https://code.wireshark.org/review/14786 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-04-10lua: fix reload with -Xlua_scriptPeter Wu1-5/+6
Use ex_opt_get_nth instead of ex_opt_get_next to avoid consuming the parameters. This ensures that lua scripts via the "-Xlua_script" parameter are also reloaded. Change-Id: I316726cdf99f7ee3d738d3632a7f639ea8596f96 Reviewed-on: https://code.wireshark.org/review/14870 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-04-04Rename "libz" to "zlib"João Valverde1-2/+2
Change-Id: I12f92c983d587c2a4751428cdf299635090c9f0b Reviewed-on: https://code.wireshark.org/review/14748 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-31wslua: avoid memleak on duplicate names for Proto.newPeter Wu1-2/+2
luaL_error never returns, free memory before. Change-Id: Ibcdbdb6afea5d2dab7be6a16c4c2536dcf14220a Reviewed-on: https://code.wireshark.org/review/14734 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-30make-taps.pl: Fix generated code indentationJoão Valverde1-8/+11
Change-Id: Ife25c519acb56b58819bc1aabfa069b5fbbc788d Reviewed-on: https://code.wireshark.org/review/14676 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-28wslua: handle parameters with const keyword when generating tapsPascal Quantin1-0/+2
Change-Id: I46148b6454a501035d86fa8f1eb767687f68aa42 Reviewed-on: https://code.wireshark.org/review/14670 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-28Fix warnings/errors of type -Wused-but-marked-unusedJoerg Mayer7-11/+11
Change-Id: I34c2d9953272822da0745d1b24c64d8466e43b37 Reviewed-on: https://code.wireshark.org/review/14668 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+2
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-15More "FT_BOOLEAN is 64-bit" fixes.Guy Harris1-1/+1
Change-Id: Iaacd492858ca2fb98c4947d587fbbd26fc102a7d Reviewed-on: https://code.wireshark.org/review/14486 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-13Lua: Remove heur dissectors when reload Lua pluginsStig Bjørlykke3-0/+18
When reloading Lua plugins all registered heuristic dissectors must be removed. Bug: 12251 Change-Id: Ib7da6df347fb9294f5394ae531b582bf6d2730bb Reviewed-on: https://code.wireshark.org/review/14429 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-03-13Lua: Check for duplicate heuristic short nameStig Bjørlykke1-0/+5
A Proto may be only be registered with a heuristic dissector once, because we check this in heur_dissector_add(). Change-Id: I524fa832b647d557f13aedcb870f7789058d2180 Reviewed-on: https://code.wireshark.org/review/14436 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-03-08Add EditorConfig settings for most C filesJoão Valverde2-0/+9
Change-Id: I02e6d71290bbdf7504437b0d670955b3686b6b52 Reviewed-on: https://code.wireshark.org/review/14360 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-03Revert "autotools: Use explicit zlib dependency build flags"João Valverde1-1/+1
This reverts commit 2bded0b66137a2f1c8b69911d91903a24f8a2624. Change-Id: Ic898c65df4daaa395eb010e0286d97509346d43a Reviewed-on: https://code.wireshark.org/review/14318 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-03autotools: Use explicit zlib dependency build flagsJoão Valverde1-1/+1
Use pkg-config if a zlib.pc file is available. Remove the now redundant AC_TRY_LINK_FUNC test (there are no linker flags for GTK+ here). Change-Id: I7de744749eba7231ae0097b975144b76ffcf1bdb Reviewed-on: https://code.wireshark.org/review/14263 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-03-01CMake: Add more structure to libwireshark buildJoão Valverde2-50/+82
Smaller epan/CMakeLists.txt is easier to work with and this structure is well suited to CMake. It should make it easier to manage and configure each epan module differently if necessary. Change-Id: Ia649db3b7dcd405aa43dbdba3288699d5e375229 Reviewed-on: https://code.wireshark.org/review/14068 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-28wslua: don't crash if disable_lua = true in init.luaMartin Kaiser1-0/+1
in wslua_init(), our lua instance L is set to NULL if disable_lua is true in init.lua make sure that we leave wslua_init() in this case if we don't, we crash in lua_pop(L,1); with L==NULL Program received signal SIGSEGV, Segmentation fault. 0x00007fffefb41a73 in lua_settop () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 (gdb) bt #0 0x00007fffefb41a73 in lua_settop () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 #1 0x00007ffff4fb50e4 in wslua_init (cb=cb@entry=0x516f40 <splash_update(register_action_e, char const*, void*)>, client_data=client_data@entry=0x0) at init_wslua.c:900 [...] Bug:12196 Change-Id: Ic338c4edcb897c0eaa9b6755bbb6c9991ec6ed02 Reviewed-on: https://code.wireshark.org/review/14228 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde3-56/+33
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-25Clean up modelines and indentation.Guy Harris2-6/+6
HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT character as tabbing to 4-space tab stops, or that even are configurable but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are broken. tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever expect anybody to look at your file with a UN*X tool, and every text file will probably be looked at by a UN*X tool at some point, so Don't Do That. Adjust indentation to reflect the mode lines. Change-Id: Icf0831717de10fc615971fa1cf75af2f1ea2d03d Reviewed-on: https://code.wireshark.org/review/14150 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-25Cleanup CMakeLists.txt indentation and use lower case function namesJoão Valverde1-53/+55
Change-Id: Ie94d2e9b6b4975d7caec10c3ce472cafe1eefd62 Reviewed-on: https://code.wireshark.org/review/14120 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: Anders Broman <a.broman58@gmail.com>
2016-02-23Making wiretap option blocks more generic.Michael Mann2-12/+34
This was inspired by https://code.wireshark.org/review/9729/, but takes it in a different direction where all options are put into an array, regardless of whether they are "standard" or "custom". It should be easier to add "custom" options in this design. Some, but not all blocks have been converted. Descriptions of some of the block options have been moved from wtap.h to pcapng.h as it seems to be the one that implements the description of the blocks. Also what could be added/refactored is registering block behavior. Change-Id: I3dffa38f0bb088f98749a4f97a3b7655baa4aa6a Reviewed-on: https://code.wireshark.org/review/13667 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-21autotools: Use pkg-config autoconf macros for GLib/GTKJoão Valverde1-1/+2
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add dependency flags explicitly instead of using WS_CPPFLAGS. Some minor improvements and fixes for missing/unnecessary variables (no impact on our test builds). Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671 Reviewed-on: https://code.wireshark.org/review/14005 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-11autotools: Add more silent build rulesJoão Valverde1-3/+3
Change-Id: I4abff8880d5b3ff439e6abc9cf3c2d17897501ea Reviewed-on: https://code.wireshark.org/review/13816 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-09Lua: Check out-of-bounds before tvb_strsize()Stig Bjørlykke1-4/+13
Add a check for out-of-bounds before calling tvb_strsize() because this will THROW an exception if not finding a terminating NUL. Unhandled exceptions will mess up Lua luaL_error() handling and will end up in a crash. Change-Id: Ieafef59a3858656e0d8c79904828b631657b4cbc Reviewed-on: https://code.wireshark.org/review/13842 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-08Revert "Lua: Remove WSLUA_ERROR on dissecting error"Stig Bjørlykke1-0/+8
This reverts commit 0f2a0e83fbb701a0836da36c16c162817d4a9b2f. Change-Id: Ifc40f99385a5948a033bb611b4ce8a0fa615b333 Reviewed-on: https://code.wireshark.org/review/13837 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-08Lua: Remove WSLUA_ERROR on dissecting errorStig Bjørlykke1-8/+0
On error in Dissector_call and DissectorTable_try we should not terminate with WSLUA_ERROR because the error is already reported in the tree with show_exception(). Change-Id: I60739f12cb8b16fe2270f47701286fd0dbf04c6f Reviewed-on: https://code.wireshark.org/review/13819 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde3-33/+56
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde3-56/+33
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-05Qt: Add check for field extractorsStig Bjørlykke2-0/+6
The proto tree is needed in several cases when using Lua field extractors, because they fetch values from the tree. Without a valid field extractor a Lua plugin may misbehave and display wrong column info. This fixes column issues when: - Calling resetColumns() in Qt. This involves adding a display filter, change time display format, change name resolution and other changes in UI which requires column updates. - Print summary lines. - Export as CSV and PSML. Change-Id: Ieed6f8578cdf2759f1f836cd8413a4529b7bbd80 Reviewed-on: https://code.wireshark.org/review/13708 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>