Wireshark-dev: Re: [Wireshark-dev] File->Export own format
From: Marcel Haas <inf462@xxxxxxxxxxx>
Date: Mon, 07 Nov 2011 10:13:08 +0100
On Fri, 4 Nov 2011 12:43:30 -0700, Guy Harris <guy@xxxxxxxxxxxx> wrote:
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.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe

hm okay i found those at gtk/menu.c
With a callback u mean something like that ?


static const GtkActionEntry main_menu_bar_entries[] = {
...
...
{ "/File/Open", GTK_STOCK_OPEN, "_Open...", "<control>O", "Open a file", G_CALLBACK(file_open_cmd_cb) },