Commit Graph

3927 Commits

Author SHA1 Message Date
Guy Harris 74262f37de Patch from Lee Berger to properly skip past the length in FT_UINT_STRING
data objects if the length isn't 1.

svn path=/trunk/; revision=3821
2001-08-04 19:57:30 +00:00
Guy Harris e5474282c1 Don't cast "data" to "unsigned long long"; "long long" - or whatever
data type "gint64" really is - should be sufficiient for a %llx format,
and not all compilers that support 64-bit data types have "long long".

svn path=/trunk/; revision=3820
2001-08-04 19:50:33 +00:00
Guy Harris 358e1944db Use "val_to_str()" to convert TRANSACT2 transaction codes to strings.
(This fixes an incorrect string for TRANS2_GET_DFS_REFERRAL, which has
the code 0x10 according to the current SNIA CIFS draft spec; I've seen
those in packet captures.)

Create entries in the transaction hash tables only for requests, not for
replies; this means a reply might not have an entry in the table, if the
request didn't appear in the capture, so handle that case.

Make the "last_transact2_command" field of a "smb_request_val" structure
an "int", so it can be given the value -1, which is different from all
the valid 16-bit unsigned values, to indicate that we couldn't get the
transaction code from the request (e.g., because it's too short).

Show the first Setup word in a TRANSACT2 request as the transaction
code, as that's what it is.

"dirn" is a Boolean, so

	if (dirn == 1) {
		...
	}
	if (dirn == 0) {
		...
	}

is equivalent to

	if (dirn == 1) {
		...
	} else {
		...
	}

and the latter is a bit clearer, so use it.

Distinguish between a TRANSACTION or TRANSACT2 reply where we didn't see
the request and one where we saw the request but didn't see the request
path for TRANSACTION or the request code for TRANSACT2.

Use "g_strdup()" rather than "g_malloc()" followed by "strcpy()".

svn path=/trunk/; revision=3819
2001-08-04 10:17:24 +00:00
Guy Harris ddfdc5bfb1 Replace the protocol-specific data in the "packet_info" structure with a
"void *" that a dissector can set to point to such a structure; that
means that the stuff in the epan directory doesn't have to know anything
about the protocol-specific private data one dissector passes to
another, and that structure doesn't have to be changed if a dissector
wants to pass some new type of data to another dissector.

svn path=/trunk/; revision=3818
2001-08-04 04:04:35 +00:00
Guy Harris 1b3f1fca49 Update the URLs for WCCP 1.0 and 2.0 drafts, and note that they're
(currently) available on-line.

Updates from Simharajan Srishylam to:

	interpret WCCPv2 in the version field;

	handle multiple forwarding methods, assignment methods, or
	packet return methods being enabled;

	treat unknown messages as WCCPv2 messages, and attempt to
	dissect the fields common to all v2 messages.

Note that multiple forwarding/assignment/packet return methods should
really be handled as Boolean bitfields.

Fix some signed vs. unsigned comparison issues.

svn path=/trunk/; revision=3817
2001-08-04 04:00:09 +00:00
Guy Harris d17e7683c1 Fix the version value for WCCPv2.
Use "proto_tree_add_item()" where possible, and use it, rather than
"proto_tree_add_text()", to put the WCCP version into the packet.  Make
the version field hex, so the V2 version shows up in a reasonable form.

Show the flags in bit-set capabilities as Boolean bitfields.

Check the length field of capabilities for sanity, and use the length
field to step to the next capability rather than hardwiring in 8.

In the top-level tree item for a capability element, show the type of
element.

Use the correct offsets when putting stuff into the subtree for a
capability element.

Dissect the values of unknown capabilities as opaque arrays of bytes,
not as 4-byte integers.

svn path=/trunk/; revision=3816
2001-08-04 01:52:07 +00:00
Guy Harris 764975529d Update the URLs for WCCP 1.0 and 2.0 drafts, and note that they're
(currently) available on-line.

Updates from Simharajan Srishylam to:

	interpret WCCPv2 in the version field;

	handle multiple forwarding methods, assignment methods, or
	packet return methods being enabled;

	treat unknown messages as WCCPv2 messages, and attempt to
	dissect the fields common to all v2 messages.

Note that multiple forwarding/assignment/packet return methods should
really be handled as Boolean bitfields.

Fix some signed vs. unsigned comparison issues.

svn path=/trunk/; revision=3815
2001-08-04 00:07:30 +00:00
Guy Harris 63a1bff1fb Fix to a comment, from Frank Singleton.
svn path=/trunk/; revision=3814
2001-08-03 20:51:49 +00:00
Guy Harris 4940c97f11 Update from Frank Singleton:
Improve Template and Description for Attribute delegation code

	_get_xxx_at() should only be called for Reply with NO_EXCEPTION
	_set_xxx_at() should only be called for Request

svn path=/trunk/; revision=3813
2001-08-03 20:44:58 +00:00
Guy Harris 131228b0b1 Updates from Steve Dickson.
svn path=/trunk/; revision=3812
2001-08-02 17:05:00 +00:00
Guy Harris 166c1fd900 Always initialize the "last_transact_command", "last_param_descrip", and
"last_data_descrip" fields of an "smb_request_val" structure to null
when you allocate it, so that, when the hash table is cleaned out, we
don't try handing random junk to "g_free()".

svn path=/trunk/; revision=3811
2001-08-02 09:37:27 +00:00
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