aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2015-08-18Lua: add FT_PROTOCOL as a ProtoField typeHadriel Kaplan1-3/+24
Bug: 11450 Change-Id: Ic77ddd193246c0202efcc9c11e61e8f6f85329c5 Reviewed-on: https://code.wireshark.org/review/10087 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-16make-taps.pl: Remove duplicate slash in pathnameJoão Valverde1-1/+1
Change-Id: Id5e13df24409267c405cdd05479610a8ba898289 Reviewed-on: https://code.wireshark.org/review/10047 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-15Lua: Free true_false_string values at reloadStig Bjørlykke1-3/+7
Change-Id: I8ab194bf094e82f08ddafb0a1451aec42989b93d Reviewed-on: https://code.wireshark.org/review/10044 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14Free all hfi->strings in free_deregister_fieldStig Bjørlykke1-16/+0
Change-Id: I6fe78266a2e881fa80e1e3a3423b685d3c1764de Reviewed-on: https://code.wireshark.org/review/10029 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12Lua: Moved deregister out of wslua_cleanupStig Bjørlykke1-8/+8
Change-Id: Ia43aa0e5f09400ef9923288b362256094a1241b8 Reviewed-on: https://code.wireshark.org/review/9998 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11Lua: Remove unneeded call in wslua_cleanupStig Bjørlykke1-1/+0
Change-Id: I0cda00001b40e5951d680d72dbc8043cbe8b9309 Reviewed-on: https://code.wireshark.org/review/9980 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11Added Reload Lua plugins.Stig Bjørlykke13-89/+324
This is initial support for reloading Lua plugins without restarting the application. Still todo: - Deregister FileHandlers - Support deregister ProtoField with existing abbrev (same_name_hfinfo) - Add a progress dialog when reloading many plugins - Search for memory leakages in wslua functions Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1 Reviewed-on: https://code.wireshark.org/review/5028 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-03Make sure per-packet tap callbacks return gbooleans.Gerald Combs1-4/+4
The tap API changed the return type of per-packet listener callbacks from int to gboolean back in 2009. Update a bunch of functions and some documentation accordingly. Change-Id: I79affe65db975caed3cc296a7e2985b7b9cdf4cc Reviewed-on: https://code.wireshark.org/review/9853 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-07-24Lua: fix "since 1.99.9" to be 1.99.8Hadriel Kaplan4-19/+19
Change-Id: I842e4b6a38fc161ba7ab14caa27b3bbf74c989d7 Reviewed-on: https://code.wireshark.org/review/9763 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-23Lua: add plugin version infoHadriel Kaplan3-6/+101
Expose a "set_plugin_info" global function to set the Lua plugin's version information. Also, put info about Lua scripts loaded from the command-line into the help output, not just for scripts loaded from plugin direvtories. Bug: 11315 Change-Id: I8bc425ed1ed0dfdc1d05178754f44d44e0b209b5 Reviewed-on: https://code.wireshark.org/review/9593 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-1/+1
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-13Change Lua's tvbrange:*int64() to read only the number of bytes specified inCédric Delmas1-18/+46
the range. Previously the length was ignored and 8 bytes were always read. The constraint on int64() and le_int64() becomes stricter to match int()'s ones: the range must be 1, 2, 4 or 8 octets long. Change-Id: Ic66798757564ac840c332b978effb418726a654c Reviewed-on: https://code.wireshark.org/review/9622 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-13Lua: all protocol tree entries expand/contract togetherHadriel Kaplan1-1/+5
Make each Lua Proto object have an alloacted ett value, so that they expand/contract only for the same protocol. Bug: 11356 Change-Id: I68fb3ff00e080b47d540344aba2554e392b7f1c4 Reviewed-on: https://code.wireshark.org/review/9611 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-1/+2
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Lua: split up wslua files into class-based filesHadriel Kaplan22-5309/+6082
The size of some of the wslua source files has grown large, and it's hard to quickly find things. So split them up based on class name, as much as seems reasonable. Also have the make-wsluarm.pl Perl script handle this. Change-Id: Ib495ec5c2a4df90495c0a05504856288a0b09213 Reviewed-on: https://code.wireshark.org/review/9579 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-11Lua: fix docs and default base for ProtoField.framenum()Hadriel Kaplan1-3/+4
The ProtoField.framenum() Lua function says to use base.DEC, HEX, etc. But it really can only allow base.NONE. Also, the code defaults to base.DEC if none was given, and then errors if it's a FT_FRAMENUM; instead the default base for FT_FRAMENUM should be base.NONE. Change-Id: I0ec867069c66dbb58399ac2db4652469bfb39152 Reviewed-on: https://code.wireshark.org/review/9599 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-10wslua_tree: Fix Dead Store (Dead assignement/Dead increment) warning found ↵Alexis La Goutte1-2/+2
by Clang Change-Id: I2bbc4c0a76935367692a5fd382013cbd074754e0 Reviewed-on: https://code.wireshark.org/review/9588 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-09Lua: add functions for more field informationHadriel Kaplan8-75/+498
Add Lua functions so a plugin can introspect field information, such as the type of field, flags, tvb, etc. Also add a couple of Tvb and ByteArray methods. And cleanup the TreeItem code a little. Change-Id: I7b58ce589ace91cce14b8abccd01ceabb63e2653 Reviewed-on: https://code.wireshark.org/review/6500 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-07Qt: Add initial Lua support.Gerald Combs2-8/+8
Add a FunnelStatistics class, which is the main interface between the Qt UI and the Funnel API. Add FunnelTextDialog, which implements the text_window, ProgDlg, menu, and other routines. Add FunnelStringDialog, which implements dlg_new. We currently only support "Tools" menu items (MENU_TOOLS_UNSORTED, aka REGISTER_TOOLS_GROUP_UNSORTED). Add a disabled placeholder to the "Tools" menu in case we don't load any scripts. Use "struct progdlg" instead of needlessly casting to funnel_progress_window_t. To do: - Add support for MENU_STAT_UNSORTED, MENU_STAT_GENERIC, etc. - Make the firewall config generator a Lua script? - Add FunnelGraphDialog? It seems like it would be useful to make QCustomPlot accessible to Lua scripts. Ping-Bug: 9845 Change-Id: Iefff02e9032ed1853666f7902509ed08b431e7a7 Reviewed-on: https://code.wireshark.org/review/9523 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-07-04Lua: split init/cleanup routinesHadriel Kaplan1-1/+18
The epan init routines have been split up into init vs. cleanup, where the init routines are only invoked when a file is opened, and the cleanup ones are invoked multiple times, such as on a re-scan of packets. Since the Lua API's Proto.init() callback is supposed to be invoked at both init and cleanup times, the wslua code now invokes it in both of epan's init and cleanup routines. Change-Id: I51a4d8bc02630a4d2db5408c37f7eb8f6e0ce88c Reviewed-on: https://code.wireshark.org/review/9491 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-06-22Fix "Unescaped left brace in regex is deprecated"Peter Wu1-1/+1
This got reported with Perl 5.22: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^typedef enum { <-- HERE / at epan/wslua/make-init-lua.pl line 228. The perldelta manual page says this about it: "[..] a future version of Perl (tentatively v5.26) will consider this to be a syntax error." Change-Id: I7f23cc10dc3311a35d8c15faa4337e4d50d0bd61 Reviewed-on: https://code.wireshark.org/review/9034 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-09Don't try to clean up uninitialized Lua and crashBalint Reczey1-2/+4
Reported to Debian BTS at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786704 Change-Id: I3045a68f0dd557bf64ea26a488a1bcece4828fec Reviewed-on: https://code.wireshark.org/review/8765 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: Balint Reczey <balint@balintreczey.hu>
2015-05-05Revert "Try to please both GCC (the compiler, not me) and clang."Gerald Combs2-14/+0
Unfortunately it prevents compilation with GCC. I'll just use "cmake -DDISABLE_WERROR=ON" on the affected machine for now. This reverts commit cdaad860720a17d889e759d9e263c5fcadaf36a2. Change-Id: I54c0e7882e42dd39b81c90c761e4aaec6d757bd1 Reviewed-on: https://code.wireshark.org/review/8297 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-05Try to please both GCC (the compiler, not me) and clang.Gerald Combs2-0/+14
The fix for GCC 5's -Wlogical-not-parentheses d7b2327 triggers -Wparentheses-equality in clang. Try to work around the issue with diagnostic suppression. Change-Id: I5eea1d3e76f6d2aa14a2595cd4455dcd2818f6a1 Reviewed-on: https://code.wireshark.org/review/8295 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-20(Benign) Fix warning [-Werror=logical-not-parentheses] (GCC 5.0.0)Bill Meier1-2/+2
Add some parentheses to prevent warning: "logical not is only applied to the left hand side of comparison" Change-Id: I8f11f93e12d24a1ea09032cf0198042fe9a87068 Reviewed-on: https://code.wireshark.org/review/7768 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12CMake: Update wslua build and test.Gerald Combs4-73/+96
Process wslua/CMakeLists.txt using add_subdirectory instead of include. Generate files in the build directory instead of the source directory. Copy lua scripts to DATAFILE_DIR instead of DATAFILE_DIR/lua. That's where init.lua looks for console.lua. Always set WIRESHARK_RUN_FROM_BUILD_DIRECTORY when testing. We presumably want to test our source files and not files which may or may not be in the system path. When we're running from the build directory look for lua scripts in both the Autotools and CMake build locations. Change-Id: Ic15ab8c58ff1b170d000c9b3e0a329af2ec44b7b Reviewed-on: https://code.wireshark.org/review/7590 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-10Change a lot of http:// URLs to https://.Gerald Combs3-5/+5
Most of our sites are now HTTPS-only. Update URLs accordingly. Update other URLs while we're at it. Remove or comment out dead links. Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33 Reviewed-on: https://code.wireshark.org/review/7621 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-03-07Get rid of an unused structure member.Guy Harris1-1/+0
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801 Reviewed-on: https://code.wireshark.org/review/7573 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21Make FT_{U}INT64 behave more like FT_{U}INT32, add support for ↵JC Wren1-2/+2
FT_{U}INT{40,48,56} Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19 Reviewed-on: https://code.wireshark.org/review/5813 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-13wslua*: Add editor modelines; Fix indentation, etc as needed.Bill Meier12-76/+229
Change-Id: I6df5d46f4b263104aa9cb6353cc987087cdb867e Reviewed-on: https://code.wireshark.org/review/7102 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13Replace tabs by spaces when editor modelines has "expandtab"Bill Meier1-1/+1
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7 Also: tabs-stops should be 8 Reviewed-on: https://code.wireshark.org/review/7100 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-04Simplify how we find Lua and expand the places we look.Jeff Morriss1-1/+1
First, it appears some packagers actually ship a pkg-config file for Lua. Try to use it. (Unfortunately the package name varies so we have to try several package names.) If that fails, try to find Lua directly, accounting for the various naming conventions we've seen. Bug: 10475 Bug: 10572 Change-Id: I82e789c466a488dc12431cdd90c49b4c1052414a Reviewed-on: https://code.wireshark.org/review/6756 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan5-20/+192
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-25Lua can free tvbuffs too earlyHadriel Kaplan1-3/+8
Lua-created tvbuffs should be kept around for the duration of pinfo's lifetime, instead of only for the duration of frame dissection. So instead of using the frame dissector's frame_end_routine, we'll register a callback to wmem for pinfo pool's allocator. Bug: 10888 Change-Id: I3e9db671c3f2a7cab9e258aca17f3be8acaf2417 Reviewed-on: https://code.wireshark.org/review/6768 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-24Get Wireshark to compile with afl-gcc.Gerald Combs1-2/+2
Fix errors found by American Fuzzy Lop's afl-gcc (http://lcamtuf.coredump.cx/afl/): peektagged.c: error: 'fileVersion' may be used uninitialized in this function packet-h223.c: error: variable 'circuit_id' might be clobbered by 'longjmp' or 'vfork' wslua_proto.c: error: variable 'd' might be clobbered by 'longjmp' or 'vfork' wslua_proto.c: error: variable 'dt' might be clobbered by 'longjmp' or 'vfork' Change-Id: Idd74a3ad7b236d3a8756c1e7e917b1c74143f381 Reviewed-on: https://code.wireshark.org/review/6767 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-23Fix some WsLua documentation errorsHadriel Kaplan2-9/+34
The format of the API chapter was a bit screwed up, as was the indentation level of attributes. Also, some functions introduced in 1.11.3 were not documented as being since that version. Change-Id: I7912488c6da5b5ae72933e4c5ce49f8fbf0b0e34 Reviewed-on: https://code.wireshark.org/review/6753 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-23Use luaL_{check,opt}integer() rather than luaL_{check,opt}int().Guy Harris12-73/+73
Lua prior to 5.3 defined luaL_{check,opt}int() as macros wrapping luaL_{check,opt}integer() with a cast to int; Lua 5.3 doesn't. It sounds as if the Lua developers are deprecating luaL_{check,opt}int(): http://osdir.com/ml/general/2014-10/msg46568.html Change-Id: I2d0b649dcd57ede124f31d39f7945f342ae9b18f Reviewed-on: https://code.wireshark.org/review/6744 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-22Get us building with the subdir-objects automake option.Jeff Morriss2-33/+48
subdir-objects will be enabled unconditionally in automake-2.0 and automake-1.14 gives us warnings about the upcoming change. Rework I1b3c517f08d3c752ee03cb89482ee4951ceb5bf3 (and I416f2d3611fb61659b9a7f7285e5f54a354fbe7d) to give wslua/make-reg.pl the directory of the source files rather than the full path to each. In echld don't use sources in the top-level directory in libechld: it breaks distclean with subdir-objects turned on. Bug: 10648 Change-Id: I404b074f1558376064c35d8fc96aea7e3d042a76 Reviewed-on: https://code.wireshark.org/review/6697 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-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris2-5/+8
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-12Remove emem APIs from UAT functionality.Michael Mann1-1/+7
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856 Reviewed-on: https://code.wireshark.org/review/6460 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-2/+2
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 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-01-05Replace ep_display_to_address with wmem equivalent display_to_address.Michael Mann1-1/+1
Almost all instances require using "manual" memory management, but it gets some ep_ calls out of the GUI. Change-Id: Ifa7303766b08d09442ccf3d7063cbe061578ecd9 Reviewed-on: https://code.wireshark.org/review/6318 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04Make all Lua code use wmem not ememHadriel Kaplan7-41/+38
Changed all remaining code in wslua that was using emem, to use wmem or simpler methods. Bug: 9927 Change-Id: I3d19a770e0fd77d996bdb6b61a76a722cc2bcd55 Reviewed-on: https://code.wireshark.org/review/6109 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field ↵Michael Mann1-3/+3
type. These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04Lua: replace proto_tree_add_text callsHadriel Kaplan3-3/+31
Replace proto_tree_add_text() calls in Lua API code, to use Lua-specific hfinfo items. Bug: 10828 Change-Id: I9b5899106502a9bdbc748b5ec0f27b787d374562 Reviewed-on: https://code.wireshark.org/review/6296 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-03Lua: replace deprecated functionsHadriel Kaplan4-15/+12
Remove deprecated functions from Lua API code: tvb_length and tvb_length_remaining. The calls to proto_tree_add_text() are left in, as I have no idea what to replace them with. The calls to ep_* are being left in, as they're removed by change-id I3d19a770e0fd77d996bdb6b61a76a722cc2bcd55. Bug: 10822 Change-Id: Ib0686f90be1edc892d3ecf401b91eb7484540b3e Reviewed-on: https://code.wireshark.org/review/6247 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-02Add '*.nativecodeanalysis.xml' to 'clean' targetsBill Meier1-1/+2
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6 Reviewed-on: https://code.wireshark.org/review/6220 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02Remove pkt_comment member from packet_info structure.Michael Mann1-3/+5
Change-Id: Ifd3d201a09944e3fc36188f891ea8a584886101d Reviewed-on: https://code.wireshark.org/review/5884 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-01Lua: FieldInfo '==' check isn't really equalityHadriel Kaplan1-12/+10
The FieldInfo metamethod for equality (letting you use the '==' operator) doesn't check for equality, but rather if the left-hand side is within the right-hand side. It should be equality instead. Also, all of the FieldInfo operate overloads should push a boolean even if they're false result. Bug: 10820 Change-Id: Ibddaab29713f26d22ddb4d5804b9edb15e93fd79 Reviewed-on: https://code.wireshark.org/review/6186 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-31wslua field: fix Copy-paste error (CID 1158590 & 1158589)Alexis La Goutte1-2/+2
Change-Id: I566ddd2930b5c86bc32ca9ba12cd4be7d994bd22 Reviewed-on: https://code.wireshark.org/review/6168 Reviewed-by: Anders Broman <a.broman58@gmail.com>