* ProtoFiled.uint checks the base to be a valid value to avoid an assertion in proto.c while registering the field array
* save one lua table lookup by using a reference to the dissectors table instead of looking for it by name
* set data_hanlde's value to avoid a crash while invoking it.
* make the TvbRange of Tree:add_item really optional.
svn path=/trunk/; revision=17220
load $ETH/init.lua if it exists
if we are not runninig on special privileges
load $USER/init.lua
and then all the files given with cmd line option -X lua_script:file.lua
svn path=/trunk/; revision=17210
- nmake makefile for lua plugin added.
- declare variables at the beginning of a function.
- proto_reg_handoff_lua was removed, remove remaining calls, too.
- missing functions to libethereal.def added.
add lua plugin to installer, if available.
svn path=/trunk/; revision=17196
* change the way taps work (docs coming)
* add an at_close method to the textwindow that allows the user to set a callback function to be called when the window is closed
svn path=/trunk/; revision=17166
* add a shiftC() function to every class for extracting values from the stack
* lua_pinfo.c
* fix pinfo.dst pinfo.dl_dst pinfo.dl_src pinfo.net_dst pinfo.net_src
* lua_tree.c
* ProtoTree_add_item_any() changed to use TvbRanges, a more handy way to give it optional arguments
* lua_tvb.c
* get ByteArray up and running
* create TvbRange class and use it to access the tvb (this class takes care of checking bounds so that exceptions are not thrown)
svn path=/trunk/; revision=17146
* add an isXxx() declaration
* packet-lua.c
* move the dissectors, handoffs and inits tables to the registry
* lua_proto.c
* new_protocol is now called Protocol
* move the dissectors, handoffs and inits tables to the registry
svn path=/trunk/; revision=17117
* Address' gt, ge, eq, le and lt operators
* lua_proto.c
* DissectorTable:remove and DissectorTable:add
- can take either Proto or Dissector as third argument
* lua_tree.c
* make sure we have a lua_etts array on which to add etts
* ProtoItem:add_subtree() if no ett is given don't fail use the default one.
svn path=/trunk/; revision=17111
* SubTreeType (ett) was renamed as SubTree
* lua_tap.c
- change the way the taps register (still to be finished so I won't comment)
* lua_tree.c
* SubTree(ett) moved here, now it autoregisters all subtrees created at once. The user neither does need to create a SubTreeArray(eliminated) anymore nor to register it.
* lua_proto.c
* SubTree moved out from here its "global" variables are used by lua_tree.c .
* SubTreeArray was eliminated (now ett's "autoregister")
* Created usertypes for
- Pref a preference
- Prefs all preferences of one protocol
So far they are transparent to the user.
* Proto has become a pseudo-table instead of a method based (registration in nicer)
* packet-lua.c
* runtime errors go where they are meant to:
- errors in dissector code go to the tree (a-la malformed)
- errors in registration/handoff/init use reporte_failure()
* no more Lua code to be compiled at runtime
svn path=/trunk/; revision=17110
- as of now I'm using a "boring" tap (NULL packet_cb) with a filter containing all the registered ones
* Lua code in init_lua() is not to be compiled anymore (I did)
svn path=/trunk/; revision=17108
* protect proto_item_add_* calls with a TRY CATCH to avoid the Lua state getting corrupted
* new ProtoItem:add_expert_info() call
* lua_proto.c
* protect call_dissector() and dissector_try_*() calls with TRY CATCH to avoid the Lua state getting corrupted
* ValueString makes no sense, get rid of it we'll use Lua's associative arrays instead
* lua_tvb.c
* while creating a tvb from a ByteArray copy the ByteArray's data and set the tvb's free_cb
* check bounds before calling tvb_*() to avoid a longjmp breaking Lua
* do not leak the string in Tvb_tostring()
* new Tvb:get_ipv4() call
* new Tvb:get_eth() call
* packet-lua.[ch]
* export lua_tvb and lua_malformed to other modules being the current tvb and the protocol_id of malformed
* convert some Lua to C
* do not register ValueString (eliminated)
svn path=/trunk/; revision=17106
pinfo.src = Address.ip("www.xxx.com")
pinfo.col.info = "A special packet"
if (pinfo.src_port == 2) then pinfo.col.protocol = "STRANGE" end
svn path=/trunk/; revision=17096
svn propset svn:keywords Id *
svn propset svn:eol-style native *
Todo: svn propset svn:ignore .
Because I don't know what to ignore
svn path=/trunk/; revision=17059
This is an interface to the Lua programming language.
http://www.lua.org
I've already wrote a simple dissector that calls another dissectors.
soon It will be able to register a tap and do something more.
I did not checkin changes to the Makefiles so in order to use it you must change the makefiles.
Other than that to get it to work you need to download lua-5.0.2.tar.gz into the plugin directory, uncompress it, cd to it and call make.
the interface is buggy and far from finished, time will help on this.
svn path=/trunk/; revision=17057