summaryrefslogtreecommitdiff
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2013-12-20Build correct base table in init.lua after changes in epan/proto.hStig Bjørlykke1-5/+2
svn path=/trunk/; revision=54293
2013-12-20Rewrote ProtoField_new to:Stig Bjørlykke1-47/+115
- Allow both string and integer for type and base (improve usability). - Check valid base and mask for different types (avoid crashes). - Remove ftypes.PROTOCOL from valid types. This should fix bug #9549. svn path=/trunk/; revision=54292
2013-12-19Rename more to_str functions to have ep_ in the name if they return ephemeralEvan Huus1-2/+2
buffers. Remove two unused functions. svn path=/trunk/; revision=54250
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-2/+2
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-19Renamed new_TvbRange to push_TvbRange and use this when creating a newStig Bjørlykke3-25/+17
TvbRange from a FieldInfo. This should fix the crash in bug #9483. svn path=/trunk/; revision=54247
2013-12-18Added Column clear_fence().Stig Bjørlykke1-0/+11
svn path=/trunk/; revision=54221
2013-12-18Add cast to try to fix buildbot failureMartin Mathieson1-1/+1
svn path=/trunk/; revision=54218
2013-12-18Added ByteArray base64_decode().Stig Bjørlykke1-1/+30
svn path=/trunk/; revision=54215
2013-12-15Fix some const/ not const warnings.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54114
2013-12-07Rename base_display_* to field_displayJakub Zawadzki1-4/+4
This is preparation to support ->display for FT_STRING values. svn path=/trunk/; revision=53820
2013-12-03Include <epan/dfilter/dfilter.h> in files that use display filterGuy Harris1-0/+1
routines. svn path=/trunk/; revision=53772
2013-12-03missing stdlib.h include for wslua.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53771
2013-12-02Move most of the plugin code from epan to wsutil and remove allGuy Harris2-1/+42
knowledge of particular types of plugins. Instead, let particular types of plugins register with the common plugin code, giving a name and a routine to recognize that type of plugin. In particular applications, only process the relevant plugin types. Add a Makefile.common to the codecs directory. svn path=/trunk/; revision=53710
2013-11-21Remove ethertype, mpls_label and ppids from packet_info structure.Michael Mann1-9/+1
The information was converted to "proto" data within their respective dissectors strictly for use in "Decode As". svn path=/trunk/; revision=53489
2013-11-21Detect out-of-bounds when handling zero terminated strings from a TvbRange.Stig Bjørlykke1-0/+15
This avoids a wireshark crash. svn path=/trunk/; revision=53470
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-15Make wslua byte_to_str[] array of char[3] instead of pointers to char.Jakub Zawadzki1-1/+1
XXX, it should use byte_to_hex() from to_str.c svn path=/trunk/; revision=53350
2013-11-10Fix buildbot:Jakub Zawadzki1-0/+1
wslua_proto.c(1700) : error C2065: 'TRY' : undeclared identifier svn path=/trunk/; revision=53233
2013-11-10try to fix buildbot:Jakub Zawadzki1-1/+1
./wslua_field.c:32:31: fatal error: ftypes/ftypes-int.h: No such file or directory svn path=/trunk/; revision=53225
2013-11-10Fix buildbot:Jakub Zawadzki1-0/+1
wslua_field.c(179) : error C2037: left of 'val_to_string_repr' specifies undefined struct/union '_ftype_t' svn path=/trunk/; revision=53224
2013-11-08The "file types" we have are actually combinations of types andGuy Harris1-6/+6
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2 are separate "file types", even though they both come from Network Monitor. Rename various functions, #defines, and variables appropriately. svn path=/trunk/; revision=53166
2013-11-06Add support for displaying dates as year and day-of-year (1-origin).Guy Harris1-2/+4
In the process, fix various man page descriptions of the -t flag, and add support for UTC absolute times in the iousers and iostat TShark taps. svn path=/trunk/; revision=53114
2013-11-02Require dissector_try_string to pass a data parameter to its subdissectors. ↵Michael Mann1-1/+1
There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new. svn path=/trunk/; revision=53049
2013-10-23Add Lua cleanup on shutdown, to help with memory leak detection. Bug 5575 ↵Michael Mann2-0/+8
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5575) From Robert G. Jakabosky From me: cleanup so that it applies to trunk. svn path=/trunk/; revision=52798
2013-10-22Cannot define Field refering ProtoField defined in LUA. Bug 3513 ↵Michael Mann3-1/+33
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3513) When a new Field is created, does as following: * Check whether that field is registered, by using `proto_registrar_get_byname`. This is current behavior. * (patched) If not registered, check whether that field is defined in LUA and will be registered. This is performed in `wslua_is_field_available` accessing LUA context. * If not, an error "a field with this name must exist" occurs. svn path=/trunk/; revision=52771
2013-10-13Add CMake properties to targets so that they are logically organised when ↵Graham Bloice1-0/+1
using a Visual Studio solution. Add CMake properties to group the source files in epan into logical blocks when using a Visual Studio solution. svn path=/trunk/; revision=52580
2013-10-09Prefix all "Wireshark application specific" display filters with a "_ws." to ↵Michael Mann1-8/+15
distinguish them from dissector filters. This was committed now to get it into the 1.11 release so users can start getting used to the changed filter names. svn path=/trunk/; revision=52462
2013-10-06Add support for RELATIVE-OID ASN.1 type. Bug 9192 ↵Michael Mann3-0/+5
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192) From Ed Beroset. svn path=/trunk/; revision=52393
2013-10-01Remove check_col.Michael Mann1-2/+1
svn path=/trunk/; revision=52316
2013-09-22More emem -> wmem conversion:Pascal Quantin1-2/+2
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz() - tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc() - tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz() - tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str() - update docs accordingly svn path=/trunk/; revision=52180
2013-09-22emem -> wmem conversion:Pascal Quantin3-10/+10
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-21Add _g_ to the names of functions that allocate glib memory. This is a bit moreEvan Huus2-5/+5
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures that take the appropriate wmem pool. Majority of the conversion done with sed. svn path=/trunk/; revision=52164
2013-09-13Explicit inclusion of emem.hJörg Mayer9-1/+16
svn path=/trunk/; revision=52000
2013-09-12From Robert G. Jakabosky via bug 5575:Stig Bjørlykke1-2/+7
Fix module registration. Must use lua_call() when calling luaopen_*() svn path=/trunk/; revision=51965
2013-09-10Enable Lua ldap, smb and smb2 tapsStig Bjørlykke1-3/+3
svn path=/trunk/; revision=51928
2013-09-10Added TreeItem prepend_text().Stig Bjørlykke1-0/+19
svn path=/trunk/; revision=51924
2013-09-10Fixed some NSTime error texts.Stig Bjørlykke1-3/+3
svn path=/trunk/; revision=51922
2013-09-10Fixed FieldInfo documentation.Stig Bjørlykke1-11/+14
svn path=/trunk/; revision=51920
2013-09-09Return ByteArray as "value" for FieldInfo's with type FT_NONE (which has data).Stig Bjørlykke1-3/+6
This fixes bug 5201. svn path=/trunk/; revision=51903
2013-09-09Initialize all tvb values in FieldInfo_get_range.Stig Bjørlykke1-0/+2
This fixes bug 5200. svn path=/trunk/; revision=51899
2013-09-09Removed return value from ByteArray append and prepend, as this did pushStig Bjørlykke1-6/+7
the same ByteArray twice (and thus calling the GC twice). This should fix bug 4461. Changed ByteArray concat to create a new array to be returned. svn path=/trunk/; revision=51872
2013-09-09Added DissectorTable_set and DissectorTable_remove_all to simplify changingStig Bjørlykke1-10/+94
registered port numbers in PROTO.prefs_changed. Now we only need this code in Lua plugins having port numbers prefs: PROTO.prefs.ports = Pref.range ("Ports", 0, "Port numbers", 65535) PROTO.prefs_changed() local udp_table = DissectorTable.get ("udp.port") udp_table:set (PROTO.prefs.ports, PROTO) end svn path=/trunk/; revision=51860
2013-09-08Couldn't quite figure out how to make the expert items in proto.c and the ↵Michael Mann2-3/+3
LUA API filterable (suggestions welcome!), but I wanted to start forcing dissectors to use the filterable expert API (nothing like compile errors to force change!). I created expert_add_info_format_internal (original expert_add_info_format) and used it as a placeholder for proto.c/LUA API until a solution is created. The "new" expert_add_info_format will be the "old" expert_add_info_format_text, and I'll slowly do the search/replace. For those with dissectors outside the source tree, please see tools/convert_expert_add_info_format.pl for help with the conversion. Please do not use expert_add_info_format_internal, as it's support time will be very short lived. svn path=/trunk/; revision=51844
2013-09-07Fix lua docstring causing the buildbot's documentation step to fail.Evan Huus1-2/+2
svn path=/trunk/; revision=51828
2013-09-07Added pinfo.can_desegment to lua script.Stig Bjørlykke1-0/+8
This fixes bug 5205. svn path=/trunk/; revision=51824
2013-09-07Added support for a "prefs_change" function in Lua scripts, which is calledStig Bjørlykke3-8/+44
when the preferences for the dissector are changed. This is not a 100% correct implementation at the time because the prefs_changed function in all Lua plugins will be called whenever a preference in a single Lua plugin is changed. svn path=/trunk/; revision=51818
2013-09-07Added support for integer range in DissectorTable_add and DissectorTable_remove.Stig Bjørlykke1-6/+28
This was requested in bug 6762. svn path=/trunk/; revision=51817
2013-09-07A small documentation fix for DissectorTable_remove.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=51816
2013-09-07Added syntax and range checks for Lua Prefs.range default values.Stig Bjørlykke1-7/+26
Fixed some small memory leakages. svn path=/trunk/; revision=51815
2013-09-06Make the Lua dissector "init" routine work again.Stig Bjørlykke1-12/+2
svn path=/trunk/; revision=51805