aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2012-09-23Store pointers to previously displayed and captured packet, not nstime_t deltas.Jakub Zawadzki1-2/+11
This commit reduces size (from 144B to 128B on AMD64) of frame_data structure. Part of bug 5821: Reduce per-packet memory requirements. svn path=/trunk/; revision=45071
2012-09-23Add lua_nstime_to_sec()Jakub Zawadzki1-4/+10
svn path=/trunk/; revision=45070
2012-09-23Cleanup wslua PINFO_GET_* macros. It's portable, right?Jakub Zawadzki1-47/+22
svn path=/trunk/; revision=45067
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss12-24/+0
svn path=/trunk/; revision=45016
2012-09-15From Niels Widger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7725Evan Huus1-0/+13
Add get_filter method to Wireshark's Lua interface (to correspond with the already-exposed set_filter method). svn path=/trunk/; revision=44916
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki2-2/+2
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-09-03MT: move global frame_end_routines to packet_info.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=44748
2012-07-28Always memset the packet-header struct in Lua to avoidEvan Huus1-7/+17
crashes from garbage data. Also, give Lua a copy of the packet comment if there is one. Fixes: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7538 svn path=/trunk/; revision=44093
2012-07-18Fix some system header files that were #included with "" instead of <>.Evan Huus1-2/+2
They made cppcheck unhappy. svn path=/trunk/; revision=43779
2012-07-09From Evan Huus:Anders Broman1-3/+11
Fix leaks - don't g_strdup a string just to use it in a g_strdup_printf - clean up properly in error cases in lua bindings - misc. other missing g_free() calls - one missing fclose() in the new 80211_utils https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7454 svn path=/trunk/; revision=43617
2012-06-28Update Free Software Foundation address.Jakub Zawadzki20-20/+20
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-25From Tony Trinh:Anders Broman1-1/+1
Update Lua from 5.1 to 5.2 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400 svn path=/trunk/; revision=43482
2012-06-25From Tony Trinh:Anders Broman11-59/+103
Update Lua from 5.1 to 5.2 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400 svn path=/trunk/; revision=43479
2012-06-22Give hint to check http://wiki.wireshark.org/CaptureSetup/CapturePrivileges ↵Balint Reczey1-5/+6
in Lua error messages related to running Wireshark as root svn path=/trunk/; revision=43442
2012-06-17Clean up indentation.Guy Harris1-85/+85
svn path=/trunk/; revision=43314
2012-06-05Fix Coverity 702396: tvbr is ep_ allocated so it can't be NULL.Jeff Morriss1-7/+1
svn path=/trunk/; revision=43116
2012-06-05Fix Coverity 702397: reference tvbr *after* checking that it is not NULL.Jeff Morriss1-2/+5
svn path=/trunk/; revision=43115
2012-05-25Add a "fallthrough" comment to avoid a missing break report from Coverity. ↵Chris Maynard1-0/+1
Fixes Coverity CID 702382 Missing break in switch. svn path=/trunk/; revision=42845
2012-05-21From Evan Huus:Anders Broman3-6/+8
Fix Three memory leaks and a bad if-condition, as caught by CppCheck. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7272 svn path=/trunk/; revision=42738
2012-05-14tvb_unicode_strsize() returns number of bytes, NOT number of UCS-2 characters.Jakub Zawadzki1-3/+1
svn path=/trunk/; revision=42622
2012-05-14Get rid of remaining Booleans-as-encoding-arguments inGuy Harris3-17/+113
proto_tree_add_item() calls. Add new "add_packet_field" method to the TreeItem class, taking a protocol field (*not* a protocol), TvbRange, and encoding value as arguments. Add the ENC_ values to init.lua. Make them all hex #defines so make-init-lua.pl can easily extract them. Export tvb_unicode_strsize() for use by Lua (and elsewhere as desired). Note that it handles UTF-16 and UTF-8, and fix the comment to note that its count of hexadectets *does* include the null terminator (that's what the code does). svn path=/trunk/; revision=42621
2012-04-27From Evan Huus: Fix memory leaks in wslua_tvb.c fix typos in wslu_proto.c ↵Anders Broman2-8/+14
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7202 svn path=/trunk/; revision=42281
2012-04-27From Evan Huus: Fix memory leaks in wslua_proto.cAnders Broman1-4/+12
svn path=/trunk/; revision=42280
2012-04-27From Evan Huus: Fix memory leaks in wslua_pinfo.c ↵Anders Broman1-1/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7202 svn path=/trunk/; revision=42279
2012-04-04Add a "-build" argument to checkAPIs.pl. Use that argument when buildingJeff Morriss2-2/+2
from makefiles (and thus from the buildbot). The intention is to be able to tell when a human is running the tool so we can provide more code-review guidance. As a starter, enable the "too many proto_tree_add_text() calls" check when a human is running the tool. svn path=/trunk/; revision=41943
2012-03-15Line-wrap an extremely long comment. Remove trailing white space.Jeff Morriss1-15/+23
svn path=/trunk/; revision=41552
2012-03-08Convert 4-space tabs to spaces.Guy Harris1-238/+238
svn path=/trunk/; revision=41441
2012-02-24CVARSDLL hasn't been used (is undefined) for a while....Bill Meier1-1/+1
svn path=/trunk/; revision=41180
2012-02-16Fix the rest of of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :Jeff Morriss1-34/+39
The Lua API does not have FT_*, it has ftypes.*, so use that in the documentation. Also, list out each ft so the user knows what the available options are. svn path=/trunk/; revision=41035
2012-02-14Fix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :Jeff Morriss1-13/+13
The Lua API does not have BASE_*, it has base.*, so use that. Also, list out each base so the user knows what the available options are. svn path=/trunk/; revision=41024
2012-02-14As suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6763 :Jeff Morriss1-1/+1
Give an example of a Pref.range's default value. svn path=/trunk/; revision=41023
2012-01-29Add *.sbr files to the clean target.Anders Broman1-1/+1
svn path=/trunk/; revision=40762
2012-01-25Fix usage of g_ascii_strdown() and g_ascii_strup() - they do *not*Guy Harris1-10/+10
modify the string in place, they return a g_mallocated modified version of the string passed into them. svn path=/trunk/; revision=40727
2012-01-24Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6738 :Jeff Morriss1-1/+1
size_t is sometimes an integer and sometimes a long. To avoid compiler warnings when formatting it, cast it to a long. svn path=/trunk/; revision=40682
2012-01-13Fix some Dereference of null pointer Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=40456
2011-11-08packet_info's in_error_pkt is now a bitfield like in_gre_pkt.Chris Maynard1-1/+1
svn path=/trunk/; revision=39764
2011-11-07Do not return from within a TRY/CATCH/ENDTRY because this will make theStig Bjørlykke1-8/+11
except stack invalid, and will lead to a crash. In this case it was when calling a dissector from a table in a Lua script. svn path=/trunk/; revision=39748
2011-11-06From Robert G. Jakabosky via bug 5575:Stig Bjørlykke6-18/+68
Fix memory errors in Lua dissectors. - Free Tvb when created from ByteArray. - Free TvbRange correctly. - Free string from get_persconffile_path and get_datafile_path. - Some code cleanup. svn path=/trunk/; revision=39744
2011-10-31No need to ep_strdup a string to lua_pushstring.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=39684
2011-10-30Don't ep_strdup the protocol name when register a dissector, becauseStig Bjørlykke1-1/+1
this name will be collected when loading a capture file and the name will be gone. svn path=/trunk/; revision=39681
2011-10-25Allow signed integers displayed as BASE_HEX_DEC.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=39571
2011-10-25Added another Lua warning:Stig Bjørlykke1-0/+2
- FT_FRAMENUM can not have a bitmask. svn path=/trunk/; revision=39563
2011-10-25Added Lua error messages when:Stig Bjørlykke1-0/+7
- Adding a INT64/UINT64 field with a value string (currently unsupported). - Trying to display a signed integer as hexadecimal. svn path=/trunk/; revision=39562
2011-10-19Duplicate Lua strings we put into the private_table.Stig Bjørlykke1-2/+7
svn path=/trunk/; revision=39468
2011-10-18Added a private hash table to transport string values between dissectors.Stig Bjørlykke3-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. svn path=/trunk/; revision=39461
2011-10-18Use PINFO_GET_BOOLEAN for visited.Stig Bjørlykke1-12/+1
svn path=/trunk/; revision=39458
2011-10-13Added some Lua pinfo fields:Stig Bjørlykke1-1/+37
ethertype, fragmented, in_error_pkt, match_uint and match_string. svn path=/trunk/; revision=39407
2011-10-02From Alex Vallee via bug 6346:Stig Bjørlykke1-0/+56
Added Lua TvbRange unicode string methods. svn path=/trunk/; revision=39225
2011-10-02Added register action for loading Lua plugins.Stig Bjørlykke2-6/+10
Removed an unused argument to wslua_init(). svn path=/trunk/; revision=39214
2011-08-25Do case insensitive search for lua scripts to load.Stig Bjørlykke1-3/+1
Skip files starting with . also on windows, as the home directory may be mounted from a server with a proper filesystem. svn path=/trunk/; revision=38737