Ethereal-dev: Re: [Ethereal-dev] Saving all packets between the first and the last marked pack

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Dick Gooris <gooris@xxxxxxxxxx>
Date: Sun, 28 Dec 2003 16:10:35 -0800
Ulf,

Thanks again for this. I have seen the loop in the print_dlg.c and i am using the same now in the file_dlg.c, indeed *very* fast. I honestly did not expect that. I added the marker stuff in there to calculate the range between the lowest and highest value.

I took the suggestions in the current code, but made a minor change in the 'Selected packet only' widget. I am writing : 'Selected packet #6 only' where 6 is the current selected packet - of course :-) Just tell me if this is nicer or should we stick to the moreless hardcoded '1 packet'.

I added again the screen shot of the current result, given that I marked 4 packets. I took the screen shot when having my mouse pointer in the entry of the range. Therefore, the balloon help is taken with the shot as well.

I checked all the functionality, and it seem to work ok. I already spotted some opportunities for optimalizations, but this can be done later.

Indeed, the last thing to do is to change the counter values in case the 'Apply display filter' is being set. Referring to the attached example, right now the value of 'All captured packets, 15 packets', remains the same when toggling the 'Apply display filter' check button. I have been looking into the GTK world of functions, and found gtk_widget_modify_text(), but this is not known to my gtk library. I also do not know if this can be used for radio buttons anyway. So when toggeling the check button a function would then update the associated couters.

If you have some suggestion to alter the text info, this would be great.

I am going to send you the code separately, then you can also see/use the parser.

Best regards,

   - Dick Gooris


Excerpt of what Ulf Lamping wrote :

If you need this for the calculation of the packet counts for the radio button labels, just have a look at the print dialog. This dialog is doing a loop over all the packets in the capture file, and counting the values to display.
Even if there are a lot of packets, this loop is very fast.

Just keep also in mind, that the checking / unchecking of the "Apply display filter" could change this counters/labels/sensitivity!

I could give you a helping hand, or have a look at your code when you want to check it in,

Regards, ULFL


GIF image