ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Adding support to Wireshark for CSV, TSV and SSV data types

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 19 Jun 2017 14:54:15 -0700
On Jun 19, 2017, at 3:06 AM, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:

>> Do you mean "deal with arbitrary CSV and TSV files" or "deal with IIS Web logs that are in CSV and TSV format"?
> 
> Yes - I mean arbitrary comma, tab and space separated.

I think Microsoft have an Excellent program that reads CSV files - and possibly TSV and SSV as well - and lets you do various forms of processing on them; it's available for Windows and macOS.  I think there's another program called LibreOffice Calc that's available for those platforms and for Linux, *BSD, and other OSes as well.

I.e., what does *Wireshark* provide here, for the *general* case of CSV/TSV/SSV files, that a spreadsheet program doesn't?

> Going back to the main objective, what I'm proposing is that we enable a PCAP-NG file to contain any text-based data together with a schema - JSON or XML or PCAP-NG proprietary.  There would be one WTAP_ENCAP_xxx type for any text-based data type. Decoding would be based on the schema data.

pcapng, unlike pcap, can have blocks in it that *don't* correspond to packets.  What's needed here are new pcapng block types:

	a "text source description block" (TSDB), which contains a schema and options (such as comments);

	a "text record block" (TRB), which contains:

		a "text source ID", which indicates which TSDB corresponds to the source of the record (the first TSDB has an ID of 0, the next one an ID of 1, etc., along the lines of Interface Description Blocks);

		the text;

		options (such as comments).

This would *not* require a DLT_/LINKTYPE_ or a WTAP_ENCAP_ value.  It would also allow packets and text records to be combined into one file.