Commit Graph

1084 Commits

Author SHA1 Message Date
Martin Mathieson 229e2dfbde - Removes last traces of 'board ports only' preference (other than marking it as an obselete preference)
- Add a preference to try to find messages within sctp primitive messages (tries renaming of known mismatches)
- Add outhdr to stub protocol (getting ready for IuB FP)

svn path=/trunk/; revision=18818
2006-08-02 09:30:28 +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
Guy Harris 0a67adf95f Fix indentation.
svn path=/trunk/; revision=18657
2006-07-04 18:32:32 +00:00
Guy Harris 964a447748 Don't test a variable in a loop if its value never changes.
Get rid of arguments and #defines that are no longer used as a result of
the previous change.

svn path=/trunk/; revision=18656
2006-07-04 18:27:07 +00:00
Ulf Lamping 0e1a8a8023 add file extension information (filter "*.pcap;*.cap" and default extension ".pcap") to wiretap
sort file types in alphabetical order, but keep the libpcap like entries at the start

svn path=/trunk/; revision=18562
2006-06-23 18:20:34 +00:00
Guy Harris e6a5d40f84 Remove definition of catapult_dct2000_board_ports_only, as per mail from
Martin Mathieson.

svn path=/trunk/; revision=18551
2006-06-23 02:42:40 +00:00
Ulf Lamping a8b26ae252 hopefully, the win32 buildbot will compile again :-(
svn path=/trunk/; revision=18541
2006-06-22 10:30:35 +00:00
Gerald Combs f7e38bd5e6 Change ETH_VAR_IMPORT to WS_VAR_IMPORT. Try to fix a duplicate variable
definition in the Catapult DCT2000 code.

svn path=/trunk/; revision=18524
2006-06-20 18:30:54 +00:00
Ronnie Sahlberg 22edbe1066 fix coverity "bug" 184 (false positive)
the contract for wiretap ..._read() functions are that the *err pointer MUST always
be provided as a valid pointer and not a NULL pointer.


ber.c contained a spurios and redundant check for the pointer being non-NULL wich triggered coverity to detect this as a false positive.

this redundant test if the pointer is NULL has been revoved.



svn path=/trunk/; revision=18492
2006-06-17 10:26:20 +00:00
Anders Broman 974fd085dc From Martin Mathieson:
Skips variant string bytes of dct2000 header when finding real packet 
data to dump.

svn path=/trunk/; revision=18458
2006-06-14 05:39:52 +00:00
Anders Broman 81bda938ff From Martin Mathieson:
This patch:
- treats the variant field as a variable-length string field.  This is 
needed for some of the more complicated protocols where the variant 
number of the embedded protocol is also represented

- the patch to Makefile.am was not applied from 
http://www.wireshark.org/lists/wireshark-dev/200606/msg00009.html

svn path=/trunk/; revision=18427
2006-06-11 08:26:55 +00:00
Gerald Combs dea7ae98be Ethereal -> Wireshark
svn path=/trunk/; revision=18369
2006-06-06 23:09:20 +00:00
Gerald Combs eb71f7fb96 Rename the main executable to "wireshark", along with more conversions:
ethereal.com -> wireshark.org
  mailing lists and addresses
  ETHEREAL -> WIRESHARK
  Man pages
  Automake/Autoconf names


svn path=/trunk/; revision=18271
2006-05-31 19:12:15 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman 7056661eac Ethareal->Wireshark
svn path=/trunk/; revision=18230
2006-05-28 15:56:15 +00:00
Anders Broman 1814821adc From Martin Mathieson:
- Many DCT2000 protocols can be embedded within an IP primitive 
message.  Add a heuristic to see if we can find the protocol payload 
within in IP primitive message, and look for an ethereal dissector 
matching the DCT2000 protocol name (this is useful for simple protocol 
testing where no physical links are involved)
- Make some more of these protocols (diameter, http, mgcp) findable by name
- Adds protocol 'variant' number to stub and dissector
- Break the duplicated writing of the stub header out into a separate 
function

svn path=/trunk/; revision=18212
2006-05-23 05:48:00 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 031773273c Squelch some compiler warnings (a time_t might be an int or a long).
svn path=/trunk/; revision=18188
2006-05-19 08:18:22 +00:00
Guy Harris 0457e756b1 GLib 1.2[.x] doesn't have g_sprintf(), it just has g_snprintf(); use
that.

It also doesn't hae <glib/gprintf.h>, so use that only for GLib 2.0 and
later.

svn path=/trunk/; revision=18169
2006-05-15 22:21:51 +00:00
Guy Harris c914d509a0 Fix some compiler warnings.
That requires that we define G_GINT64_MODIFIER ourselves if glib.h
doesn't define it for us, as that's what should be used to print 64-bit
integral values in any calls that use any of the GLib printf functions
(directly or indirectly).

svn path=/trunk/; revision=18154
2006-05-15 05:28:56 +00:00
Graeme Lunt abefaf32bf Basic Encoding Rules (BER) encoded file reading. Not really a packet trace format but still useful for dissecting arbitrary BER/DER ASN.1.
svn path=/trunk/; revision=18110
2006-05-08 19:56:36 +00:00
Anders Broman de3b8195c5 From Martin Mathieson:
This patch should hopefully remove any possible buffer overflows in 
parse_line() as reported by the current Coverity scan.  I'm not sure 
that the error it currently reports is valid (I think its confused by 
supposing that a condition that is being tested can be true, whereas it 
can't...), but this patch fixes a number of potential problems remaining 
in the function.

svn path=/trunk/; revision=17979
2006-04-24 19:08:52 +00:00
Anders Broman 8dd0e70722 Fix CID: 150
svn path=/trunk/; revision=17968
2006-04-23 18:05:23 +00:00
Anders Broman b99bf25795 From Martin Mathieson:
Fix coverity bugs.

svn path=/trunk/; revision=17909
2006-04-19 18:57:25 +00:00
Guy Harris 87077ede81 The first item in the network load EIP appears to be the network
utilization, in units of .1%.

svn path=/trunk/; revision=17901
2006-04-19 03:42:06 +00:00
Anders Broman 375ba77274 From Martin Mathieson:
These patches:
- fix the bounds errors reported by coverity in bug 879
- fix a couple of other potential bounds errors (length checking 1st & 2nd lines in file)
- reorder catapult_dct2000_phdr so that normal protocol pseudo-header info is at the start.  This means that the stub dissector can avoid the nasty
(overlapped) memcpy
- a little whitespace fixing

svn path=/trunk/; revision=17886
2006-04-17 18:46:14 +00:00
Guy Harris 701b569104 Get rid of the unused WTAP_ENCAP value - holes in the number space cause
ugly printouts for "editcap -T".

svn path=/trunk/; revision=17873
2006-04-16 10:38:47 +00:00
Guy Harris dc5f4a69e2 Add some missing little-endianizing.
Get rid of some unnecessary casts.

Multiply seconds by 10^9, not 10^6, to get nanoseconds.

svn path=/trunk/; revision=17872
2006-04-16 02:59:49 +00:00
Guy Harris 3a1b1fc8ff Add a loop to process TLVs in the file header.
Advertise nanosecond resolution.

svn path=/trunk/; revision=17871
2006-04-16 02:04:42 +00:00
Guy Harris 749faec6a3 Move file format definitions to the header file.
Put the code to read the packet header and the packet data into routines
(which also fixes some places where observer_seek_read() was using the
sequential file handle rather than the random file handle), make the
packet header reader skip over the TLVs,

Do some additional sanity checking.

Wiretap supports nanosecond resolution; provide nanosecond resolution
time stamps.

Rename some structure members to match their purpose (they're TLV
counts, not flags).

Remove the TLV header from the TLV structures (and eliminate TLV
structures if we don't have the contents or they're just a string); if
we process them, we'll probably end up reading the header and data
separately.

Add some information about some of the TLVs in expert information packets.

svn path=/trunk/; revision=17870
2006-04-16 00:52:36 +00:00
Jaap Keuter b33cccd47f Sake Blok wrote....
I have taken a look at the trace myself and calculated the TpS to be 
20000000.0 for this particular trace. If I also discard the start_timestamp
like it has been done for other versions of the netxray format, then I get 
the proper results.

svn path=/trunk/; revision=17869
2006-04-15 19:00:42 +00:00
Anders Broman 518732d903 From Martin Mathieson:
Please find a patch to catapult_dct2000.c:
- doesn't use g_hash_table_new_full(), which is missing from earlier versions of glib
- fixed a couple of memory leaks
- hopefully cast away a few warnings I saw on the fedora and solaris buildbot logs


svn path=/trunk/; revision=17867
2006-04-15 15:16:26 +00:00
Ulf Lamping f1553378e1 from Martin Mathieson: add catapult_dct2000.h
svn path=/trunk/; revision=17866
2006-04-14 13:46:19 +00:00
Anders Broman 69ea88e3f7 SVN properties...
svn path=/trunk/; revision=17863
2006-04-14 13:08:41 +00:00
Anders Broman af554c2f75 From Martin Mathieson:
patch and new files provide support for Catapult DCT2000 
.out files to wiretap and ethereal.

This wiretap support (catapult_dct2000.c+h) appends a short header to 
each packet giving some context, and a corresponding ethereal dissector 
(packet-catapult-dct2000.c) parses this before passing the real payload 
onto an existing ethereal dissector (for ethernet, ip, lapd, ppp, 
frame-relay,...).

For now, there is only support for saving dct2000 files in their own 
format, although I may add support for converting between dct2000 and 
libpcap later.

updated version of these files and patch, now with support 
for MTP2.  Olivier's trace used the ANSI variant - the MTP2 and MTP3 
decode fine with the right preferences set (although the ISUP dissector 
reports a reserved/retired message type).

Witha a change to NOT to declare gboolean catapult_dct2000_board_ports_only;
as extern as MSVC choked on it.

svn path=/trunk/; revision=17862
2006-04-14 12:41:06 +00:00
Guy Harris 44aa78fe5e Skip non-data records. Fixes bug 767.
svn path=/trunk/; revision=17861
2006-04-14 10:22:29 +00:00
Anders Broman 901f07af60 From Martin Mathieson:
wiretap/README.developer
- the referenced default seek_read function doesn't exist now

wiretap/wtap.c
- a "hole" in encap_table was causing the wrong encap value for later 
types to be looked up (by name)

mergecap.c
- fix a couple of program name copy+paste errors from editcap.c

svn path=/trunk/; revision=17765
2006-03-30 04:58:06 +00:00
Jaap Keuter 9daa63d451 The header will be there, just make sure the date is put in.
Coverity bug 148

svn path=/trunk/; revision=17756
2006-03-29 16:06:57 +00:00
Anders Broman 2502e30bc1 From Martin Warnes:
> I've attached a fix that cleans up this code, actually since my last 
> update of this module the particular call in question was fairly 
> redundant so I just went ahead and removed it and updated the constant 
> that specifies the maximum possible line length instead.
>
> Thanks for bring this to my attention.

svn path=/trunk/; revision=17737
2006-03-27 18:24:26 +00:00
Gerald Combs 480818a431 Fix a possible NULL dereference (bug 827 / CID 145). Add an SVN
ID.  Fix up whitespace.

svn path=/trunk/; revision=17732
2006-03-27 16:09:47 +00:00
Anders Broman 70a045d772 From Mertin Wrnes:
Following my last submitted patch I did some further investigation on the different types of iSeries  Comms Traces, although the field formats are constant, things such as page throws and line spacing vary depending on the tool used to pull the trace form the iSeries spool.

This patch should better handle the different formats and more importantly exit in a graceful manner if an unknown format is encountered.


svn path=/trunk/; revision=17699
2006-03-22 17:37:04 +00:00
Jaap Keuter a346237ffd From Martin Warnes:
Attached is a fix that addresses a problem reading certain IBM iSeries
Communications traces.


svn path=/trunk/; revision=17655
2006-03-17 06:59:27 +00:00
Luis Ontanon 9ed9299e17 Remove an entire horde of off-by-one errors pointed out by Coverity's CID: 83
(Coverity finds just one at a time...)


svn path=/trunk/; revision=17580
2006-03-11 11:48:35 +00:00
Gerald Combs d910d8491b Fix a possible NULL dereference (Coverity CID 33).
svn path=/trunk/; revision=17556
2006-03-09 20:48:17 +00:00
Luis Ontanon 83296ec679 Another off by one error found by coverity (CID 83), using > instead of >= when comparing index against array size.
svn path=/trunk/; revision=17521
2006-03-08 10:20:09 +00:00
Luis Ontanon 3fa91ab7be Coverity's run 14 CID 82.
an off by one error (> vs >= in bounds check).


svn path=/trunk/; revision=17520
2006-03-08 10:14:51 +00:00
Anders Broman 497e0ec775 From Daniele Orlandi:
The attached patch adds support for LAPD frames captured using vISDN thru 
libpcap. The support has already been included in libpcap.

The patch adds a new wiretap encapsulation, the necessary glue to decode 
SLL-encapsulated frames, and some minor change in the LAPD dissector in order 
to support the remote-to-remote frames captured on the ISDN E-Channel.

Please apply ethereal-encap-table.diff before, as it fixes a misalignment in 
the encapsulation names table.

svn path=/trunk/; revision=17450
2006-03-02 21:28:05 +00:00
Anders Broman 38c1fab219 Add makefile.nmake
svn path=/trunk/; revision=17365
2006-02-22 06:06:21 +00:00
Ulf Lamping 58d9f6c3b1 even if we don't want to close stdout on wtap_dump_close(), we might at least try to flush it
svn path=/trunk/; revision=17326
2006-02-17 01:47:53 +00:00
Jaap Keuter ca4000cbaf The attached patch to fix bug 663 allows Ethereal to read Windows
Sniffer V2 format capture files with captyp=5, timeunit=0.
The ticks_per_sec for this case apparently is 1e6.

Bill Meier

svn path=/trunk/; revision=17019
2006-01-12 15:02:25 +00:00
Ulf Lamping 76bbd4181b don't claim to be an erf file if it isn't (e.g. if the file_read call fails)
I don't know if this is the right way to fix it, but it seems at least better than before

svn path=/trunk/; revision=16971
2006-01-07 01:19:29 +00:00
Ulf Lamping 161d4d7efd code cleanup: use "-" for all places, where stdin/stdout is meant
tethereal internally converted the stdout capture filename "-" into "" which doesn't make any real sense and only complicated things.

To make things even more confusing, wiretap expected "" for dump output and "-" for offline reading ...

svn path=/trunk/; revision=16962
2006-01-06 01:06:46 +00:00
Ulf Lamping 548d44c041 Win32: set stdout to binary mode in wtap_dump_fdopen(), so tethereal is also able to write capture files to stdout using -w -
svn path=/trunk/; revision=16958
2006-01-05 22:24:09 +00:00
Ulf Lamping 851692e8fb bugfix to #649: first convert to microseconds, then eventually swap byte ordering (not the other way round)
svn path=/trunk/; revision=16925
2005-12-31 11:48:32 +00:00
Luis Ontanon 5113ab4d4a Add support for Juniper GGSN generated pcap files.
svn path=/trunk/; revision=16857
2005-12-19 19:18:20 +00:00
Guy Harris 2646996a82 Fail if *any* of the fields in the per-packet header of the first record
aren't sane, rather than requiring them *all* to have invalid values.

svn path=/trunk/; revision=16610
2005-11-27 12:10:03 +00:00
Anders Broman 00728fb587 From Martin Warnes:
Add Support for reading of IBM iSeries (AS/400) Comms traces

svn path=/trunk/; revision=16588
2005-11-25 20:30:42 +00:00
Ulf Lamping c2c6475048 minor mkdir bugfix from Gisle Vanem
svn path=/trunk/; revision=16492
2005-11-12 16:44:54 +00:00
Guy Harris 17456c2e09 Include <unistd.h> if available, to get "close()" declared.
Update the big comment to reflect current reality.

svn path=/trunk/; revision=16453
2005-11-10 02:49:54 +00:00
Guy Harris 262a414f41 The problem wasn't that <sys/stat.h> wasn't being included, the problem
was that file_util.h wasn't in the distribution tarball, so it couldn't
be included - it handles including <sys/stat.h>.

svn path=/trunk/; revision=16423
2005-11-07 20:14:40 +00:00
Ulf Lamping 91e66afb84 add file_util.h so distcheck might work
svn path=/trunk/; revision=16422
2005-11-07 19:51:16 +00:00
Guy Harris 60c4c050d0 You need <sys/stat.h>, if present, to use fstat().
svn path=/trunk/; revision=16416
2005-11-07 17:18:52 +00:00
Guy Harris 688a256884 The standard <dirent.h> routines to rewind and close a directory are
rewinddir() and closedir().

Clean up indentation.

svn path=/trunk/; revision=16415
2005-11-07 17:12:43 +00:00
Guy Harris 7474bc0f13 If we're using libz, make file_open() construct the open() flag
argument, rather than requiring the caller to get the open() flag and
the fopen() flag in sync.  That also means that if we're *not* using
libz, it can just be a wrapper around eth_fopen().

We need to include <fcntl.h>, at least on UN*X, to get open() declared
and the O_ flags defined.

svn path=/trunk/; revision=16409
2005-11-07 02:45:19 +00:00
Ulf Lamping 937a50243c as mkstemp makes trouble and is only used once in util.c, move definition from file_util.h to util.c for now
this hopefully fixes the mkstemp problem

svn path=/trunk/; revision=16406
2005-11-07 00:20:20 +00:00
Guy Harris 5990cb095a Get rid of CRs and set svn:eol-style to native, so that Windows machines
get the CRs and UN*X machines don't.  Also set svn:keywords to Id to
expand RCS IDs.

svn path=/trunk/; revision=16405
2005-11-06 23:21:03 +00:00
Ulf Lamping cc3d9cb78f Obviously, <glib/gstdio.h> is available since GLib version 2.6 only ...
svn path=/trunk/; revision=16404
2005-11-06 23:11:49 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Anders Broman 973bdcb507 From Mark C Brown,
Small patch correcting nettl.uid to unsigned and adding pduin/pduout as nettl.kind values...

svn path=/trunk/; revision=16320
2005-10-26 19:01:29 +00:00
Luis Ontanon 74d1997f40 forgot this from the last commit
svn path=/trunk/; revision=16297
2005-10-24 21:52:14 +00:00
Luis Ontanon 9008cf5cd9 - packet records with AAL5 Pdus or AAL2 Sdus contain VP/VC and CID info in the packet record, use that instead of the one in the intreface description record.
- Fix Timestamps that got broken with nanoseconds.
- Add some more disabled code for debugging.


svn path=/trunk/; revision=16294
2005-10-24 21:20:03 +00:00
Guy Harris 67d94f37a4 Update URL for Sniffer manual, and expand a comment a bit.
svn path=/trunk/; revision=16285
2005-10-22 04:09:37 +00:00
Guy Harris 097f75dd7a Add #defines for the DOS Sniffer network types and for various frame
status field bits".

Check for "Internetwork analyzer" captures by checking the Sniffer
network type, and save that type rather than just an "ATM or not" flag
in the private data.

svn path=/trunk/; revision=16283
2005-10-22 03:49:23 +00:00
Guy Harris 39fb4b8378 "aalt5_len" in the ATM pseudo-header is not guaranteed to be set to a
non-zero value - it's only set from file formats that provide it in a
per-packet header, and only the old DOS Sniffer did so, so it's zero for
all other capture types.  Instead, check the actual packet data length.

Also check it against 16; 14 bytes isn't large enough for a LANE
Ethernet frame.

svn path=/trunk/; revision=16261
2005-10-18 10:39:23 +00:00
Luis Ontanon d9a581c3c5 make sure tham when more than one stack file is used each channel uses the right stack file.
svn path=/trunk/; revision=16218
2005-10-13 18:37:42 +00:00
Anders Broman 118236bacc From Ignacio Goyret
correct a bug in parsing Lucent/Ascend PPP dumps. Basically, blobs with "PPP-OUT" should be labelled "PPP transmit" while blobs with "PPP-IN" should be labelled "PPP receive". The current code labels them the other way around.

packet-ppp.c
- Properly decode option to enable ECRTP (it wasn't decoded).
- Use the ipv6 knob to control ipv6 decoding (previously, it
  was using the ipv4 knob).

svn path=/trunk/; revision=16194
2005-10-11 19:55:55 +00:00
Anders Broman 5ddbeb2cb8 From Rene Pilz,
In the bssgp an IE was decoded as mobile identity and should be decoded as (p)tmsi only.

The patch is attached to this email. It also consists the new atm patch which was send yesterday.


svn path=/trunk/; revision=16146
2005-10-06 20:01:25 +00:00
Guy Harris ad2023cdb8 A heuristic that only treats packets that appear to be LANE-encapsulated
Ethernet packets with a length field as LANE packets, and doesn't do so
for packets that appear to be LANE-encapsulated Ethernet packets with a
type field, is too weak.  Back out that part of the heuristics added in
the previous checkin.

svn path=/trunk/; revision=16111
2005-10-04 10:13:15 +00:00
Anders Broman e1ebb0953d From Rene Piltz:
Due to the fact that 3G Signaling appears at an undefined VPI/VCI I added a heuristics (very simple) which should take care of this fact.

svn path=/trunk/; revision=16108
2005-10-04 05:42:18 +00:00
Anders Broman df21536710 From Hannes Gredler:
patch to support 4 additional juniper DLTs.

all those are wrappers for exisiting media types augmented with meta-information which gets also displayed using this patch;

svn path=/trunk/; revision=15908
2005-09-20 20:25:55 +00:00
Ulf Lamping 84cf7ce767 added compression support for capture file output. The Save/As dialog now has a checkbox "Compress with gzip"
currently limited to Ethereal and all the variants of libpcap filetypes only.

We might want to add output compression support to the other tools as well (tethereal, mergecap, ...).

We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek.

One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). 

Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ...

svn path=/trunk/; revision=15804
2005-09-14 21:57:30 +00:00
Guy Harris 90ce35c64e From Bill Meier:
define "timezone" as "gint16", as it can be positive (west of
	UTC) or negative (east of UTC);

	update comments to refer to the new names for structure members;

	say the precision of the time stamps is 1 nanosecond only if the
	ticks per second is > 10 million;

	fix the handling of files truncated exactly on a frame boundary.

svn path=/trunk/; revision=15739
2005-09-09 08:40:58 +00:00
Gerald Combs e0331bbb1c Fix more problems found by Steve Grubb, along with other changes:
Camel: Fix an off-by-one error.  Don't alloc and free where it's not
needed.  Remove an unused variable.

PPP and K12: Fix memory leaks.

svn path=/trunk/; revision=15725
2005-09-08 15:01:16 +00:00
Ulf Lamping 4cd4f9a669 Add support for slightly modified libpcap file format with nanosecond resolution (currently supported by Ethereal only). Support for both read and write was added.
The file format stays the same as the common libpcap format, only the lower part of the timestamp field uses nanoseconds instead of microseconds.

This file format uses the libpcap magic number 0xa1b23c4d.

svn path=/trunk/; revision=15623
2005-08-30 09:43:47 +00:00
Guy Harris 88c5c6c0d8 Get rid of the old file header definition.
Set the time stamp resolution based on whether the number of ticks per
second is > 1 million or not.

svn path=/trunk/; revision=15606
2005-08-29 01:18:27 +00:00
Guy Harris 394582573d From Bill Meier:
1. Use the new (good work!) 'nanosec' precision only for gig pods;
2. Rework 'struct netxray_hdr' to make it (somewhat) easier
   to maintain and revise:
   a. Declare known hdr fields such as 'captype' instead
      of using offsets in 'xxx placeholder' fields.
   d. Define 'unknown' hdr fields using placeholder names
      based upon hex-offset in the netxray header record.
      (This isn't perfect, but I hope it will make things 
       more manageable).
3. Update hdr field info (based upon examination of various
   capture files):
   a. Define a hdr field which appears to be 'time-zone' 
      [offset in hours from UTC] for the machine doing
      the capture.
      (Maybe this field can eventually be used for Ethereal
       to display the (local) time as it was at the time
       of the capture).
   b. Describe certain hdr fields as being "file offsets"
      (altho the exact use is still unclear).

Update some comments.

svn path=/trunk/; revision=15603
2005-08-28 23:11:53 +00:00
Guy Harris 7b6ae0a049 Ethereal requires 64-bit integrer support; do the time stamp
calculations with integers, which avoids some floating-point inaccuracy.

svn path=/trunk/; revision=15602
2005-08-28 22:52:05 +00:00
Guy Harris 6a4a656881 Get rid of a no-longer-true comment.
svn path=/trunk/; revision=15598
2005-08-28 19:55:44 +00:00
Guy Harris 9238aad9db Fix indentation, and fix a comment.
svn path=/trunk/; revision=15545
2005-08-26 19:44:30 +00:00
Guy Harris 98473c77b6 Ethereal now requires 64-bit integer support, so get rid of the tests of
G_HAVE_GINT64.

Get rid of the floating-point stuff in the Etherpeek Classic file
reading code, just use 64-bit integers.  Fix up the calculation of the
nanoseconds portion of the time stamp.

svn path=/trunk/; revision=15544
2005-08-26 19:40:46 +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
Luis Ontanon 9362605183 Two fixes to tektronix k12 import:
- it appears that there are more packet record types other than 0x00010020.
     accept anything matching 0x00010020/28 as a packet record.

- make the stack filename lowercase before comparing it so that capitalization is not an issue.


svn path=/trunk/; revision=15513
2005-08-22 23:11:48 +00:00
Guy Harris 07f44e2a7f "ascend-grammar.h" is generated by Bison with a copy of the definition
of the YYSTYPE structure in "ascend-grammar.c"; the intent is that other
files include "ascend-grammar.h" if they need that structure, but that
"ascend-grammar.c" not itself include "ascend-grammar.h".  If it *does*
include it, the compiler complains about YYSTYPE being redefined (even
though the two structures are identical).

svn path=/trunk/; revision=15478
2005-08-20 17:49:58 +00:00
Jörg Mayer 96adc5f4a1 - Include the .h files in their .c files.
- Remove epan/dissectors/packet-sna.h, it isn't used anywhere.

svn path=/trunk/; revision=15475
2005-08-20 16:19:22 +00:00
Jörg Mayer 980b568a3d Add -Wmissing-declarations -Wwrite-strings to extra-gcc-flags
svn path=/trunk/; revision=15453
2005-08-20 02:05:02 +00:00
Guy Harris 38ec1644e6 Add APIs to Wiretap to return the file of the size as supplied by the OS
(so if the file's gzipped, it's *NOT* the size of the file after
uncompressing), and an approximation of the amount of that data read
sequentially so far.

Use those for various progress bars and the like.

Make the fstat() in the Ascend trace reader directly use wth->fd, as
it's inside Wiretap; that gets rid of the last caller of wtap_fd() (as
we're no longer directly using fstat() or lseek() in Ethereal), so get
rid of wtap_fd().

svn path=/trunk/; revision=15437
2005-08-19 19:40:00 +00:00
Guy Harris d5891d9623 Try yet another scheme for handling time stamps; realtick isn't always
correct.

svn path=/trunk/; revision=15404
2005-08-18 09:47:00 +00:00
Anders Broman 8b0ed89155 From Hannes Gredler
- add support for Multi-Link Frame-Relay (FRF.15) captures
  taken on Juniper ML-, LS-, AS- PICs.

- rework of the common juniper header dissector:
    test the extension flag (0x80) which indicates that there are
    meta-information like interface-index, interface-name etc.
    present

- minor bugfix (LSQ L3-proto masks, direction masks were broken)

svn path=/trunk/; revision=15316
2005-08-12 21:08:02 +00:00
Gerald Combs d0811b3d35 Don't assume ints are 32 bits. Fixes a recent Buildbot error.
svn path=/trunk/; revision=15200
2005-08-03 17:32:00 +00:00
Jörg Mayer f5afb4da1b Include the .h files into the .c files. That way we
a) get rid of warnings of type "no previous declaration" and
b) make sure that declaration and implementation are in sync.

svn path=/trunk/; revision=15168
2005-08-02 04:23:39 +00:00
Jörg Mayer e1c6d9ac3d Fix some warnings (and one of my previous 'fixes')
svn path=/trunk/; revision=14997
2005-07-22 17:57:40 +00:00
Anders Broman bd12fbef7f From Hannes Gredler:
support for support for DLT_JUNIPER_MLPPP

svn path=/trunk/; revision=14994
2005-07-22 15:55:06 +00:00
Jörg Mayer f67b00ad9a More 'char*' -> 'const char*' warning fixes
svn path=/trunk/; revision=14986
2005-07-22 07:55:51 +00:00
Jörg Mayer 5b442f2279 After doing "make maintainer-clean", "svn status --no-ignore | grep ^I"
returned quite a list of files. Add them to MAINTAINERCLEANFILES.

Whitespace changes (replace multiple spaces by TABs, in a few cases this
needed to be done at the beginning of Makefile lines.


svn path=/trunk/; revision=14891
2005-07-10 08:04:27 +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
Jörg Mayer d67ae33f0f Replace Chris Lydick by Robert Long as Author of the Sniffer 2.003 support patch
svn path=/trunk/; revision=14862
2005-07-05 22:58:00 +00:00
Jörg Mayer adddb9819b Chris Lydick: Support for Sniffer 2.003 files.
Modified to match the current codebase.


svn path=/trunk/; revision=14832
2005-07-02 15:40:49 +00:00
Ronnie Sahlberg a60bb6ada9 make reading of observer files work again
for some reason we have forgotten to skip the initial (always 8?) bytes prior to the start of the frame.
 

svn path=/trunk/; revision=14822
2005-06-30 02:31:15 +00:00
Luis Ontanon 57b4ec0b35 - Write rf5 files (I don't think tektronix software will be able to read these, ethereal does)
- change k12.atm.vci and k12.atm.vpi into atm.vci and atm.vpi


svn path=/trunk/; revision=14682
2005-06-17 17:26:43 +00:00
Guy Harris f28456dd84 Note that the WAN_CAPTYPE value of 4 can correspond to Cisco HDLC
traffic as well as Frame Relay traffic, and give some information about
the cruft found in the xxc field of the header for one CHDLC and one FR
capture.

svn path=/trunk/; revision=14659
2005-06-16 08:10:13 +00:00
Luis Ontanon 6aead4f02c third and last(?) iteration on the import routines for tektronix 32bit rf5 files.
Now the import is correct even for large files.
I found out when and where the "junk" was inserted.


svn path=/trunk/; revision=14646
2005-06-16 02:27:30 +00:00
Luis Ontanon 851d6b9a5e use a helper dissector to show k12 files.
svn path=/trunk/; revision=14621
2005-06-13 19:45:21 +00:00
Luis Ontanon 7cae4a40d0 Fixed indentation and removed control characters, in an attempt to understand why windows fail to compile.
svn path=/trunk/; revision=14607
2005-06-10 16:23:22 +00:00
Luis Ontanon e0dc2b2a9a Initial checkin of the 32 bit tektronix k12 binary format (rf5)
There is still much to do, but at the very least it can import files allowing the user to choose which protocols handle the diferent sources.


svn path=/trunk/; revision=14606
2005-06-10 16:01: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
Gerald Combs e25b530eb5 From Steve Grubb: Fix a memory leak. Fixes part of bug 217.
svn path=/trunk/; revision=14500
2005-05-30 21:08:16 +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
Gilbert Ramirez 25dd1ce767 Add WTAP_GCOM_TIE1 and WTAP_GCOM_SERIAL for
Oolan Zimmer <ethereal@gcom.com>

svn path=/trunk/; revision=14362
2005-05-13 19:44:25 +00:00
Ronnie Sahlberg 4e3c7cc716 From Hannes Gredler
support for Juniper PPPOE encapsulation


svn path=/trunk/; revision=14346
2005-05-11 11:24:17 +00:00
Michael Tüxen 23d022349d - Add support for libpcap files for MTP2 with a per packet header
indicating the direction, narrowband/broadband, and interface number.
- Add support to display the direction and interface number.
- Add support to packet-mtp2.c to use the broadband/narrowband indication.

svn path=/trunk/; revision=14265
2005-05-02 14:07:33 +00:00
Ronnie Sahlberg 412e592a12 updating Mark C Browns information
svn path=/trunk/; revision=14025
2005-04-07 10:04:50 +00:00
Guy Harris 9f0d946003 Fix up the table of encapsulation type strings to match the new set of
encapsulation types.

svn path=/trunk/; revision=14007
2005-04-03 12:05:05 +00:00
Guy Harris 466c3e9c8d Make editcap use wtap_read(); that eliminates the last user of
wtap_loop(), so eliminate wtap_loop().

svn path=/trunk/; revision=14006
2005-04-03 11:00:49 +00:00
Ronnie Sahlberg 3b435e70a3 From Mark C Brown NETTL updates
svn path=/trunk/; revision=13999
2005-04-01 10:17:05 +00:00
Guy Harris 6c16e488a1 "*p++" doesn't affect what "p" points to; it only affects "p" itself,
and is equivalent to just "p++".  If "p" isn't used after that, "*p++"
does nothing whatsoever, and can just be removed.

svn path=/trunk/; revision=13818
2005-03-20 10:55:50 +00:00
Ronnie Sahlberg e70e3a8d2f from Thierry Martin
fix a bug in 5view reader due to an uninitialized variable


svn path=/trunk/; revision=13804
2005-03-18 20:35:53 +00:00
Guy Harris cd035d1b02 The DBS Etherwatch file handler does look for a magic number (the word
"ETHERWATCH").

svn path=/trunk/; revision=13567
2005-03-01 19:59:54 +00:00
Jörg Mayer d31c2badda Minor fixes
svn path=/trunk/; revision=13498
2005-02-24 19:45:08 +00:00
Guy Harris 6616a3770c Make the "maintainer-clean" rules get rid of some additional generated
files.  Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.

Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.

Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files.  In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).

Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.

svn path=/trunk/; revision=13402
2005-02-14 20:33:57 +00:00
Gerald Combs 9e93bf4747 From Josh Bailey:
Attached is an update to Lucent/Ascend trace parsing: fix a few bugs,
add support for ISDN and Ethernet captures - diffs to 0.10.9.


svn path=/trunk/; revision=13311
2005-02-05 17:39:12 +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 e86a1c6a47 Give a URL for the ERF specification.
svn path=/trunk/; revision=13252
2005-02-03 02:26:20 +00:00
Guy Harris 467ece8920 From Florian Lohoff: Redback SmartEdge SE400/800 tcpdump disassembly.
svn path=/trunk/; revision=13212
2005-01-31 03:03:02 +00:00
Guy Harris e4a550c538 Add some notes about stuff discovered by Ken Mann.
svn path=/trunk/; revision=13194
2005-01-29 10:48:16 +00:00
Guy Harris c29e427533 From Yoshihiro Oyama: support "-" as a file name, referring to the
standard input.  Opening it for random access isn't supported; we add a
new error for that.

svn path=/trunk/; revision=13189
2005-01-28 11:31:19 +00:00
Guy Harris 36e8efcbca From Hannes Gredler: support for Juniper's DLT_JUNIPER_ATM{1,2} values.
svn path=/trunk/; revision=13130
2005-01-20 05:40:56 +00:00
Guy Harris 714ca234a6 When we get an EOF, only return WTAP_ERR_SHORT_READ as the error if we
were in the middle of processing a record.  If we got one at the
*beginning* of the record, that just means we've come to a clean
end-of-file.

svn path=/trunk/; revision=13064
2005-01-16 08:45:11 +00:00
Guy Harris c3240e1ccb Note that the low-order bit of hdr->hdr_2_x.xxx[8] appears to be a "bad
FCS" bit for 802.11, just as it appears to be for Ethernet, and give
more details on the 4 bytes of junk at the end of the packet (i.e., that
we haven't yet seen an 802.11 capture where it's an FCS rather than just
junk).

svn path=/trunk/; revision=13028
2005-01-14 09:47:22 +00:00
Guy Harris bcedae3c1f Add some more comments about the FCS issue.
svn path=/trunk/; revision=12939
2005-01-03 10:27:20 +00:00
Guy Harris 0e1e5e9feb Give a bit more information on the "are there FCSes in the frame?"
issue.

svn path=/trunk/; revision=12938
2005-01-03 10:10:23 +00:00
Guy Harris fd56bd7689 Rename the CAPTYPE_ definitions as appropriate - many of them are
specific to particular types of captures, and the same value might
correspond to more than one CAPTYPE_ definition.

Add an additional CAPTYPE_ for some non-gigabit Ethereal capture seen by
Bill Meier, and fix the range check the time stamp units value as per
his mail.

svn path=/trunk/; revision=12937
2005-01-03 05:27:35 +00:00
Guy Harris b5070624a7 From James Fields and Kevin Johnson: fix the handling of time stamps in
a number of Windows Sniffer captures - apparently the time stamp units
are in a field in the file header.

Add a capture type value seen in at least one ATM capture.

Update some comments, and add some comments.

Get rid of some redundant setting of "timeunit".

svn path=/trunk/; revision=12936
2005-01-03 03:42:23 +00:00
Jörg Mayer 6b2d41a3fe Small Whitespacechange
svn path=/trunk/; revision=12798
2004-12-21 12:26:43 +00:00
Guy Harris 4327dbeef0 Note that the link-layer types 170 and 171 are reserved (GFP-T is a bit
ugly, as it encapsulates, for example, the 8B/10B code for gigabit
Ethernet and Fibre Channel, so code to read it might have to decode
that; GPF-F isn't so bad).

svn path=/trunk/; revision=12700
2004-12-09 19:12:28 +00:00
Guy Harris 2f01986159 Add an entry for the new DLT_GPRS_LLC (so that nobody working on
Ethereal, unaware that the Ethereal team does *NOT* control libpcap
format, thinks they can just grab 169 and use it for their own
purposes).

svn path=/trunk/; revision=12678
2004-12-07 17:54:08 +00:00
Jörg Mayer 5e91049896 Fix some typos
svn path=/trunk/; revision=12667
2004-12-04 15:42:18 +00:00
Jörg Mayer 56cce90134 Updates by Martin Regner
svn path=/trunk/; revision=12666
2004-12-04 15:35:51 +00:00
Jörg Mayer 1f6bd4c530 Add a bit of info that should be present in a capture
svn path=/trunk/; revision=12665
2004-12-04 09:12:24 +00:00
Jörg Mayer 8a45a54c22 Backup some notes on Airmagnet capture file format into Ethereal - I'm NOT going to write an importer in the near future though
svn path=/trunk/; revision=12578
2004-11-22 16:36:26 +00:00
Guy Harris a3439d24fb Check for errors from all calls to "file_getc()".
If we get such an error, always call "file_error()" to get an indication
of what the error was and, if it returns 0, set the error to
WTAP_ERR_SHORT_READ.

svn path=/trunk/; revision=12442
2004-10-30 09:14:36 +00:00
Guy Harris 1e6a5d408c As Sam Leffler notes, the radiotap header isn't BSD-only, it's also used
by his madwifi Atheros driver on Linux; rename
WTAP_ENCAP_IEEE_802_11_WLAN_BSD to WTAP_ENCAP_IEEE_802_11_WLAN_RADIOTAP,
and change its text name from "ieee-802-11-bsd" to
"ieee-802-11-radiotap".

svn path=/trunk/; revision=12429
2004-10-29 02:40:01 +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 88982558b0 file_hdr.network is one byte long, so don't use htoles() on values it's
set to - that causes it to be set to zero.

svn path=/trunk/; revision=12328
2004-10-17 06:20:43 +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
Jörg Mayer 54e0e363a9 Get rid of warnings about shadowed variables (code was ok)
svn path=/trunk/; revision=12171
2004-10-01 12:31:52 +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 32848e62b3 Improve the heuristic for Frame Relay, and move that heuristic after the
checks for Wellfleet and Cisco HDLC.

svn path=/trunk/; revision=11995
2004-09-15 07:22:34 +00:00
Ulf Lamping 19ddb92ce1 to prevent problems reported by David Richards, don't depend on the cvarsdll from win32.mak and define our own CVARSDLL
svn path=/trunk/; revision=11980
2004-09-12 23:29:33 +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 0d7309988e Rename HEADER_FILES to NONGENERATED_HEADER_FILES, so that it's clear
that it contains only the .h files not generated from other files.

svn path=/trunk/; revision=11531
2004-07-27 00:36:31 +00:00
Guy Harris 7f6ff83e35 Add a missing backslash.
svn path=/trunk/; revision=11530
2004-07-26 22:00:05 +00:00
Guy Harris 39ceb18bf1 Add a Makefile.common for Wiretap, and have Makefile.am and
Makefile.nmake include it.

svn path=/trunk/; revision=11528
2004-07-26 20:46:54 +00:00
Guy Harris f28323ba39 From Graham Bloice: add resources to wiretap.dll.
svn path=/trunk/; revision=11476
2004-07-23 06:11:50 +00:00
Jörg Mayer fd24ad7d92 .cvsignore is dead
it has been replaced by
svn proplist -v <dir/file>
and
svn propedit <dir/file>

svn path=/trunk/; revision=11422
2004-07-18 23:44:34 +00:00
Jörg Mayer 56c759212f Add epan/dissectors/.cvsignore
Add tags and TAGS to all .cvsignore files

svn path=/trunk/; revision=11419
2004-07-18 22:51:50 +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 1715f98d9c This shouldn't be checked in, as it's generated from Makefile.am.
svn path=/trunk/; revision=11381
2004-07-16 23:26:27 +00:00
Guy Harris 6216591bdf If we don't know the board type in a Lanayzer capture, return
WTAP_ERR_UNSUPPORTED_ENCAP, not WTAP_ERR_UNSUPPORTED, as it presumably
means the capture was done on some type of device we don't know about.

svn path=/trunk/; revision=11339
2004-07-08 07:32:39 +00:00
Guy Harris 272a2055ab On at least some platforms, a #define of O_BINARY is needed even if
<fcntl.h> is included, as <fcntl.h> doesn't define it.

svn path=/trunk/; revision=11276
2004-06-30 06:58:59 +00:00
Ulf Lamping a24b176c32 define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups

svn path=/trunk/; revision=11272
2004-06-29 20:51:26 +00:00
Guy Harris f17a8f98ec To return an EOF indication, return FALSE from the read routine *AND*
set "*err" to 0, rather than leaving what random value happened to be in
"*err" there.

svn path=/trunk/; revision=11158
2004-06-16 08:11:59 +00:00
Guy Harris c16562407d Add an encapsulation type for BACnet MS/TP, and map the newly-assigned
libpcap DLT_ value for BACnet MS/TP to it.

svn path=/trunk/; revision=11126
2004-06-07 20:28:51 +00:00
Jörg Mayer 01dd51cdf4 It really helps when you change the default from gtk1 -> gtk2 in the top
level configure.in to mirror that change in wiretap. Otherwise people who
have both versions of glib/gtk installed may see crashes.

svn path=/trunk/; revision=11049
2004-06-01 00:15:38 +00:00
Guy Harris 251ecc78f5 From Joe Marcus Clarke: force the standard output to be in binary mode
on Windows.

svn path=/trunk/; revision=10717
2004-04-28 05:47:33 +00:00
Olivier Biot af4a73a523 At last compiling on CygWin works again! Added the missing PCRE and GLIB
libraries to libftypes.

Provide caching of computed configure tests.

svn path=/trunk/; revision=10600
2004-04-14 18:42:19 +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 78becd2967 From Rolf Fiedler: fix a comment, and fix the code to get the packet
length.

svn path=/trunk/; revision=10541
2004-04-02 07:40:37 +00:00
Guy Harris 5eb39c4638 From Albert Chin: "config.h" should come before all other #includes.
svn path=/trunk/; revision=10528
2004-03-30 19:37:31 +00:00
Jörg Mayer 9c83306a7e Some aclocal warning fixes during autogen.sh
svn path=/trunk/; revision=10507
2004-03-27 12:07:57 +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
Olivier Biot eee9dc26ac Fix the CLEANFILES target so both static and shared libraries are cleaned.
svn path=/trunk/; revision=10475
2004-03-24 21:27:44 +00:00
Guy Harris 30b2831847 Add support for DLT_APPLE_IP_OVER_IEEE_1394.
svn path=/trunk/; revision=10446
2004-03-23 01:02:41 +00:00
Guy Harris ac38f86c69 Clean up the code to check the file type.
svn path=/trunk/; revision=10445
2004-03-23 00:17:50 +00:00
Guy Harris b9ab806214 In the read routine, set the 802.11 pseudo-header for
WTAP_ENCAP_PRISM_HEADER, WTAP_ENCAP_IEEE_802_11_WLAN_BSD, and
WTAP_ENCAP_IEEE_802_11_WLAN_AVS.

In the seek_read routine, set it for all 802.11 types.

svn path=/trunk/; revision=10404
2004-03-19 05:22:41 +00:00
Guy Harris 40f3136dbf "esc_read()" is passed a FILE_T, not a FILE_T * - a FILE_T is a pointer
(a FILE * if zlib isn't used, a gzFile if zlib is used).

Use "size_t" for the amount of data to read in
"eyesdn_check_file_type()", to squelch signed vs. unsigned warnings.

svn path=/trunk/; revision=10392
2004-03-17 09:24:41 +00:00
Jörg Mayer b7803c8fc6 Make libethereal and libwiretap shared libs.
svn path=/trunk/; revision=10368
2004-03-13 10:15:36 +00:00
Guy Harris 48cd9f9358 Add support for DLT_ value 99, as used by the Axent Raptor
firewall/Symantec Enterprise Firewall.  Thanks, Axent/Symantec, for not
asking us for a DLT_ value and not telling us about the link-layer type.

svn path=/trunk/; revision=10361
2004-03-11 09:18:33 +00:00
Guy Harris 5ae946d67c From Jeff Morriss: delete "ascend-grammar.c" and "ascend-grammar.h" with
"make maintainer-clean", as they're generated files.

svn path=/trunk/; revision=10336
2004-03-06 21:46:27 +00:00
Guy Harris 03d1c9e781 Get rid of an out-of-date comment.
We only appear to need autoconf 2.52, not 2.53.

svn path=/trunk/; revision=10293
2004-03-04 06:30:14 +00:00
Guy Harris ba72e955dc Have "wtap_read()" set "wth->phdr.pkt_encap" to "wth->file_encap",
rather than requiring individual capture file type handlers to do it
(unless they're doing per-packet encapsulation, in which case we check
to make sure they didn't *leave* it as WTAP_ENCAP_PER_PACKET).

svn path=/trunk/; revision=10290
2004-03-03 22:24:53 +00:00
Jörg Mayer c4884cab89 Require autoconf 2.53 and automake 1.6
svn path=/trunk/; revision=10287
2004-03-03 21:35:57 +00:00
Guy Harris cf1466d623 Set the packet encapsulation value to the file encapsulation.
svn path=/trunk/; revision=10285
2004-03-03 01:49:16 +00:00
Guy Harris d7ea5b23cf A DLT_ value of 13, in a Nokia-format capture, appears to be an ATM
capture of some sort.

svn path=/trunk/; revision=10109
2004-02-19 08:02:06 +00:00
Guy Harris b5881ce528 Get rid of unused variables and #defines.
svn path=/trunk/; revision=10059
2004-02-13 19:19:13 +00:00
Guy Harris 26536d7a41 Use "guint8" for 8-bit binary data.
"file_getc()" returns either an 8-bit unsigned value, or -1 for error or
EOF; store its return value into an "int", and check for -1 and return
-2, in "esc_read()" (rather than checking "file_error()" at the end).

Clean up some comments, routine names, and variable names - eyeSDN files
are binary, not text.

In "parse_eyesdn_packet_data()", handle the case of an EOF from
"esc_read()".

svn path=/trunk/; revision=10050
2004-02-12 21:25:07 +00:00
Guy Harris 0aef15283a Note that 164 is reserved for Juniper chassis-internal meta-information
(DLT_JUNIPER_MONITOR/LINKTYPE_JUNIPER_MONITOR).

Fix a typo.

svn path=/trunk/; revision=10046
2004-02-12 19:49:08 +00:00
Guy Harris 131be6ce7d Map WTAP_ENCAP_IEEE_802_11_WITH_RADIO to DLT_IEEE802_11, for now; we
could probably map it to one of the many different 802.11+radio headers,
but we should probably just have *one* Wiretap encapsulation for 802.11,
with a radiotap-style list of attributes attached to it.

svn path=/trunk/; revision=10041
2004-02-11 20:47:00 +00:00
Guy Harris 2df960325a From Rolf Fiedler: support for reading EyeSDN USB S0 trace files.
svn path=/trunk/; revision=10038
2004-02-11 20:05:16 +00:00
Guy Harris 31c636ff4a Cast the arguments to <ctype.h> macros to "guchar", to squelch
"subscript has type `char'" warnings and to make the code work correctly
if there are characters with the 8th bit set.

svn path=/trunk/; revision=10010
2004-02-09 00:06:30 +00:00
Guy Harris a2d69c6fae Add extra {} to "avoid ambiguous `else'", to quote the GCC warning that
this squelches.

svn path=/trunk/; revision=10009
2004-02-09 00:05:35 +00:00
Jörg Mayer 55af6c35c4 Move -pedantic back to extra-gcc-flags, as glib generates more warnings than our code
svn path=/trunk/; revision=10008
2004-02-08 14:11:48 +00:00
Jörg Mayer 16970db9af Don't build as shared *and* static by default
svn path=/trunk/; revision=10004
2004-02-07 05:44:08 +00:00
Jörg Mayer 2a1cb9ce0f Ignore byproducts of shared lib compilation
svn path=/trunk/; revision=10003
2004-02-07 04:35:49 +00:00
Guy Harris 75d7c8727b Whether frames in an AiroPeek V9 802.11 capture have 4 bytes of 0 or an
FCS at the end appears to depend on the network subtype value.

svn path=/trunk/; revision=10001
2004-02-06 20:50:44 +00:00
Guy Harris 922c36ea57 A MediaSubType value of 1 also means 802.11. (Is that what indicates
whether there's an FCS or not?)

svn path=/trunk/; revision=9995
2004-02-06 05:23:46 +00:00
Guy Harris f23a8e64c0 Make sure a packet has one and only one length field, one and only one
timestamp lower field, and one and only one timestamp lower field.

svn path=/trunk/; revision=9994
2004-02-06 04:48:06 +00:00
Guy Harris 95ff961e2d The time stamps in *Peek V9 files appear to be in nanoseconds from the
Windows FILETIME epoch, i.e. midnight, January 1, 1601.

svn path=/trunk/; revision=9993
2004-02-06 04:27:19 +00:00
Guy Harris d5263942b5 Ethernet frames appear to have 4 bytes of 0 at the end, at least in the
captures I've seen.

svn path=/trunk/; revision=9991
2004-02-06 03:12:21 +00:00
Guy Harris 0875bf3afe V9 format appears to be used by some versions of EtherPeek, too.
The MediaType field seems to be 0 for the Ethernet captures; however,
the MediaSubType field is different.

The fields in the header are different - we can't use hard-coded offsets
for the fields, we have to process them as a sequence of tag/value
items.

Rename some routines to use the same naming convention as the V9 open
routine rather than the same convention as the V5/V6/V7 read and
seek/read routines.

svn path=/trunk/; revision=9990
2004-02-06 02:11:52 +00:00
Guy Harris 2cbe1a0bf5 Fix up a comment to note that this is also used for AiroPeek, and used
only for versions 5, 6, and 7 of the file format.

Add another comment explaining why this refers to "etherpeek" even
though it's also used for AiroPeek and probably also TokenPeek.

svn path=/trunk/; revision=9989
2004-02-06 02:09:11 +00:00
Guy Harris f3a4c61c93 Sort the link-layer type values a little better.
svn path=/trunk/; revision=9987
2004-02-06 00:45:27 +00:00
Guy Harris cf131d9e16 The DLT_ value 127 is being used for the BSD radio header, and the
current CVS libpcap uses 163 for the AVS radio header (127 was never
used for the AVS radio header).  Redo the Wiretap encapsulation values
for that (and shuffle them to put the 802.11 Wiretap values together).

svn path=/trunk/; revision=9904
2004-01-29 10:58:28 +00:00
Guy Harris 677db2dadd From Tomas Kukosa: reserve private WTAP_ENCAP values and map them to
reserved private DLT_ values.

svn path=/trunk/; revision=9892
2004-01-28 01:24:30 +00:00
Guy Harris 2528c053ce Supply a pseudo-header for all 802.11 packets; add an "fcs_len" field to
it, similar to the Ethernet pseudo-header's "fcs_len" field, and use it
in the 802.11 dissector.

svn path=/trunk/; revision=9884
2004-01-27 08:06:12 +00:00
Guy Harris 1c8f8924ac Fix a compiler warning.
svn path=/trunk/; revision=9867
2004-01-26 21:26:52 +00:00
Guy Harris bbf3806ba7 Don't muck with the Ethernet pseudo-header if we have an 802.11 capture.
svn path=/trunk/; revision=9857
2004-01-25 23:50:48 +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
Jörg Mayer 6e59f95ceb Fix all fixable warnings
Move addional warnings from extra-gcc-checks to normal compilation flags

svn path=/trunk/; revision=9826
2004-01-24 16:48:12 +00:00
Guy Harris c19c7677fb It appears that, for ISDN captures, the rules for whether there's 4
bytes of extra stuff at the end of the packet or not are the same as for
Ethernet and 802.11.

svn path=/trunk/; revision=9728
2004-01-19 02:23:18 +00:00
Olivier Biot 2857dfc114 Add -Wbad-function-cast to extra gcc flags.
svn path=/trunk/; revision=9639
2004-01-10 16:51:07 +00:00
Guy Harris f497416d24 The year in a LANalyzer capture's trace summary record is a 2-byte year
number.

svn path=/trunk/; revision=9583
2004-01-07 04:50:21 +00:00
Guy Harris 0b82bd5123 Packet data is an array of "guint8"s, not an array of "char"s; declare
variables appropriately.

Put in a cast to squelch MSVC++ warnings.

svn path=/trunk/; revision=9575
2004-01-06 20:05:39 +00:00
Ulf Lamping f16ac7a482 removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9558
2004-01-05 17:33:28 +00:00
Guy Harris c45a2852f0 For WTAP_ENCAP_ETHERNET, you have to fill in the "eth.fcs_len" member of
the pseudo-header; these captures don't appear to have an FCS in them,
so set that member to 0.

svn path=/trunk/; revision=9502
2003-12-31 01:07:09 +00:00
Guy Harris 7110082aa4 From Neils Koot:
add the ability to read Ethernet captures;

	add the ability to read hex-only dumps.

svn path=/trunk/; revision=9468
2003-12-29 00:36:12 +00:00
Guy Harris 1b6d16c7cc Make all the byte arrays for writing out stuff "guint8" rather than
"gint8" - there's no reason for them to be signed, and making them
signed can cause compiler warnings if a value won't fit in 8 bits if
sign-extended.

svn path=/trunk/; revision=9467
2003-12-29 00:25:39 +00:00
Ulf Lamping cb2658031d removed some MSVC warnings (warning level 2)
svn path=/trunk/; revision=9459
2003-12-28 12:43:40 +00:00
Jörg Mayer 982b7a3f2b Add -pedantic to --with-extra-gcc-checks
svn path=/trunk/; revision=9443
2003-12-24 14:45:48 +00:00
Ulf Lamping 467c05b3ea removed some MSVC warnings (conversions between double/float and int)
svn path=/trunk/; revision=9422
2003-12-23 00:16:46 +00:00
Ulf Lamping 3b77bfee59 removed some MSVC warnings (moved pcap.h before glib.h)
svn path=/trunk/; revision=9393
2003-12-21 12:19:39 +00:00
Jörg Mayer 8d1f1c9b4f libpcap.c:1777: warning: implicit declaration of function htons
svn path=/trunk/; revision=9388
2003-12-21 06:02:06 +00:00
Guy Harris 8b0f0d5b7e Add some additional sanity checking.
svn path=/trunk/; revision=9360
2003-12-19 22:23:05 +00:00
Guy Harris 95e6fb64c0 Add support for a link-layer type value of 143 as DOCSIS in libpcap
captures.

svn path=/trunk/; revision=9350
2003-12-18 23:50:44 +00:00
Guy Harris b8299f0b98 From Jan Kiszka: IrDA support.
svn path=/trunk/; revision=9345
2003-12-18 19:07:14 +00:00
Guy Harris a98aa75a58 WildPackets' EtherHelp appears to write EtherPeek-compatible files,
except that the 0x80 bit is turned on in the file version number field.
Turn that bit off before processing that field.

svn path=/trunk/; revision=9342
2003-12-18 03:43:40 +00:00
Guy Harris c642c44ad8 Fix more "CPPLAGS" typoes.
svn path=/trunk/; revision=9310
2003-12-17 02:41:04 +00:00
Ulf Lamping 10e3320115 prevent MSVC warning:
"warning C4761: Gr��enkonflikt im Argument. Konvertierung vorgenommen"
-> size conflict in argument, conversion done

svn path=/trunk/; revision=9244
2003-12-11 21:23:37 +00:00
Guy Harris 02260b4056 From Jeff Morriss: add support for libpcap MTP2 and MTP3 captures.
Add a missing entry in "encap_table[]" for Bluetooth H4, and fix some
comments.

svn path=/trunk/; revision=9157
2003-12-03 22:40:39 +00:00
Guy Harris 95f25d46c1 "strtoul()" returns a "long", not a "long long".
svn path=/trunk/; revision=9154
2003-12-03 19:47:36 +00:00
Guy Harris 98c4d5d030 Check for errors and EOF, and handle them appropriately; don't treat all
errors when reading the header as indications that the file isn't an
AiroPeek V9 file.

Put in comments nothing some additional checks we should do.

svn path=/trunk/; revision=9145
2003-12-02 20:27:14 +00:00