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
some FDDI captures where 3-byte padding is added in order to
align the FDDI header (case of tcpdump/packetfilters on
Tru64 UNIX for instance).
svn path=/trunk/; revision=7833
handle it on UNIX. Check for an empty interface name (which indicates
the end of the interface list) at the beginning of the loop, so that if
the first interface name is empty (meaning an empty interface list) we
don't put a bogus entry into the list with just a colon.
svn path=/trunk/; revision=7828
you build Ethereal without ADNS. (It'd be nice if ADNS_DIR not being
defined caused the config.h file to have the appropriate #ifdefs turned
off; we can probably do that with another @xxx@ variable in
config.h.win32, and !IFDEFs in the rules to make the config.h files,
although we should then make config.h also depend on config.nmake.)
svn path=/trunk/; revision=7827
throwing an exception, if the bytes to be compared aren't available in
the tvbuff, we don't need to check for their existence before calling
those routines.
svn path=/trunk/; revision=7826