Wireshark-dev: Re: [Wireshark-dev] Where is the "Packet Range" dialog box created ?
From: "BARILLY YANN" <Yann.Barilly@xxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Jan 2010 09:40:07 +0100
> First, please create a new e-mail message addressed to
wireshark-dev@xxxxxxxxxxxxx
>  instead of replying to someone else's e-mail when you aren't talking
about the same 
> thing as them.  This causes problems with mail readers that do
threading such 
> as mine.  My e-mail client thinks that your message is related to
Stig's one titled 
> "Wireshark 1.2.5 is now available"  Thanks.

Sorry, I'll do it for the next times. I thought the object of the mail
was used for threads.

> Now on to your question.  These functions are scattered through a few
different files.
> Take a look at gtk/capture_file_dlg.c and gtk/ range_utils.c.  On
Windows, some of it 
> is probably in gtk/ file_dlg_win32.c.  What are you trying to
accomplish?

Wireshark is running on our plateforms for day long trafic tests. We
can't stop it because we will miss important packets. But we also need
to save some traces while running. It is a big problem for us.

In gtk/menu.c, "void set_menus_for_capture_file(capture_file *cf)"
function allows me to save when "capture_file *cf" is NULL so when
capture is stopped. I'd like to understand why do we have this limit.
It is quite logic that we can't save all packets while running but I
have notice no bug on saving range or marked packet.
I supposed that if we can create a "live capture saving" menu with
reduced possibilities (only displayed packets and only marked, first to
last marked and range of packets) it would be great use for us and I
suppose for many other people.

Now deeper into the code :

I've found in "gtk/file_dlg_win32.c" the
void win32_save_as_file (...) function

In witch "if (GetSaveFileName(OPENFILENAME ofn)) {}" opens the "save as"
window. 
If we properly save, we enter the if condition and if we cancel we
don't.

"GetSaveFileName(ofn)" do the job but I can't go deeper into that
function. I've noticed that when no packet is marked the sensitivity of
2 radio buttons is set to false. That is why I suppose it is possible to
feed with parameters the "packet range" part of the window.

This is where I am for the moment. Can I go further in this direction or
should I stop trying to modify it?

Regards

Yann