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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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
"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