Commit Graph

42 Commits

Author SHA1 Message Date
Moshe Kaplan 34454a5037 wiretap: Add header files to Doxygen
Add @file markers for wiretap
headers so that Doxygen will
generate documentation for them.
2021-11-29 21:59:23 -05:00
Guy Harris 166159f15d wiretap: eliminate the pcap/nspcap/pcapng WTAP_FILE_TYPE_SUBTYPE_ values.
Register the pcap and pcapng file types/subtypes rather than hardwiring
them into the table.

Call the registration routines for them directly, rather than through a
generated table; they're always supposed to be there, as some code in
Wireshark either writes only one of those formats or defaults to writing
one of those formats.  Don't run their source code through the
registration-routine-finder script.

Have the file type/subtype codes for them be directly exported to the
libwiretap core, and provide routines to return each of them, to be used
by the aforementioned code.

When reporting errors with cfile_write_failure_message(), use
wtap_dump_file_type_subtype() to get the file type/subtype value for the
wtap_dumper to which we're writing, rather than hardcoding it.

Have the "export PDU" code capable of supporting arbitrary file
types/subtypes, although we currently only use pcapng.

Get rid of declarations of now-static can_write_encap and
dump_open routines in various headers.
2021-02-23 21:56:20 +00:00
Guy Harris 6e6233521a Have WTAP_ERR_INTERNAL include an err_info string giving details.
That way, users won't just see "You got an internal error", the details
will be given, so they can report them in a bug.
2020-10-14 04:51:45 +00:00
Guy Harris 7d95c27de2 ERF: split wiretap/erf.h into three files.
wiretap/erf_record.h has declarations for records in ERF files and in
LINKTYPE_ERF packets in pcap and pcapng files.

wiretap/erf-common.h has declarations of routines to be called by
pcap/pcapng reader code when processing LINKTYPE_ERF packets.

wiretap/erf.h is what's left, for use by wiretap/erf.c and the code with
the tables of file readers and writers.

Change-Id: Ia982e79b14a025a80dcbc7c812fb3b2cdb9c6aaa
Reviewed-on: https://code.wireshark.org/review/37021
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-02 04:24:08 +00:00
Guy Harris 9d30864607 wiretap/erf: Get rid of no-longer-used routine.
I guess the "replace" part of "TODO: Replace uses in pcapng and pcap
with erf_read_header() and/or erf_populate_interface_from_header() and
delete." has been done, so we do the "delete" part.

Change-Id: Icd691aa8c3defdd68c306ad9eaf1379a8ba6ec0f
Reviewed-on: https://code.wireshark.org/review/37020
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-02 03:33:29 +00:00
Guy Harris 22e7952e06 HTTPS In Even More Places, update some links.
Fall back on the Wayback Machine for some links.

Change-Id: I6a44a2caaeb4fa521c2f08196e7c36069e3bb842
Reviewed-on: https://code.wireshark.org/review/34103
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-28 04:21:18 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Anthony Coddington f1d8b22fec erf: Add support for attribute and sensor Provenance tags
Add temperature and power tags, represented using millidegrees/milliwatts.
Add attribute tag, allows generic reprsentation of dynamic path like key-value pairs in the format namespace.path.to.name=value where value can be a JSON-escaped string or an integer/float number.
Also fix a few implicit floating point conversions (confirmed values are the same).

Change-Id: Id8a858abfa8a56b44e9e7200b11adc562e67fb3b
Reviewed-on: https://code.wireshark.org/review/31136
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-20 05:13:44 +00:00
Stig Bjørlykke 488c831790 Use common indenting space in heading
Change-Id: I47022f9c7d568ca6d9705ba63c669a980822818a
Reviewed-on: https://code.wireshark.org/review/27229
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:55:55 +00:00
Dario Lombardo fdd426e410 spdx: more licenses converted.
Change-Id: Ia1650bc02511f7bd47fb90be91b623177f05bcbd
Reviewed-on: https://code.wireshark.org/review/26337
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:48:20 +00:00
Anthony Coddington 15c261e94b ERF: Add support for new extension header and Provenance tags
Add support for Entropy Extension header, currently with one field. Uses
a conversion function to convert representation to bits.
Add various entropy and tap mode Provenance (ERF_TYPE_META) tags.

The only complex tag is ext_hdrs_added/removed. This tag consist of up
to 4 big endian uint32 bitfields, with each bit representing an
extension header number. ehdr_type_vals and a new ehdr_type_vals_short
are used to generate the tags. Custom printing is used for the header
line to display unknown values as integer and support the special case
of <All>: all supplied bits 1 meaning all extension headers removed.
Storage for the up to 4 subtree header_field id entries is in the first
4 extra hf_values[] for now, the ett value is reused.

Increase erfmeta_tag_info_ext_t ERF_HF_VALUES_PER_TAG to 32. A better
solution is needed sooner rather than later but the structure is only
allocated for tags that need it.

Change-Id: I9e359f044131bce2afc189bebc21239eed429b21
Reviewed-on: https://code.wireshark.org/review/26111
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-27 09:06:01 +00:00
Anthony Coddington f3181f706b ERF_TYPE_META write and comment support
Support per-packet comments in ERF_TYPE_META through a new Anchor ID
extension header with per-Host unique 48-bit Anchor ID which links an
ERF_TYPE_META record with a packet record. There may be more than one
Anchor ID associated with a packet, where they are grouped by Host ID
extension header in the extension header list. Like other ERF_TYPE_META
existing comments should not be overwritten and instead a new record
generated. See erf_write_anchor_meta_update_phdr() for detailed comments
on the extension header stack required.

As Wireshark only supports one comment currently, use the one one with
the latest metadata generation time (gen_time). Do this for capture
comment too.

Write various wtap metadata in periodic per-second ERF_TYPE_META records
if non-WTAP_ENCAP_ERF or we have an updated capture comment.
Refactor erf_dump to create fake ERF header first then follow common
pseudoheadr and payload write code rather than two separate code paths.
Support an ERF_HOST_ID environment variable to define Wireshark's Host
ID when writing. Defaults to 0 for now.

ERF dissector updates to support Anchor ID extension header with basic
frame linking.
Update ERF_TYPE_META naming and descriptions to official name
(Provenance)

Core changes:
Add has_comment_changed to wtap_pkthdr, TRUE when a packet
opt_comment has unsaved changes by the user.
Add needs_reload to wtap_dumper which forces a full reload of the file
on save, otherwise wireshark gets confused by additional packets being
written.

Change-Id: I0bb04411548c7bcd2d6ed82af689fbeed104546c
Ping-Bug: 12303
Reviewed-on: https://code.wireshark.org/review/21873
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stephen Donnelly <stephen.donnelly@endace.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-17 02:08:52 +00:00
Anthony Coddington 7531318e05 ERF: Fix issues with Host ID mapping
packet-erf: Fix Host ID/Source ID showing for all extension header types.
Only show generated Host ID/Source ID when there is a Host ID extension header
or there was not one on the record.
Assumes there is only one Source ID if multiple Flow ID extension headers (unlikely)
and that it matches the one in the Host ID header. This is consistent with other tools.
Does support multiple Host ID extension headers though.

Fix dag_version tag short name. Was clashing with another tag due to typo.

ERF wiretap: Don't conflate Host ID 0 with implicit Host ID.

While the implicit Host ID defaults to 0, it is not the same thing as seeing
a packet with Host ID explicitly 0 in the extension header which means
explicitly unknown source.
Store the initial (unknown) implicit Host ID interface mapping in it's own
special mapping table entry rather than 0.

Noticed we can currently get duplicate interfaces in the unusual event of mixed
implicit and explicit Host ID packet extension headers for the same ID before
we discover that mapping.
Consistently abandon the implicit version for consistency with the dissector
linking behaviour and mark the interface as unmatched in the description. In
2 pass mode (including normal Wireshark file open) the abandoned interface ends
up with no packets. In the common cases (all Host ID or no Host ID on packet
records) this duplicate interface will not be created in the first place.

Change-Id: Ic5d0b2ce9aae973f1693a247cf240ef1324ff70a
Ping-Bug: 12303
Reviewed-on: https://code.wireshark.org/review/18704
Reviewed-by: Stephen Donnelly
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-11-08 12:09:39 +00:00
Anthony Coddington 94cb86a0ca ERF: Add ERF_TYPE_META clock tags
Adds various clock configuration related tags.
Uses ptp_v2 value strings exported from packet-ptp.

Refactor out common ERF_TYPE_META bitfield code.
Also clean up field registration a bit.
Add flow_hash_mode enum, other minor wording cleanup.
Manually display relative timestamps as nanoseconds for <1ms.
Fix ns_host_* tag subtree summary field name duplication.

Ping-Bug: 12303
Change-Id: I76264d141f1c4a3590627637daa5dcd4fdfd2e93
Reviewed-on: https://code.wireshark.org/review/16782
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-31 13:26:33 +00:00
Anthony Coddington ad0e70f10c ERF: Make ERF wiretap forwards compatible.
Dissector has always been able to cope with unknown record types so pass them
through (and call the data dissector from the ERF dissector in this case).
Previously was stopping processing on the first unrecognized record which is
very unhelpful for otherwise valid files that have new types mixed in.

Remove ERF type check altogether from open heuristic as ERF type could be past
48 in future and with more extension headers bit any byte value could be valid.
Also allow setting ERF_RECORDS_TO_CHECK to 0 to force skipping the heuristic.

Change-Id: I8331eef30ba2e949564f418b3100bd73b8f58116
Reviewed-on: https://code.wireshark.org/review/15361
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-07 03:56:02 +00:00
Adam Goldman ba3f4f991c opa: Add dissectors for Intel’s Omni-Path Architecture (OPA)
Added dissectors for OPA Fabric Executive (FE) Header, OPA Snoop and
Capture (SnC) MetaData Header, OPA 9B Packets, and OPA MAD Packets.

Bug: 12114
Change-Id: I6acd3c9e266e4b638167abbdd275ec7c1d472b4f
Reviewed-on: https://code.wireshark.org/review/13473
Reviewed-by: Adam Goldman <adam.goldman@intel.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-17 18:05:54 +00:00
Anthony Coddington 3db7b1ed04 ERF: Add dissection and wiretap support for ERF_TYPE_META.
ERF Dissector:
Add dissection for ERF_TYPE_META, Host ID and Flow ID extension headers.
Rename ERF extension header defines to ERF_EXT_HDR* and put in erf.h.

The Flow ID extension header has an improved 32-bit Flow Hash with a Hash Type
field describing what the hash was computed over. The Host ID extension header
contains a 48-bit organizationally unique Host Identifier. Both extension
headers contain the same 8-bit Source ID used for distinguishing records from
multiple sources in the same file and for metadata linking to ERF_TYPE_META
records. Host ID is used to identify the capturing host and can also be used to
distinguish records from multiple hosts in the same file.

ERF_TYPE_META records have a payload consisting of TLV metadata, divided into
sections which define the context of the TLV tag. The dissector registers
a field for each tag for each section type based on a template.
ERF_TYPE_META records generally have a Host ID extension header used to link
metadata to packet records with the same Host ID and Source ID. The associated
Host ID can either be explicit on all records, or implicit where the Host ID
extension header is only present on MetaERF records and other records are
associated using only the Source ID in the Flow ID extension header.

Includes per-record generated Source summary and frame linking. These have the
'correct' Host ID and Source IDs from either extension header, including
applying the Implicit Host ID, and links to the most recent ERF_TYPE_META
record. Relies on Wireshark doing more than one pass to associate the correct
implicit Host ID tree items for records before the first ERF_TYPE_META record.
The metadata is technically not associated at that point anyway.

ERF Wiretap:
Add per-HostID/per-SourceID wtap interfaces and basic ERF_TYPE_META support.

Adds read support for displaying some fields of the 'first'
ERF_TYPE_META record in the Capture File Properties screen. Concatenates
and merges some summary fields to provide more useful information and
attempt to combine ERF sources, streams and interfaces into wtap interfaces.

Interface naming gracefully degrades when Host ID and Source ID are not present
and is intended to be parseable for use by DAG software.
Supports Implicit Host ID, but assumes it does not change.
NOTE: Now only ERF interfaces that are present in the file are added.
Only works with native ERF files for now. Written such that it is easily
adapted for use by pcap dissector.

Some support for setting REC_TYPE_FT_SPECIFIC_REPORT on MetaERF records.
Disabled for now as this breaks pcapng_dump saving of ERF_TYPE_META
and ft_specific_record_phdr clashes with erf_mc_phdr.
Only when native ERF file (as uses wth->file_type_subtype).
Register packet-erf as a dissector of WTAP_FILE_TYPE_SUBTYPE_ERF.

Bug: 12303
Change-Id: I6a697cdc851319595da2852f3a977cef8a42431d
Reviewed-on: https://code.wireshark.org/review/14510
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-01 12:50:37 +00:00
Guy Harris 24324a0263 Clean up handling of the data before the Ethernet packet in ERF files.
The data before the Ethernet packet isn't a 16-bit little-endian
integer, it's two bytes, one byte of offset and one byte of padding.

Change-Id: I327b88f058dda184b79d3c2c6cf0dea52c0d28b1
Reviewed-on: https://code.wireshark.org/review/13254
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-13 08:11:19 +00:00
Guy Harris d286243d0d Dissect the MC and AAL2 headers as 32-bit words.
That's how they're extracted in the libwiretap module, and that's how
they're shown in the ERF spec.

This gets rid of some compiler warnings about type-punning.

Merge some reserved bit fields to match what's in the ERF spec.
Renumber others.

Process the AAL2 and MC headers differently; yes, they're both
big-endian 32-bit values, but that makes the code a bit clearer, and,
heck, the optimizer may well combine the two sequences of code.

Change-Id: Ief7f976e77e8f2fba1685ad5a50ee677a8070ae7
Reviewed-on: https://code.wireshark.org/review/13251
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-13 05:22:12 +00:00
Guy Harris f9a848ac30 Add missing ERF types, mention another missing type, mention reserved space.
Add the TYPE_COLOR_HASH_POS and TYPE_COLOR_HASH_ETH types, note that
type 26 has no #define, mention that types 28 through 31 are reserved
for future record types.

Change-Id: Ic828254599599c6bd7399d4682f9a3d4bff1f0f7
Reviewed-on: https://code.wireshark.org/review/12728
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-19 18:25:15 +00:00
Anthony Coddington dcfbf92705 ERF: Add basic no-break support for ERF_TYPE_META.
Update erf_open heuristic to not break when ERF_TYPE_META records are present.
Remove check for maximum non-pad ERF type and add defines for reserved types.
No dissection in this commit beyond record type name, this will come later.

Change-Id: Ib64e450e26b2878b5519fb6afeafa2ce9477ac85
Reviewed-on: https://code.wireshark.org/review/12708
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-19 17:53:10 +00:00
Bill Meier 454fd6e9eb Add "Editor modelines"; Adjust whitespace as needed.
Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4
Reviewed-on: https://code.wireshark.org/review/6216
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 00:49:09 +00:00
Guy Harris 5947291294 Fix declared types of open routines.
Change-Id: Ifa38dfec31ec5b03f00d6e077902184a9ae2ee0e
Reviewed-on: https://code.wireshark.org/review/4583
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-10 01:04:43 +00:00
Guy Harris a1b1c8bed5 Revert "Refactor Wiretap"
This reverts commit 1abeb277f5.

This isn't building, and looks as if it requires significant work to fix.

Change-Id: I622b1bb243e353e874883a302ab419532b7601f2
Reviewed-on: https://code.wireshark.org/review/1568
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09 05:21:01 +00:00
Michael Mann 1abeb277f5 Refactor Wiretap
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality.

The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes.

bug:9607
Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae
Reviewed-on: https://code.wireshark.org/review/1485
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-09 03:04:39 +00:00
Alexis La Goutte 09cd306d1c Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\* \$Id\$/,+1 d') (no space before star)

Change-Id: I318968db2b8512ba1303b5fc5c624c66441658f0
Reviewed-on: https://code.wireshark.org/review/879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:30:52 +00:00
Bill Meier 5a0809c718 (Trivial) whitespace cleanup (mostly trailing whitespace).
svn path=/trunk/; revision=53172
2013-11-08 17:17:57 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Balint Reczey aa659985a5 Export libwiretap symbols using WS_DLL_PUBLIC define
TODO: hide flex-generated functions

svn path=/trunk/; revision=47948
2013-02-28 19:35:59 +00:00
Anders Broman 8a62ebc28d From Stephen Donnelly:
Add frame.interface_id support for pcap DLT_ERF file format

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7281

svn path=/trunk/; revision=42824
2012-05-24 09:24:05 +00:00
Stig Bjørlykke 141a830b9f From Andrew Kampjes via bug 6260:
Added support for saving ERF files.

From me:
Use crc routines from libwsutil.

svn path=/trunk/; revision=38826
2011-08-31 20:50:15 +00:00
Balint Reczey 311f9acfd5 Fix wiretap headers to allow error-free ABI dumping.
svn path=/trunk/; revision=37543
2011-06-04 21:20:57 +00:00
Anders Broman 441c3f63b2 From Stephen Donnelly:
InfiniBand Link Packet (flow control) dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4656

svn path=/trunk/; revision=32425
2010-04-08 08:41:56 +00:00
Anders Broman 637761d295 From Francesco Fusco:
Endace ERFII (extension header) support.

svn path=/trunk/; revision=26287
2008-09-29 16:20:24 +00:00
Gerald Combs 68d23708bc From Stephen Donnelly via bug 2235:
This plugin implements a dissector for Infiniband. It is released 
under the GPL v2.

Rather than using say libpcap to capture raw (unframed) IP packets 
from near the top of an IPoIB stack, this plugin dissects link level
Infiniband frames.

Infiniband trace files can be read from Endace ERF format trace 
files, or from libpcap DLT_ERF files containing ERF TYPE_INFINIBAND 
records. There is currently no native DLT_INFINIBAND in libpcap.

Each record contains a hardware timestamp, capture metadata such as 
port Id, and a complete link level Infiniband frame starting from
the Local Route Header.

svn path=/trunk/; revision=24628
2008-03-14 17:47:53 +00:00
Anders Broman b9f9b33e0e From Florent DROUIN:
This is a replacement of the existing decoding of ERF files (Extensible Record
Format from Endace). 
For the decoding of the ERF files, according to the "type of record" given in
the ERF header, several decoders can be used. Up to now, the decoder is
determined according to an environment variable, or with a kind of heuristic.
And, all the treatment is done during the file extraction.

The new architecture, will separate the ERF file decoding, and the ERF record
decoding. The ERF records will be decoded with a specific dissector. This
dissector can be configured with options, to replace the environment variable.

http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1839

svn path=/trunk/; revision=23092
2007-10-08 11:41:21 +00:00
Guy Harris 230c951306 From Stephen Donnelly of Endace:
The code for reading ERF files has not been significantly
	updated since 2004.  This patch brings it up to date with a
	number of changes.

	1) Increase number of decodable ERF types from 7 to 12. This
	   covers newer DAG card models and firmware updates.

	2) Fix timestamp conversion. Was calculating only microsecond
	   precision, now displaying with nanosecond resolution.  Hardware
	   precision is 7.5 to 30 ns depending on model.

	3) Allow the user to specify HDLC encapsulation as 'chdlc',
	   'ppp_serial', 'frelay' or 'mtp2'.  This is needed because the
	   ERF HDLC capture formats do not include information on what
	   protocol is used at the next level.  This is currently done via
	   an environment variable 'ERF_HDLC_ENCAP' and is analagous to the
	   existing 'ERF_ATM_ENCAP' variable.

	   If the user does not specify an HDLC encapsulation it tries to
	   guess, and falls back to MTP2 for backwards compatibility with
	   Florent's existing behaviour.

	   I know environment variables are ugly, suggestions are welcome.

	4) When reading HDLC captures as MTP2, use
	   WTAP_ENCAP_MTP2_WITH_PHDR rather than WTAP_ENCAP_MTP2.  This
	   allows us to put the 'Multi-Channel ERF' record 'channel
	   number' field into the MTP2 pseudo header > 'link_number'
	   field.  This is then displayed in Frame information, and can
	   be filtered on.  (Would be nice if it could be made a display
	   column?)

	Because the ERF record does not specify whether Annex A is used
	or not, we pass MTP2_ANNEX_A_USED_UNKNOWN and allow the existing
	user preference to decide.

Move the MTP2_ANNEX_A_ definitions into Wiretap, make the annex_a_used
field a guint8, and change MTP2_ANNEX_A_USED_UNKNOWN to 2 so it fits in
a guint8.  (This means that if you can save an ERF MTP2 file as a
libpcap file, the pseudo-header will have MTP2_ANNEX_A_USED_UNKNOWN in
it.)

svn path=/trunk/; revision=22067
2007-06-08 17:06:13 +00:00
Jeff Morriss 28767302a5 From Florent Drouin: support for MTP2 in ERF type 5 (Multi-Channel HDLC) files
svn path=/trunk/; revision=20838
2007-02-18 11:32:54 +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
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 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 4ecb7cb4f2 From Jesper Peterson: support for Endace ERF file format.
svn path=/trunk/; revision=8272
2003-08-26 07:10:39 +00:00