Commit Graph

69 Commits

Author SHA1 Message Date
Bill Meier 72ef03e60a [Trivial] Constify a few things
svn path=/trunk/; revision=28144
2009-04-24 12:16:01 +00:00
Jaap Keuter b47e7619e6 From Mark C. Brown:
Added support for HPVM (Integrity Virtual Machines) guest AVIO (Accelerated Virtual IO) driver IGSSN.
Cleaned up the trace record checks.  
Made the default ethernet if the nettl subsystem is not recognized.

svn path=/trunk/; revision=27549
2009-02-25 23:19:56 +00:00
Martin Mathieson 7e40100fb3 From Anders: Checkapi enabled for wiretap and more functions converted.
svn path=/trunk/; revision=25257
2008-05-08 09:37:11 +00:00
Jaap Keuter f6bf2c9451 From Mark C. Brown:
Added support for HPVM (Integrity Virtual Machines) guest AVIO (Accelerated Virtual IO) 
driver IGSSN and 2nd generation 10 Gigabit Ethernet adapter AD386A driver ICXGBE.

svn path=/trunk/; revision=24926
2008-04-12 09:23:35 +00:00
Anders Broman e6fc9efb62 From Mark C. Brown:
Add support for the new NS_LS_SCTP tracing subsystem.

svn path=/trunk/; revision=23290
2007-10-27 15:44:12 +00:00
Jaap Keuter 224a21ecfe From Mark C. Brown:
HP-UX 11.31 will add a new nettl trace subsystem, NS_LS_TELNET (ID=267).
NS_LS_TELNET is just raw telnet data.  There is no layer 2/3/4 headers, so
there's just the HP-UX nettl record header followed directly by the TCP payload
for a telnet connection.  Thus the need for a new wiretap encapsulation type...

svn path=/trunk/; revision=20253
2007-01-01 14:48:18 +00:00
Jaap Keuter 33310e87b6 From Mark C. Brown:
Fix some nettl encap types and size checks

svn path=/trunk/; revision=20252
2007-01-01 14:43:15 +00:00
Ulf Lamping 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Guy Harris a6eda1060e Rework some of the header processing, to handle some additional nettl
files, and to clean the code up a bit - and incorporate some fixes to
the rework, and other fixes, from Mark C. Brown.

svn path=/trunk/; revision=18945
2006-08-18 09:01:20 +00:00
Guy Harris c5a7a3b935 The nettl_file_hdr structure has a fixed format, as it's an on-disk data
structure.  Instead of making the host_name field bigger, make the thing
we put in it smaller.

Use that structure when reading files as well as when writing them.

svn path=/trunk/; revision=18796
2006-07-26 23:22:28 +00:00
Jörg Mayer 7f6aa2359e postadal@suse.cz:
Bufferoverflow caused by ethereal->wireshark rename
	(ws is 1 char longer).
	http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1015


svn path=/trunk/; revision=18794
2006-07-26 06:38:16 +00:00
Gerald Combs dea7ae98be Ethereal -> Wireshark
svn path=/trunk/; revision=18369
2006-06-06 23:09:20 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Ulf Lamping 723c80ea90 timestamp display precision:
- automatic adjustment depending on file format
- manual adjustment through menu items

save the setting in the recent file

svn path=/trunk/; revision=15534
2005-08-25 21:29:54 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Guy Harris 7828470923 Make nettl file header items containing strings "gchar", to squelch
signed vs. unsigned compiler warnings.

svn path=/trunk/; revision=14873
2005-07-08 02:21:16 +00:00
Guy Harris 7b9c1a62a7 Fix some more leaks in error returns from open routines (if the open can
fail after the private data is allocated, you have to free the private
data).

The file header in nettl files is 128 bytes - use a #define for it, and
also a #define for the magic number size.

svn path=/trunk/; revision=14553
2005-06-04 21:58:55 +00:00
Anders Broman 8e48f993ae From Mark C Brown,:
Fixes for LAP-B (SX25L2) and X.25 (SX25L3) nettl trace records.

svn path=/trunk/; revision=14385
2005-05-17 19:50:38 +00:00
Ronnie Sahlberg 412e592a12 updating Mark C Browns information
svn path=/trunk/; revision=14025
2005-04-07 10:04:50 +00:00
Ronnie Sahlberg 3b435e70a3 From Mark C Brown NETTL updates
svn path=/trunk/; revision=13999
2005-04-01 10:17:05 +00:00
Jörg Mayer fc9a0f0744 Mark C. Brown: Added support for new ixgbe card
svn path=/trunk/; revision=13267
2005-02-03 22:44:13 +00:00
Guy Harris 60bbdd93a7 From Mark C. Brown:
fix FDDI to use correct bit swapped encap;

	tweak file open code to guess at file encap so merge works
	better.

svn path=/trunk/; revision=12351
2004-10-19 22:28:27 +00:00
Guy Harris af061ccd60 From Mark C. Brown: add 100VG support.
svn path=/trunk/; revision=12299
2004-10-14 21:59:17 +00:00
Guy Harris eb608f1c98 From Mark C. Brown: support dumping files with the raw ICMP and raw
ICMPv6 encapsulations.

svn path=/trunk/; revision=12279
2004-10-12 17:23:15 +00:00
Guy Harris da8539cbdb Correctly update the count of bytes dumped.
svn path=/trunk/; revision=12275
2004-10-12 08:05:58 +00:00
Ulf Lamping 08ba61b48f fix MSVC unused magic warning
svn path=/trunk/; revision=12274
2004-10-12 06:32:57 +00:00
Guy Harris 1a15f79f26 From Mark C. Brown: add support for writing nettl files.
svn path=/trunk/; revision=12258
2004-10-11 07:18:20 +00:00
Guy Harris dba97f9cc5 From Mark C. Brown: add EISA 100BaseTX, EISA FDDI, and HSC FDDI support,
and make a small performance fix to HP-PB FDDI.

svn path=/trunk/; revision=12218
2004-10-06 10:08:29 +00:00
Guy Harris 5a46037813 From Mark C. Brown: support for the NETTL_SUBSYS_HPPB_FDDI records.
svn path=/trunk/; revision=12202
2004-10-05 08:59:57 +00:00
Guy Harris d525c0129e From Mark C. Brown: add the HP-PB FDDI card type, although we currently
don't have any code to handle it (other than to report that fact...).

Also, refer to the subsystem type code as such, not as a "network type".

svn path=/trunk/; revision=12178
2004-10-01 22:01:25 +00:00
Guy Harris 3cdebd31db From Mark C. Brown: fix support for nettl NETTL_SUBSYS_NS_LS_ICMP and
NETTL_SUBSYS_NS_LS_ICMPV6 - they don't even have IP headers, so we need
to directly call the ICMP and ICMPv6 dissectors.

svn path=/trunk/; revision=12047
2004-09-19 07:13:52 +00:00
Guy Harris a686d1b953 From Mark C. Brown:
1) Change nettl subsystem ID's to decimal so as to
   match /etc/nettlgen.conf and ease maintenance

2) Add support for hp_apaport (PAgP), hp_apalacp,
   and IPv6 subsystem trace records

3) Correct handling of LOOPBACK trace records

svn path=/trunk/; revision=11901
2004-09-04 20:35:29 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 1adc05c157 From Mark C. Brown: add support for FDDI and Token Ring cards.
Set the file encapsulation the same way it's done for iptrace captures -
leave it as "unknown" to start with, and, for each packet we see, set it
to the packet's encapsulation type if the file encapsulation type is
unknown and set it to "per-packet" if the file encapsulation type is
"known" but isn't the type of that packet, so files that have all the
same type of packet have that type as the file type and packets that
*don't* have all the same type of packet have "per-packet".

svn path=/trunk/; revision=10543
2004-04-02 08:27:26 +00:00
Guy Harris 313ba9e2b8 From Mark C. Brown: add support for iether (dual-port gigabit) cards in
nettl files.

svn path=/trunk/; revision=10501
2004-03-27 11:16:54 +00:00
Guy Harris d6cd61061e Have the Wiretap open, read, and seek-and-read routines return, in
addition to an error code, an error info string, for
WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and
WTAP_ERR_BAD_RECORD errors.  Replace the error messages logged with
"g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed
strings returned as the error info string, and change the callers of
those routines to, for those errors, put the info string into the
printed message or alert box for the error.

Add messages for cases where those errors were returned without printing
an additional message.

Nobody uses the error code from "cf_read()" - "cf_read()" puts up the
alert box itself for failures; get rid of the error code, so it just
returns a success/failure indication.

Rename "file_read_error_message()" to "cf_read_error_message()", as it
handles read errors from Wiretap, and have it take an error info string
as an argument.  (That handles a lot of the work of putting the info
string into the error message.)

Make some variables in "ascend-grammar.y" static.

Check the return value of "erf_read_header()" in "erf_seek_read()".

Get rid of an unused #define in "i4btrace.c".

svn path=/trunk/; revision=9852
2004-01-25 21:55:17 +00:00
Guy Harris be2736adcf Have a pseudo-header for Ethernet packets, giving the size of the FCS -
0 means "there is no FCS in the packet data", 4 means "there is an FCS
in the packet data", -1 means "I don't know whether there's an FCS in
the packet data, guess based on the packet size".

Assume that Ethernet encapsulated inside other protocols has no FCS, by
having the "eth" dissector assume that (and not check for an Ethernet
pseudo-header).

Have "ethertype()" take an argument giving the FCS size; pass 0 when
appropriate.

Fix up Wiretap routines to set the pseudo-header.  This means we no
longer use the "generic" seek-and-read routine, so get rid of it.

svn path=/trunk/; revision=8574
2003-10-01 07:11:49 +00:00
Guy Harris fe42cc9dd8 From Mark C. Brown:
Following fixes for nettl (HP-UX):

	1) Fixed 11.X timestamp issue
	      there is no difference in 10.X/11.X timestamps, so no
	      need to shift 11.X timestamps
	2) Fixed NS_LS_DRIVER trace record handling
	      now works rather than throwing "...network type that
	      Ethereal doesn't support" error
	3) Fixed handling of traces with sliced packets (nettl -m xx)
	      now uses correct packet and capture lengths
	4) Additional ethernet card support
	      now handles btlan[1,3-6],gelan,igelan,intl100 driver
	      trace records

svn path=/trunk/; revision=7642
2003-05-05 01:01:36 +00:00
Jörg Mayer 64b6acac6d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6115
2002-08-28 20:30:45 +00:00
Guy Harris 6e21561be8 From Joerg Mayer:
All files:
  - Replace types from sys/types.h by those from glib.h
  - Replace ntoh family of macros from netinet/in.h and winsock2.h
    by g_ntoh family from glib.h
  - Remove now unneeded includes of sys/types.h, netinet/in.h and
    winsock2.h
wtap.h
  Move includes to the top

svn path=/trunk/; revision=5909
2002-07-29 06:09:59 +00:00
Guy Harris 2aad75bb82 Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't set
the internal z_err value for the stream if an "fseek()" call it makes
fails, so that if "gzerror()" is subsequently called, it returns Z_OK
rather than an error.

To work around this, we pass "file_seek()" an "int *err", and have the
with-zlib version of "file_seek()" check, if "gzseek()" fails, whether
the return value of "file_error()" is 0 and, if so, have it return
"errno" instead.

svn path=/trunk/; revision=5642
2002-06-07 07:27:35 +00:00
Ronnie Sahlberg d1fa53c605 Updated NS_LS_DRIVER to work with both pre-HPUX11 and HPUX11.
Added support for NS_LS_TCP, NS_LS_UDP, NS_LS_LOOPBACK, NS_LS_ICMP and
unnamed subsystem 0xb9 (which contains ethernet headers in my captures frames).
However, NS_LS_ICMP will not be dissected since we dont have a
RAW_ICMP wiretap encapsulation type.
Updated decoding of usec timestamp for HPUX11 since HPUX11 has 0.1us
resolution for the scalar in this field.

YMMV but all these ones works for me from nettl traces from HPUX11.

svn path=/trunk/; revision=5523
2002-05-22 10:53:17 +00:00
Ronnie Sahlberg bd351e3709 Added support for HPUX11 NETTL captures for the NS_LS_DRIVER type.
It works for such captures containing 100baseT captures. It may explode on
other link types.

svn path=/trunk/; revision=5496
2002-05-17 09:53:20 +00:00
Guy Harris bf7e4ce909 Move the definition of the FROM_DCE bit in the "flags" field of a
"struct x25_phdr" to "wiretap/wtap.h".

Have two X.25 dissectors, one of which assumes that there's a "struct
x25_phdr" pseudo-header and one of which doesn't; the former uses the
information in that pseudo-header to determine whether the packet is
DTE->DCE or DCE->DTE, and the latter assumes it has no clue whether the
packet is DTE->DCE or DCE->TDE.  Use the former one in the LAPB
dissector, and the latter one in the XOT dissector and in the LLC
dissector table.

In the X.25-over-TCP dissector, handle multiple X.25 packets per TCP
segment, and handle X.25 packets split across TCP segments.

svn path=/trunk/; revision=5134
2002-04-09 08:15:04 +00:00
Guy Harris b5e9cef2bf Make "wtap_seek_read()" return TRUE on success and FALSE on error, like
"wtap_read()".

Add some additional error checks to the Sniffer file reader.

svn path=/trunk/; revision=4875
2002-03-05 08:40:27 +00:00
Guy Harris e300f4db52 Have "wtap_seek_read()" return 0 on success and -1 on failure, and take
an "err" argument that points to an "int" into which to put an error
code if it fails.

Check for errors in one call to it, and note that we should do so in
other places.

In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite
"cfile.pseudo_header", and make the buffer into which we read the data
WTAP_MAX_PACKET_SIZE bytes, as it should be.

In some of the file readers for text files, check for errors from the
"parse the record header" and "parse the hex dump" routines when reading
sequentially.

In "csids_seek_read()", fix some calls to "file_error()" to check the
error on the random stream (that being what we're reading).

svn path=/trunk/; revision=4874
2002-03-05 05:58:41 +00:00
Guy Harris d54bd0bd6b Check for errors in seeks, "tell"s, and "stat()"s/"fstat()"s.
For file types where we allocate private data, add "close" routines
where they were missing, to free the private data.  Also fix up the code
to clean up after some errors by freeing private data where that wasn't
being done.

Get rid of unused arguments to "wtap_dump_open_finish()".

Fix indentation.

svn path=/trunk/; revision=4857
2002-03-04 00:25:35 +00:00
Guy Harris 89a4acb438 Have Wiretap set the snapshot length to 0 if it can't be derived from
reading the capture file.  Have callers of "wtap_snapshot_length()"
treat a value of 0 as "unknown", and default to WTAP_MAX_PACKET_SIZE (so
that, when writing a capture file in a format that *does* store the
snapshot length, we can at least put *something* in the file).

If we don't know the snapshot length of the current capture file, don't
display a value in the summary window.

Don't use "cfile.snap" as the snapshot length option when capturing -
doing so causes Ethereal to default, when capturing, to the snapshot
length of the last capture file that you read in, rather than to the
snapshot length of the last capture you did (or the initial default of
"no snapshot length").

Redo the "Capture Options" dialog box to group options into sections
with frames around them, and add units to the snapshot length, maximum
file size, and capture duration options, as per a suggestion by Ulf
Lamping.  Also add units to the capture count option.

Make the snapshot length, capture count, maximum file size, and capture
duration options into a combination of a check box and a spin button.
If the check box is not checked, the limit in question is inactive
(snapshot length of 65535, no max packet count, no max file size, no max
capture duration); if it's checked, the spinbox specifies the limit.
Default all of the check boxes to "not checked" and all of the spin
boxes to small values.

Use "gtk_toggle_button_get_active()" rather than directly fetching the
state of a check box.

svn path=/trunk/; revision=4709
2002-02-08 10:07:41 +00:00
Gilbert Ramirez f14a6b8b91 Hopefully the last time I have to change my e-mail address.
svn path=/trunk/; revision=4199
2001-11-13 23:55:44 +00:00
Guy Harris 3c9efdf478 Use longs as file offsets, so that on platforms with 64-bit "long" we
can handle capture files bigger than 2GB.

svn path=/trunk/; revision=3993
2001-10-04 08:30:36 +00:00