aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2015-12-14Lua: Fix switch-case braces.Stig Bjørlykke1-2/+2
+ fixed a comment. Change-Id: Ib1a8449054afde3b4df7ad57f0c3da07016281c2 Reviewed-on: https://code.wireshark.org/review/12635 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-14Lua: Free Pref enum valuesStig Bjørlykke1-7/+24
Free the Pref enum values in Pref__gc(). Change-Id: I4d66dbe7ee4879f3b14094135887d78cba876ea3 Reviewed-on: https://code.wireshark.org/review/12628 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Add comments to explain what we're doing with strings.Guy Harris1-9/+47
Change-Id: I043d02092464ec8cbbec08d11b29dfee248116bf Reviewed-on: https://code.wireshark.org/review/12629 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Lua: Free Pref default stringStig Bjørlykke2-5/+8
Store the Pref default string value and ensure this is freed both when registering the pref and when not. Use g_malloc0 to allocate Pref and avoid several init's. Change-Id: I5f97a15d06068d7805f02f7c7feea61f9b2030f5 Reviewed-on: https://code.wireshark.org/review/12626 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14wslua: Change macro to avoid nuisance warning [-Wredundant-decls]João Valverde1-4/+4
Change-Id: I358735b5ff69e414a227ce8c69e75ff3e04ad3b3 Reviewed-on: https://code.wireshark.org/review/12624 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Lua: Cleanup ProtoField_timeStig Bjørlykke1-15/+10
Reverted some unneeded changes from 7f074364 because it's currently only used for FT_ABSOLUTE_TIME. Also fixed some small indent issues. Change-Id: I923e35bf8ad4e991518bee973b87d4be06137463 Reviewed-on: https://code.wireshark.org/review/12539 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-14No need to free the value of a string preference in the garbage collector.Guy Harris1-3/+10
The preference has already been deregistered at that point, so the value of the preference has been freed and the pointer to it has been set to null, so it's already been freed and its pointer no longer points to it and the free from Lua will do nothing. Change-Id: I11bf74932303151483cd3699659f67d64b466759 Reviewed-on: https://code.wireshark.org/review/12606 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13Create a way to register "capture" dissectors.Michael Mann1-1/+0
Capture dissectors could be architected like dissection dissectors, with tables and subtables and possibly using tvbs to pass there data instead of raw byte arrays. This is a first step towards that by refactoring capture_info_packet() to work off of a "capture dissector table" Registering the capture dissection functions instead of calling them directly also clears up a bunch of dissector header files who sole purpose was providing the capture dissection function definition. Change-Id: I10e9b79e061f32d2572f009823601d4f048d37aa Reviewed-on: https://code.wireshark.org/review/12581 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-12-11Lua: Check for empty name in ProtoFieldStig Bjørlykke1-0/+25
The check in tmp_fld_check_assert() does terminate with g_error if given an empty string as name, so we have to check for this. Change-Id: I084e3e715bd319484a52f60ef90c1a2aea30df1b Reviewed-on: https://code.wireshark.org/review/12534 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-11Lua: Validate ProtoExpert.new argumentsStig Bjørlykke1-1/+48
Change-Id: I0da829041cda48a35341c315a7889b557b6334d7 Reviewed-on: https://code.wireshark.org/review/12527 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>
2015-12-11Qt: Reload Lua expert infosStig Bjørlykke2-3/+4
Support reloading Lua plugins with expert infos. Use the same delayed deregister logic as for fields. Change-Id: I36efa0820050b3a7afed4de7a8b0fa16805e8dfa Reviewed-on: https://code.wireshark.org/review/12498 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>
2015-12-11new_register_dissector -> register_dissector for remaining uses.Michael Mann2-3/+3
Mostly plugins, but also LUA and generated skinny dissector. Change-Id: Ifeb4205442f9a60875266b4e82841ff38b4fdb63 Reviewed-on: https://code.wireshark.org/review/12515 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-26Lua: Switch URL to documentation to HTTPSUli Heilmeier1-2/+2
URL to documentation with https as suggested by Alexis. (s. commit ecc9c74326183e8d03eddfdbc1557919f3be6046) Change-Id: I64d82b0c07cce5658eb8f4ae758f1a42946b837a Reviewed-on: https://code.wireshark.org/review/12181 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-25Lua: fix URL to documentationUli Heilmeier1-1/+1
The Lua reference has been moved from User's Guide to Developer's Guide. Change-Id: I3489d774e54310ce49997e33d5318adf5e0bb2bc Reviewed-on: https://code.wireshark.org/review/12128 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-21Lua: Validate Proto() argumentsStig Bjørlykke1-4/+15
Check if description (protocol name) and short_name are used before registering the protocol. This because proto_register_protocol() makes sure there's not already a protocol with any of the names registered and duplicates will be reported with a g_error() which terminates the Wireshark unexpectedly. Also check if short_name contains valid characters. Give appropriate error messages. Bug: 11739 Change-Id: Ib9776a2a3406ae5278ce744defd61864ebed0282 Reviewed-on: https://code.wireshark.org/review/11995 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-17Lua: Do not deregister Listener in __gc.Stig Bjørlykke1-10/+5
Listeners should not be deregistered in __gc because they will go out of scope while in use. Instead free allocated data when deregistering the Listener (Listener.remove() and Reload Lua Plugins). Bug: 11722 Change-Id: Iadf6506757df06e476ac3cac38c05f1d1d497dc4 Reviewed-on: https://code.wireshark.org/review/11924 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-16For now, call the finish routine in Lua file writers "close".Guy Harris2-8/+8
If we ever change the way file writers work, in a fashion incompatible with the existing way they work, we'll also rename this member - and get rid of checks for earlier versions of the Lua interface. Change-Id: I64065944fa31371f5249cafd930c18f180ad7299 Reviewed-on: https://code.wireshark.org/review/11879 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-15Lua: Fixed some argument # in argument errors.Stig Bjørlykke1-4/+4
Change-Id: I1dba41c9f129d368096dd69a0f40fa2164311124 Reviewed-on: https://code.wireshark.org/review/11852 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-15Lua: Check for nil valuestring for integer fields.Stig Bjørlykke1-1/+1
Added a check for nil valuestring for all ProtoField integer types to avoid lookup when argument is not set. Change-Id: Ib4c016b69ee77dbea4bb83ac93c0d9ae9f48f236 Reviewed-on: https://code.wireshark.org/review/11845 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-15Lua: Added support for ProtoField framenum type.Stig Bjørlykke3-5/+38
Change-Id: I1d4cddd4026f08416005f2b3212536b3984d1a8d Reviewed-on: https://code.wireshark.org/review/11834 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>
2015-11-14Lua: Disallow ProtoField FRAMENUM to fetch from Tvb.Stig Bjørlykke1-0/+4
A ProtField type FRAMENUM cannot fetch value from a Tvb. Change-Id: Iff0f6df8b00445855c9030dcfa753daa62262171 Reviewed-on: https://code.wireshark.org/review/11832 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-09Call the dumper routine to finish write a file the "finish" routine.Guy Harris2-17/+17
It doesn't actually *close* any handle, so it's best called a "finish" routine rather than a "close" routine. In libwiretap modules, don't bother setting the finish routine pointer to null - it's already initialized to null (it's probably best not to require modules to set it). Change-Id: I19554f3fb826db495f17b36600ae36222cbc21b0 Reviewed-on: https://code.wireshark.org/review/11659 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include libwireshark headers from libwiretap.Guy Harris1-1/+1
Move the definitions of hashipv4_t and hashipv6_t to wiretap/wtap.h, as that's the main place they're used. Change them a bit not to depend on other stuff from libwireshark, and change the code as required by those changes. This should fix the Solaris build; apparently, the Sun^WOracle compiler is generating code for static inline functions even if they're never called, so that libwiretap ends up including code that calls tvbuff and wmem functions. There's probably further cleanup that could be done here, but this should at least fix the build, as well as getting rid of a dependency between two libraries that are at least somewhat independent (libwiretap should *not* depend on libwireshark, as some programs use libwiretap but not libwireshark, and, ultimately, we probably want it to be possible to use libwireshark without libwiretap but that'd be more work). Change-Id: I91c745282f17d7c8bff7809aa277eab2b3cf47c1 Reviewed-on: https://code.wireshark.org/review/11537 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs4-30/+30
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.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-10-07wslua: fix memleak in lua_prime_all_fieldsPeter Wu1-0/+1
Would leak some bytes after startup. Caught by LeakSanitizer. Change-Id: I4644f204343ce5a803a7dfdedac6a1960882807f Reviewed-on: https://code.wireshark.org/review/10859 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-05wslua: fix crash when a LUA error is raised in TRY blockPeter Wu2-5/+29
The dissect_tcp_pdus function in LUA is passed two LUA functions that get the PDU length and the dissect a PDU. When one of these functions fail, a longjmp is made to the the caller of lua_pcall. This is no problem for the PDU length function, but the PDU dissect function is wrapped in a TRY/CATCH/ENDTRY block which also uses longjmp and need to be fully executed. Without doing so, LUA exceptions will crash on a weird location (except_pop). Fix the crash by not using luaL_error, but throw dissector errors which properly breaks out of the tcp_dissect_pdus C function and then convert it to a LUA error such that the dissector can handle it. Test with `tshark -X lua_script:crash.lua -r ssl.pcap`: trivial_proto = Proto("trivial", "Trivial Protocol") function dissect_foo(tvb, pinfo, tree) error("triggering a LUA error"); end function get_pdu_len(tvb, pinfo, tree) return 5; end function trivial_proto.dissector(tvb, pinfo, tree) dissect_tcp_pdus(tvb, tree, 5, get_pdu_len, dissect_foo) end tcp_table = DissectorTable.get("tcp.port") tcp_table:add(443, trivial_proto) It should not crash and will print this: Lua Error: dissect_tcp_pdus dissect_func: [string "crash.lua"]:3: triggering a LUA error Change-Id: Ibd079cc5eb3a2e4d2e62ea49a512fa2cc8e561ea Reviewed-on: https://code.wireshark.org/review/10685 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-09-30wslua: do not pop from empty stack on newer LUA versionsPeter Wu1-2/+0
Fixes this failure: tshark: lapi.c:175: lua_settop: Assertion `(-(idx+1) <= (L->top - (func + 1))) && "invalid new top"' failed. Found using LUA 5.2 compiled with -DLUA_USE_APICHECK. Note that the value returned by luaopen_bit does not affect the size of the stack after using lua_call; if there are excess return values, then these will be dropped after calling lua_call. See http://www.lua.org/pil/26.2.html I also verified that the stack is still empty after calling all wslua_reg_module functions. Change-Id: Ia72635277ca4d8077e47a5c472391a78fe6d311e Reviewed-on: https://code.wireshark.org/review/10664 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-09-27Qt: Add the Dissector Tables dialog.Gerald Combs1-1/+1
Add the "Internals" menu under the View menu instead of at the top level for now at least. Add the Dissector Tables dialog there. Change-Id: Ieb23b0015591bac196e4ef94e3443832288333f9 Reviewed-on: https://code.wireshark.org/review/10654 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-04Coverity CID 1167971-1167974: constant expressions in wslua_int64Hadriel Kaplan1-4/+9
Get rid of false-positive coverity issues by using a macro instead of source code if-statement. Bug: 11501 Change-Id: I07f478ed334931f05bdfb87cb8f614b16bbf8fa8 Reviewed-on: https://code.wireshark.org/review/10376 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> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-09-03Lua: Check if having listeners before removeStig Bjørlykke1-1/+1
This avoids a warning when trying to remove a listener twice. g_ptr_array_remove: assertion 'array' failed Change-Id: I0bcbbbe3b3393a8455b51fad80c5716fc38ac50e Reviewed-on: https://code.wireshark.org/review/10370 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-23Lua: remove unneeded todo commentsStig Bjørlykke1-7/+0
Change-Id: I2591a0f21092a251e6fc4393e97ae0594318dfdf Reviewed-on: https://code.wireshark.org/review/10214 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-21Lua: check sscanf return valueHadriel Kaplan1-2/+6
Wslua's Int64.fromhex() and UInt64.fromhex() need to check the sscanf return value. Found by coverity (CID 1191368 &1191369). Change-Id: I67fba027e18341d429787515f94c794573dc41c2 Reviewed-on: https://code.wireshark.org/review/10183 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-20Add the WLAN statistics dialog.Gerald Combs1-1/+1
Instead of splitting the stats into two lists as with the GTK+ UI, add everything to an expandable tree. This allows viewing nodes on more than one network. Rename the top-level Bluetooth menu item to Wireless and put the WLAN stats dialog there. The Qt UI matches SSIDs (WlanNetworkTreeWidgetItem::isMatch) a bit differently than the GTK+ UI. Try to make the logic as plain as possible since we'll likely have to update it in the future. The addition of a custom BSSID address types means that we can't assume that everything is AT_ETHER. Add routines for checking for broadcast BSSIDs and comparing only the data portions of addresses. Move PercentBarDelegate into its own module. Use it in WlanStatisticsDialog. Change-Id: Ie4214eb00671a890871380c4a07213ebfb7585c6 Reviewed-on: https://code.wireshark.org/review/10171 Reviewed-by: Gerald Combs <gerald@wireshark.org>
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>