Commit Graph

2805 Commits

Author SHA1 Message Date
Guy Harris a3fa5541a8 Add a "col_clear()" routine, to clear a column; it appears (and it
doesn't just seem to be a profiling artifact) that, at least on FreeBSD
3.4, it's significantly more efficient to clear out a column by stuffing
a '\0' into the first byte of the column data than to do so by copying a
null string (I guess when copying one byte, the fixed overhead of the
procedure call and of "strcpy()" is significant).

Have the TCP dissector set the Protocol column, and clear the Info
column, before doing anything that might cause an exception to be
thrown, so that if we *do* get an exception thrown, the frame at least
shows up as TCP.

Instead of, in the TCP dissector, constructing a string and then
stuffing it into the Info column, just append to the Info column, which
avoids one string copy.

Pass a "frame_data" pointer to dissectors for TCP and IP (and PPP)
options, so they can use it to append to the Info column.

svn path=/trunk/; revision=2744
2000-12-04 06:37:46 +00:00
Guy Harris 35bf0b2abc Don't loop infinitely if we see a Host Address or unknown Forwarding
Equivalence Class.

Set "pinfo->current_proto", so that if we run past the end of the data
the problem is noted as being with LDP.

svn path=/trunk/; revision=2743
2000-12-04 06:05:49 +00:00
Guy Harris e152085fa8 Update a comment.
svn path=/trunk/; revision=2742
2000-12-03 22:53:09 +00:00
Guy Harris 79d456e315 Declare "proto_malformed" in "packet-frame.h", as "packet-frame.c"
exports it.

Make the pointer that points to the GMemChunk for per-frame data static
to "epan/packet.c", as it's not used outside "epan/packet.c".

svn path=/trunk/; revision=2741
2000-12-03 22:32:10 +00:00
Guy Harris 6b744058c3 Nothing in "packet.c" uses the global "cfile", so there's no need to
declare it there.

svn path=/trunk/; revision=2740
2000-12-03 22:26:26 +00:00
Guy Harris 35b1907af8 Pull the code to set the fields in the "cfile.cinfo" structure into a
common routine to initialize a "column_info()" structure, shared by
Ethereal and Tethereal.

svn path=/trunk/; revision=2739
2000-12-03 22:12:21 +00:00
Guy Harris 6c4de764d1 Put the "-s" flag into the usage message for editcap.
svn path=/trunk/; revision=2738
2000-12-03 21:11:05 +00:00
Guy Harris 6e8a797df4 "dissect_ppp()" isn't called directly from outside of "packet-ppp.c", so
make it static.

svn path=/trunk/; revision=2737
2000-12-03 09:59:49 +00:00
Guy Harris b875b93005 Add the standard "CHECK_DISPLAY_AS_DATA()" call.
svn path=/trunk/; revision=2736
2000-12-03 09:47:18 +00:00
Guy Harris 7a2cd91595 Register "dissect_nbipx()", and have the IPX dissector look up its
handle and call it through the handle.  Make it static; this renders
"packet-nbipx.h" unnecessary.

Get rid of the "tvb_compat()" call in the IPX dissector - it calls all
dissectors through handles or lookup tables, and thus any
backwards-compatibility stuff is done by the code in libethereal.

svn path=/trunk/; revision=2735
2000-12-03 09:18:20 +00:00
Richard Sharpe 6d30ba2b97 Stealing time again to compulsively code this beast.
Still more TLVs to code ...

svn path=/trunk/; revision=2734
2000-12-03 02:37:56 +00:00
Richard Sharpe 8482bcd0ab Dissect Common Hello Params TLV ...
Still more work to do though ...

svn path=/trunk/; revision=2733
2000-12-02 14:23:04 +00:00
Guy Harris c06489bae3 Add the relevant "CHECK_DISPLAY_AS_DATA()" call.
svn path=/trunk/; revision=2732
2000-12-02 09:09:25 +00:00
Guy Harris 3f658551e5 The second argument to "proto_register_protocol()" is a name to be used
in filters, and should be all-lower-case.

svn path=/trunk/; revision=2731
2000-12-02 08:56:40 +00:00
Guy Harris 0ab8e159b9 Some tvbuffified dissectors weren't setting "pinfo->current_proto", so
that if they threw an exception, the wrong protocol would be blamed.
Add the missing assignments.

Clean up the extraction of the null-encapsulation header.

svn path=/trunk/; revision=2730
2000-12-02 08:41:08 +00:00
Guy Harris 75acffe70c Clean up the handling of MIME headers.
Handle the Content-Length: MIME header, so that, if there's a
Content-Length: header, we only process as RTSP payload the amount of
data specified by that header.

Handle frames with more than one RTSP message in them (the previous
change allows us to do so).

svn path=/trunk/; revision=2729
2000-12-02 06:05:29 +00:00
Gilbert Ramirez 70d52fa4e8 Comment out some unused variables.
svn path=/trunk/; revision=2728
2000-12-01 15:12:25 +00:00
Richard Sharpe 7c5911a9c6 Fix one small type WRT Forwarding Equivalence Classes and handle the
illegal padding by trying to skip it.

svn path=/trunk/; revision=2727
2000-12-01 09:40:12 +00:00
Richard Sharpe 1aa04e3836 A much more complete LDP dissector.
Still more work to do though, as I want to dissect the various message
types correctly, and to dissect TLVs much more as well.

The dissector currently handles multiple messages in a PDU, as the trace
file I have has some of those.

I think that the equipment that generated the LDP trace I have has a bug.

It seems to think that TLVs must be alligned on 4-byte boundaries, while the
spec (draft) says that there are no alignment requirements :-)

Don't know what generated the trace :-)

svn path=/trunk/; revision=2726
2000-12-01 09:05:46 +00:00
Guy Harris a810e733e6 NFS V4 support, from Mike Frisch.
svn path=/trunk/; revision=2725
2000-12-01 00:38:20 +00:00
Richard Sharpe 749e87cb6f Step-wise improvement on this thing ... next to dissect each message type
more fully.

Apparently, LDP allows multiple messages per PDU. Has anyone seen such an
implementation?

svn path=/trunk/; revision=2724
2000-11-30 20:27:40 +00:00
Uwe Girlich d27c24579a Small code optimization to make it possible to compile on ReliantUNIX.
svn path=/trunk/; revision=2723
2000-11-30 14:09:14 +00:00
Guy Harris 060587a3a5 Fix up the handling of type/length fields in ATMARP.
svn path=/trunk/; revision=2722
2000-11-30 10:42:50 +00:00
Guy Harris 60b1bed605 GVRP dissector, from Kevin Shi.
svn path=/trunk/; revision=2721
2000-11-30 09:31:52 +00:00
Richard Sharpe 8af1fc6550 More work in progress on the Label Distribution Protocol dissector ...
Bit more work to do, and a list of TLV values, and I am away :-)

svn path=/trunk/; revision=2720
2000-11-30 06:24:53 +00:00
Guy Harris 50f6a061a7 In "tvb_find_guint8()" and "tvb_pbrk_guint8()", correctly set the limit
of the search if the caller-supplied limit goes past the end of the
tvbuff - the limit should just be what remains in the tvbuff after the
specified starting offset.

In "tvb_find_line_end_unquoted()", after searching for the next
interesting character, check the value we got back from that search, in
"char_offset", not whatever happens to be in "cur_offset", to see if we
found a character.

svn path=/trunk/; revision=2719
2000-11-30 06:11:32 +00:00
Gilbert Ramirez a0729a25dd In tvb_set_reported_length(), don't assert on
reported_length <= tvb->reported_length, but throw a ReportedBoundsError
if that condition is not met.

svn path=/trunk/; revision=2718
2000-11-30 03:24:16 +00:00
Guy Harris 7c5cf7fee0 Rename "proto_reg_handoff_iee380211()"[sic] to
"proto_reg_handoff_wlan()", to match "proto_register_wlan()".

Call it "IEEE 802.11 wireless LAN", not "Wireless ethernet" - that makes
it clearer what type of wireless LAN it is (which *isn't* Ethernet at
the MAC layer, although I suspect many of the drivers make it look like
Ethernet to the rest of the system).

svn path=/trunk/; revision=2717
2000-11-30 03:19:27 +00:00
Guy Harris afb9f6dea8 Clean up the handling of the RTSP payload a bit.
svn path=/trunk/; revision=2716
2000-11-30 02:06:30 +00:00
Gilbert Ramirez a6ff1e144f Add LDP dissector to NMake makefile.
svn path=/trunk/; revision=2715
2000-11-29 13:20:06 +00:00
Richard Sharpe 88f954cfa2 Initial coding of the dissector for the Label Distribution Protocol.
It registers the same dissector for the LDP port for both TCP and UDP.

Still a lot of work to do, but we can see the header now.

svn path=/trunk/; revision=2714
2000-11-29 13:15:01 +00:00
Guy Harris 4a41bdd1fc Use GLib's G_MODULE_EXPORT when defining constants and functions
exported by a plugin, rather than defining our own DLLEXPORT.

svn path=/trunk/; revision=2713
2000-11-29 09:49:30 +00:00
Guy Harris 458a156913 Get the suffix for dynamically-loaded modules by means of a hack
involving "g_module_build_path()", rather than by checking the platform
- this should let us handle non-Windows platforms that don't use ".so"
(e.g., HP-UX).

Use G_DIR_SEPARATOR_S as the pathname separator character when
generating the pathname of the module.

svn path=/trunk/; revision=2712
2000-11-29 09:10:03 +00:00
Guy Harris 5a8c21a217 Catch Sniffer packets where the record length for a record containing a
packet is too small to contain all the data that the frame header claims
was captured for the packet; treat that as a bad record, and return an
error.

svn path=/trunk/; revision=2711
2000-11-29 08:24:14 +00:00
Guy Harris 1c9502bafd Tvbuffify the GRE and WCCP dissectors.
svn path=/trunk/; revision=2710
2000-11-29 07:42:35 +00:00
Guy Harris d0177bb9b0 WCCP 2.0 support.
svn path=/trunk/; revision=2709
2000-11-29 06:17:34 +00:00
Gilbert Ramirez d673500082 Wrap the dissect_fddi() call (with a 4th argument) with
dissect_fddi_not_bitswapped() and dissect_fddi_bitswapped(), both of which
use the standard 3-argument tvbuffified-dissector argument list.

Add a dissector table called "wtap_encap" which is used to call dissectors
from dissect_frame(). The switch() statement from this top-level dissector
is removed.

The link-layer dissectors register themselves with the "wtap_encap"
dissector table. The dissectors are now static where possible.

svn path=/trunk/; revision=2708
2000-11-29 05:16:15 +00:00
Gilbert Ramirez d6d2a9ccc9 Translate the A-F characters of all OUIs to uppercase before inserting
them into the hash. Without using the same case on all OUIs, some collisions
were not detected (00:00:F6 vs 00:00:f6)

svn path=/trunk/; revision=2707
2000-11-29 04:11:48 +00:00
Gilbert Ramirez f69e977a76 Move Win32 version to 0.8.14.1
svn path=/trunk/; revision=2705
2000-11-28 15:54:20 +00:00
Guy Harris 63bf78521d Updates from Ralf Holzer.
svn path=/trunk/; revision=2704
2000-11-28 06:38:47 +00:00
Guy Harris f0da4988f0 The SMI Network Management Private Enterprise Code for Ascend is 529,
not 123 (123 is Newbridge Networks); update the list of RADIUS vendor
IDs, and put in a comment before that list indicating that RADIUS vendor
IDs are just SMI Network Management Private Enterprise Codes and giving
the URL of the IANA list of enterprise codes.

svn path=/trunk/; revision=2703
2000-11-28 06:29:17 +00:00
Olivier Abad ce54dc3d54 The length of FT_BOOLEAN bitfields must be specified in bits, not bytes.
svn path=/trunk/; revision=2702
2000-11-27 06:23:42 +00:00
Gerald Combs 841a0c56d4 Credit Michael Patton and the IEEE in the document header. Add URLs to the
IEEE data (Michael's was already there).

svn path=/trunk/; revision=2701
2000-11-26 19:35:31 +00:00
Gerald Combs 78efde1cef Add make-manuf, a script that:
- Reads our current 'manuf' file header and contents

  - Fetches OUI information from the IEEE and CaveBear

  - Merges the OUI information, with our entries taking precedence, then
    CaveBear's, then the IEEE.

  - Dumps eveything into the 'manuf' file.

svn path=/trunk/; revision=2700
2000-11-23 18:22:00 +00:00
Richard Sharpe 07f065e61a Apply Jeroen Ruigrok van der Werven's patches ...
svn path=/trunk/; revision=2699
2000-11-22 21:19:38 +00:00
Guy Harris b4219afa51 Generated Bison and Flex files test whether __STDC__ is defined
in order to check whether to use ANSI C features such as "const".

GCC defines it as 1 even if extensions that render the implementation
non-conformant are enabled; Sun's C compiler (and, I think, other
AT&T-derived C compilers) define it as 0 if extensions that render
the implementation non-conformant are enabled; Microsoft Visual C++
6.0 doesn't define it at all if extensions that render the implementation
non-conformant are enabled.

We define it as 0 in "config.h.win32", so that those generated files will use
those features (and thus not get type warnings when compiled with
MSVC++).

svn path=/trunk/; revision=2698
2000-11-22 07:20:27 +00:00
Gilbert Ramirez ff8da7fb9d Export plugin_reg_handoff via DLLEXPORT.
svn path=/trunk/; revision=2697
2000-11-22 06:22:35 +00:00
Gilbert Ramirez 90e0fb129d Change Ethereal homepage URL from etheral.zing.org to www.ethereal.com.
svn path=/trunk/; revision=2696
2000-11-22 04:07:04 +00:00
Gilbert Ramirez 038774d586 Enable the building of any combination of ethereal, tethereal, and editcap.
If GTK+ is not detected, then ethereal is not built.

svn path=/trunk/; revision=2695
2000-11-22 04:03:22 +00:00
Guy Harris 032575ea0d In the tvbuffified "dissect_rpc()", use the "pinfo" argument rather than
the global "pi".  Also set "pinfo->current_proto" to "RPC", so that we
get the right message if a tvb accessor throws an exception.

svn path=/trunk/; revision=2694
2000-11-22 01:39:10 +00:00