Commit Graph

76 Commits

Author SHA1 Message Date
Gerald Combs b15974d094 libethereal -> libwireshark. idl2eth -> idl2wrs. There are a _lot_ of
changes here.  It compiles OK on OS X, but hasn't been tested anywhere else.

svn path=/trunk/; revision=18260
2006-05-31 00:23:01 +00:00
Anders Broman db57e7b724 Ethereal->Wireshark
svn path=/trunk/; revision=18231
2006-05-28 16:32:49 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Gerald Combs c23899620f It looks like g_fopen() in the version of GLib that we ship with Windows
sets errno to 0 when we can't open a file.  This resurrected the annoying
"C:\Program Files\Ethereal\asn1/default.tt" error in the ASN.1 plugin,
since we depended on errno being set to ENOENT.  Move some logic around
to account for this.

svn path=/trunk/; revision=18073
2006-05-02 18:21:42 +00:00
Guy Harris 5199671441 Convert most other plugin dissectors to use the make-dissector-reg
scripts.

svn path=/trunk/; revision=17961
2006-04-22 20:26:16 +00:00
Gerald Combs 4ea62e57b0 Continue to play whack-a-mole with null dereferences. Fixes CID 146.
svn path=/trunk/; revision=17770
2006-03-30 15:34:18 +00:00
Gerald Combs 1b468857b8 Be more paranoid about dereferencing pointers (and improve readability
IMHO).  This should hopefully take care of bug 826 / CID 42.

svn path=/trunk/; revision=17744
2006-03-27 19:43:17 +00:00
Gerald Combs 642706ce97 Remove some unused #defines.
svn path=/trunk/; revision=17736
2006-03-27 16:57:05 +00:00
Gerald Combs 6be7d55c40 Further refinements for Coverity CID 42. Make some "0"s (which were
confusing my feeble mind) NULLs.  Fix up whitespace.

svn path=/trunk/; revision=17710
2006-03-23 20:13:00 +00:00
Ronnie Sahlberg f331077a60 waste a couple of bytes per tcp conversation and make the tree for acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global.
while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite   tcp analysis might actually work and work well even for tcp over tcp tunnelling. 

this also means that if you include packet-tcp.h   you also need to include emem.h .




svn path=/trunk/; revision=17681
2006-03-20 10:52:53 +00:00
Ronnie Sahlberg c1aa2aef89 coverity bug 43
svn path=/trunk/; revision=17624
2006-03-14 07:38:43 +00:00
Ronnie Sahlberg 726471b25f coverity bug#42
dereverencing a null variable


svn path=/trunk/; revision=17548
2006-03-09 12:11:21 +00:00
Guy Harris db9fba20b4 Use <wiretap/file_util.h> to include "file_util.h"; otherwise, the
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-07 02:47:09 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is 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-06 22:43:25 +00:00
Ronnie Sahlberg b177f170eb convert to g_snprintf()
also make range_convert_range() return an emem allocated string


svn path=/trunk/; revision=15660
2005-09-01 19:05:00 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-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
2005-08-08 18:50:39 +00:00
Anders Broman 6f022ad796 From Thomas Steffen:
Fix a copy-paste error in the prefs. code

svn path=/trunk/; revision=15225
2005-08-05 19:32:26 +00:00
Guy Harris a58c119084 Register the port range preferences as such, rather than doing our own
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
2005-07-24 11:14:13 +00:00
Jörg Mayer cb4ac62893 'char*' -> 'const char*' to fix warnings
svn path=/trunk/; revision=15014
2005-07-23 08:18:44 +00:00
Jörg Mayer 5b442f2279 After doing "make maintainer-clean", "svn status --no-ignore | grep ^I"
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
2005-07-10 08:04:27 +00:00
Guy Harris 802859d3fd Call the "new-style init" routine for plugins a "register" routine, as
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
2005-03-07 02:44:41 +00:00
Lars Roland 00273300e7 Preparations for dropping the old plugin api.
Introduce a new init routine for plugins, 
which does not take the plugin api table as an 
argument and allows etheral to distinguish 
between plugins using the old and the new api.

Update README.plugins accordingly

Change all g_warnings() in epan/plugins.c to report_failue().
On windows we do not have a log console open while
loading the plugins, because a log console cannot be opened before the prefs have been read. Thus g_warnings()
does not work for reporting problems with plugins.

svn path=/trunk/; revision=13596
2005-03-05 06:28:10 +00:00
Guy Harris 6616a3770c Make the "maintainer-clean" rules get rid of some additional generated
files.  Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.

Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.

Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files.  In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).

Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.

svn path=/trunk/; revision=13402
2005-02-14 20:33:57 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Guy Harris 7e58bd88ca Cast the values passed to the <ctype.h> macros so as to avoid
sign-extending 8-bit characters.

svn path=/trunk/; revision=12922
2005-01-02 00:23:50 +00:00
Ulf Lamping 78ff68d4b5 a lot of warnings removed, most of them about pointer to int casts without using the appropriate GLib macros
svn path=/trunk/; revision=12832
2004-12-25 13:49:30 +00:00
Guy Harris 017d788da0 From Lars Roland: we need to define _NEED_VAR_IMPORT_ in plugins if we
link the plugins with libethereal, so do so.

svn path=/trunk/; revision=12176
2004-10-01 19:50:03 +00:00
Guy Harris 99392257b7 In "plugins/plugin_api.h", don't include stuff required for the plugin
address table if we don't need the plugin address table, so as to catch
plugin dissectors that don't directly include stuff they need -
eventually, the plugin address table stuff should completely go away, so
we don't want dissectors depending on it.

Fix those dissectors caught by this.

Don't include "simple_dialog.h" in the ASN.1 dissector - it doesn't use
it.

svn path=/trunk/; revision=12140
2004-09-29 22:20:21 +00:00
Guy Harris 444119dbcb From Lars Roland: add an option to link plugins with libethereal rather
than using the plugin address table.

svn path=/trunk/; revision=12139
2004-09-29 19:30:10 +00:00
Guy Harris eaadcc4c62 Move various tables into the epan directory.
svn path=/trunk/; revision=12130
2004-09-29 00:52:45 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris fdfdd39080 Routines called by "g_node_traverse()" return a Boolean - FALSE to
continue traversing, TRUE to stop traversing - so make
"free_node_data()" return FALSE.

svn path=/trunk/; revision=12110
2004-09-27 08:30:25 +00:00
Guy Harris 97cd8040a8 Preference strings don't remain null pointers for long - they get
converted to pointers to null strings (see prefs.c for an explanation). 
Initialize "current_asn1" to a mallocated null string.

That lets us use "strcmp()" to compare asn1_filename and current_asn1. 
We already do that with asn1_pduname and current_pduname, so use
"strcmp()" for them as well.

Call "build_pdu_tree()" if we haven't yet built a PDU tree, even if the
PDU type preference hasn't changed.

Don't register with any of the ports unless we have a PDU tree, so we
don't try to dissect with a null PDU tree pointer.

Before constructing a PDU tree, if we already have a PDU tree, free it.

When we free data_nodes, free the data attached to the nodes.

Make a bunch of stuff static.

svn path=/trunk/; revision=12045
2004-09-19 03:00:00 +00:00
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +00:00
Guy Harris e6bc3872b0 From Lars Roland: don't link with GTK+, as it's not necessary to do so,
and as plugin dissectors shouldn't be linked with GTK+ (so that they
don't depend on Ethereal being built with a particular version of GTK+ -
Ethereal is packaged for Windows in both GTK+ 1.3[.x] and 2.x versions -
and so that they can work with Tethereal, which doesn't use GTK+).

svn path=/trunk/; revision=11840
2004-08-26 22:46:32 +00:00
Guy Harris 42b915674b Map the old one-port "generic ASN.1" TCP/UDP/SCTP port-number
preferences to the new multi-port ones, so that, instead of complaining
when the old preferences were seen, we make the port be the one port in
the new preference.

Make the "message_win" "generic ASN.1" preference an obsolete
preference, so we silently ignore it rather than complaining about it.

svn path=/trunk/; revision=11623
2004-08-08 01:20:26 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Jörg Mayer 0ca5d06e2e Change // to C90 style comment
svn path=/trunk/; revision=11576
2004-07-31 22:02:20 +00:00
Guy Harris 0ee683e0b8 From Matthijs Melchior:
add SCTP support;

	allow more than one port number to be specified;

	add recovery from garbled or incomplete ASN.1 messages.

svn path=/trunk/; revision=11572
2004-07-30 07:28:31 +00:00
Jörg Mayer fd24ad7d92 .cvsignore is dead
it has been replaced by
svn proplist -v <dir/file>
and
svn propedit <dir/file>

svn path=/trunk/; revision=11422
2004-07-18 23:44:34 +00:00
Jörg Mayer 56c759212f Add epan/dissectors/.cvsignore
Add tags and TAGS to all .cvsignore files

svn path=/trunk/; revision=11419
2004-07-18 22:51:50 +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
Guy Harris 911bad80f0 Have two strings in an enum_val_t - one that's a short string that is
convenient to put into a command line (no capital letters, no spaces to
require quotes), and one that's a detailed description for use in the
UI.  Allow either of them in the preferences file or "-o" option; use
the detailed description in the UI, and also use it when writing the
preferences out, so that the preference will be readable by older
versions of Ethereal (assuming the preference existed in that version).

Update "README.developer" to give more detail about an enum_val_t (and
to put the _t in), and to give a more detailed description of the
"radio_buttons" argument to "prefs_register_enum_preference()".

svn path=/trunk/; revision=10982
2004-05-24 02:25:21 +00:00
Olivier Biot 93751c8e32 Replace the plugin linkage libs into PLUGIN_LIBS which is generated from the
top-level configure.in when running configure.

svn path=/trunk/; revision=10699
2004-04-25 21:10:20 +00:00
Olivier Biot 4459d9f0a9 Add support for plugin dissectors on cygwin builds, by adding the following
line to every Makefile.am file for a given plugin XXX:

	XXX_la_LIBADD = -L../../epan -lethereal @GLIB_LIBS@

This way symbols defined in libethereal and GLib are resolved when linking
the plugin dissector modules.

svn path=/trunk/; revision=10601
2004-04-14 22:13:28 +00:00
Guy Harris 121f06fab7 Make "epan_init()" take, as additional arguments, pointers to routines
that dissectors should call to report file open and read errors, and
have "report_open_failure()" and "report_read_failure()" call through
those pointers, rather than being defined and exported by the
application using libethereal - instead, the application would define
those functions and pass pointers to them to 'epan_init()".

Move "report_err.h" to the epan directory, as the functions it declares
are now part of the libethereal API.

svn path=/trunk/; revision=10470
2004-03-23 21:19:58 +00:00
Jörg Mayer 12a17e8f96 Note to self: If you update the code, you should update the docs too.
Update README.plugins to use ENABLE_STATIC instead of __ETHEREAL_STATIC__
Update some plugins, that were created after my changes according to the
outdated docs.
Changed occurrences of
G_MODULE_EXPORT void plugin_reg_handoff(void)
into
G_MODULE_EXPORT void
plugin_reg_handoff(void)

as the one line Python version doesn't work with the Python of Suse 9.0

svn path=/trunk/; revision=10281
2004-03-02 23:45:34 +00:00
Guy Harris 07a989fbc6 Make the default ASN.1 file be "no file", not {Ethereal install
directory}/asn1/default.tt.

svn path=/trunk/; revision=10192
2004-02-22 23:53:57 +00:00
Guy Harris 83634f54c7 Add routines that can be called from dissectors to report file open and
read errors; there are separate implementations for Ethereal (pops up an
alert box) and Tethereal (prints an error message).

Use those routines in the ASN.1 dissector.

svn path=/trunk/; revision=10152
2004-02-21 02:15:07 +00:00
Guy Harris 0a8db3ba32 Fix a typo.
svn path=/trunk/; revision=10141
2004-02-20 22:14:12 +00:00