aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
AgeCommit message (Collapse)AuthorFilesLines
2013-07-10Document that ProtoField INT64 and UINT64 does not support value string.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=50484
2013-07-10Use luaL_optnumber for ProtoField mask, to avoid a signed cast.Stig Bjørlykke1-3/+3
This fixes bug 5734. svn path=/trunk/; revision=50483
2013-06-25Move a couple of time-related modules into wsutil.Jeff Morriss2-2/+1
A bunch of files didn't really need to include these header files so remove the include line rather than changing it. svn path=/trunk/; revision=50154
2013-06-25makefile.nmake -> Makefile.nmake and minor whitespace (spaces -> tabs) changes.Chris Maynard1-1/+1
svn path=/trunk/; revision=50140
2013-05-29wslua: Adda a wtap_encaps name to replace wtap which is too generic.Luis Ontanon1-1/+1
svn path=/trunk/; revision=49617
2013-05-29Fix what looks to be a typo in definition of wtap_encaps.Jeff Morriss1-2/+2
svn path=/trunk/; revision=49609
2013-05-29 fix for bug 7465Luis Ontanon2-1/+12
add a wiretap file type table to init.lua svn path=/trunk/; revision=49608
2013-04-09Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written toJeff Morriss2-4/+4
that directory since 2001 and reading from that directory was only left in for backwards compatibility with versions prior to r4702. I think it's now safe to remove that backwards compatibility. This eliminates the last argument of get_persconffile_path(). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437 svn path=/trunk/; revision=48797
2013-04-01In the Lua dumper code, don't bother checking whether the encapsulationGuy Harris1-18/+38
is supported before trying to open for writing - the attempt to open for writing will do the check for you. Instead, check for specific errors if the attempt to open for writing fails, and use somewhat more specific error messages for certain error codes. (We should perhaps check for even more error codes in those cases.) That gets rid of all external calls to wtap_dump_can_write_encap(), so remove it from wtap.h and make it static. svn path=/trunk/; revision=48691
2013-03-24Squelch some "casting away constness" warnings.Guy Harris2-3/+3
svn path=/trunk/; revision=48542
2013-03-23From Hadriel Kaplan and myself via ↵Evan Huus1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8496 Iterate backwards through the linked list of identically-named fields in the lua bindings since the list is, in fact, created backwards by proto_register_field_init(). There is some question about whether that is actually intended, but the rest of the code seems to assume it's normal so we will too. It was possibly a performance consideration, though that's not well-documented if so. Either way, this is the simplest and safest method of fixing the issue with the lua bindings. See the bug for more analysis. svn path=/trunk/; revision=48495
2013-03-19Added TvbRange uncompress().Stig Bjørlykke1-0/+31
svn path=/trunk/; revision=48422
2013-03-16From beroset:Anders Broman10-91/+92
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48337
2013-03-15Update Lua BitOp to version 1.0.2Stig Bjørlykke1-13/+15
svn path=/trunk/; revision=48316
2013-03-14From beroset:Anders Broman2-19/+19
made implicit casts explicit and changed a number of fields and function return values from base_display_e to unsigned because the enum was not a comprehensive list of all possible values https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48289
2013-03-12From David Arnold:Jaap Keuter1-1/+1
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools. svn path=/trunk/; revision=48261
2013-03-11Fix Coverity CID 989732: Structurally dead code.Chris Maynard1-8/+18
Also, change a few tabs -> spaces. Add modelines. svn path=/trunk/; revision=48257
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-1/+1
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris3-7/+6
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-02-26Fix a misspelled word; Do some minor tweaking of the wording of a few comments.Bill Meier1-7/+8
svn path=/trunk/; revision=47903
2013-02-26Fix spelling/typos found using a list of commonly misspelled words.Bill Meier1-4/+4
The misspellings were mostly in comments but some were in text strings visible to the user. svn path=/trunk/; revision=47899
2013-02-26it's ==> its & its ==> it's as needed.Bill Meier2-3/+3
svn path=/trunk/; revision=47898
2013-02-25Fix typos/errors and make Lua API more consistent.Michael Mann11-62/+135
From Hadriel Kaplan, bug 8393 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8393) svn path=/trunk/; revision=47885
2013-02-25LUA API improvementsMichael Mann1-8/+24
1. Add col_set_fence() equivalent 2. Update __tostring function to actually return column text From Hadriel Kaplan, bug 8295 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8295) svn path=/trunk/; revision=47882
2013-02-25Bugfix Lua pinfo.cols.protocol not holding value in postdissectorMichael Mann2-1/+19
From Hadriel Kaplan, bug 6020 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6020) svn path=/trunk/; revision=47877
2013-02-25Fix Lua 5.2 panic problems.Michael Mann3-38/+47
From Hadriel Kaplan, bug 7400 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400) svn path=/trunk/; revision=47874
2013-02-23Invert the if statement into the common form:Evan Huus1-15/+17
if (error) return error; do normal things; svn path=/trunk/; revision=47829
2013-02-23Add a return statement accidentally removed in r47783 and tweak theEvan Huus1-4/+9
brace placement so it's more obvious why the return is needed. svn path=/trunk/; revision=47828
2013-02-20Add modelines, fix indentation to be a consistent 4-spaces throughout.Evan Huus1-228/+239
svn path=/trunk/; revision=47784
2013-02-20From Hadrien Kaplan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8357Evan Huus1-13/+48
Fix the Lua tostring() method on FieldInfo objects such that it always returns a string, although the string might be '(unknown)', '(none)', or '(n/a)'. This is more conformant to Lua's API style. Also create a new 'FieldInfo.display' accessor table member, which Lua scripts can use instead of tostring() to get what the GUI displays. From me: Misc indentation fixes, remove redundant 'return' statement. svn path=/trunk/; revision=47783
2013-02-15Add a new WSLUA_CLASS_FNREG_ALIAS() macro to register methods where theGuy Harris5-36/+38
function name isn't the same as the method name; this is used if we're providing compatibility aliases for method names. Use WSLUA_CLASS_FNREG() and WSLUA_CLASS_FNREG_ALIAS() for all method registrations. Fix the spelling of "prepend", but leave a compatibility alias in place. svn path=/trunk/; revision=47667
2013-01-10From "temp4746":Anders Broman1-1/+3
wslua TvbRange:le_ustring/ustring buffer overflow's. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8175 svn path=/trunk/; revision=47012
2012-12-26OK, fine, maybe sometimes it's used; flag it with _U_ while we're at it.Guy Harris1-1/+1
svn path=/trunk/; revision=46750
2012-12-26If a parameter might be unused, mark it with _U_; don't stick in a fakeGuy Harris1-1/+1
usage. svn path=/trunk/; revision=46749
2012-12-26Fix a bunch of warnings.Guy Harris3-5/+5
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-05Whitespace changesJörg Mayer1-3/+3
svn path=/trunk/; revision=46403
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-17/+17
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-11-30Added check for missing/empty ProtoField abbrev also inStig Bjørlykke1-0/+20
integer, boolean, time and other cases. svn path=/trunk/; revision=46302
2012-11-23From mathewt via bug 8012:Stig Bjørlykke1-2/+2
Fixed lua le_int64() and le_uint64(). svn path=/trunk/; revision=46151
2012-11-18Added check for missing/empty ProtoField abbrev.Stig Bjørlykke1-0/+4
svn path=/trunk/; revision=46078
2012-10-20Make data_source opqaue, add getter for tvb.Jakub Zawadzki1-3/+3
svn path=/trunk/; revision=45672
2012-10-16Second try to fix wslua building.Jakub Zawadzki1-2/+3
svn path=/trunk/; revision=45603
2012-10-16Try to fix building wslua.Jakub Zawadzki1-1/+2
svn path=/trunk/; revision=45602
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