Commit Graph

258 Commits

Author SHA1 Message Date
Gilbert Ramirez f14a6b8b91 Hopefully the last time I have to change my e-mail address.
svn path=/trunk/; revision=4199
2001-11-13 23:55:44 +00:00
Guy Harris f0c86f5537 Include "conversation.h", as the plugin API now includes the routines to
create and find conversations.

svn path=/trunk/; revision=4155
2001-11-04 22:14:43 +00:00
Guy Harris 8cc7d53183 Declare routines exported to plugins through the plugin API table as
extern, so that "plugin_api_defs.h" works on platforms where you have to
use the plugin API table.

svn path=/trunk/; revision=4151
2001-11-04 03:55:52 +00:00
Guy Harris d859325753 Additional routines made available to plugins, from Tomas Kukosa.
svn path=/trunk/; revision=4150
2001-11-04 03:37:29 +00:00
Guy Harris f2676ba1c9 Tvbuffification of Negotiate Protocol, from Ronnie Sahlberg.
Fix up Info column to put "Request" or "Response" *after* the name of
the request.

Give the Negotiate Protocol request its full name.

svn path=/trunk/; revision=4139
2001-11-03 11:42:50 +00:00
Guy Harris f62a97cf2d TVBUFF_SUBSET tvbuffs share a "ds_name" with the parent tvbuff, so their
"ds_name"s shouldn't be freed when the tvbuff is freed.  (Thanks and a
tip of the Hatlo hat to the FreeBSD memory allocator for complaining
about multiple frees of the same string.)

svn path=/trunk/; revision=4136
2001-11-03 03:49:34 +00:00
Guy Harris ba06fa6490 More indentation fixes.
svn path=/trunk/; revision=4135
2001-11-03 03:41:35 +00:00
Guy Harris 66c2940031 When freeing the "gpa_hfinfo" pointer array, free the array itself, as
well as the structure containing it.

svn path=/trunk/; revision=4131
2001-11-03 01:19:59 +00:00
Guy Harris 0c13da5c70 Rename the "private" member of the "packet_info" structure to
"private_data", to keep C++ compilers from getting heartburn.

svn path=/trunk/; revision=4130
2001-11-03 00:58:52 +00:00
Guy Harris 6d24afcb1f Fix the indentation.
svn path=/trunk/; revision=4129
2001-11-03 00:19:26 +00:00
Gilbert Ramirez 920b294065 Fix leak of ds_name. Thanks to Sirop Erable <matrix_ottawa@yahoo.ca>
svn path=/trunk/; revision=4128
2001-11-02 21:39:34 +00:00
Guy Harris 5511e79593 Add support for 64-bit signed integers in "int-64bit.[ch]", add an
FT_INT64 type, and make the Diameter dissector use it.

Handle the 64-bit integer types in the display filter semantics checks.

svn path=/trunk/; revision=4125
2001-11-02 10:09:51 +00:00
Guy Harris 4b0bce7f97 Put "extern" in front of a pile of function declarations.
It makes no difference if they really are function declarations;
however, in plugins, when building on OSes that don't let
dynamically-loaded modules access functions in the main program (e.g.,
Windows), when compiling a plugin, <plugin_api.h> defines the names of
those functions as (*pointer_name), so they turn into declarations of
pointer variables pointing to the functions in question, and, on
platforms with a def/ref model in the linker, if a plugin has more than
one source file that gets linked into the plugin, the linker may get
upset at two definitions of the same variable.

svn path=/trunk/; revision=4114
2001-10-31 07:47:27 +00:00
Guy Harris dffa2a989a Get rid of a bunch of stuff that was there to support non-tvbuffified
dissectors and that's no longer needed.

svn path=/trunk/; revision=4112
2001-10-31 05:59:20 +00:00
Guy Harris 62d224011d Stop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as the
former depends on having "guint64" and the latter depends on
"%ll[douxX]" being what's used to print 64-bit integers, and there are
platforms on which Etheeal runs that don't have "guint64" or that don't
use "%ll[douxX]" to print 64-bit integers.

Get rid of the routines to extract 64-bit integers into "gint64"s and
"guint64"s, as per Ronnie Sahlberg's suggestion, to discourage people
from writing code that won't work on all platforms; they should be using
FT_UINT64, or the routines in "int-64bit.c", instead.

svn path=/trunk/; revision=4102
2001-10-29 21:56:50 +00:00
Guy Harris d82c74d757 From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integers
without requiring compiler support for them, and updates to the
Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC
dissector to allow ONC RPC subdissectors to use it.

svn path=/trunk/; revision=4099
2001-10-29 21:13:13 +00:00
Guy Harris 9d75336e38 Clean up another signed vs. unsigned comparison warning - if
"snprintf()" returns a negative number, that's an error, and we assume
"errno" was set and return NULL, otherwise we cast its return value to
"size_t" and compare it with the size of the buffer we were given, and,
if it was bigger, we know that "snprintf()" didn't generate all the
characters it could be cause they wouldn't have fit, so we set "errno"
to ENOSPC and return NULL.

svn path=/trunk/; revision=4095
2001-10-28 01:55:10 +00:00
Guy Harris 594c839f55 Check, in the configure script in the epan directory, whether we have
"strptime()" and, if not, define NEED_STRPTIME_H.

svn path=/trunk/; revision=4093
2001-10-28 01:27:59 +00:00
Guy Harris 6eb4ae7a7d From Mike Frisch: Win32 systems don't have "strptime()", so we need to
use a replacement "strptime()" on those systems, and thus need to
include "strptime.h" to declare "strptime()".

svn path=/trunk/; revision=4092
2001-10-28 00:57:15 +00:00
Guy Harris facce7278a "ftypes" and "dfilter" should depend on "config.h", so that if it
doesn't exist, or is out of date with respect to "config.h.win32", it's
remade - stuff in "ftypes" and "dfilter" includes "config.h", and it
should get the "config.h" in "epan".

svn path=/trunk/; revision=4091
2001-10-28 00:52:28 +00:00
Gilbert Ramirez 038da8730a Fix some signed/unsigned comparison warnings. In the case of tvbuff.h,
there were 2 functions which accepted 'maxlength' == -1, but the function
prototypes had maxlength as a guint --- fixed.

svn path=/trunk/; revision=4087
2001-10-26 17:29:12 +00:00
Guy Harris 11a2b62ebe Fix compile errors and code errors in the Win32 code.
svn path=/trunk/; revision=4073
2001-10-24 09:22:23 +00:00
Guy Harris 509f30374e Have a routine that takes a file name for a personal configuration file
and generates the path name; have it, if the file is to be opened for
reading on Win32, check whether it exists and, if not, check for it in
the old home directory-based configuration directory and, if so, return
that path instead, so that files saved with earlier versions of Ethereal
will be seen.

svn path=/trunk/; revision=4072
2001-10-24 07:18:39 +00:00
Guy Harris d453f6d992 On Windows, put Ethereal configuration files under the "Application
Data\Ethereal" directory under the user's profile, as that appears to be
the Windows 2000 standard.

svn path=/trunk/; revision=4071
2001-10-24 06:13:07 +00:00
Guy Harris c68d6a7158 Include <direct.h> on Windows systems, to declare "mkdir()".
On Windows, put the ".ethereal" directory under the user profile
directory rather than the home directory.

Update the documentation to reflect that, and to fix other out-of-date
information, as well as some typos.

svn path=/trunk/; revision=4068
2001-10-23 08:15:11 +00:00
Guy Harris 6f54015711 When putting protocols into the list of protocols, do a case-insensitive
sort.

Give iSCSI the short name "iSCSI" rather than "ISCSI".

svn path=/trunk/; revision=4067
2001-10-23 05:40:36 +00:00
Guy Harris cf5a1d86e7 Add a new routine to create the ".ethereal" directory for a user.
Use that routine rather than duplicating that code in the routines to
write out the preference file and filter files.

Use it in the code for the color filter dialog, so that the directory in
question is created if necessary.

As that routine returns an error indication, have the code that calls
that routine put up a message box if the attempt fails.

svn path=/trunk/; revision=4065
2001-10-23 05:01:02 +00:00
Guy Harris f5143b4482 Include <stdio.h> to declare "sprintf()".
svn path=/trunk/; revision=4063
2001-10-23 03:40:39 +00:00
Guy Harris 898959665c The only reason we care about the user's home directory is that their
".ethereal" directory is under it; get rid of "get_home_dir()", and put
its code inside "get_persconffile_dir()".  (The personal configuration
file directory may move, on Windows, to the user's profile directory.)

svn path=/trunk/; revision=4062
2001-10-22 23:16:01 +00:00
Guy Harris e4db9c4b64 Add a routine to get the directory in which personal configuration files
reside.  Use it, rather than concatenating the user's home directory and
".ethereal" in a number of files.

Fix up some additional places to use G_DIR_SEPARATOR_S as the pathname
separator.

svn path=/trunk/; revision=4061
2001-10-22 22:59:26 +00:00
Guy Harris e980dd9d3b Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
strings used to generate pathnames.

Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>,
so that files requiring only the definition of PF_DIR don't have to
include <epan/epan.h>, and get rid of no-longer-necessary includes of
<epan/epan.h>.

Add a routine to get the directory for "system files" such as
"/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on
Windows (as there's no "/etc" on Windows).  Use that to construct the
pathname of the ethers and ipxnet files.

svn path=/trunk/; revision=4056
2001-10-21 21:48:00 +00:00
Guy Harris fa928f62c3 On Windows, get the "ethers" and "ipxnets" file from the directory in
which the Ethereal binary is found; there's no notion of "/etc" or of
"/etc/ethers" or "/etc/ipxnets" files on Windows.

Update the documentation to reflect that, and fix a typo in the Ethereal
and Tethereal man pages.

svn path=/trunk/; revision=4055
2001-10-21 19:54:49 +00:00
Gerald Combs 3ccc10f622 Get NEWS current up to July 31, update version to 0.8.20.
svn path=/trunk/; revision=4021
2001-10-12 17:17:05 +00:00
Guy Harris d627904aba Have a flag in the "packet_info" structure, which indicates whether the
stuff currently being dissected is part of a packet included in an error
packet (e.g., an ICMP Unreachable packet).  Have the TCP dissector not
bother doing reassembly if the TCP segment is part of an error packet,
rather than an actual TCP transmission; other dissectors might want to
treat those packets specially as well.

Add to the "tcpinfo" structure a flag indicating whether the URG flag
was set, rather than having the zero or non-zero value of the urgent
pointer indicate that.  (Yes, at least as I read RFC 793, a zero urgent
pointer value isn't useful, as it means "the stuff before this segment
is urgent", but it's certainly possible to put onto the wire a TCP
segment with URG set and a zero urgent pointer.)

Don't dissect the TCP header by grabbing the entire header with
"tvb_memcpy()" and then pulling stuff out of it - extract stuff with
individual tvbuff calls, and put stuff into the protocol tree and the
Info column as we extract it, so that we can dissect a partial header.
This lets us, for example, get the source and destination ports from the
TCP header of the part of a TCP segment included in a minimum-length
ICMPv4 error packet.

svn path=/trunk/; revision=3986
2001-10-01 08:29:37 +00:00
Guy Harris bcc16a58c9 To check whether something is a directory, call "test_for_directory()"
on it and check whether it returned EISDIR, not whether it returns 0 -
EISDIR means it's a directory, 0 means it isn't.

svn path=/trunk/; revision=3939
2001-09-14 09:27:35 +00:00
Guy Harris 845f39b6fe Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3937
2001-09-14 07:33:04 +00:00
Guy Harris 07c2ce1bad Get rid of no-longer-necessary includes of <sys/time.h>.
svn path=/trunk/; revision=3936
2001-09-14 07:23:34 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Guy Harris 2a148564d6 TCP desegmentation support, and changes to the ONC RPC and NBSS
dissectors to use it, from Ronnie Sahlberg, with additional changes to
handle the case where a frame contains messages that don't run past the
end followed by one that does and where a reassembled chunk has, at the
end, a message that runs past the end of that chunk (because the
reassembly was for an earlier message).

svn path=/trunk/; revision=3923
2001-09-13 07:56:53 +00:00
Guy Harris 0e68611e41 From Thomas Wittwer: add "prefs_register_string_preference()" to the
list of functions available to plugins.

svn path=/trunk/; revision=3906
2001-09-04 01:05:41 +00:00
Guy Harris 3388bde488 Instead of having a single datum attached to a conversation, have a list
of protocol-id-plus-datum pairs, so that multiple protocols can attach
information to the same conversation.

Dissectors that attach information to a conversation should not assume
that if they find a conversation it has one of its data attached to it;
the conversation might've been created by another dissector.

svn path=/trunk/; revision=3901
2001-09-03 10:33:12 +00:00
Guy Harris f6c33914fe Don't pass wildcarded arguments to "find_conversation()" to routines
that look up conversations in hash tables, unless they are arguments
that will be ignored; if they're not being ignored, then if the argument
is a null pointer you may get a crash if it's dereferenced, and if it's
not a null pointer you'll only get a match if the conversation has
whatever stuff the arguments points to as its first address or port.

If you match a conversation with a wildcarded address and/or port, and
the address and/or port matched a non-wildcarded search argument, and
the conversation is for a connection-oriented transport protocol, set
the wildcarded address and/or port for the conversation to the value
that matched it.

svn path=/trunk/; revision=3897
2001-09-03 07:31:20 +00:00
Guy Harris 2c9de0038c In "find_conversation()", do the same type of matching that
"try_conversation_dissector()" does - start with as exact matches as
possible, and then start doing wildcarding - so that it can find
conversations with wildcard addresses or ports even if both address and
port arguments are supplied to it.

svn path=/trunk/; revision=3893
2001-09-03 00:26:31 +00:00
Guy Harris fbe8da33f5 Add a "proto_item_append_text()" routine, which is like
"proto_item_set_text()" except that it appends the result of the
formatting to the item's current text, rather than replacing the item's
current text.  Use it in the DNS dissector.

svn path=/trunk/; revision=3880
2001-08-29 00:51:10 +00:00
Guy Harris aa4cd01b9b Get rid of "proto_tree_add_notext()" - if you create a subtree using it,
but, before you set the text, you throw an exception while putting stuff
under the subtree, you end up with an absolutely blank protocol tree
item, which is really gross.  Instead of calling
"proto_tree_add_notext()", call "proto_tree_add_text()" with at least a
minimal label - yes, it does mean you do some work that will probably be
unnecessary, but, absent a scheme to arrange to do that work if it *is*
necessary (e.g., catching exceptions), the alternative is an ugly
protocol tree display.

svn path=/trunk/; revision=3879
2001-08-28 08:28:19 +00:00
Guy Harris 4dd604972b Plug a memory leak.
svn path=/trunk/; revision=3862
2001-08-21 09:11:59 +00:00
Guy Harris 973552df3e Fix some Win32 compilation warnings and errors.
svn path=/trunk/; revision=3861
2001-08-21 08:16:54 +00:00
Guy Harris 9d601c6799 On Windows, use the directory in which the binary resides as the
directory in which global data files are stored.  If an installed binary
is being run, that's the correct directory for them; if a build-tree
binary is being run, the "manuf" file will be there, and you can put
other data files there as well, if necessary.

Do the same with plugins, except that, if there's no
"plugins\\{version}" subdirectory of that directory, fall back on the
default installation directory, so you at least have a place where you
can put plugins for use by build-tree binaries.  (Should we, instead,
have the Windows build procedure create a subdirectory of the "plugins"
source directory, with the plugin version number as its name, and copy
the plugins there, so you'd use the build-tree plugin binaries?)

Move "test_for_directory()" out of "util.c" and into
"epan/filesystem.c", with the other file system access portability
wrappers and convenience routines.  Fix "util.h" not to declare it - or
other routines moved to "epan/filesystem.c" a while ago.

svn path=/trunk/; revision=3858
2001-08-21 06:39:18 +00:00
Guy Harris d5fbc4d780 Fix some compile problems on Windows.
svn path=/trunk/; revision=3851
2001-08-19 00:42:36 +00:00
Guy Harris 01d5c10b07 On Win32, use the default installation directory for Ethereal as the
"standard" plugin directory, and, instead of getting PLUGIN_DIR (the
*real* installation directory) from the configure script, as can be done
in UNIX, attempt to get it by getting the full pathname of the currently
running program and assuming it's in the installation directory.

svn path=/trunk/; revision=3850
2001-08-18 23:21:31 +00:00