Lex code is often hard for humans to understand... neither of the error conditions found would be happening...
One was marked as error because coverity does not understand that yyterminate() breaks execution.
The other marked as an error because coverity is not able to figure out that the error appears in an actions against two different rules that will not ever match toghether.
svn path=/trunk/; revision=17584
- By the same token get rid of ProtoFieldArray having Proto.fields attribute been a lua "Array" containing fields.
(still untested, and probably broken)
svn path=/trunk/; revision=17486
make sure isXxx() functions do not trigger an error, we want them to return not to pop the stack back to the lua caller.
svn path=/trunk/; revision=17411
- add doComments
- fix an error in DissectorTable_remove
- reorganize DissectorTable_try
- elua.h
squelch some warnings
- Makefile.nmake
- replace the $^ macro with the targets (i.e. do what nmake was supposed to do)
- move the doc target into the conditional part
svn path=/trunk/; revision=17406
- also supress Address__ge and Address_gt because re-reading the ref manual I noticed that they are suplerfluous (Lua assumes that a > b is equivalent to b < a, which in most cases (as this) it does)
- have elua_makedoc.pl hanlde docomments in more than one line and after the line where the entity s defined.
svn path=/trunk/; revision=17382
- Changed some Macros
- Have dump:close NULLyfing the boxed object so that no futher operations are performed on a dumper once is closed.
- Check if elua_register.h has changed and avoid overwriting it if it hasn't changed to avoid unnecessary compilations.
svn path=/trunk/; revision=17374
- have elua_makereg.pl generating the declaration and registration Macros for each module
- start of elua_makedoc.pl that should generate the Reference Manual from the code.
svn path=/trunk/; revision=17362
- fix args of Dumper:new_for_current
- add a semicolon after LUA_CLASS_DECLARE(PseudoHeader,PSEUDOHEADER) that caused an error (Lesson: Even if trivial one should test changes, there's always a typo arround the corner)
svn path=/trunk/; revision=17329
- columns live for less than a packet's time, use ep_alloc not g_malloc
- tvbranges are ephemeral too
doc/ is to remain as a placeholder for upcoming docs.
lualib/ is to be deleted (if needed it should go in trunk) but it appears that once I added if I do not check it in I cannot delete it.
svn path=/trunk/; revision=17305
- 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
* 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
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
* 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
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
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
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
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
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
TPG now uses the ignore feature of tvbparse
named sub_rules can have cardinality
epan/tvbparse.c:
do not crash on zero cardinality
svn path=/trunk/; revision=16065
I've changed all settings I could find to TRUE. It might be reasonable to change some protocol settings back to FALSE, if reassembling fails very often.
svn path=/trunk/; revision=16048
that we don't have all the lexical analyzers in libethereal share them
(note that they're already static in radius_dict.l, so they weren't
sharing with any other lexical analyzer), and so that OS X 10.3.9's
run-time linker doesn't get upset at finding them defined in libethereal
and the MATE plugin.
Fix up indentation.
svn path=/trunk/; revision=15961
directory to the epan directory. Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.
Fix Gerald's e-mail address in files we're moving.
svn path=/trunk/; revision=15844
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.
Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).
svn path=/trunk/; revision=15758
to fix compilation under Windows NT. This should fix bug 403.
The changes were made using "find . -name Makefile.nmake | xargs perl
-pi.bak -e 's: /y::i'". They appear to work under XP, but if anything
broke I blame Larry Wall.
svn path=/trunk/; revision=15710
Makefile.nmake instead of doing our own XCOPYing. Use the "clean-deps"
target when we're done instead of leaving DLLs lying around.
Normalize the use of underscores vs hyphens in the "clean-deps" target.
svn path=/trunk/; revision=15704
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...
What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.
As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.
Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...
As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...
svn path=/trunk/; revision=15520
"conversation_add_proto_data()" is supposed to be a protocol ID, as
returned by "proto_register_protocol()". In addition, there are two
different types of protocol data being attached to a conversation; use
different protocol IDs for them, so we don't misinterpret an
"iap_conversation_t" as a "lmp_conversation_t" or vice versa.
svn path=/trunk/; revision=15265
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants
svn path=/trunk/; revision=15264
"make distclean", even though they come with the distribution, and
make the one in plugins/xml/Makefile.nmake match the one in some other
files.
svn path=/trunk/; revision=15214
range implementation.
Make string preferences "const", to squelch compiler warnings, and make
other variables and arguments "const" to match.
Port numbers are unsigned; display them as such.
svn path=/trunk/; revision=15037
include it in "pinfo_stats_tree.c" (which defines it) and
"stats_tree_plugin.c" (which refers to it).
Make all the other routines defined in "pinfo_stats_tree.c" static, as
they're not used outside "pinfo_stats_tree.c".
Get rid of declaration of unused "register_http_stat_trees()".
svn path=/trunk/; revision=15035
returned quite a list of files. Add them to MAINTAINERCLEANFILES.
Whitespace changes (replace multiple spaces by TABs, in a few cases this
needed to be done at the beginning of Makefile lines.
svn path=/trunk/; revision=14891
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.
Make those routines, and "val_to_str()", return a "const" pointer.
Update dissectors as necessary to squelch compiler warnings produced by
that.
Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string. Clean up some other
"match_strval()"/"val_to_str()" usages.
Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.
Make some global variables in the AFS4INT dissector local.
Make some routines not used outside the module they're in static.
Make some tables "static const".
Clean up white space.
Fix Gerald's address in some files.
svn path=/trunk/; revision=14786
create the top-level protocol tree item, until the dissector accepts the
packet as being for it.
"strcmp()" isn't a Boolean; don't treat it as such.
Get rid of trailing white space.
svn path=/trunk/; revision=14750
IDL (and re-insert an earlier bug fix into the CosNaming and
CosEventComm dissectors), and add a new check added to ethereal_gen.py
to the Tango dissector.
svn path=/trunk/; revision=14745
by iDEFENSE. Add constant format strings to proto_item_append_text()
in a bunch of other dissectors. Copy a comment from proto.c to proto.h.
svn path=/trunk/; revision=14713
A new plugin based on GIOP to recognize Tango packets. TANGO is
an object oriented distributed control system based on CORBA. Tango is
being actively developed as a collaborative effort among the ESRF, Soleil, Elettra and ALBA synchrotron facilities. TANGO is an open source
project hosted by SourceForge.
svn path=/trunk/; revision=14513
replace dissect_ndr_uuid_t by dissect_dcerpc_uuid_t, as this is the correct function to use and will prevent a problem with access to non existing private_data in dissect_ndr_uuid_t
svn path=/trunk/; revision=14506
- pdu transports were upside down (ip/tcp vs tcp/ip)
- the gop to gog index was not being populated
- tell svn to ignore generated c files
svn path=/trunk/; revision=14416
in the plugins subdirectory. This target will copy all plugins to plugins/$(VERSION), thus (t)ethereal will
find and load the plugins when called from within the source tree.
call this target from the main nmake makefile after
installing other dependencies. call it from the nmake makefile
in the doc subdirectory before calling "tethereal -G".
This way "tethereal -G" will recognize the filterable
fields from the plugins, too.
svn path=/trunk/; revision=14284
- added support for local connection options
- added missing "Response Acknowledgement (000)" response code
- got rid of "display_dissect_tree" preference and code
- increased version number in moduleinfo.h
svn path=/trunk/; revision=14225
a first step of cleaning up the mgcp dissector:
- re-indenting/formatting the file as it was tricky to follow
- some code simplification and commenting (more to do)
- losing some unnecessary includes (not needed under linux at least...)
- show duplicate request and response fields in tree (previously hidden)
- improved duplicate response detection
- fix a couple of problems shown by fuzz testing
svn path=/trunk/; revision=14181
- allow dissector to show "MGCP/SDP" in the Protocol column, at least when
the 'Display the number of MGCP messages' preference is switched off
- when displaying the command verb, show in the tree the full verb name as
well as the 4-letter code
- show the links to response and request messages as being [generated]
- fixed some indentation problems
svn path=/trunk/; revision=13972
get rid of a debugging printout;
in "get_agentx_pdu_len()", fetch the payload length in the right
byte order.
If the NETWORK_BYTE_ORDER flag isn't set, that means "little-endian",
not "host byte order" - the host on which I'm typing this is big-endian!
That means that using the "g_hton[ls]()" macros on the result of
"tvb_get_ntoh[ls]()" won't give you little-endian values on a big-endian
host; just directly use "tvb_get_letoh[ls]()" to fetch little-endian
values.
Use "proto_tree_add_item()" whenever possible.
svn path=/trunk/; revision=13834
Instead of first running the lexer to create a list of items and then iterate through this items to create the tree, just create the tree from the lexer.
svn path=/trunk/; revision=13696
NOTE: we need to make sure that all the media types registered in the XML dissector get registered with the line-based text dissector as a fall-back when the XML dissector is disabled.
svn path=/trunk/; revision=13683
it serves the same purpose as the register routine in a built-in
dissector, and don't require all dissectors to have one, as they might
just be taps.
Get rid of the stats tree's init routine, as it's just a tap, and as it
doesn't do anything.
Update the idl2eth Python script to generate plugins with register routines.
svn path=/trunk/; revision=13644