aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
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>
2016-01-28autotools: Don't use "user variables" to set build flagsJoão Valverde1-4/+2
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 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-01-27wslua: do not free TVB for data sourcesPeter Wu1-2/+2
Bug: 12050 Change-Id: If094f78f683776ba2ea3ddd848ec9018cba064b8 Reviewed-on: https://code.wireshark.org/review/13554 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-01-26wslua: fix memleak on error path of Tvb:bytes()Peter Wu1-5/+6
Delay allocation of a GByteArray to avoid a memleak on errors. Change-Id: I2b2ae6d33407500e81a4f45b86ef82720d3443a4 Reviewed-on: https://code.wireshark.org/review/13553 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-01-24Add the packet number to the packet_info structure, and use it.Guy Harris2-3/+3
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23More pinfo->fd->abs_ts to pinfo->abs_ts.Guy Harris1-1/+1
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac Reviewed-on: https://code.wireshark.org/review/13501 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-4/+3
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-11Lua: Added reload_lua_pluginsStig Bjørlykke1-3/+29
This makes it possible to trigger reloading Lua plugins from within a Lua plugin. This can be used when having a plugin to update local plugins from a external source. Renamed reload() to reload_packets() to clarify what's reloaded, and added a alias (marked as obsoleted) from reload(). Change-Id: I4e529992af5f651613950329e73718dbda317d2e Reviewed-on: https://code.wireshark.org/review/13024 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-01-09Add routines to add an item and return the item's real length.Guy Harris1-0/+1
proto_item_get_len() is *not* guaranteed to return a correct value. Even if there's a non-null tree item, it might be pointing to a "faked" item; it really shouldn't be used. So add proto_tree_add_item_ret_length() and proto_tree_add_item_new_ret_length(), which calculate the real length themselves and return it through a pointer. Fix as many places as we straightforwardly can to use them rather than to use proto_item_get_len(). (There's a Lua API for proto_item_get_len(), so we keep it around, but we should add Lua APIs for the new routines, and deprecate the old API.) Fix ptvcursor_add() to do the same thing that proto_tree_add_item_ret_length() and proto_tree_add_item_new_ret_length() do. Split the TRY_TO_FAKE_THIS_ITEM macros into a macro to check for the tree being null and to try to fake the item. We don't always use the former macro, as we might need to do more than just return NULL if the incoming tree is null (for example, calculating the item's real length and using it...). new_field_info() never returns NULL; remove checks for it. The check for a null tree is done before the calls to new_field_info(). Change-Id: I002a218d1f810c73e0de837e0ac6ebcde21bacec Reviewed-on: https://code.wireshark.org/review/13139 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31Don't cast away constness.Guy Harris1-4/+3
Change-Id: I37a1923c2e463346244cd5e56daf22122d119d78 Reviewed-on: https://code.wireshark.org/review/12976 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-28Don't cast away constness for the key in g_hash_table_lookup().Guy Harris1-1/+1
Change-Id: Ibd5cf8947028d90a734de629e3c4202af9d0514b Reviewed-on: https://code.wireshark.org/review/12887 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
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>