aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2011-10-19Duplicate Lua strings we put into the private_table.stig1-2/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39468 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-18Added a private hash table to transport string values between dissectors.stig3-0/+161
This works between C and Lua. In C the pinfo.private_table pointer must be initialized using g_hash_table_new (g_str_hash, g_str_equal); In Lua the values are available using pinfo.private.<key>, and the table is created automatically on first usage. It's possible to use this datatypes: nil, boolean, number and string, but every value is converted to string so numbers must be converted using tonumber() on usage. Boolean is either nil or an empty string. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39461 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-18Use PINFO_GET_BOOLEAN for visited.stig1-12/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39458 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-13Added some Lua pinfo fields:stig1-1/+37
ethertype, fragmented, in_error_pkt, match_uint and match_string. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39407 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02From Alex Vallee via bug 6346:stig1-0/+56
Added Lua TvbRange unicode string methods. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39225 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-02Added register action for loading Lua plugins.stig2-6/+10
Removed an unused argument to wslua_init(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39214 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-25Do case insensitive search for lua scripts to load.stig1-3/+1
Skip files starting with . also on windows, as the home directory may be mounted from a server with a proper filesystem. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38737 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-25Add a method to fetch protocol description.stig1-0/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38736 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-21Add some NSTime methods: add, sub and unm.stig1-0/+36
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38648 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-19Introduce NSTime Lua object to handle nstime_t.stig6-0/+332
This object can be used to retreive other absolute and relative time fields, create and modify nstime_t values and put generated time values in the tree. Also added ProtoField.absolute_time and ProtoField.relative_time. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38616 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-11Clarify that Tvb_reported_length_remaining may return -1morriss1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38485 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-11From Alexander Stein via ↵morriss1-0/+17
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6175 : The attached patch adds the method reported_length_remaining to tvb. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38464 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-10Add a Tvb_reported_len Lua API; this may help satisfy bug 6175.morriss1-0/+15
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38461 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-08Load console.lua and dtd-gen.lua from an explicit path.gerald1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38414 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-07Replace deprecated glib functions.jmayer1-4/+4
In order to compile the whole project with -DG_DISABLE_DEPRECATED the mate plugin needs to replace its usage of GMemChunk. All other places should be clean. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38392 f5534014-38df-0310-8fa8-9805f1628bb7
2011-07-04From Michael Mann:etxrab1-0/+2
Added ability to display UTC time or UTC time with date. I liked having the difference between UTC and local time, not just setting local=UTC. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2629 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37898 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-28From bug 6057:stig1-3/+3
Improved set_color_filter_slot documentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37813 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-27From bug 6057:stig1-0/+19
Lua API: add support to temporary color filters (10 color slots) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37801 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-25From Tony Trinh via bug 6018:stig1-18/+65
Add NULL checks and fix typos in Lua error print-outs From me: Use the error message "GUI not available" when using GUI functions in tshark. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37788 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-25Added check for invalid chars in abbrev in ProtoField functions.stig1-0/+20
This fixes bug 5569. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37787 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-25Remove "range" from Lua's Pref.range(), as this value shall be fetched from stig1-4/+3
the "default". This fixes bug 5896. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37786 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-25From Tony Trinh via bug 5894:stig1-1/+1
Added argument validation to Pref.range. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37785 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-23From Tony Trinh via bug 5960:stig1-1/+1
Fix TvbRange:string() so that it returns a string that contains all bytes of the range, including zeroes (instead of being truncated at first zero). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37763 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-23Use guint32 internally to store mask.stig1-1/+1
This may fix bug 5734. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37762 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-23Rename Tvb_new_real to ByteArray_tvb, as it's a ByteArray function.stig1-7/+6
Documentation is generated from code. This fixes bug 5199. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37761 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-23Rename Tvb_tvb to TvbRange_tvb, as it's a TvbRange function.stig1-2/+2
Documentation is generated from code. This fixes bug 5006. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37760 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-01Show the plugin paths in Help→About→Plugins. Add a "-G plugins" optiongerald1-3/+3
to TShark which dumps a list of plugins. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37512 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-27Make TVBs opaque for most users.morriss2-2/+2
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37422 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-18Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5930 :morriss1-2/+5
with a variant of the patch submitted by Alexander Stein on the -dev list: Allow FT_FRAMENUMs to be added (as base BASE_NONE). My change from Alexander's patch is to disallow BASE_NONE for non-framenum integers. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37239 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-17More eradication of old-style function definitions.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37216 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-09Comment out dead code.darkjames1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37029 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-26get_host_ipaddr() was returning numeric addresses in host byte ordergerald1-1/+0
and hostnames in network byte order. Have it return everything in network byte order. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36873 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-21Include config.h only from .c files.stig13-4/+47
This avoids a warning building epan.c which includes both config.h and wslua.h (duplicate defines from config.h) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36751 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-14Zero is zero is zero, as Gertrude Stein didn't say.guy1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36639 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-05From Felix Kraemer: fix ↵morriss1-0/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5694 : This patch adds the capability to create BACnet statistics trees. Find the respective menu items under 'Statistics->BACnet'. Packets can be sorted by different criteria: - Src/Dst IP adresses - Instance ID - Object Type - Service From me: - Don't use C++/C99-style comments. - Name variables for tick_stat_node() don't need to be static. - Change updateBacnetInfoValue() to require 'data' to be ep_ allocated. Change the couple of calls that did not send in ep_ allocated data to do so. - Change one or two functions to be static. - Do not use (memory-unsafe) g_sprintf(). - Use ep_strconcat() instead of leaking memory with g_strconcat(). - Put back one if(tree) that doesn't appear to do any harm. - Remove variable declarations and #includes from the header file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36468 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-03From David Carne:jake1-1/+1
col_set_str simply stores the pointer passed to it, and luaL_checkstring returns a temporary pointer. Changing col_set_str to col_add_str in Columns_newindex seems to fix the issue. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35795 f5534014-38df-0310-8fa8-9805f1628bb7
2011-02-02A bit of Windows makefiles rework and cleanup:wmeier1-4/+4
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile; a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS; b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake) (This allows disabling "Warnings as Errors" by just changing config.nmake) c. CVARSDLL definitions (not usage) have been removed from the various makefiles. XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since: -DWIN32 and -DNULL=0 do not appear to be needed (any more); -D_MT and _D_DLL are not needed since /MP causes these definitions. d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled. E.G., 4295: array is too small to include a terminating null character - config.nmake: reformat some long lines for readability; - plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile); - dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35747 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-31Add a Manual entry to the Lua menu.jake1-0/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35729 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-31Put back a 'return' statement so GCC doesn't generate a warning...wmeier1-0/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35716 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-30Fix a number of msvc level 4 "Unreachable code" warnings by removing unneededwmeier7-21/+6
return statements. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35709 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy2-5/+5
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-10Move wslua_plugin_list to epan/plugins.c, that should fix the Solaris builds ↵rbalint1-1/+0
finally. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35167 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-09Drop init_wslua.h from EXTRA_DISTrbalint1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35164 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-09Always provide wslua_plugin_list, even if we don't have Lua configured.rbalint2-44/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35163 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-22From Regis Cridlig via bug 5326:stig1-1/+1
The Lua text string passed to column:set(text) by a dissector will eventually be reclaimed. This causes the column to display incorrect characters. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34618 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-21Aw, man, I knew this code was parsed, but I missed the docbook part. Revert ↵morriss10-1572/+1050
34598 and 34599. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34602 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-21Make the indentation consistent.morriss10-1074/+1579
Pull function names to column 0 - except when necessary for autoregistration. Put function comments before the function. For readability, put the macros for functions before the function too. Put class functions before the class. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34599 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-21Fix up indentation to get it consistent and other minor cleanup issues.morriss1-144/+161
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34598 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-21From Holger Freyther via ↵morriss1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5320 : Doing a Dumper:close() and then forcing the dumper to be garbage collected will cause a segfault. The code attempts to handle the GC that could follow but fails to do it properly. Assigning Dumper dp = NULL will only have an affect within the scope of this method... Assumingly this should be a *dp = NULL. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34597 f5534014-38df-0310-8fa8-9805f1628bb7
2010-08-29Doxygen changes.etxrab1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33990 f5534014-38df-0310-8fa8-9805f1628bb7