Commit graph

7955 commits

Author SHA1 Message Date
Tim Potter
78c337d69e Some educated guesses about the structure of the QueryValue RPC (was named
"Info") for the WINREG DCERPC pipe.

svn path=/trunk/; revision=7897
2003-06-17 06:50:36 +00:00
Guy Harris
2e0b314579 Handle the 1.3 vs. 2.x issue similarly to the way Lars Roland's patches
did, basing the path name structure on the version number, but handle
GLib and GTK+ orthogonally.

svn path=/trunk/; revision=7896
2003-06-17 05:38:24 +00:00
Tim Potter
24d1d3a828 Remove silly dcerpc_smb_check_long_frame() function and all calls to it.
A much better place to do this is after the subdissector function has
been called in dcercp_try_handoff().

svn path=/trunk/; revision=7895
2003-06-17 05:29:46 +00:00
Guy Harris
b65f1a77c1 From Lars Roland:
fix typo in my earlier checkin - GTK_GLIB_DIR should be
	GLIB_GTK_DIR;

	look for headers in "lib\glib-$(GLIB_VERSION)\include and
	"lib\gtk-$(GTK_VERSION)\include, as that's where the 2.x
	packages hide "glibconfig.h" and "gdkconfig.h".

svn path=/trunk/; revision=7894
2003-06-17 04:21:59 +00:00
Guy Harris
d6dadab52f From Lars Roland: clean the rtnet plugin directory when "nmake -f
Makefile.nmake clean" is done.

svn path=/trunk/; revision=7893
2003-06-17 04:06:12 +00:00
Guy Harris
c70953341c "!IFDEF" just takes the name of the variable as an argument.
We do have to look for headers in $(GTK_DIR)\gdk when using the
development packages from the Ethereal Web site, as "gdkconfig.h" is in
that directory but it's included as <gdkconfig.h>.

The commented string for ADNS_CONFIG doesn't appear to get substituted
as we want it to be; just use an empty string for now.

svn path=/trunk/; revision=7892
2003-06-16 07:58:26 +00:00
Guy Harris
0bdb498bdb Do all the tests for whether ADNS_DIR is defined or not in
"config.nmake", and just use the variables set based on the results of
those tests in various "Makefile.nmake" files.

svn path=/trunk/; revision=7891
2003-06-15 23:04:47 +00:00
Guy Harris
c88189af06 Based on a change from Lars Roland, set the GLIB_CFLAGS, GTK_CFLAGS,
GLIB_LIBS, and GTK_LIBS variables based on whether the GLib and GTK+
header files and libraries are in separate "glib" and "gtk+" directories
(as is the case for the developer's packages from the Ethereal Web site)
or in the same directory (as is the case for the developer's packages
from the GTK+-for-Win32 site).

svn path=/trunk/; revision=7890
2003-06-15 22:58:19 +00:00
Ronnie Sahlberg
698c0c9d4d update iSCSI so that DecodeAs... can be used to specify a TCP session being iSCSI
svn path=/trunk/; revision=7889
2003-06-15 02:02:59 +00:00
Ronnie Sahlberg
fc70d21834 The MID field in the SMB header is in reality only ~10 bits in size
so it is pretty common for MID values to be reused even in
moderately sized captures.

The test to compare that the command type between the request
and reply is not sufficient for when most of the commands between the client
and the server are the same (e.g. streaming Read/Write)

Change the matching so that ONLY the first "response" we see for a certain
open MID will be matched to the original request.

I.e.  Prevent
Read Request
Read Reply
[missing from capture] Read Request
Read Reply

From incorrectly matching the second reply (if it has a reused MID) with the
first request.

This makes the response time statistics a bit more reliable as well.

svn path=/trunk/; revision=7888
2003-06-15 00:35:49 +00:00
Ronnie Sahlberg
6204eee840 Let iSCSI/TCP keep track of where PDU bundaries are in the TCP stream.
This will reduce the chance of false-positives in detecting iscsi headers
inside a large data transfer.  the dissector needs to become a bit more
stateful first.

NOP-Out commands will have a TransferTag of either -1   or a valid value if
a response is requested.
Assume opcode==NOP-Out (0) and TransferTag==0   is a non-iscsi header.

svn path=/trunk/; revision=7887
2003-06-15 00:16:06 +00:00
Guy Harris
21ce5791f7 Put in a "break;" after the labels in the final clause of a switch
statement - GCC lets you get away with no statement after those labels,
but some other compilers (e.g., MSVC++ 6.0) don't.

svn path=/trunk/; revision=7886
2003-06-14 23:50:43 +00:00
Guy Harris
8178db4980 Define GLIB_LIBS and GTK_LIBS variables in config.nmake (based on
variables the user configures - the user isn't expected to change
GLIB_LIBS or GTK_LIBS, and there's a comment nothing that users
shouldn't have to do so), which contain the appropriate libraries for
building stuff that requires only GLib, and stuff that required GTK+ and
GLib, respectively, and use those macros in the Makefile.nmake files.

svn path=/trunk/; revision=7885
2003-06-14 20:45:29 +00:00
Guy Harris
71424053cd Define GLIB_CFLAGS and GTK_CFLAGS variables in config.nmake (based on
variables the user configures - the user isn't expected to change
GLIB_CFLAGS or GTK_CFLAGS, and there's a comment nothing that users
shouldn't have to do so), which contain the appropriate "/I" flags for
building stuff that requires only GLib, and stuff that required GTK+ and
GLib, respectively, and use those macros in the Makefile.nmake files.

svn path=/trunk/; revision=7884
2003-06-14 20:36:04 +00:00
Guy Harris
25bd670668 From Lars Roland: use $(COMMON_FILES_GNU) in the PATH setting, don't
duplicate the setting of $(COMMON_FILES_GNU).

svn path=/trunk/; revision=7883
2003-06-14 03:23:21 +00:00
Guy Harris
abfc0e5cd8 Update Laurent Meyer's e-mail address.
svn path=/trunk/; revision=7882
2003-06-13 22:56:28 +00:00
Guy Harris
117cd421e4 From Lars Roland: don't use ADNS_DIR if it's not defined.
svn path=/trunk/; revision=7881
2003-06-13 22:45:15 +00:00
Guy Harris
a4e02bed1e As per a patch from Lars Roland, make RC_VERSION comma-separated.
Also put in a comment noting that it should be comma-separated, and
noting why it should be comma-separated.

svn path=/trunk/; revision=7880
2003-06-13 22:43:37 +00:00
Guy Harris
3c6327720b From Jeff Rizzo: sFlow support.
svn path=/trunk/; revision=7879
2003-06-13 22:31:11 +00:00
Guy Harris
7ca62c9ece Fixes to get it to compile on Win32.
svn path=/trunk/; revision=7878
2003-06-13 22:22:48 +00:00
Guy Harris
626b7e21ea On Win32, say "without WinPcap" rather than "without libpcap" (although
it's unlikely that somebody would build without WinPcap - they'd
currently have to manually tweak config.h.win32; we can do the same
trick there that we do with ADNS).

svn path=/trunk/; revision=7877
2003-06-13 20:40:31 +00:00
Guy Harris
31d4df4a8f Do run-time word-wrapping on the "Compiled with" message, rather than
wiring the line boundaries in.

On Win32, say "with WinPcap" rather than "with libpcap", and report both
on whether we were compiled with WinPcap and whether we were able to
load WinPcap.

svn path=/trunk/; revision=7876
2003-06-13 20:03:50 +00:00
Guy Harris
b18f9bad07 Handle the case of a comparison between two ranges (or, at least, don't
dump core if the user tries it).

svn path=/trunk/; revision=7875
2003-06-13 10:03:25 +00:00
Guy Harris
47895f5e55 Oops, a range of N-N is valid and means "the byte at offset N".
svn path=/trunk/; revision=7874
2003-06-13 07:39:26 +00:00
Guy Harris
669e203f4b Add some sanity checking for ranges, so that you can't say "foo[M-N]"
where N is less than or equal to M.

svn path=/trunk/; revision=7873
2003-06-13 07:27:46 +00:00
Guy Harris
a67a96191b Fix some typoes.
svn path=/trunk/; revision=7872
2003-06-13 07:07:51 +00:00
Guy Harris
eecc575e23 "tvb_format_text()" should be able to handle a length argument of 0.
svn path=/trunk/; revision=7871
2003-06-13 04:07:13 +00:00
Guy Harris
60f7a4d75d Make it compile without libpcap.
svn path=/trunk/; revision=7870
2003-06-13 03:44:36 +00:00
Guy Harris
896eee275d Put in a missing comma.
svn path=/trunk/; revision=7869
2003-06-13 03:43:44 +00:00
Guy Harris
af2ff9a201 Link dftest with the ADNS library if it's configured in.
svn path=/trunk/; revision=7868
2003-06-13 03:09:28 +00:00
Guy Harris
4275845779 Fix by Gerald Combs to a braino of mine.
svn path=/trunk/; revision=7866
2003-06-13 02:37:42 +00:00
Guy Harris
7a2770dd81 From Jason House: fix the return types of the pointers to
"tvb_get_string()" and "tvb_get_stringz()".

svn path=/trunk/; revision=7865
2003-06-13 02:35:15 +00:00
Guy Harris
48aa4ea7ac Clarify the comment about not doing dissection work if "tree" is NULL,
to indicate what you should avoid doing *and* to indicate what you still
have to do (i.e., call subdissectors).

svn path=/trunk/; revision=7864
2003-06-12 10:15:25 +00:00
Guy Harris
c7ce8b9a8b Link the plugin with glib, as it now calls "g_free()".
svn path=/trunk/; revision=7863
2003-06-12 10:12:21 +00:00
Guy Harris
feadec85eb Export "tvb_get_string()" and "tvb_get_stringz()" to plugins.
svn path=/trunk/; revision=7862
2003-06-12 10:10:39 +00:00
Guy Harris
15d260c8ba Get rid of allocations of unused buffers.
svn path=/trunk/; revision=7861
2003-06-12 10:10:17 +00:00
Guy Harris
ec5499613d Don't wire into "config.h.win32" files an indication of whether we have
GNU ADNS or not - set it based on whether ADNS_DIR is defined by
"config.nmake", and make "config.h.win32" files that specify whether we
have GNU ADNS dependent on "config.nmake".

Note in "config.nmake" that:

	if you have GNU ADNS, ADNS_DIR should be defined as the
	directory in which the ADNS .lib file resides;

	if you don't have GNU ADNS, ADNS_DIR shouldn't be defined.

svn path=/trunk/; revision=7860
2003-06-12 09:45:42 +00:00
Guy Harris
ee97ce3196 Add new routines:
tvb_get_string() - takes a tvbuff, an offset, and a length as
	arguments, allocates a buffer big enough to hold a string with
	the specified number of bytes plus an added null terminator
	(i.e., length+1), copies the specified number of bytes from the
	tvbuff, at the specified offset, to that buffer and puts in a
	null terminator, and returns a pointer to that buffer (or throws
	an exception before allocating the buffer if that many bytes
	aren't available in the tvbuff);

	tvb_get_stringz() - takes a tvbuff, an offset, and a pointer to
	a "gint" as arguments, gets the size of the null-terminated
	string starting at the specified offset in the tvbuff (throwing
	an exception if the null terminator isn't found), allocates a
	buffer big enough to hold that string, copies the string to that
	buffer, and returns a pointer to that buffer and stores the
	length of the string (including the terminating null) in the
	variable pointed to by the "gint" pointer.

Replace many pieces of code allocating a buffer and copying a string
with calls to "tvb_get_string()" (for one thing, "tvb_get_string()"
doesn't require you to remember that the argument to
"tvb_get_nstringz0()" is the size of the buffer into which you're
copying the string, which might be the length of the string to be copied
*plus 1*).

Don't use fixed-length buffers for null-terminated strings (even if the
code that generates those packets has a #define to limit the length of
the string).  Use "tvb_get_stringz()", instead.

In some cases where a value is fetched but is only used to pass an
argument to a "proto_tree_add_XXX" routine, use "proto_tree_add_item()"
instead.

svn path=/trunk/; revision=7859
2003-06-12 08:33:32 +00:00
Guy Harris
04a8718528 For the "all the rest of the packet is just text" case, just allocate a
buffer big enough to hold all of it, copy it all, and put in a null
terminator, rather than using "tvb_get_nstringz0()".

Don't use fixed-length buffers for null-terminated strings (even if the
code that generates those packets has a #define to limit the length of
the string).  Use "tvb_strsize()", and dynamically-allocated buffers,
instead (even if there's a nominal maximum packet size; that way you
don't have to remember that the argument to "tvb_get_nstringz0()" is the
size of the buffer into which you're copying the string, which might be
the length of the string to be copied *plus 1*, or remember that, if the
null terminator is found in the buffer, the return value of
"tvb_get_nstringz0()" doesn't include the null terminator).

svn path=/trunk/; revision=7858
2003-06-12 08:29:39 +00:00
Guy Harris
6402ebc0e5 Heuristic dissectors are not allowed to return FALSE after they've done
something to the protocol tree or the columns, as that leaves crud in
the protocol tree that could mess up whatever stuff subsequent
dissection code does with the packet.

Get rid of all column-setting code before the initial sanity checking
code, and have that code just return FALSE rather than putting
"Malformed FIX Packet" indications (if the dissector returns FALSE, it's
saying the packet *isn't* a FIX packet, not that it is one but that it's
malformed).  After we've set the columns and created the protocol tree,
return TRUE if we find a problem (we should put an error indication
there in that case).

svn path=/trunk/; revision=7857
2003-06-12 08:02:47 +00:00
Guy Harris
96524f20bc There are 10 bytes of interface name in the header; make the buffer for
the interface name 10+1 bytes (1 byte for a terminating null - we
mustn't assume there's one in the header, as *no* Ethereal dissector
should ever make assumptions about file contents that would cause
misbehavior) rather than 20 bytes (the extra 9 bytes wouldn't be used
and aren't necessary), and pass the size of the buffer to
"tvb_get_nstringz0()" rather than the size of the field in the packet.

svn path=/trunk/; revision=7856
2003-06-12 07:37:30 +00:00
Guy Harris
e502949ecc Show the segment type in the line for an 8-bit logical connection point
segment, as is done for othr logical segments (including 16-bit and
32-bit logical connection point segments).

svn path=/trunk/; revision=7855
2003-06-12 07:33:26 +00:00
Guy Harris
7794698ef1 The authentication field in a VRRP packet is 8 bytes long, not 9 bytes
long, so the length of the protocol tree item for it should be 8 bytes;
the buffer into which we copy it should still be 9 bytes long, to
include a trailing null.

svn path=/trunk/; revision=7854
2003-06-12 06:58:38 +00:00
Gerald Combs
8644f8baea Final updates for 0.9.13.
svn path=/trunk/; revision=7852
2003-06-12 01:01:05 +00:00
Guy Harris
329fcc6750 From Joakim Wiberg: update to the CIP dissector, reverting to the
"EtherNet/IP" name in his original version ("IP" there is "Industrial
Protocol", not "Internet Protocol"), and to the original file name, and
getting rid of some unused variables.

svn path=/trunk/; revision=7851
2003-06-11 22:36:18 +00:00
Guy Harris
6fc868b2c9 Put in a missing "break" statement.
svn path=/trunk/; revision=7850
2003-06-11 21:48:39 +00:00
Gilbert Ramirez
6823d063ee Expand the ability of fvalue_to_string_repr, and modify more FT_* types
to provide that method.

svn path=/trunk/; revision=7849
2003-06-11 21:24:54 +00:00
Guy Harris
03731079ca Put the subfields of the request or response line under the protocol
tree item for that line.

In "dfilter_sip_request_line()", free the string after we're done.

svn path=/trunk/; revision=7848
2003-06-11 21:17:41 +00:00
Gilbert Ramirez
2cd3b04259 SetCmdValueNum needs to be used with a fixed length, not -1. Thus,
use rec() instead of srec().

svn path=/trunk/; revision=7847
2003-06-11 20:57:11 +00:00
Guy Harris
857742e5e2 Replace value fetches and "proto_tree_add_XXX" calls with
"proto_tree_add_item()" if the value isn't being used.  (In one case,
there wasn't a corresponding value fetch, and some other value was being
put into the tree.)

svn path=/trunk/; revision=7846
2003-06-11 20:41:45 +00:00