Commit Graph

2059 Commits

Author SHA1 Message Date
Guy Harris 7fbf320b8a Patch from Ben Fowler to rename the global variable "cf" to "cfile", to
make it easier to use grep to find all references to it without getting
a lot of false hits and to check, after allocating the memory chunk for
"frame_data" structures, that the allocation succeeded.

svn path=/trunk/; revision=2092
2000-06-27 04:36:03 +00:00
Guy Harris 85a7f56ac0 Rename "format_value()" to "format_var()", and have it dynamically
allocate the buffer into which it formats the variable value, and return
that value.  This

	1) makes it more closely resemble the formatting routine in the
	   libsmi-based "packet-snmp.c" under development;

	2) makes it less likely to overrun the buffer (we can't be
	   certain how long the string "sprint_value()" generates will
	   be, but we can make a reasonable guess as to the maximum size
	   based on the type and size of the object we're formatting).

When *not* using "-lsnmp", dynamically allocate the buffers into which
we format octet strings and OID values, based on the size of the object
we're formatting, so that we don't overrun the buffer.

svn path=/trunk/; revision=2091
2000-06-26 00:13:21 +00:00
Guy Harris 5a8b587fc6 In "asn1_oid_value_decode()", set "size" directly from "enc_len", rather
than setting "eoc" from "asn1->pointer" and "enc_len" and then setting
"size" from "eoc" and "asn1->pointer", to make it clearer how it's being
set.

svn path=/trunk/; revision=2090
2000-06-26 00:08:48 +00:00
Guy Harris 33fccd5fa2 Make the string buffers into which stuff is formatted larger, to handle,
for example, larger octet string values.

svn path=/trunk/; revision=2089
2000-06-25 20:55:09 +00:00
Gilbert Ramirez 254c803dca Report changes for 0.8.10
svn path=/trunk/; revision=2088
2000-06-24 16:30:44 +00:00
Guy Harris ae1f565029 Joerg Mayer's changes to add support for NetXRay file format version
2.002, as used by release 3.50 of the Network Associates Sniffer for
Windows; currently, we treat it just like the 2.001 version, so we
rename the version #define WTAP_FILE_NETXRAY_2_001 to
WTAP_FILE_NETXRAY_2_00x and use that for both 2.001 and 2.002.

svn path=/trunk/; revision=2087
2000-06-24 05:32:48 +00:00
Guy Harris 068f36c4fe Write and read the temporary file for "Follow TCP Stream" as a binary
file, not as a text file; that makes no difference on UNIX, but, as the
file *is* binary, it makes a difference on Win32 systems.

svn path=/trunk/; revision=2086
2000-06-24 05:06:29 +00:00
Guy Harris 0c19288eb3 Add link instructions for "tvbtest", so that we link with GLib.
svn path=/trunk/; revision=2085
2000-06-22 06:37:59 +00:00
Guy Harris b5c534ddbf Add support for the reported length of tvbuffs and for the
ReportedBoundsError exception.

svn path=/trunk/; revision=2084
2000-06-22 06:36:45 +00:00
Guy Harris 480eaea7d4 Fix the display of volume names.
svn path=/trunk/; revision=2083
2000-06-21 04:41:30 +00:00
Gilbert Ramirez 942a561059 tvbuffify the IGMP dissector. There's still plenty more to do inside
packet-ip.c.

svn path=/trunk/; revision=2082
2000-06-20 13:21:55 +00:00
Gilbert Ramirez 4006708385 tvbuff-ify the TR MAC dissector.
svn path=/trunk/; revision=2081
2000-06-20 03:05:37 +00:00
Guy Harris 1cca166630 Make the "isis_hello.source_id" an FT_BYTES field rather than an
FT_ETHER field; the ISIS spec doesn't say it's necessarily a 6-byte
Ethernet address (and, if it's FT_BYTES, you can test it in a filter
much the same way you test an Ethernet address).

Make "isis_hello.lan_id" an FT_BYTES field rather than an FT_STRING
field - it's an array of bytes, not a character string.

Don't require that "system ID" fields be 6 octets; use the size value
from the ISIS PDU header.  (This means that PDUs containing "system ID"
fields can't be described as C structures; dissect them by stepping the
offset instead.)

svn path=/trunk/; revision=2080
2000-06-19 08:33:50 +00:00
Guy Harris 02fd86777e ISIS is ISO standard 10589, not 10598.
svn path=/trunk/; revision=2079
2000-06-19 04:49:36 +00:00
Gerald Combs 1513e26b0b Get rid of string overrun.
svn path=/trunk/; revision=2078
2000-06-18 22:12:14 +00:00
Guy Harris 7d67328a2a Instead of calling "snmp_set_full_objid()" to cause OIDs to be displayed
symbolically as full sequences, call "snmp_set_suffix_only(2)" to cause
them to be displayed symbolically as a module name and a name within
that module, as that might make it easier to find the RFC or whatever
that describes the object in question.

Don't just statically call it, though, on Linux, as that causes binaries
built on Red Hat releases prior to 6.2 to fail to run on 6.2, due to the
UCD SNMP 4.1.1 library used in RH 6.2 not being 100% binary-compatible
with the UCD SNMP libraries used in those prior releases.  Instead, on
Linux, try to "dlopen()" the "libsnmp.so" library and, if that succeeds,
try to find "snmp_set_suffix_only()" in that library - if that succeeds,
call it, otherwise try to find "ds_set_int()" in that library and, if
*that* succeeds, call it with the arguments that, in UCD SNMP 4.1.1, the
"snmp_set_suffix_only()" macro passes to it.

svn path=/trunk/; revision=2077
2000-06-17 05:56:22 +00:00
Guy Harris 6bf61848b7 Add braces to squelch a warning from GCC 2.8.1 on Solaris 7/x86.
svn path=/trunk/; revision=2076
2000-06-17 03:05:02 +00:00
Gilbert Ramirez 5afb4f7225 Small patch for the win32 makefile that improves the dependencies and
prints out exactly which executable is being linked.
From Graham Bloice <graham.bloice@trihedral.com>

svn path=/trunk/; revision=2075
2000-06-16 15:05:26 +00:00
Guy Harris f3eddb46cc Changes from Graham Bloice to support "Update list of packets in real
time" during captures on Win32.

svn path=/trunk/; revision=2074
2000-06-15 08:02:43 +00:00
Guy Harris 65b907e98d Patch from Joerg Mayer:
Make "tethereal -h" look as similar to "ethereal -h" as
	possible.  The ethereal help was the "better" of the two.

svn path=/trunk/; revision=2073
2000-06-15 07:49:25 +00:00
Guy Harris 7ec88ecbb4 Patch from Joerg Mayer to fix a problem reading Sniffer files:
Differentiate between LAPB and LAPD sync sniffer traces.
	Personally I think there must be a better way to find out which
	protocol is in the trace but I currently lack the time to look
	at the remaining frame info.

svn path=/trunk/; revision=2072
2000-06-15 06:18:32 +00:00
Guy Harris b27100abcb Patch from Joerg Mayer to fix a problem reading Sniffer files:
When trying to decode a sample trace from the NG offline sniffer
	installation, one trace resulted in a "corrupted" error.  The
	reason was, that the file was a version 2 file format.  That
	format used type 8 for header purposes while version 4 uses it
	for FRAME4.

svn path=/trunk/; revision=2071
2000-06-15 06:13:08 +00:00
Guy Harris 7250d49c49 Mark Clayton's patch to add support for capturing on ATM interfaces on
Linux (call the until-now-unused "capture_clip()" routine for each
packet).

svn path=/trunk/; revision=2070
2000-06-15 04:23:06 +00:00
Guy Harris 72ad5b91d6 Fix typos in some printf formats - "+%d", not "%+d"
svn path=/trunk/; revision=2069
2000-06-15 04:09:22 +00:00
Gilbert Ramirez 0ab8dd8cbd Convert IPX-and-friend dissectors in packet-ipx.c to use
tvbuffs.

In doing so, I realied that my recommendation for using
tvb_new_subset(pi.compat_top_tvb, -1, -1) was incorrect, because
some dissectors (ethernet!) change pi.len and pi.cap_len. So, I have
to take those two variables into account instead of using -1 and -1.

So, I provide a macro called tvb_create_from_top(offset), where
offset is the name of your offset variable. It is a wrapper around
tvb_new_subset().

I converted the lines that followed my suggestion to use
tvb_create_from_top().

In proto.c I added
proto_tree_add_debug_text(proto_tree*, const char*, ...)
It's much like proto_tree_add_text(), except that it takes no offset
or length; it's soley for temporarily putting debug text into the
proto_tree while debugging a dissector. In making sure that its
use is temporary, the funciton also prints the debug string to stdout
to remind the programmer that the debug code needs to be removed
before shipping the code.

svn path=/trunk/; revision=2068
2000-06-15 03:49:00 +00:00
Gerald Combs adaefea44d Added a passel-o-codes from Gaetan Soltesz <gaetan@cisco.com>
svn path=/trunk/; revision=2067
2000-06-14 19:53:37 +00:00
Guy Harris 9a52ba3506 When building under Win32, "boolean" appears to be defined in a fashion
that causes "packet-x11.c" to fail to compile due to it defining its own
function named "boolean", so we rename the "packet-x11.c" "boolean()"
function to "add_boolean()".

svn path=/trunk/; revision=2066
2000-06-14 07:16:07 +00:00
Guy Harris 9dd3dda4c9 In "stringCopy()", make the character temporary unsigned, so that it
doesn't get sign-extended before being handed to "isgraph()".

svn path=/trunk/; revision=2065
2000-06-14 00:24:39 +00:00
Jun-ichiro itojun Hagino e544ab95c9 tos_str is no longer used. it was superseded by iptos_vals.
svn path=/trunk/; revision=2064
2000-06-13 10:37:24 +00:00
Gilbert Ramirez 835e8bea10 Initialize 'int next_offset' to 0 instead of NULL.
svn path=/trunk/; revision=2063
2000-06-12 19:19:54 +00:00
Olivier Abad 7ca2d277d6 Convert the DDTP dissector to use tvbuffs.
svn path=/trunk/; revision=2062
2000-06-12 10:01:54 +00:00
Guy Harris 5a957e006a Don't include <X11/Xlib.h> to get AllPlanes defined; that causes the
build to fail on Win32 systems.  It's defined (at least in the X11R6 on
my FreeBSD 3.4 system) as "((unsigned long)~0L)", which presumably means
"set all the bits" - which means "set all 32 bits" in the "value_string"
table where it appears, as the value member of an entry in such a table
is a "guint32", so just use 0xFFFFFFFF.

Get rid of other unneeded #includes as well.

svn path=/trunk/; revision=2061
2000-06-12 09:32:06 +00:00
Guy Harris 5592101b43 Use "dissect_rpc_list()" to dissect NFS READDIR/READDIRPLUS reply lists
and portmapper DUMP reply lists, rather than duplicating what
"dissect_rpc_list()" does.

svn path=/trunk/; revision=2060
2000-06-12 08:47:34 +00:00
Guy Harris 22f6f8b468 Partial tvbuffification of the X11 dissector; we construct a tvbuff from
the top-level "compatibility" tvbuff, so that we don't blow up if we get
short frames *or* misinterpret data due to, for example, trying to treat
the initial client->server message in a connection as an X11 request, or
interpreting the middle of a multi-frame request (e.g., a big PutImage)
as if it contained requests.  (I have a capture file on which the
non-tvbuffified code crashed.)

Attempt to dissect requests until we reach the end of the frame, even if
that would take us past the end of the captured data in the frame before
we reach the end of the frame; the tvbuff code will throw an exception
if we go past the end of the captured data, which means it'll put a
"Short frame" indication into the protocol tree, which is what we want
(the frame *is* short, because the capture length was too short).

Define functions taking no arguments with a "(void)" argument list, so
that the compiler knows that they must not be passed any arguments.

svn path=/trunk/; revision=2059
2000-06-12 08:28:13 +00:00
Guy Harris c5fe191b66 Add "packet-syslog.c".
svn path=/trunk/; revision=2058
2000-06-12 02:38:13 +00:00
Guy Harris 515f6811c0 Christophe Tronche's X11 dissector.
svn path=/trunk/; revision=2057
2000-06-12 02:30:35 +00:00
Gerald Combs 1d97f13307 Add syslog support to randpkt.
Fix problems revealed by randpkt, add OS-specific info.

svn path=/trunk/; revision=2056
2000-06-11 15:54:03 +00:00
Guy Harris 069f5695ed Search for the GDK library in $(GTK_DIR)\gdk rather than in
$(GTK_DIR)\gdk\win32 - the latest GTK+ packages for Win32 don't put it
in a "win32" subdirectory.

svn path=/trunk/; revision=2055
2000-06-11 07:49:36 +00:00
Gerald Combs 9907f9b9ff Add syslog message dissector.
svn path=/trunk/; revision=2054
2000-06-11 05:19:21 +00:00
Olivier Abad a8dada6429 DDTP has been assigned port 1052 for both client and server by the IANA.
I updated the dissector_add() calls to reflect this change.

svn path=/trunk/; revision=2053
2000-06-10 18:08:17 +00:00
Gilbert Ramirez cf9133cd2e Mark 2 local functions as 'static'.
svn path=/trunk/; revision=2052
2000-06-09 21:15:46 +00:00
Gilbert Ramirez 0c53a9ab7e Changed long registration name for L2TP to spelled-out name, without
a redundant "P".

svn path=/trunk/; revision=2051
2000-06-08 19:07:13 +00:00
Gilbert Ramirez f5d4b02502 The last bit of news for 0.8.9
svn path=/trunk/; revision=2049
2000-06-08 03:14:46 +00:00
Gilbert Ramirez 4054ffd418 Let people know that this document is useful for both compiling
and using Ethereal on Win32.

svn path=/trunk/; revision=2048
2000-06-08 03:12:52 +00:00
Gilbert Ramirez 4984788880 Document the fact that we can now read compressed Sniffer files.
svn path=/trunk/; revision=2047
2000-06-08 03:09:32 +00:00
Gilbert Ramirez 8130072d19 Document how to create a tvbuff inside a dissector-table-called dissector,
using packet-cops.c as an example.

svn path=/trunk/; revision=2046
2000-06-08 03:03:43 +00:00
Gilbert Ramirez 80fd4c2250 Mention Heikki as the COPS author.
svn path=/trunk/; revision=2045
2000-06-07 22:58:20 +00:00
Gilbert Ramirez d8944a80aa Add COPS dissector (with a few fixes for compiling on Win32).
I put the header file info in packet-cops.c since no one else uses it.

Fix the version number and plugin directory in config.h.win32.

svn path=/trunk/; revision=2044
2000-06-07 22:57:45 +00:00
Gilbert Ramirez 0de6781c3b Fix L2TP so that dissect_ppp() is called.
Convert L2TP dissector to use tvbuffs.

svn path=/trunk/; revision=2043
2000-06-07 11:37:08 +00:00
Gilbert Ramirez f185b77167 Move to version 0.8.9
svn path=/trunk/; revision=2042
2000-06-07 02:37:06 +00:00