Wireshark-dev: Re: [Wireshark-dev] File->Export own format
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 4 Nov 2011 12:43:30 -0700
On Nov 4, 2011, at 2:45 AM, Andreas wrote:

> Am 04.11.2011 09:31, schrieb Marcel Haas:
>> On Wed, 26 Oct 2011 11:00:27 +0200, Marcel Haas
>> <inf462@xxxxxxxxxxx> wrote:
>>> Hey Guys,
>>> With File->Export u can atm export "Plain text" "CSV" "C-Array" etc.
>>> I want to Export my own format.
>>> Someone have an idea how to built it in ??
>>> 
>> 
>> Nobody an idea how to export own format or where i can find the export
>> code ?
> 
> I would look at the wiretap directory and the dump_open_table_base in file_access.c where you add your file_type_info to dump_open_table_base.

That's for saving capture files in a full-blown capture file format, not for exporting either raw packet data without metadata or dissected packets.

To add a new File->Export format, add a new item to the Export menu in the ui_desc_menubar description and the main_menu_bar_entries array, with a callback; see how other callbacks for "Export" are done for examples.