aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2006-02-13- disable printLuis Ontanon2-34/+142
- add a log facility to lua (so far just prints to stderr) - add settings to disable lua even if installed, to load or not to load user scripts when superuser - create a default /usr/local/share/ethereal/init.lua that blocks all the io/system calls when running as superuser svn path=/trunk/; revision=17290
2006-02-08* DissectorTable.add does not allow to add lua protocols that don't have a ↵Luis Ontanon5-43/+66
dissector. * 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
2006-02-08Include glib.h, so FALSE is defined when compiling statically.Jörg Mayer1-0/+1
svn path=/trunk/; revision=17218
2006-02-08Changed how files are loaded.Luis Ontanon1-39/+67
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
2006-02-07changes to build lua plugin with MSVC6:Lars Roland4-14/+70
- 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
2006-02-07init_routines was moved back to globals.Luis Ontanon1-1/+1
svn path=/trunk/; revision=17192
2006-02-07I Noticed a crash when registering a tap with filter during handoff (that's ↵Luis Ontanon2-46/+9
when I had lua starting) trying to see if I could move dfilter_init() before protocol registration I discovered register_final_registration_routine() neat! Lua protocols won't need a handoff routine anymore!! svn path=/trunk/; revision=17191
2006-02-06+ gui_enabled()Luis Ontanon3-10/+25
* make the gui routines call-able since the first line of the script svn path=/trunk/; revision=17190
2006-02-06svn eol-style and keywordsJörg Mayer1-1/+1
svn path=/trunk/; revision=17183
2006-02-06Lua uses the simple dialogLuis Ontanon4-1/+126
svn path=/trunk/; revision=17173
2006-02-05Add an example of tap,text window and menu usageLuis Ontanon1-0/+58
svn path=/trunk/; revision=17167
2006-02-05* move all the tap functions to lua_tapLuis Ontanon5-198/+258
* 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
2006-02-05Allow lua to register menu itemsLuis Ontanon3-0/+70
svn path=/trunk/; revision=17162
2006-02-04Propset eol-style and Id for allLuis Ontanon1-3/+20
lua_gui.h has a licence svn path=/trunk/; revision=17152
2006-02-04Give lua a minimal gui.Luis Ontanon5-1/+150
svn path=/trunk/; revision=17150
2006-02-03* packet-lua.hLuis Ontanon6-392/+537
* 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
2006-02-01From Eric Hultin:Anders Broman8-2/+1972
This patch adds support for dissection of the DCC packet as defined in CableLab's (http://www.cablelabs.com/) DOCSIS Radio Frequency Interface (RFI) specification. The latest version of this specification is currently available at http://www.cablemodem.com/specifications/specifications20.html . Packet formats for DCC are defined in sections 8.3.20 (DCC-REQ), 8.3.21 (DCC-RSP), and 8.3.22 (DCC-ACK) of the RFI specifications (referencing version CM-SP-RFIv2.0-I10-051209). In addition, this patch adds support for the DCD packet as defined in the DOCSIS Set-Top Gateway (DSG) Specification. The latest version of this specification is currently available at http://www.cablemodem.com/specifications/gateway.html . The format of the DCD packet is defined in section 5.3.1 of the DSG specification (referencing version CM-SP-DSG-I06-051209). svn path=/trunk/; revision=17138
2006-01-31It was hard.. but at the end I won (or at least i believe so...).Luis Ontanon2-16/+18
After install hello_world.lua works. svn path=/trunk/; revision=17137
2006-01-29Warning fixes: no ';' at the end of functions.Jörg Mayer6-80/+82
svn path=/trunk/; revision=17124
2006-01-29* packet-lua.hLuis Ontanon3-20/+39
* 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
2006-01-28* lua_pinfo.cLuis Ontanon3-10/+100
* 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
2006-01-28* packet-lua.hLuis Ontanon5-493/+692
* 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
2006-01-26* we need not to register the interesting fields via a tap its registration ↵Luis Ontanon4-46/+109
should be transparent to the user. - 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
2006-01-26 * lua_tree.cLuis Ontanon5-206/+358
* 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
2006-01-25two bugs lessLuis Ontanon1-2/+2
svn path=/trunk/; revision=17104
2006-01-25One step at a timeLuis Ontanon6-107/+190
several fixes and additions svn path=/trunk/; revision=17103
2006-01-25Avoid crashing when given an object of the wrong usertypeLuis Ontanon3-20/+54
format_time() format_date() report_failure() svn path=/trunk/; revision=17097
2006-01-24an Address class, changed the names of some classes, modified pinfo to be a ↵Luis Ontanon6-231/+590
table 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
2006-01-24it wasn't a goo idea,Luis Ontanon118-23305/+0
sorry svn path=/trunk/; revision=17095
2006-01-24Add register_postdissector() to the API.Luis Ontanon1-1/+6
Dissectors registered with register_postdissector() will be called after all other dissectors have been called. Use it to register mate. svn path=/trunk/; revision=17089
2006-01-24 I forgot the Licence!Luis Ontanon6-0/+167
set svn:keywords Id on source svn path=/trunk/; revision=17088
2006-01-23Use .la instead of .so as dependency in MakefilesLuis Ontanon1-7/+7
Fix svn:ignore svn path=/trunk/; revision=17087
2006-01-23Add lua-5.0.2Luis Ontanon127-2576/+26155
Split packet-lua.c Changes aren't tested. It should compile ok. Makefile.nmake still missing. svn path=/trunk/; revision=17086
2006-01-21Another iteration, new things aren't tested yet.Luis Ontanon2-242/+1094
Update README, to have a description of the classes svn path=/trunk/; revision=17067
2006-01-20Add the commit message as READMEJörg Mayer4-2/+47
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
2006-01-20Starts to work so I check it in.Luis Ontanon3-0/+2080
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
2006-01-05Bill Meier:Jörg Mayer5-15/+15
Spelling fixes. svn path=/trunk/; revision=16956
2005-12-13we are opening the file for writing....Luis Ontanon1-2/+2
svn path=/trunk/; revision=16784
2005-12-12- add Debug and Default declarations.Luis Ontanon5-9/+85
- supress unwanted console printouts. svn path=/trunk/; revision=16769
2005-12-12Avoid to crash if we are given an unexistent field.Luis Ontanon1-1/+1
svn path=/trunk/; revision=16762
2005-12-12Done is not needed anymore; Luis Ontanon1-3/+4
in Pdus transforms go before Criteria (because they are evaluated before) svn path=/trunk/; revision=16761
2005-12-11Cleanup the grammar.Luis Ontanon1-693/+152
svn path=/trunk/; revision=16759
2005-12-09Fix ...$ to : $Jörg Mayer5-6/+6
svn path=/trunk/; revision=16750
2005-11-22Trivial warning fixesJörg Mayer2-7/+7
svn path=/trunk/; revision=16561
2005-11-12minor enhancementsUlf Lamping1-1/+11
svn path=/trunk/; revision=16485
2005-11-07Use <wiretap/file_util.h> to include "file_util.h"; otherwise, theGuy Harris2-2/+2
include fails as we don't do -Iwiretap. If we have it, include <sys/stat.h> in epan/filesystem.c - we need it for stat() and the macros and structures it uses. svn path=/trunk/; revision=16410
2005-11-06replace *a lot* of file related calls by their GLib counterparts. This is ↵Ulf Lamping2-4/+6
necessary for the switch to GTK 2.6 (at least on WIN32). to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. svn path=/trunk/; revision=16403
2005-11-02minor enhancement (raised plugin version to 0.1.2):Ulf Lamping3-4/+49
PN-DCP: dissection of "DHCP/DHCP client identifier" suboption was added svn path=/trunk/; revision=16377
2005-10-31When printing the code for a display filter:Guy Harris1-27/+1
print register numbers as unsigned (they're guint32); when printing a PUT_FVALUE instruction, show the value as well as the type of the value. That requires that a bunch of types get to_repr methods; add them for PCRE (FTREPR_DFILTER-only - show the regular expression as text), tvbuffs (FTREPR_DFILTER_only - show the data as a hex string), integral types, string types other than FT_STRING, and FT_IPv6. That means we can use fvalue_to_string_repr() for FT_IPXNET and FT_IPv6 in proto_construct_dfilter_string(), and that we don't need to handle integer and floating types specially in MATE. Fix some problems with the PCRE execution code for tvbuff types. svn path=/trunk/; revision=16369
2005-10-17From Peter JohanssonAnders Broman1-1/+1
Correct a typo. svn path=/trunk/; revision=16254