Commit graph

4093 commits

Author SHA1 Message Date
Guy Harris
91cdcfbaa3 Put the continuation data into the protocol tree for a reply
continuation regardless of whether we have the frame number of the frame
from which we're continuing.

svn path=/trunk/; revision=3837
2001-08-11 17:17:42 +00:00
Richard Sharpe
0046494f94 Change the SMB header to being a separate break-out tree ...
Next, on to tvbuffify etc the others...

svn path=/trunk/; revision=3836
2001-08-11 13:50:11 +00:00
Guy Harris
a5047906f1 Put into the protocol tree for transaction continuations an item for the
data in the continuation.

svn path=/trunk/; revision=3835
2001-08-11 07:31:14 +00:00
Guy Harris
a739061860 Keep track of transaction replies that have continuations, and associate
continuations with the message to which they're a continuation.

svn path=/trunk/; revision=3834
2001-08-11 07:26:25 +00:00
Guy Harris
a588428c1b Update from Frank Singleton to
- Add support for CORBA IDL "unions"
	- Update TODO
	- Improve "Operation Return Value" in genOperationReply()

svn path=/trunk/; revision=3833
2001-08-11 04:37:31 +00:00
Guy Harris
30296fc745 Tvbuffified SMB mailslot protocol dissector, from Ronnie Sahlberg.
svn path=/trunk/; revision=3832
2001-08-07 08:39:57 +00:00
Guy Harris
57091e1abb Update from Steve Dickson to add support for UDP encapsulation of PGM
packets.

svn path=/trunk/; revision=3831
2001-08-06 19:05:14 +00:00
Guy Harris
cf69e4c354 Fix up the check for an unlimited amount of storage.
Fix up the code to add the "milliseconds since some point in the past"
field in a NETREMOTETOD response to the tree.

svn path=/trunk/; revision=3830
2001-08-06 08:49:17 +00:00
Guy Harris
95056acbba The MID in an SMB message is not a transaction ID in, say, the ONC RPC
sense; instead, it's a "multiplex ID" used when there's more than one
request *currently* in flight, to distinguish replies.

This means that the MID and PID don't uniquely identify a request in
a conversation.

Therefore, we have to use some other value to distinguish between
requests with the same MID and PID.

Add a mechanism to do so.

svn path=/trunk/; revision=3829
2001-08-06 00:59:14 +00:00
Guy Harris
763b607aa4 Save the parameter and result descriptors if the frame *hasn't* already
been visited, not if it *has*.

svn path=/trunk/; revision=3828
2001-08-05 20:35:41 +00:00
Guy Harris
170d538f16 Patch from Motonori Shindo to add support for decoding additional data,
for CHAP, in LCP Authentication Protocol option.

Fix a typo.

svn path=/trunk/; revision=3827
2001-08-05 19:44:13 +00:00
Guy Harris
74fb14adac Patch from Motonori Shindo, adding
1) Shiva PAP (SPAP) and Extensible Authentication Protocol (EAP)

 2) CBCP negotiation in LCP Callback Operation Field

to the PPP dissector.

svn path=/trunk/; revision=3826
2001-08-05 10:09:40 +00:00
Guy Harris
4ed98dbd84 Make some of the NBDS fields enumerated fields, and give the Boolean
fields "Yes" and "No" as their strings and give them new names, so we
don't need to use "proto_tree_add_XXX_format" and so that the enumerated
fields can be filtered symbolically.

Set the length of the top-level NBDS item based on the packet type, and
set it to cover only the header, not the SMB message inside the packet,
for direct and broadcast datagrams.

Set the length of the top-level NBSS header to cover only the header,
not the SMB message, for session messages.

svn path=/trunk/; revision=3825
2001-08-05 10:00:35 +00:00
Guy Harris
d2b01e812b Remote API protocol (that seems to be what it's called in a number of
places) dissector tvbuffified, from Ronnie Sahlberg and me.

Additional "are we past the end of the buffer" checks added, so that we
don't hand random junk to the transaction and transact2 dissectors.

svn path=/trunk/; revision=3824
2001-08-05 01:15:27 +00:00
Guy Harris
d271509c7e Use the #define SMB_FLAGS_DIRN, rather than its numerical value, when
testing the request/response flag.

svn path=/trunk/; revision=3823
2001-08-05 00:30:41 +00:00
Guy Harris
749f27dd0e Add a request/response flag to the "struct smb_info" structure, and use
that rather than passing another copy of that flag to dissectors of
particular messages.

Pass that structure to the pipe subdissector by making "pi.private"
point to it, rather than by passing it as an explicit argument.

Change more of the

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

stuff to

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

and then, as per the first paragraph, check the "request" flag in the
"smb_info" structure rather than checking a "dirn" flag.

Set "last_transact2_command" to -1 in the "smb_request_val" structures
for TRANSACTION requests, as it doesn't apply to those requests.

As "dissect_transact_params()" doesn't do any work if the "TransactName"
argument is null, don't bother calling it for a reply if we don't have an
"smb_request_val" for the corresponding request, as that means we can't
find out the value to pass as the "TransactName" argument.

svn path=/trunk/; revision=3822
2001-08-05 00:16:36 +00:00
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