Commit Graph

3966 Commits

Author SHA1 Message Date
Guy Harris 840f9b11b6 The "mid" field of the "smb_request_val" structure isn't used; eliminate
it.

svn path=/trunk/; revision=3810
2001-08-02 09:30:09 +00:00
Guy Harris 8b1df43d92 When looking for the request that matches a reply, match the PID as well
as the MID and the conversation index; the current CIFS spec from the SNIA
Web site says

	The multiplex ID (Mid) is used along with the Pid to allow
	multiplexing the single client and server connection among the
	client's multiple processes, threads, and requests per thread.
	Clients may have many outstanding requests (up to the negotiated
	number, MaxMpxCount) at one time.  Servers MAY respond to
	requests in any order, but a response message MUST always
	contain the same Mid and Pid values as the corresponding request
	message.  The client MUST NOT have multiple outstanding requests
	to a server with the same Mid and Pid.

(although, in practice, at least as I remember from working on the
NetApp CIFS server N years ago, Windows clients tend to use the same PID
in all requests, so only the MID acts as a transaction ID).

When initializing the dissector, free up all the data attached to
"smb_request_val" structures in the request hash table before destroying
the hash table and the structures in question.

svn path=/trunk/; revision=3809
2001-08-02 08:48:46 +00:00
Guy Harris f56c5b5333 Make some variables and routines not used outside "packet-smb.c" static.
Show the parameters, data, and padding in transact/transact2 SMBs as
hex, not text; it's usually binary.

"dissect_transact_params()" returns immediately if TransactName is null,
so we don't need to check whether it's null when copying it; just use
"g_strdup()" to copy it.

svn path=/trunk/; revision=3808
2001-08-02 08:08:12 +00:00
Guy Harris bbb52d060b Put in some checks to make sure we're not running past the end of the
packet; this is far from a complete set of checks - the right way to
make this dissector safe is to tvbuffify it - but it's sufficient to
eliminate most cases where my regression tests bogusly reported that the
packet was dissected differently due to different stuff being past the
end of the packet.

svn path=/trunk/; revision=3807
2001-08-02 07:16:05 +00:00
Guy Harris d451acb66c Add a "time_secs_to_str_buf()" routine, which takes seconds and
fractions-of-a-second (the units of which are either milliseconds or
microseconds, specified by a Boolean argument), and formats it into a
"DD days, HH hours, MM minutes, SS seconds" using a buffer supplied to
it.  Have "time_secs_to_str()" and "time_msecs_to_str()" both use it.
Also, have it correctly handle the case of SS being > 0 but < 1 (which
"time_msecs_to_str()" didn't do).

Rename "rel_time_to_str()" to "rel_time_to_secs_str()", and add a
"rel_time_to_str()" routine that takes a "struct timeval" and hands its
seconds and microseconds values to "time_secs_to_str_buf()".  Use
"rel_time_to_secs_str()" to format FT_RELATIVE_TIME values for now; we
might want to use "rel_time_to_str()" for them, though, or make it an
option (either a user option, or a per-field option, using the field
that also holds BASE_ values).

svn path=/trunk/; revision=3806
2001-08-01 08:27:00 +00:00
Guy Harris 0363dc030d Put in the right URL for the browser spec on the Samba site.
The periodicity in \MAILSLOT\LANMAN browser packets appears to be in
seconds, not milliseconds.

svn path=/trunk/; revision=3805
2001-08-01 08:12:15 +00:00
Guy Harris c12f72ebdc "dissect_pipe_lanman()" is no longer used outside "packet-smb-pipe.c";
make it static to "packet-smb-pipe.c".

svn path=/trunk/; revision=3804
2001-08-01 03:51:16 +00:00
Guy Harris 9ab5b580ce Packets sent to \MAILSLOT\LANMAN appear to be browser announcements (for
an older version of the protocol than the one for packets sent to
\MAILSLOT\BROWSE), rather than being LANMAN pipe packets.

svn path=/trunk/; revision=3803
2001-08-01 03:47:00 +00:00
Guy Harris 97a90e0f6c "getopt()" doesn't support multiple option arguments to a flag; have
"-u" take a single argument with two port numbers separated by a comma.

svn path=/trunk/; revision=3802
2001-08-01 03:22:15 +00:00
Guy Harris 26a68c20fc idl2eth man page, from Frank Singleton.
Update Makefile.am and Makefile.nmake files to build it (although it's
not currently built by default; you have to do "make idl2eth.1" on UNIX,
and something similar on Windows.

Put a full copyright notice into "doc/Makefile.nmake", along with a
comment explaining why stuff depends on "../config.h".  Also, add
"clean" rules to it to get rid of generated files for mergecap and
text2pcap documentation.

svn path=/trunk/; revision=3801
2001-07-30 21:40:13 +00:00
Guy Harris 6c2ee431a2 Update from Alexandre P. Ferreira to correctly decode Extended Methods
capabilities in CONNECT replies.

svn path=/trunk/; revision=3800
2001-07-30 21:24:29 +00:00
Guy Harris 76a85d5764 From David Frascone: update to the DIAMETER dissector for
draft-ietf-aaa-diameter-07.  His changenotes:

	Changes:

	o       Flags are now done properly.  (I changed it to dissect
		them like packet-tcp.c does)

	o       Completely re-did the dictionary.  I think it is much
		more maintainable now.  And, it is no longer dynamically
		generated.

	o       Added some lookup routines to work with new dictionary.

	o       Removed lots of old lookup stuff that had been cloned
		from packet-radius.c.  It's much cleaner now.

svn path=/trunk/; revision=3799
2001-07-30 20:08:44 +00:00
Guy Harris 2997acf2cc Parameters to Transact and Transact2 calls are usually binary, not pure
text; display them with "bytes_to_str()", not "format_text()".

svn path=/trunk/; revision=3798
2001-07-30 07:36:28 +00:00
Guy Harris f8b71590ef Use "tvb_strsize()" rather than "tvb_strnlen()" to get the size
(including the terminating null byte) of a null-terminated string; it
includes the terminating null in the count, and throws an exception if
the string goes past the end of the tvbuff, so we don't have to do
either of those ourselves.

svn path=/trunk/; revision=3797
2001-07-30 05:20:44 +00:00
Guy Harris 899b6013c8 Link with $SOCKET_LIBS and $NSL_LIBS, as well as with $PCAP_LIBS, when
testing whether libpcap defines "pcap_version" or not; libpcap may
require those other libraries.

svn path=/trunk/; revision=3796
2001-07-27 19:14:59 +00:00
Guy Harris 7c3f0a260f Updates from Frank Singleton:
- Add support for CORBA attributes
	- Add support for included files, not just main file
	- Fix sequence variable name generation.
	- Add support functions for code warnings etc.
	   i.e.: TODO and WARNING functions, to highlight
	   if we don't [yet] support a particular CORBA type.

svn path=/trunk/; revision=3795
2001-07-27 18:35:22 +00:00
Guy Harris c11d596fb7 Update from Frank Singleton to get rid of a bogus "Malformed Frame"
indication when reading an IOR with TAG_MULTIPLE_COMPONENTS.

svn path=/trunk/; revision=3794
2001-07-27 18:31:56 +00:00
Gilbert Ramirez 52d5904afd Fix for Kazlib exception code:
Defect number: 0011
Date: Jul 26 2001
Releases of Kazlib affected: 1.10 through 1.19
Status: Fixed in 1.20
Modules affected: except.c
Description: Members of the except_t structure needed to be declared
    volatile because the structure is automatically allocated in the
    except macro, modified after a setjmp() takes place, and accessed
    after control returns via longjmp.
Solution: Upgrade to 1.20 or backpatch the fix.

svn path=/trunk/; revision=3793
2001-07-27 16:20:39 +00:00
Guy Harris 5bb08b0970 Fix AC_ETHEREAL_PCAP_CHECK so that, if a directory was specified with
"--with-pcap", it adds the "include" subdirectory of that directory to
the list of directories to search for include files, rather than adding
the directory itself.

Check whether libpcap defines "pcap_version", and define
HAVE_PCAP_VERSION if it does.  Use "pcap_version" iff HAVE_PCAP_VERSION
is defined, rather than special-casing MacOS X.

Don't #define a string for the WinPcap version; just leave
HAVE_PCAP_VERSION undefined on Windows, as WinPcap 2.2beta is out, so we
can no longer assume that the Windows version of Ethereal is using
WinPcap 2.1.

svn path=/trunk/; revision=3792
2001-07-27 07:10:13 +00:00
Guy Harris 8a9917a9a7 If GLib doesn't support loadable modules, don't let the user enable
plugins.  (This means that "--with-plugins" with no argument is useless
- if GLib supports loadable modules, plugins are enabled by default, and
if GLib doesn't support loadable modules, plugins can't be enabled - but
with an argument, it lets you specify a different directory into which
to put plugins.)

svn path=/trunk/; revision=3791
2001-07-27 06:10:26 +00:00
Guy Harris 3322b11fc2 Fix from Michael Tuexen: define PLUGIN_DIR as NULL if plugin support is
disabled, so that the code that passes it to a subroutine compiles (the
subroutine doesn't use that argument if plugin support is disabled - and
shouldn't do so).

svn path=/trunk/; revision=3790
2001-07-26 22:05:01 +00:00
Guy Harris 120e9b393f Fix from Frank Singleton to get rid of a premature "g_free()" of memory.
svn path=/trunk/; revision=3789
2001-07-26 16:59:28 +00:00
Guy Harris ae251f8426 MacOS support changes, from Michael Tuexen (with some modifications):
replace "--with-plugindir" with "--with-plugins", and have the
	plugin directory optional - this allows plugins to be disabled;

	add "--traditional-cpp" on MacOS X/Darwin (Apple's "cc" compiler
	requires it, for some annoying reason, even though it is, as far
	as I know, GCC-based, and other GCC's don't require it);

	on MacOS X, don't use "pcap_version[]", as, for some annoying
	reason, libpcap on MacOS X doesn't define it.

Clean up some whitespace in the help messages for the configure script.

Move the AM_CONDITIONAL for SETUID_INSTALL after the point at which
"enable_setuid_install" is set, as it tests "enable_setuid_install".

svn path=/trunk/; revision=3788
2001-07-26 07:25:49 +00:00
Guy Harris d299f1e4ed Don't try to look up a module name in the module hash table if we don't
have a module name.

svn path=/trunk/; revision=3787
2001-07-25 20:21:57 +00:00
Guy Harris 4609aef435 Clean up the white space a bit.
Use B<> rather than asterisks for emphasis.

svn path=/trunk/; revision=3786
2001-07-25 06:00:27 +00:00
Guy Harris 2e713f2947 Add a "wlan.addr" field, and put two instances into it for all frames
with both source and destination addresses - one instance with the
source address, and one instance with the destination address - to allow
display filtering that checks both the source and destination address
against a single value (as the other 802.x dissectors, and the FDDI
dissector, do).

svn path=/trunk/; revision=3785
2001-07-25 05:53:30 +00:00
Guy Harris 28c2512106 Put back the description of CIDR support for IPv4 addresses, as Gilbert
put the code back a month or so ago.

Fix a typo.

svn path=/trunk/; revision=3784
2001-07-25 05:22:32 +00:00
Guy Harris ae1213c0b2 Fix from Todd Sabin.
svn path=/trunk/; revision=3783
2001-07-24 00:38:43 +00:00
Gilbert Ramirez d9a11864cf Add mergecap.rc.in to list of distributed files.
svn path=/trunk/; revision=3782
2001-07-23 18:29:32 +00:00
Guy Harris c12060d8cc GMRP dissector, from Markus Seehofer.
Throw a very small caltrop in the way of spam-harvesters, by replacing
"@" in e-mail addresses in the AUTHORS file and Ethereal man page with
"[AT]" (although I wouldn't be surprised to find that some of those
harvesters already know about that trick and "fix" those addresses so
you, too, can receive Valuable Information about Viagra, can-fail
Internet investment opportunities and stuff-envelopes-at-home jobs, and
cable descramblers).

Add a couple of items from the AUTHORS file to the Ethereal man page.

svn path=/trunk/; revision=3781
2001-07-23 18:21:32 +00:00
Guy Harris baa0f41513 Use an unsigned character when processing string lists, so that you can
use "isspace()" on them without getting screwed by negative array
subscripts.

svn path=/trunk/; revision=3780
2001-07-23 18:14:36 +00:00
Guy Harris d7149c990b Make "put_string_list()" truly take a GList of strings as arguments;
generate such a list from the list of column format information and hand
the resulting list to "put_string_list()" when writing out the preference.

svn path=/trunk/; revision=3779
2001-07-23 00:12:47 +00:00
Guy Harris 91fe015bca Reformat to be a bit closer to the way it looked before the parser
changes.

svn path=/trunk/; revision=3778
2001-07-22 22:41:37 +00:00
Guy Harris 44740fe821 Ignore non-quoted white space in string lists.
Backslash-escape backslashes and double quotes when writing string lists
out.

svn path=/trunk/; revision=3777
2001-07-22 22:34:42 +00:00
Guy Harris 4b66d25227 "col_format_to_pref_str()" is used only in "prefs.c", and knows about
the format of string lists in a preferences file; rename it to
"put_string_list()", make it take the list as an argument rather than
working only on "prefs.col_list", and put it in "prefs.c".

svn path=/trunk/; revision=3776
2001-07-22 21:56:25 +00:00
Guy Harris 6b664c122c Check for valid column titles (non-zero-length) and valid column formats
in preference settings.

In the process of doing that, fix a memory leak (we were handing a null
pointer, rather than a pointer to the list of strings in
"column.format", to "clear_string_list()").

svn path=/trunk/; revision=3775
2001-07-22 21:50:47 +00:00
Guy Harris 0edb5d5dc8 Put in a comment noting that the format of a preferences string is
determined by the code in "prefs.c", so arguably
"col_format_to_pref_str()" belongs there.

Put in a comment noting that said format includes support for escaping
quotation marks in quoted strings, and that we should handle that.

svn path=/trunk/; revision=3774
2001-07-22 21:28:46 +00:00
Guy Harris 1ca40d8b3e Don't require the strings in string lists to be quoted, just allow them
to be quoted.

Correctly handle backslash-quoting in string lists.

Return an error if the "get_string_list()" indicates that
"column.format" string list is syntactically invalid or if it doesn't
contain an even number of entries.

svn path=/trunk/; revision=3773
2001-07-22 21:27:54 +00:00
Guy Harris 070ac884e4 Note that we should supply a detailed explanation of syntax errors, so
we can say more than just that there was a "Syntax error" in the
preferences file.

svn path=/trunk/; revision=3772
2001-07-22 21:25:11 +00:00
Guy Harris 946ec3a865 Update from Mark Burton.
svn path=/trunk/; revision=3771
2001-07-22 20:02:23 +00:00
Uwe Girlich 8d7c2ef984 Quake 3 Arena added for Uwe Girlich
svn path=/trunk/; revision=3770
2001-07-22 19:07:50 +00:00
Uwe Girlich 0d8ef7dd3e misleading comment changed on the byte ordering
svn path=/trunk/; revision=3769
2001-07-22 19:04:20 +00:00
Uwe Girlich 93e99b0ec9 new file packet-quake3.c added
svn path=/trunk/; revision=3768
2001-07-22 18:56:37 +00:00
Uwe Girlich fc4bea028f First working version of a Quake 3 Arena dissector.
Many things are missing but it is a start.

svn path=/trunk/; revision=3767
2001-07-22 18:54:16 +00:00
Uwe Girlich b9a3653c89 Before calling proto_tree_add_string, the correct proto_tree should
be checked and not any upper proto_tree object.

svn path=/trunk/; revision=3766
2001-07-22 18:52:38 +00:00
Guy Harris cc21ec8124 Do __attribute__ stuff if the GCC version number is greater than or
equal to 2, not just if it's equal to 2 - GCC 3.0 makes it 3, not 2....

svn path=/trunk/; revision=3765
2001-07-22 10:25:50 +00:00
Guy Harris 6287e86539 Add a bunch of routines used by GIOP plugins to the plugin address
table.

svn path=/trunk/; revision=3764
2001-07-22 10:12:11 +00:00
Uwe Girlich 8d6e6e5067 New function added to dissect a infostring. I'll use it for other games too.
Connectionless packets are now better splitted in command and arguments.

svn path=/trunk/; revision=3763
2001-07-21 19:25:59 +00:00
Uwe Girlich 4b36dda379 The connect request (client to server) is now much more detailed.
svn path=/trunk/; revision=3762
2001-07-21 15:34:44 +00:00
Guy Harris 681f73adb7 There is really no need to have the BGP dissector and the LDP dissector
have two independent "value_string" tables mapping RFC 1700 address
family numbers to names, nor is there any need to have the BGP dissector
and the PIM dissector have two independent sets of #defines for RFC 1700
address family numbers; put a single "value_string" table in "afn.c" and
put a declaration of it, and #defines for the address family numbers,
into "afn.h", and have the dissectors use that.

Move the #define for PGM into "ipproto.h", and add an entry for it in
the "value_string" table in "ipproto.c".

Have the PGM dissector use the standard Ethereal mechanisms for
resolving addresses, and have it use "value_string" tables for mapping
option types, the OPX bits, and packet types to strings.  Use
"bytes_to_str()" to turn byte arrays into strings of hex digits.  Pass
the packet type string to "dissect_pgmopts()" as an argument, rather
than making it a global.  Don't use "proto_tree_add_XXX_format" routines
if you can possibly just use "proto_tree_add_XXX"; give various fields
the correct radix and type, and VALS() strings if necessary, to make
that happen (and to make filtering on them more pleasant).  Put the
type, length, and total length of the options into the protocol tree as
separate fields.  Don't have separate type, length, and OPX fields for
every type of option; one field will suffice.  Don't format a string
with "sprintf()" and then pass that string to "col_add_fstr()" with a
format of "%s" and the string as an argument - "col_add_fstr()" can
format strings itself (that's what the "f" stands for).  Don't byte-swap
and then un-byte-swap IPv4 address fields in the header, just leave them
network byte order to start with.  Use the correct fields for
"proto_tree_add_XXX", rather than using the same field multiple times.
Quit early if an address family identifier isn't AFNUM_INET, as that
means the structure we use to dissect the header doesn't match the
actual header.

svn path=/trunk/; revision=3761
2001-07-21 10:27:13 +00:00