Commit Graph

7780 Commits

Author SHA1 Message Date
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
Guy Harris eb551a28c9 Put the ACAP request or response line into the protocol tree, and put the
subfields of it under that item.

svn path=/trunk/; revision=7845
2003-06-11 20:04:13 +00:00
Guy Harris 124ba8819f Put the IMAP request or response line into the protocol tree, and put the
subfields of it under that item.

svn path=/trunk/; revision=7844
2003-06-11 20:03:39 +00:00
Guy Harris f796ac1886 Put the POP request or response line into the protocol tree, and put the
subfields of it under that item.

svn path=/trunk/; revision=7843
2003-06-11 20:03:09 +00:00
Guy Harris e066ea2337 Put the SMTP request or response line into the protocol tree, and put the
subfields of it under that item.

svn path=/trunk/; revision=7842
2003-06-11 18:22:12 +00:00
Gilbert Ramirez bc2eac429c Handle diff lines that look like "Binary files".
svn path=/trunk/; revision=7841
2003-06-11 14:48:27 +00:00
Gerald Combs ad37ffa69b s/artnet/rtnet/g.
svn path=/trunk/; revision=7840
2003-06-11 14:40:17 +00:00
Guy Harris f54e01516a From Erwin Rol: RTNET/TDMA support.
svn path=/trunk/; revision=7839
2003-06-11 09:17:03 +00:00
Guy Harris f70cc6b9f1 From Joakim Wiberg: support for Common Industrial Protocol over IP.
svn path=/trunk/; revision=7838
2003-06-11 09:02:19 +00:00
Guy Harris fd3a3a0436 Get the right length for methods with an "M-" prefix.
svn path=/trunk/; revision=7837
2003-06-11 04:25:30 +00:00
Gerald Combs 3e993551ce Add a couple of missing line continuations.
svn path=/trunk/; revision=7836
2003-06-11 01:33:04 +00:00
Guy Harris ff6017292f Put the FTP request or response line into the protocol tree, and put the
subfields of it under that item.

svn path=/trunk/; revision=7835
2003-06-10 23:12:15 +00:00
Gilbert Ramirez debac46b66 Add http.request.method field, and a subtree under the HTTP Reqeust in which
to put the field, and any future field extracted from the HTTP Request
record.

svn path=/trunk/; revision=7834
2003-06-10 22:07:18 +00:00
Laurent Deniel 8e2b112ae0 Add a preference for the FDDI dissector to be able to decode
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
2003-06-10 19:34:36 +00:00
Guy Harris 9472b08c4e Get rid of an unused variable.
svn path=/trunk/; revision=7832
2003-06-10 18:03:23 +00:00
Guy Harris bedcff1a07 Fix some places where "Ethereal" wasn't capitalized and boldfaced.
Fix a typo.

svn path=/trunk/; revision=7831
2003-06-10 17:34:01 +00:00
Guy Harris d71bf38e04 Fix a typo.
svn path=/trunk/; revision=7830
2003-06-10 17:24:40 +00:00
Guy Harris 57ae65f70f From Mike Frisch: finish NFS_ACL dissector.
svn path=/trunk/; revision=7829
2003-06-10 17:14:28 +00:00
Guy Harris 32eb0448a8 Handle the case of an empty interface list on Windows the same way we
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
2003-06-10 08:01:42 +00:00
Guy Harris 537710afee If ADNS_DIR isn't defined, don't link with the ADNS library; this lets
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
2003-06-10 07:20:06 +00:00
Guy Harris 9d24268f8f As "tvb_strneql()" and "tvb_memeql()" now just return -1, rather than
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
2003-06-10 05:53:33 +00:00
Guy Harris eab7ed158b When checking for a CR-LF at the end of a packet, don't assume we have
all the data in the packet - we might have captured with a snaplen
insufficient to get it all.

svn path=/trunk/; revision=7825
2003-06-10 05:45:33 +00:00
Guy Harris 43189e4e44 Add support for some additional SAPs for Netware and OSI.
svn path=/trunk/; revision=7824
2003-06-10 05:38:52 +00:00
Guy Harris a048cbebed Show the upper 2 bytes of the formerly-reserved area as a "High Part of
PID" even for SMB-over-IPX.

svn path=/trunk/; revision=7823
2003-06-10 05:28:02 +00:00
Jörg Mayer 00bfd16e5f update manuf to june 10th
svn path=/trunk/; revision=7822
2003-06-10 02:07:33 +00:00
Jörg Mayer 0138ab3c7a update FAQ to may 25th
svn path=/trunk/; revision=7821
2003-06-10 02:03:38 +00:00