Commit Graph

32 Commits

Author SHA1 Message Date
Stig Bjørlykke 43851d797d Include config.h only from .c files.
This avoids a warning building epan.c which includes both config.h and wslua.h
(duplicate defines from config.h)

svn path=/trunk/; revision=36751
2011-04-21 13:13:39 +00:00
Bill Meier 79e8fdf14f Put back a 'return' statement so GCC doesn't generate a warning...
svn path=/trunk/; revision=35716
2011-01-31 04:23:46 +00:00
Bill Meier 8a07e469f3 Fix a number of msvc level 4 "Unreachable code" warnings by removing unneeded
return statements.

svn path=/trunk/; revision=35709
2011-01-30 22:32:25 +00:00
Balint Reczey 0e9ed5ecf0 Move wslua_plugin_list to epan/plugins.c, that should fix the Solaris builds finally.
svn path=/trunk/; revision=35167
2010-12-10 10:37:03 +00:00
Balint Reczey 2118fd723c Always provide wslua_plugin_list, even if we don't have Lua configured.
svn path=/trunk/; revision=35163
2010-12-09 15:20:14 +00:00
Jeff Morriss 9f3acc1e25 Aw, man, I knew this code was parsed, but I missed the docbook part. Revert 34598 and 34599.
svn path=/trunk/; revision=34602
2010-10-21 12:41:15 +00:00
Jeff Morriss 383df3dfe5 Make the indentation consistent.
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.

svn path=/trunk/; revision=34599
2010-10-21 02:50:27 +00:00
Stig Bjørlykke 30875d714c Do not load lua-scripts starting with '.'
svn path=/trunk/; revision=33793
2010-08-13 11:18:44 +00:00
Stig Bjørlykke 3dd1312d74 Load lua scripts from subdirectories in the plugins folders.
svn path=/trunk/; revision=30683
2009-10-24 13:36:16 +00:00
Stig Bjørlykke 3a5c9ec3b2 Load lua scripts in the plugins directory, both global and personal.
List loaded lua scripts in Help->About->Plugins.

svn path=/trunk/; revision=30675
2009-10-23 17:52:18 +00:00
Stig Bjørlykke ca0379ca2a Make more functions static.
svn path=/trunk/; revision=30517
2009-10-11 16:27:37 +00:00
Stig Bjørlykke 70b264328c Made lua_load_script() static.
svn path=/trunk/; revision=30236
2009-10-01 14:47:57 +00:00
Stig Bjørlykke 3531e85a00 Changed expert infos from PI_DEBUG to PI_UNDECODED for Lua errors.
svn path=/trunk/; revision=28637
2009-06-04 14:23:30 +00:00
Stig Bjørlykke 27a22f674f Postpone marking objects as expired until the whole frame is completed.
We can have a case where one Lua dissector calls another Lua dissector,
so we can't mark all objects when only one dissector is completed.

This fixes comment #37 and #39 in bug 2453.

svn path=/trunk/; revision=28325
2009-05-10 15:56:57 +00:00
Balint Reczey f64f7b1e8d Separate reassembly request methods in Lua API implementation.
Now both new-style and pinfo based method work without interference.

svn path=/trunk/; revision=27002
2008-12-15 15:46:53 +00:00
Balint Reczey 0e4856e8b9 Fix PDU reassembly for Lua dissectors.
Now Lua dissectors that do not request PDU reassembly will work again.

svn path=/trunk/; revision=26821
2008-11-21 15:47:14 +00:00
Balint Reczey e326300ef3 Fix PDU reassembly for Lua dissectors.
This hopefully really fixes bug 2146.

svn path=/trunk/; revision=26815
2008-11-20 12:54:34 +00:00
Luis Ontanon 42c3239a1a luis.ontanon@gmail.com => luis@ontanon.org
svn path=/trunk/; revision=25937
2008-08-05 21:03:46 +00:00
Luis Ontanon 006e41af12 From Balint Reczey
Fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2453

The patch fixes the problem by extending the original "outstanding stuff"
approach.

Now the pointer itself won't be NULLified, instead we track the pointers with
their expiry state in structs in the outstanding_stuff list.
The Lua objects refers to those structs instead of the actual pointers and
checks the expiry state of the pointers before accessing them.
The pointers are marked expired when the dissection of the frame is finished
and the allocated struct is freed by Lua's garbage collector.

If the garbage collector hits the struct when it holds a not expired pointer,
it marks it as expired (that means we don't have any object in Lua referring to
the pointer) and the struct will be freed at the end of the dissection of the
frame.

this is for the 1.0 branch


svn path=/trunk/; revision=25845
2008-07-26 23:41:31 +00:00
Jeff Morriss 83f9ecf96f Move privileges.c and unicode-utils.c from epan to wsutil (so things like
capinfos and dumpcap don't need to depend on libwireshark nor directly pull
in those modules).  Because capinfos and editcap were only being linked with
privileges.c if we had plugins, this allows those programs to be linked when
someone is compiling --without-plugins.

svn path=/trunk/; revision=25640
2008-06-30 17:16:29 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Jaap Keuter da005d4aaf From Márton Németh:
Cleanup ident of epan/wslua/init_wslua.c: use spaces instead of tabs.
cleanup the ident of generator scripts and for template-init.lua
Spaces used instead of tabs for indent. Removed spaces placed by generator
script just before a newline.

svn path=/trunk/; revision=25176
2008-04-25 19:04:52 +00:00
Jeff Morriss 1e65f5b562 A couple more const fixes.
svn path=/trunk/; revision=24483
2008-02-26 23:30:40 +00:00
Jeff Morriss 7ffc01c6ce Oops, freeing a const char* doesn't always work. Make it not a const.
svn path=/trunk/; revision=24482
2008-02-26 23:05:05 +00:00
Jeff Morriss 1d6df91a9d get_datafile_path() and get_persconffile_path() return malloc'd memory,
free it when we're done with the file name.

svn path=/trunk/; revision=24479
2008-02-26 19:52:21 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Stig Bjørlykke e63c643cb2 Add a cast.
svn path=/trunk/; revision=24028
2008-01-07 23:00:09 +00:00
Stig Bjørlykke 8959e6f766 From Balint Reczey (bug 2146):
Make it possible to write Lua dissectors that use TCP reassembly.

svn path=/trunk/; revision=24026
2008-01-07 21:24:23 +00:00
Jeff Morriss 53489c8f5d A few more s/fopen/eth_fopen/
svn path=/trunk/; revision=23207
2007-10-16 15:58:25 +00:00
Luis Ontanon 74cb1d2b46 - Fix the name of the disable_lua variable.
== improve documentation
   make-doc.pl ( make doc ) generates an almost complete reference manual.
 



svn path=/trunk/; revision=20192
2006-12-22 05:48:57 +00:00
Luis Ontanon 7ae6780cd6 wslua_init() must return a value
svn path=/trunk/; revision=19326
2006-09-26 04:06:17 +00:00
Luis Ontanon 6462d05044 Move the Lua interface into epan... (not a plugin anymore).
- Rename Tap into Listener
- add a mechanism to pass protocols' tap data to the Listener


svn path=/trunk/; revision=19319
2006-09-25 01:09:00 +00:00