Commit Graph

1505 Commits

Author SHA1 Message Date
Guy Harris 9d4c965c81 Add some new SAP values from
http://www.optimized.com/COMPENDI/REF-SAP.htm

svn path=/trunk/; revision=1529
2000-01-24 02:44:52 +00:00
Guy Harris 05b04d0a42 xDLC frames other than I and UI frames may have a payload, e.g. TEST
frames; rename "XDLC_HAS_PAYLOAD()" to "XDLC_IS_INFORMATION()", and if
the frame isn't an "information" frame, dissect its payload (if any) as
data.

svn path=/trunk/; revision=1528
2000-01-24 02:05:39 +00:00
Guy Harris e55dac5888 Put the PID of SNAP frames into the protocol tree regardless of whether
the frame has a payload or not.

Note in a comment that in one capture there's a U frame with a function
of TEST, rather than UI, that appears to have a payload.

svn path=/trunk/; revision=1527
2000-01-24 01:45:12 +00:00
Guy Harris 6ba70926af When computing the total frame length of an 802.3 frame, add to the
value in the length field not only the Ethernet MAC header size, but
also the offset in the frame of the Ethernet MAC header, so that, if the
802.3 frame is encapsulated in some other type of frame, the total frame
length includes the header for that frame as well.

svn path=/trunk/; revision=1526
2000-01-24 01:15:37 +00:00
Guy Harris 2461d79698 In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless of
whether we're building a protocol tree or not.

Make "dissect_eth()" use "BYTES_ARE_IN_FRAME()" to see if we have a full
Ethernet header - it can be called with a non-zero offset, if Ethernet
frames are encapsulated inside other frames (e.g., ATM LANE).

Make capture routines take an "offset" argument if the corresponding
dissect routine takes one (for symmetry, and for Cisco ISL or any other
protocol that encapsulates Ethernet or Token-Ring frames inside other
frames).

Pass the frame lengths to capture routines via the "pi" structure,
rather than as an in-line argument, so that they can macros such as
"BYTES_ARE_IN_FRAME()" the way the corresponding dissect routines do.

Make capture routines update "pi.len" and "pi.captured_len" the same way
the corresponding diseect routines do, if the capture routines then call
other capture routines.

Make "capture_vlan()" count as "other" frames that are too short, the
way other capture routines do.

svn path=/trunk/; revision=1525
2000-01-23 08:55:37 +00:00
Gerald Combs 42d68156a9 Merge Paul Ionescu's CDP fixes with Guy's. Add #defines to oui.h for Cisco
IOS 9.0 and bridged frame relay and update packet-llc.c accordingly.  Add
CDP handler to capture_llc() in packet-llc.c.

svn path=/trunk/; revision=1524
2000-01-22 21:49:50 +00:00
Guy Harris 287efcbbe7 Allow "-w" and/or "-R" to be specified either when doing a live capture
or when reading a saved capture file; if "-w" is specified, the packets
captured or read from the file are written to the specified file rather
than being dissected and printed, and if "-R" is specified, only packets
that pass the specified read filter are dissected and printed or
written.

svn path=/trunk/; revision=1523
2000-01-22 07:19:34 +00:00
Guy Harris 3e067b812c Fix files that had Gilbert's old e-mail address or that didn't have my
forwarding e-mail address.

svn path=/trunk/; revision=1522
2000-01-22 06:22:44 +00:00
Guy Harris 167999e61e Give "dissect_rpc_string()" an extra "char **" argument; if it's
non-null, it returns through that argument a pointer to the displayed
version of the string, otherwise it just frees that string.

Use that to put, in the tree item for READDIR and READDIRPLUS reply
directory entry items, the file name from the directory entry.

svn path=/trunk/; revision=1521
2000-01-22 05:49:08 +00:00
Guy Harris 0b41709f86 Add "proto_item_set_text()", which sets the "representation" field of an
existing protocol tree item.

Add "proto_tree_add_notext()"; it's just like "proto_tree_add_text()",
but without the text, and it sets the "representation" field to NULL;
that field would be set later with "proto_item_set_text()".

Those routines let you construct, for example, an interior node of the
protocol tree whose text can't be determined until all the nodes under
it have been dissected - it's similar to "proto_item_set_len()" in that
fashion.

Use that when dissecting address TLVs in the CDP dissector - create the
item for an address in an "Addresses" TLV with no text, and then fill in
the items under it one at a time; if we get cut off before we get to the
actual address, set the text to "Truncated address", otherwise set it to
a description of the address.

Also, set the length of the item for the entire address TLV correctly.

svn path=/trunk/; revision=1520
2000-01-22 04:59:55 +00:00
Guy Harris 5b5f2271cd "tm_mon" in a "struct tm" is 0-based, not 1-based; when printing the
month number, add 1 to "tm_mon".

svn path=/trunk/; revision=1519
2000-01-22 02:00:27 +00:00
Gilbert Ramirez 1f6d7eb0e5 Add URL.
svn path=/trunk/; revision=1518
2000-01-21 19:19:23 +00:00
Guy Harris 0b3f81ad8f Add stuff to add platform-specific compiler flags; currently, we have
only flags for HP's ANSI C compiler, as suggested by Jost Martin.

svn path=/trunk/; revision=1517
2000-01-21 08:44:40 +00:00
Guy Harris d9f1ce299f Add "-L" flags to LDFLAGS, not LIBS, and get rid of all the exotic
searching that tries to figure out in what directory libpcap lives - we
should treat "-L" just like "-I", rather than adding a ton of
complication to do it the way the autoconf maintainers think, for some
reason, it should be done (by adding "-L" flags to LIBS - "-L" flags
don't specify libraries, so I have no clue why they think they belong in
LIBS; they specify a search path for libraries, just as "-I" flags
specify a search path for header files, so they strike me as "flags to
the linker" rather than "libraries", and LDFLAGS, unlike LIBS, appears
before *all* "-l" flags, including those specified by PCAP_LIBS and so
on).

svn path=/trunk/; revision=1516
2000-01-21 06:18:16 +00:00
Gilbert Ramirez 622e0ef550 Applied the vines part of Joerg's vines patch.
svn path=/trunk/; revision=1515
2000-01-21 00:07:53 +00:00
Guy Harris 8e7816815f Joerg Mayer's updates to the VINES dissector and to protocol layers
above VINES.

svn path=/trunk/; revision=1514
2000-01-20 21:34:16 +00:00
Guy Harris 0ce1dab01d Gerrit Gehnen's patch to add support for the "Inactive Subset" of the
ISO 8473 CLNP protocol.

svn path=/trunk/; revision=1513
2000-01-20 19:16:41 +00:00
Olivier Abad ea77c943c5 The headers of HP-UX 9.04 and HP-UX 10.20 nettl files seem to be different.
Check for both "magic numbers".

svn path=/trunk/; revision=1512
2000-01-20 17:13:42 +00:00
Guy Harris 485a5e01f6 Put the RFC number for PPTP into the introductory comment.
Fix a bunch of byte-order problems, as noted by Thomas Quinot in Debian
bug 55347, although his fix addressed only the byte-order problems, not
the blithely-fetching-through-a-possibly-unaligned-pointer problems that
said code also had; we fix both of them.

svn path=/trunk/; revision=1511
2000-01-20 07:31:29 +00:00
Guy Harris aabf4155cb Include CFLAGS in the command to build "rdps".
svn path=/trunk/; revision=1510
2000-01-18 20:35:40 +00:00
Guy Harris f09b4f0ace Use "strrchr()" instead of "rindex()" - "strrchr()" is the routine the
ANSI C standard specifies.

Fix up some menu stuff that should've been fixed when I put "Find Frame"
and "Go To Frame" under "Edit".

svn path=/trunk/; revision=1509
2000-01-18 19:01:35 +00:00
Uwe Girlich 28b71348de Last dissectors for NFS v3 are finally done.
svn path=/trunk/; revision=1508
2000-01-18 11:56:15 +00:00
Uwe Girlich 13ad87182d New constants for ftype3 decoding.
svn path=/trunk/; revision=1507
2000-01-18 11:54:07 +00:00
Guy Harris 766e37db65 Put into the "Capture Preferences" dialog box a check box to control
whether, in a live capture that updates the display as packets arrive,
the packet list pane should scroll to show the most recently captured
packets or not.

svn path=/trunk/; revision=1506
2000-01-18 09:25:04 +00:00
Guy Harris aa718b5e74 Put the "Find Frame" and "Go To Frame" menu items under "Edit"; leave
them under "Display" as well for now.

svn path=/trunk/; revision=1505
2000-01-18 09:05:30 +00:00
Guy Harris 4603877dc4 Jerry Talkington's changes to support, in the packet list and protocol
tree panes, menus popped up by the right mouse button.

svn path=/trunk/; revision=1504
2000-01-18 08:38:18 +00:00
Guy Harris 4aaff9af74 Squelch some complaints from GCC (and protect against the admittedly
unlikely possibility that, on some platform, converting a "gpointer" to
pointers of the types in question involves more than just reinterpreting
the bits of the "gpointer" value).

svn path=/trunk/; revision=1503
2000-01-17 20:30:17 +00:00
Guy Harris 7b2773fa31 Use "strchr()" rather than "index()" - the ANSI C standard specifies
"strchr()", and it, unlike "index()", is declared in <string.h>.

svn path=/trunk/; revision=1502
2000-01-17 20:21:40 +00:00
Gilbert Ramirez 0439185d4a Add Makefile.nmake to list of deliverables. I had sent Thomas Parvais
a tarball from the current CVS image using "make dist". That's why
he sent an e-mail today saying that the gtk/Makefile.namek was not
in CVS. It's in CVS, but it wasn't in the tarball I sent him.

svn path=/trunk/; revision=1501
2000-01-17 18:14:13 +00:00
Olivier Abad fdc1055f9f We have to #include "plugins.h" before using the HAVE_PLUGINS define.
svn path=/trunk/; revision=1500
2000-01-17 17:12:43 +00:00
Guy Harris a83998f4f0 Add a "-F" flag, to allow the format of a file being written to be
specified.  This will be of more use when I allow "-w" to be used when
reading an existing capture file rather than doing a live capture (which
will also allow you to specify a read filter, and thus to write a
capture file containing those packets from an existing capture file that
match a given display filter).

Fix up some messages to say "tethereal" rather than "ethereal".

svn path=/trunk/; revision=1499
2000-01-17 08:06:42 +00:00
Richard Sharpe 656eb3453b Small patch to editcap to allow ranges of packets to be specified
as well as individual packets.

I needed to grab quite a few from the middle of a large capture file.

Will eventually need to sort the extract list.

svn path=/trunk/; revision=1498
2000-01-17 08:06:03 +00:00
Guy Harris 1108f9f609 Add a "-x" flag to Tethereal, to make it print a hex and ASCII dump of
the packet data.

svn path=/trunk/; revision=1497
2000-01-17 07:49:03 +00:00
Guy Harris cfb98c14c4 Get rid of the include of "util.h" that some dissectors do - it's not
necessary.

svn path=/trunk/; revision=1496
2000-01-16 02:54:49 +00:00
Guy Harris 7f30e566a0 Move the routine to get a list of the network interfaces on the system
to "util.c", and provide a routine to free that list as well.

When picking an interface on which to do a capture (if no "-i" flag was
specified), use that routine, and pick the first interface on the list.

svn path=/trunk/; revision=1495
2000-01-16 02:48:12 +00:00
Guy Harris 66a0ac1ca1 The NetBSD zlib problem is probably the same as the FreeBSD and OpenBSD
zlib problems, and my workaround appears to handle that problem, so
let's reenable zlib support in NetBSD and look into it in more detail if
there's still a problem.

svn path=/trunk/; revision=1494
2000-01-16 00:13:24 +00:00
Guy Harris 25e72642db Rename "save_LIBS" to "ethereal_save_LIBS", to reduce the risk of a name
collision with another variable.

svn path=/trunk/; revision=1493
2000-01-15 21:01:04 +00:00
Gilbert Ramirez ccef52a83a Don't exclude register.c from the distribution tarball because we
no longer optionally compile the snmp dissector. But I left the dist-hook
line in the Makefile.am in case we're ever in that situation again.

svn path=/trunk/; revision=1492
2000-01-15 13:45:06 +00:00
Gilbert Ramirez 40abaa9d1e Add in a couple of the artifacts produced from autoconf/automake
svn path=/trunk/; revision=1491
2000-01-15 13:27:39 +00:00
Gilbert Ramirez 34a287ee01 Remove libltdl from the build. The directory is still in CVS, but it is
not used in the build. I'll wait a few days to remove the libltdl
directory, just in case.

svn path=/trunk/; revision=1490
2000-01-15 13:25:22 +00:00
Gilbert Ramirez acc4ff5884 Move top-level window creation to separate function outside of
main().

svn path=/trunk/; revision=1489
2000-01-15 12:54:24 +00:00
Olivier Abad bc1b21d94f Add missing #ifdef HAVE_PLUGINS before calling init_plugins()
svn path=/trunk/; revision=1488
2000-01-15 10:50:23 +00:00
Olivier Abad c85d49dc19 Add a call to init_plugins() in order to read the plugins.status file and
enable plugins if their saved status is "active".

svn path=/trunk/; revision=1487
2000-01-15 10:47:56 +00:00
Guy Harris d24c46a027 As we're not using the default action for AC_CHECK_LIB in
AC_ETHEREAL_PCAP_CHECK, we have to explicitly define HAVE_LIBPCAP if we
find it, otherwise it doesn't get defined.

svn path=/trunk/; revision=1486
2000-01-15 10:25:41 +00:00
Guy Harris 84776702fa Pass the number of packets to be captured to "capture()" as an argument,
rather than making it static.

Don't print the "Capturing on <interface>" message until you actually
start capturing, and print it regardless of whether the interface was
explicitly specified or not (that's what snoop and tcpdump do).

svn path=/trunk/; revision=1485
2000-01-15 10:23:10 +00:00
Guy Harris eacc4cad71 Arrange that, on Solaris, we link with "-lkstat" if necessary when
linking with "-lsnmp".

Link only Ethereal and Tethereal with "-lpcap"; don't link editcap, or
any of the test programs that the configure script builds, with it
(because that means you also have to arrange that those test programs be
linked with @SOCKET_LIBS@ and @NSL_LIBS@) - i.e., don't add it to LIBS,
add it to PCAP_LIBS, and use that only for programs that need it.

svn path=/trunk/; revision=1484
2000-01-15 09:46:28 +00:00
Guy Harris 486e259d94 Tethereal needs the same set of additional objects that Ethereal does;
make it link with them.

Provide dependencies for Tethereal as well.

Tethereal may need to be linked with "-lsocket" and/or "-lnsl"; check
for that, and arrange that it be linked with them if necessary.

svn path=/trunk/; revision=1483
2000-01-15 08:08:20 +00:00
Guy Harris 278b21900a If no "-i" flag is specified to Tethereal when no file is to be read,,
or to Ethereal when the "-k" flag is specified, i.e. when a capture is
to be started immediately, use "pcap_lookupdev()" to pick an interface,
just as tcpdump does.

svn path=/trunk/; revision=1482
2000-01-15 06:05:21 +00:00
Guy Harris 8a1ecc5d83 When configuring for GLib, we have to include gmodule support; the GTK+
options include it automatically, but the GLib options don't, and
Tethereal links with GLib but not with GTK+.

svn path=/trunk/; revision=1481
2000-01-15 05:30:52 +00:00
Guy Harris 7063b3ae25 Fix up a bunch of places where a pointer into the packet buffer was cast
to a type requiring 2-byte or better alignment and was then
dereferenced; doing that requires that the code generated by your
compiler not trap if it makes an unaligned reference, and on most RISC
processors the code generated by the compiler *will* trap on an
unaligned reference by default.

svn path=/trunk/; revision=1480
2000-01-15 04:17:37 +00:00