Wireshark-dev: Re: [Wireshark-dev] What's the state of the Meta/LUA plugins? How to continue?

Date: Mon, 25 Sep 2006 16:53:58 +0200
On 9/25/06, Ulf Lamping <ulf.lamping@xxxxxx> wrote:
LEGO wrote:
> For now I checked in a slightly  modified version into epan/ which by
> now only *nix build uses (that's why I haven't deleted the plugin
> yet).
>
Having two different ways to load lua might be confusing and difficult
to document. Please finish the changes :-)

I'm on it, but I have to get my win32 dev env to work before I can start.

> I'll be working soon in a mechanism to be able to load and use
> libwireshark.dll from lua (not just to extend ws with lua) so that
> applicaations that use libwireshark can be actually written in lua.
>

Working with libwireshark directly should have a good reason that I
can't see.
The result in the long run might be ending up with "tiny" ws-like
applications that are not combinable with each other.
Keeping lua scripts under the "hood" of ws makes it much more likely
that extensions build by third parties are combinable.
I can see that.

I still don't see the goal you're trying to achieve with the lua binding
here.
Being able to actually control ws from Lua. because for now lua code
is being called by ws and not viceversa. example: I wanted to write an
http daemon for wireshark.

I still think that being able to invoke ws directly from lua would
allow for more flexibility.

However I agree with your point.

Having a way to "remote control" Wireshark with lua - we could have a
"Tools" menu item where you can execute lua scripts - might be very helpful.

As of right now that could be implemented in lua using TextWindow.
(although It would end up in the Statistics menu, the only one
available to lua so far.)

function luaexec_menu()
	local tw = TextWindow.new("Lua Run")
	tw:set_editable(TRUE)
		
	function run(w)
		local w2 = TextWindow.new("Result")
               w2:set(assert(loadstring(w:get_text()))())
	end
	
	tw:add_button("Run",run)
end

register_menu("Lua/Run",luaexec_menu)


Luis


Regards, ULFL

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev



--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan