Commit Graph

91 Commits

Author SHA1 Message Date
Jörg Mayer 1fbacc90d3 Revert my previous patch - something else was seriously screwed up
svn path=/trunk/; revision=15118
2005-07-27 16:05:41 +00:00
Jörg Mayer 1a3afc844f gcc-4.0 (GCC) 4.0.2 20050720 (prerelease) (SUSE Linux)
fails when trying to use varargs. Due to a missing include
config.h we were using varargs with proto.h


svn path=/trunk/; revision=15117
2005-07-27 15:08:22 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Jörg Mayer ca322883d6 Change proto_register_protocol to use 'const char*' instead of 'char*'
svn path=/trunk/; revision=14966
2005-07-20 11:01:35 +00:00
Ulf Lamping e8939e1f60 fix three doxygen warnings
svn path=/trunk/; revision=14959
2005-07-19 20:49:28 +00:00
Tomas Kukosa bab34b522b new field type FT_GUID
svn path=/trunk/; revision=14845
2005-07-04 13:04:53 +00:00
Guy Harris b67f63560e More constification.
svn path=/trunk/; revision=14740
2005-06-24 02:51:01 +00:00
Gerald Combs 3a6c9ab134 Fix a format string vulneratility in the AFP dissector identified
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
2005-06-20 19:35:58 +00:00
Jörg Mayer 488483855f Get rid of several megabytes worth of warnings about
"discards qualifier from assignment".

svn path=/trunk/; revision=14663
2005-06-16 17:23:34 +00:00
Ulf Lamping 9784fa242a add new function proto_tree_move_item(), which will move an already existing proto_item inside the tree (but it can't be moved to a different "tree level")
svn path=/trunk/; revision=14524
2005-06-02 18:35:20 +00:00
Ronnie Sahlberg 2bc81b2a48 Major speed improvement for filtering and dissection.
It should not dump core as far as all my tests are concerned and Menu_Statistics/ProtocolHierStats work

It needs more testing and there might still be cases where it will crash that will need to be fixed  but I feel it will be worth it since it will decrease the time to filter very large capture files dramatically.

Real significant performance boost for very large captures.


(If we cant fix all the problems we can just revert this patch)



svn path=/trunk/; revision=14051
2005-04-11 08:43:51 +00:00
Ronnie Sahlberg df98534657 From Didier:
optimization for COLUMNS to make ethereal faster when filtering

optimization to make the slow find_protocol_by_id() fast.
(idea from Didier, implementation modified by me to be less intrusive)



svn path=/trunk/; revision=14026
2005-04-07 12:00:03 +00:00
Ulf Lamping 58e7915cc0 add a DISSECTOR_ASSERT_NOT_REACHED() macro
svn path=/trunk/; revision=13870
2005-03-22 23:59:54 +00:00
Ulf Lamping e378098855 from Micheal Duigou: add some doxygen tags and some changes to README.developer
svn path=/trunk/; revision=13725
2005-03-11 21:14:38 +00:00
Guy Harris 2617e40356 Add a REPORT_DISSECTOR_BUG() macro to let caller-specified messages be
used in DissectorError exceptions.

svn path=/trunk/; revision=13079
2005-01-17 00:18:39 +00:00
Guy Harris 2bdef3c122 Rename the FieldError exception to DissectorError.
Add a DISSECTOR_ASSERT() macro, which is the usual type of assertion
macro, but throws a DissectorError exception with a message giving the
flien and line number and the failed test as a string.  Use that macro
in "alloc_field_info()".

Report that exception in the Info column and the protocol tree, as well
as logging the exception failure with g_warning().

svn path=/trunk/; revision=13078
2005-01-16 23:30:55 +00:00
Guy Harris 4c45795dab Constify a pointer, so that the array of pointers to ett_ values can be
const, although the pointers can't point to consts (as the values get
filled in as they're registered).

svn path=/trunk/; revision=12981
2005-01-07 12:56:21 +00:00
Guy Harris 55465228b2 "proto_registrar_get_byname()" doesn't modify its argument, so make it
"const char *".

svn path=/trunk/; revision=12888
2004-12-31 02:02:19 +00:00
Gilbert Ramirez f676f7107b Add a "-G fields2" option which is like "-G fields", but extends the field
records by tw fields: base (for integers), and blurb

Add a "-G values" option which shows value strings and true_false strings for
the fields that have them.

svn path=/trunk/; revision=11954
2004-09-10 15:21:20 +00:00
Guy Harris c68f62210f Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.

Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.

Use those routines in the RSVP dissector.

svn path=/trunk/; revision=11796
2004-08-22 00:31:58 +00:00
Olivier Biot a11651260b From Lars Roland: With this patch print.(c/h) and ps.(c/h) don't belong to
the DISSECTOR_SUPPORT_xy files any longer and as a consequence they 
won't be linked into libethereal.

svn path=/trunk/; revision=11559
2004-07-29 00:11:14 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Ulf Lamping 8da8e54fa6 remove FI_LINK again,
as this info can be derived from the presence of the FT_FRAMENUM field

svn path=/trunk/; revision=10901
2004-05-15 00:52:02 +00:00
Ulf Lamping 1314808bd5 add support to link from specially marked fields to related packets,
a doubleclick will follow the link

svn path=/trunk/; revision=10892
2004-05-14 15:55:37 +00:00
Ulf Lamping 8228cd1b79 prepared for generate documentation using doxygen,
added lot's of new (hopefully correct) comments

svn path=/trunk/; revision=10841
2004-05-10 23:13:55 +00:00
Ulf Lamping b3dc21eb5f use GNUC_FORMAT_CHECK in every appropriate function
svn path=/trunk/; revision=10838
2004-05-10 14:02:17 +00:00
Ulf Lamping 685195c073 first try to get rid of annoying double definition of the proto_tree_add_xy_fromat functions,
because of GNUC printf format checks

svn path=/trunk/; revision=10837
2004-05-10 08:29:18 +00:00
Guy Harris 15af0f656f From Lars Roland: add support for building a libethereal.dll with MSVC:
add a config.nmake option to control whether to build
	libethereal.dll or not;

	remove "./wiretap" from PATH to prevent problems due to
	wrongly-loaded files;

	build dissector.lib with MSVC;

	move "print.c" and "ps.c" to the dissector helpers, as "print.c"
	imports variables from packet-frame.c and packet-data.c, which
	are in libethereal;

	move "g711.c" out of the dissector helpers, as they're used only
	by Ethereal in a tap, not in Tethereal or in any dissector;

	add a .def file for libethereal;

	arrange to declare global variables exported from libethereal
	with "__declspec(dllimport)" when building programs that import
	those variables;

	update the NSIS installer.

Make the "configure" script define ETH_VAR_IMPORT as "extern".

svn path=/trunk/; revision=10834
2004-05-09 10:03:41 +00:00
Ulf Lamping b964421aec added changed some comments to better reflect current "behaviour"
svn path=/trunk/; revision=10833
2004-05-09 09:26:31 +00:00
Olivier Biot 8d29376f42 Squelch a compiler warning (extraneous extern on struct).
Fix the PROTO_ITEM_IS_XXX and PROTO_ITEM_SET_XXX macros by replacing
the if(x) with trigraphs so the macros can still be used in subsequent
conditional tests.

svn path=/trunk/; revision=10758
2004-05-01 20:15:56 +00:00
Ulf Lamping 6faeb75881 prevent null pointer exception
svn path=/trunk/; revision=10755
2004-05-01 18:39:07 +00:00
Ulf Lamping d9118dc089 add PROTO_ITEM_SET_HIDDEN() and PROTO_ITEM_SET_GENERATED(),
this sets flags for later rendering of the field data

svn path=/trunk/; revision=10752
2004-05-01 15:15:08 +00:00
Ulf Lamping 37fc156dc6 removed unused things
svn path=/trunk/; revision=10740
2004-04-30 06:56:15 +00:00
Guy Harris 044f075c66 From Tomas Kukosa: add APIs to get the parent of a protocol tree item
and the item N levels up from a protocol tree item.

svn path=/trunk/; revision=10486
2004-03-25 23:55:21 +00:00
Guy Harris a6ed2d499a From Tomas Kukosa: BER dissector enhancements and proto.c updates to
support them.

From Ronnie Sahlberg: Kerberos updates with new constants from the
current draft, decryption and dissection of Kerberos blobs, and changes
to work with the changed BER dissector.

svn path=/trunk/; revision=10479
2004-03-25 09:18:03 +00:00
Richard Sharpe fa9874ef73 Apply the patches from Tadaaki Nagao for a global version of disabled
protocols ...

svn path=/trunk/; revision=9538
2004-01-03 18:40:08 +00:00
Gilbert Ramirez 058ef64db8 Add the ability to print packet dissections in PDML (an XML-based format)
to tethereal. It could be added to Ethereal, but the GUI changes to
allow the user to select PDML as a print format have not been added.

Provide a python module (EtherealXML.py) to help parse PDML.

Provide a sample app (msnchat) which uses tethereal and EtherealXML.py
to reconstruct MSN Chat sessions from packet capture files. It produces
a nice HTML report of the chat sessions.

Document tethereal's PDML and EtherealXML.py usage in doc/README.xml-output

Update tethereal's manpage to reflect the new [-T pdml|ps|text] option

svn path=/trunk/; revision=9180
2003-12-06 06:09:13 +00:00
Guy Harris fa1de9d824 It turns out the protocol tree parent link was used, so we need it in
our new scheme.

svn path=/trunk/; revision=9172
2003-12-04 19:53:54 +00:00
Guy Harris f0b9d12b6a Don't use GNodes for the protocol tree, put the sibling pointer, and
pointers to the first *and* last child, in the "proto_node" structure
itself.  That saves us one level of indirection and memory allocation,
and lets us append to a tree by appending to the last child directly,
rather than having to scan through the list of siblings of the first
child to find the end of that list.

svn path=/trunk/; revision=9171
2003-12-04 10:59:34 +00:00
Guy Harris dcd98ae8d3 The "ptr_u" unions no longer have a "next" pointer - they now just have
one member - or have one that's not used, so get rid of those unions.

svn path=/trunk/; revision=9151
2003-12-03 09:28:26 +00:00
Guy Harris ed2ae2d8d3 Instead of requiring slab-allocated structures to have a "next" pointer,
when adding them to the free list, cast the pointer to the structure to
a pointer to a "freed_item_t" which contains the "next" pointer.

This reduces the memory requirement for some of those structures, and
leaves us free to slab-allocate structures that have a "next" pointer
for other reasons.

svn path=/trunk/; revision=9150
2003-12-03 08:53:37 +00:00
Guy Harris bd9f96738c From Didier Gautheron: put an "fvalue_t" structure into a "field_info"
structure, rather than separately allocating "fvalue_t"s and having the
"field_info" structure point to them - this appears to speed up protocol
tree construction a bit.

svn path=/trunk/; revision=9146
2003-12-02 21:15:49 +00:00
Ronnie Sahlberg eb39a99b2c Speed updates
create generic macros for allocating/freeing structures.

remove one more slow GMemChunk and replace it with a simple linked list

~4% speed improvement in my tests.

the allocated data is never freed.   this may be a problem if ethereal is
ever supported on a platform lacking resource tracking but makes the
implementation faster and simpler.

svn path=/trunk/; revision=9095
2003-11-26 12:22:22 +00:00
Ronnie Sahlberg 9d88e58e51 remove another slow GMemChunk from ethereal making ethereal a little bit faster
svn path=/trunk/; revision=9085
2003-11-25 14:07:45 +00:00
Guy Harris 122dd3959c Make the recent epan/proto.{c,h} change compile.
svn path=/trunk/; revision=9075
2003-11-24 22:11:55 +00:00
Ronnie Sahlberg fa1ee7667b performance enhancement to proto.c
Removed the GMemChunk used to allocate/free field_info structures
and used a free list to store the freed structs until they are allocated again.

Ethereal will allocate more field_info structs as it needs to but never free them. Instead the are just placed in a cheap and fast free list so that if we
want to use the struct again, this will be fast.

This affects the speed of the two functions
alloc_field_info() that should be slightly faster now
free_field_info() that was replaced with a 2 line macro.

All in all  my testing suggests that ethereal is 2-3% faster with this patch.

svn path=/trunk/; revision=9073
2003-11-24 21:12:10 +00:00
Ronnie Sahlberg 7eef1914e0 Performance fix
In the GPROF logs proto_registrar_get_nth() used to take anything between 2.5 and 5.5% of the time.

Replace the GLIB array with a handroleld one for one of the private structures.

the function should now be virtually zero cost
and thus ethereal should be 2.5-5.5% faster on those traces.

anyone that wants to, please rerun GPROF with this fix and see what has changed.

svn path=/trunk/; revision=9058
2003-11-21 14:58:49 +00:00
Guy Harris 7bd2e232a9 Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.

Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).

Change some direct dissector calls to go through handles.

svn path=/trunk/; revision=8979
2003-11-16 23:17:27 +00:00
Guy Harris 0c0ef44095 Make the "fvalue_set" methods for types whose value is allocated free
any previously-allocated version first, so that they don't leak memory.

From Olivier Biot: add a "proto_item_append_string()" routine, to append
to the string value a protocol tree item has.

svn path=/trunk/; revision=8821
2003-10-29 23:48:14 +00:00