Commit Graph

853 Commits

Author SHA1 Message Date
Guy Harris d7b2aad043 Move some headers for UI stuff, and the alert_box.c UI-specific file, to
the ui directory.  (Perhaps some other files that would be used by all
flavors of Wireshark, for any GUI toolkit or for someting such as
ncurses, and not for any command-line tool such as TShark, should be
moved there as well.)

Shuffle some #includes to put the "ui/XXX.h" includes together.

svn path=/trunk/; revision=40529
2012-01-16 01:07:52 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00
Bill Meier 439adbdbcc Remove obsolete comments referring to mem_chunks.
svn path=/trunk/; revision=40507
2012-01-14 20:14:43 +00:00
Guy Harris c7857a522b In all these cases, i is a guint32, so if c_match is <= i, c_match fits
in a guint32; cast it to one to squelch compiler warnings.

svn path=/trunk/; revision=40487
2012-01-13 22:27:59 +00:00
Bill Meier 85c1195fe3 Fix Bug #6276: "Find Packet" Bug:
'The search query e.g. (ASCII or hex) "abac" doesn't find the packet(s)
  containing the string "ababac".'

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6726

svn path=/trunk/; revision=40483
2012-01-13 21:09:33 +00:00
Chris Maynard 3362e174f6 From Jim Young via bug 5580: Only update the time elapsed between the previous displayed packet and this packet if the packet is actually displayed. Ref: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5580
svn path=/trunk/; revision=40304
2011-12-27 18:16:12 +00:00
Guy Harris d94bd07f99 Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports any
form of corruption/bogosity in a file, including in a file header as
well as in records in the file.  Change the error message
wtap_strerror() returns for it to reflect that.

Use it for some file header problems for which it wasn't already being
used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only
be used for files that we have no reason to believe are invalid but that
have a version number we don't know about or some other
non-link-layer-encapsulation-type value we don't know about.

svn path=/trunk/; revision=40175
2011-12-13 09:53:50 +00:00
Chris Maynard 36074c9828 Export all data sources of a frame to a C array. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4988
svn path=/trunk/; revision=40136
2011-12-09 19:44:28 +00:00
Guy Harris 272c011d19 On an I/O error, merge_read_packet() and merge_append_read_packet() need
to return a pointer to the merge_in_file_t that got the error.  Set *err
to 0 on success and an error code on an err, treat a null return as an
EOF indication, and if we don't get a null return check for a non-zero
error code and treat that as an I/O error.

svn path=/trunk/; revision=39964
2011-11-21 06:26:03 +00:00
Chris Maynard 1e6a19e48a Fix "'Closing File!' Dialog Hangs" bug 3046: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3046
svn path=/trunk/; revision=39959
2011-11-20 15:11:15 +00:00
Guy Harris 2929c93ea2 When reporting "sorry, *this* packet can't be written to a file of that
type" when writing out a capture file (i.e., writing a
per-packet-encapsulation capture to a file type that supports it but
doesn't support one of the packet's encapsulations), report the packet
number and, when doing this in a merge operation, report the file from
which it came.

When reporting "sorry, that file can't be written to a file of that
type, period", show the file type rather than the input file link-layer
type that causes the problem.  (We could show both.  We could be
*really* ambitious and iterate through all possible file types and show
the ones that will or at least might work....)

file_write_error_message() is documented as handling only UNIX-style
errnos, and libwireshark should be usable without libwiretap, so leave
it up to its callers to handle Wiretap errors such as
WTAP_ERR_SHORT_WRITE.

Clean up indentation.

svn path=/trunk/; revision=39949
2011-11-19 20:18:01 +00:00
Chris Maynard e86ebd872d From Michael Mann: Add cf_callback_invoke to cf_open to tidy up the currently open file before opening a new one. Fixes bugs 5987 and 6457.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5987
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6457


svn path=/trunk/; revision=39445
2011-10-17 14:56:37 +00:00
Bill Meier e6bd9d1a8c Whitespace cleanup:
Use consistent indentation;
 Convert "4 space tabs" to spaces;
 Remove trailing whitespace.

svn path=/trunk/; revision=39082
2011-09-21 18:55:03 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Gerald Combs 99d4de66e5 From Dirk Jagdmann via bug 5875:
My attachment adds a link to a XSLT file to the preamble of the PDML.
The XSLT will transform the PDML to a HTML page, and the HTML page
features a look similar to Wireshark. See
http://cubic.org/~doj/ebay/a.pdml for an example.

The patch also contains a small perl program which converts the
Wireshark colortable into javascript code which is used in the XSLT
file. If you want to use a different color scheme you would execute the
perl program and insert the generated javascript function into your XSLT
file.

To view the HTML you could either place the PDML and XSLT file on your
webserver and verify that your webserver sends the PDML file as
"text/xml".  Then your webbrowser will find the linked XSLT file,
download that as well and convert the PDML to HTML on the fly.

You could also use an XSLT processor like xsltproc to convert the PDML
and XSLT into a static HTML file.


From me:

Minor fixups.

svn path=/trunk/; revision=37298
2011-05-19 18:10:21 +00:00
Guy Harris 1372515b02 More eradication of old-style function definitions.
svn path=/trunk/; revision=37216
2011-05-17 22:18:32 +00:00
Jakub Zawadzki 63981c8b35 Packet editor: support for saving changed frames.
svn path=/trunk/; revision=37099
2011-05-12 19:47:49 +00:00
Jakub Zawadzki 73d94fa620 When closing capture file, set number of frames to 0. It fix bug #5903.
svn path=/trunk/; revision=37040
2011-05-10 15:13:46 +00:00
Guy Harris 88a1ed85e3 From Jakub Zawadzki: for file read progress bars, use the raw offset in
the file, rather than the offset in the uncompressed data stream.  That
way we don't get the "hey, we're more than 100% into the file, better
refigure this" surprise.

svn path=/trunk/; revision=37025
2011-05-09 05:30:59 +00:00
Guy Harris b42fab3a61 TShark doesn't need column text attached to each frame; move col_text
and col_text_len from the frame_data structure to the PacketRecord
structure.

svn path=/trunk/; revision=36967
2011-05-03 01:19:55 +00:00
Jakub Zawadzki 192837a1f2 Restore updating packet bar while loading file (removed in r36851)
svn path=/trunk/; revision=36896
2011-04-27 09:20:02 +00:00
Guy Harris 59ef61f6da Don't free the frame_data_sequence unless we have one.
svn path=/trunk/; revision=36882
2011-04-27 03:13:03 +00:00
Guy Harris c9b9dd690b Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number.  Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.

Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).

Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.

svn path=/trunk/; revision=36881
2011-04-27 02:54:44 +00:00
Guy Harris 280fcc497f Get rid of some code that's no longer relevant with the new tree
structure for frame_data items.

svn path=/trunk/; revision=36862
2011-04-26 02:51:10 +00:00
Anders Broman 96ebc30068 from Jakub Zawadzki:
Don't thaw the packet list during file loading to speed up file loading.

svn path=/trunk/; revision=36851
2011-04-25 19:36:13 +00:00
Guy Harris 71b31d92fc Store the frame_data structures in a tree, rather than a linked list.
This lets us get rid of the per-frame_data-structure prev and next
pointers, saving memory (at least according to Activity Monitor's report
of the virtual address space size on my Snow Leopard machine, it's a
noticeable saving), and lets us look up frame_data structures by frame
number in O(log2(number of frames)) time rather than O(number of frames)
time.  It seems to take more CPU time when reading in the file, but
seems to go from "finished reading in all the packets" to "displaying
the packets" faster and seems to free up the frame_data structures
faster when closing the file.

It *is* doing more copying, currently, as we now don't allocate the
frame_data structure until after the packet has passed the read filter,
so that might account for the additional CPU time.

(Oh, and, for what it's worth, on an LP64 platform, a frame_data
structure is exactly 128 bytes long.  However, there's more stuff to
remove, so the power-of-2 size is not guaranteed to remain, and it's not
a power-of-2 size on an ILP32 platform.)

It also means we don't need GLib 2.10 or later for the two-pass mode in
TShark.

It also means some code in the TCP dissector that was checking
pinfo->fd->next to see if it's NULL, in order to see if this is the last
packet in the file, no longer works, but that wasn't guaranteed to work
anyway:

	we might be doing a one-pass read through the capture in TShark;

	we might be dissecting the frame while we're reading in the
	packets for the first time in Wireshark;

	we might be doing a live capture in Wireshark;

in which case packets might be prematurely considered "the last packet".
#if 0 the no-longer-working tests, pending figuring out a better way of
doing it.

svn path=/trunk/; revision=36849
2011-04-25 19:01:05 +00:00
Guy Harris 678be392f1 Make the packet count an unsigned value, as frame numbers are unsigned.
Make the loops that scan through all the packets do so by frame number,
to abstract away the "next" and "previous" pointers in the frame_data
structure.  Add a routine to cfile.c to map frame numbers to frame_data
structures, and put in some special case handling so scanning forward or
backward through the packets is O(N) rather than O(N^2).

svn path=/trunk/; revision=36846
2011-04-25 05:33:07 +00:00
Guy Harris a39c3fab30 new_packet_list_find_row_from_data() is always used to select a packet,
so get rid of the select_flag argument, and rename it
new_packet_list_select_row_from_data().

It's also always passed a frame_data *, so make its argument a
frame_data *.

Its return value is used only to detect whether the packet was found in
the display or not, so make it a gboolean.  Check it in *all* cases
where it's called, and change the dialog message a bit (the most likely
cause is that the user cancelled a redissection of the packets, so not
all packets in the capture file are in the display.

Also, in the find case, pass it the new packet we found.

svn path=/trunk/; revision=36839
2011-04-24 21:02:55 +00:00
Guy Harris 6cbf6ce16c Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discovered
by the gunzipping code.  Have it also supply a err_info string, and
report it.  Have file_error() supply an err_info string.

Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to
suggest a decompression error - into the rawshark and tshark errors,
along the lines of what other programs print.

Fix a case in the Netscaler code where we weren't fetching the error
code on a read failure.

svn path=/trunk/; revision=36748
2011-04-21 09:41:52 +00:00
Guy Harris 92c974f2f7 Now that wtap_read() checks for delayed errors on EOF, there's no need
to check for it on close.

svn path=/trunk/; revision=36593
2011-04-12 17:37:05 +00:00
Guy Harris e5fe0128d7 Allow wtap_sequential_close() and wtap_close() to return an error; this
may happen if, when reading a compressed file, we find an error in the
file's contents past the last packet (e.g., the file being cut short so
that we can't get a full buffer worth of compressed data), and that
reporting of that error is delayed (so that you can get all of the
packets that we *can* decompress).  Check for those errors, at least on
the sequential read pass (the only errors we should see when closing the
random stream are errors we've already seen in the sequential stream).

svn path=/trunk/; revision=36576
2011-04-12 01:36:12 +00:00
Gerald Combs fcf51fc73b Add initial pcapng name resolution record support. Wireshark has read
support; TShark has read+write support. Additionally TShark can read a
"hosts" file and write those records to a capture file.

This uses "struct addrinfo" in many places and probably won't compile on
some platforms.

svn path=/trunk/; revision=36318
2011-03-24 22:47:57 +00:00
Gerald Combs 6e7d652034 Clarify a comment.
svn path=/trunk/; revision=36270
2011-03-22 21:07:00 +00:00
Stig Bjørlykke ed3d478fb9 Allocate correct size of fdata col_text and col_text_len.
Coverity 711 & 716.

svn path=/trunk/; revision=36266
2011-03-22 19:24:08 +00:00
Guy Harris 8ca97915c3 We have to initialize the elements of the fdata->col_text array to null
pointers, as there's code that assumes that if they're not set to null
pointers, they're set correctly, and doesn't bother setting them to the
right value.

svn path=/trunk/; revision=36252
2011-03-22 16:33:39 +00:00
Guy Harris 23e5eb42ba When we allocate the col_text array, initialize it to a bunch of
pointers to null strings, rather than a bunch of null pointers, so that
if an exception is thrown before we set any of the columns, or some
other problem occurs, we don't end up with null pointers that could
later cause a crash.

Fix indentation.

svn path=/trunk/; revision=36234
2011-03-22 03:56:39 +00:00
Sake Blok 307c0d70fb Removal of the old packet-list in favor of the new packet list.
It compiles with "./configure without options" on my Mac. Let's see what the buildbots have to say about it :-)


svn path=/trunk/; revision=36161
2011-03-08 01:52:25 +00:00
Gerald Combs a6bbdaa849 Fix some dead code and zero division issues found by Clang scan-build.
In convert_string_case() use g_utf8_strup() instead of converting each
character by hand. Hopefully this won't cause any unexpected changes in
behavior.

svn path=/trunk/; revision=36006
2011-02-18 22:43:48 +00:00
Guy Harris 45ba0a19c4 Clean up indentation.
svn path=/trunk/; revision=35813
2011-02-04 10:23:22 +00:00
Anders Broman b7527dd063 From Cal Turney:
Bug 5621 - With String in Packet details searches, highlight row in tree 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5621

svn path=/trunk/; revision=35718
2011-01-31 12:19:15 +00:00
Stephen Fisher 347d0a77bf From Cal Turney via enhancement bug #5587: In hex or string searches of the
packet data highlight the target rather than the entire field.


svn path=/trunk/; revision=35584
2011-01-19 18:21:21 +00:00
Guy Harris a4cc25f84d Move main_statusbar.h to the top-level directory; none of its routines
use GTK+ data types, so, at least in theory, it could be implemented
atop another toolkit.

Make statusbar_push_temporary_msg() take a format string and format
arguments.  Use it instead of simple_status(), and change one call to
just take a format string and arguments rather than to take the result
of using that format string and arguments with g_strdup_printf() and
passing the result to statusbar_push_temporary_msg().

svn path=/trunk/; revision=35041
2010-11-27 21:50:49 +00:00
Bill Meier dbd143d68a (Trivial) Fix a typo in a comment.
svn path=/trunk/; revision=34626
2010-10-23 15:45:12 +00:00
Jeff Morriss 83caffd358 Fix the win64 build
svn path=/trunk/; revision=34564
2010-10-18 21:36:41 +00:00
Jeff Morriss 94e072c92f Fix progress bar when loading compressed files.
Continue to use the data offset ((uncompressed) bytes read) as our progress
indicator, at least until we get a progress value greater than 1.0.  Then,
in addition to checking if the size of the file changed, check our position in
the file and use that as our progress indicator.

This optimizes uncompressed file accesses (avoiding an lseek()) at the "expense"
of switching progress measures (from data read to position in the file) while
loading a file.  Tests have shown that the progress bar never shows the data
offset number when loading a compressed file, so this should be okay.

svn path=/trunk/; revision=34563
2010-10-18 20:52:54 +00:00
Bill Meier ee7d36f1df (Trivial) Fix a typo
svn path=/trunk/; revision=33951
2010-08-27 15:01:28 +00:00
Anders Broman 46cd4a8507 From Cal Turney:
1. Restore the functionality of <Ctrl>A and <Ctrl>X to the filter textbox.  
2. Assign intuitive shortcuts without consuming any new shortcut letters.  
3. Add 'Un-Time Reference All Packets' to the menu.
4. Disallow the marking or ignoring of all packets in the capture.  
5. Make the Mark/Ignore/Time Reference-related menu items context sensitive. 
6. Add 'ref_time_count' to the capture_file structure
7. Utilize marked/ignored/ref_time_count vars to prevent needless looping thru
   the entire packet list by exiting the loop when it becomes zero.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5115

svn path=/trunk/; revision=33817
2010-08-16 18:17:45 +00:00
Bill Meier 4871fd2412 Fix compilation error when compiling for "old packet list".
svn path=/trunk/; revision=33802
2010-08-15 15:17:48 +00:00
Guy Harris 2a328da4ef Instead of using a Boolean for the search direction, use an enum, so
that you can tell from examination whether the search is forward or
backward.

Make the cf_find_packet routines take the direction as an explicit
argument, rather than, in the cases where you don't want to permanently
set the direction, saving the direction in the capture_file structure,
changing it, doing the search, and restoring the saved direction.  Give
more information in the Doxygen comments for those routines.

Add a cf_find_packet_dfilter_string() routine, which takes a filter
string rather than a compiled filter as an argument.  Replace
find_previous_next_frame_with_filter() with it.

Have cf_read_frame_r() and cf_read_frame() pop up the error dialog if
the read fails, rather than leaving that up to its caller.  That lets us
eliminate cf_read_error_message(), by swallowing its code into
cf_read_frame_r().  Add Doxygen comments for cf_read_frame_r() and
cf_read_frame().

Don't have find_packet() read the packet before calling the callback
routine; leave that up to the callback routine.

Add cf_find_packet_marked(), to find the next or previous marked packet,
and cf_find_packet_time_reference(), to find the next or previous time
reference packet.  Those routines do *not* need to read the packet data
to see if it matches; that lets them run much faster.

Clean up indentation.

svn path=/trunk/; revision=33791
2010-08-13 07:39:46 +00:00
Gerald Combs cfa9982492 Make sure we call wtap_cleareof() before each read.
svn path=/trunk/; revision=33555
2010-07-16 18:20:32 +00:00
Anders Broman 5356785ede Reverting
http://anonsvn.wireshark.org/viewvc?view=rev&revision=29861
seems to fix the scrolling in live captures issue.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4891

svn path=/trunk/; revision=33384
2010-06-30 19:38:26 +00:00
Stig Bjørlykke b444bd6eb2 Increase the displayed_count before we add the packet to the packet list,
because we update the the packets bar when adding the packet.

This fixes bug 4896.

svn path=/trunk/; revision=33331
2010-06-26 21:03:01 +00:00
Gerald Combs 69d7392467 Add cf_fake_continue_tail() which is called when real-time capture
updates are off and which sets the capture file state to a value that
won't cause an assertion when the user stops capturing. Fixes bug 4035.

svn path=/trunk/; revision=33005
2010-05-27 23:55:04 +00:00
Gerald Combs e2c8894947 Another attempt at bug 4669: Properly set the previous-displayed-packet
timestamp when we're recalculating reference times.

Remove an unused variable. Add whitespace & comment fixups.

svn path=/trunk/; revision=32985
2010-05-26 23:29:56 +00:00
Anders Broman 65ee4e797a From Jakub Zawadzki:
New functions: cf_read_frame_r, cf_read_frame

It's much easier to write:
 cf_read_frame (cf, fdata, &err, &err_info)
Than:
 wtap_seek_read (cf->wth, fdata->file_off, &cf->pseudo_header, cf->pd,
fdata->cap_len, &err, &err_info)

svn path=/trunk/; revision=32980
2010-05-26 19:11:23 +00:00
Gerald Combs 0a209d762e Zlib has an officially-sanctioned way of clearing EOF when we're tailing
a file.  Use it.

svn path=/trunk/; revision=32716
2010-05-07 21:15:24 +00:00
Bill Meier a509e11b85 Use consistent indentation;
Altho no tabs use tab-width=8 anyway.

svn path=/trunk/; revision=32590
2010-04-28 16:37:25 +00:00
Gerald Combs cc5d7670bd Keep a copy of the interface description and capture filter around so that
we can use it in the main window title during and after capture. Add a
"-X" option for providing a description for stdin.

svn path=/trunk/; revision=32357
2010-04-01 21:55:01 +00:00
Guy Harris 04eef8ab97 Squelch a compiler warning.
svn path=/trunk/; revision=32310
2010-03-27 18:17:19 +00:00
Anders Broman 9a97618f1c Measure the filtering time.
svn path=/trunk/; revision=32192
2010-03-15 06:28:01 +00:00
Stig Bjørlykke bae37cf3ac Uh, no need to check for having custom columns to call
col_custom_prime_edt().

svn path=/trunk/; revision=31991
2010-02-24 20:34:38 +00:00
Stig Bjørlykke 258c8363ec Fix for bug 4323 & 4511:
Call col_custom_prime_edt() when having custom columns on print and
export to csv and psml.

svn path=/trunk/; revision=31990
2010-02-24 20:24:05 +00:00
Gerald Combs d122243892 Another Laura bug: Don't reset the file load time in the status bar when
we apply a display filter. Display the load time as "Load time:
M:SS.SSS" instead of "Time: HH:MM:SS.SSS".

svn path=/trunk/; revision=31909
2010-02-17 23:03:41 +00:00
Anders Broman bc80677038 Don't freeze/thaw the list when stoping a live capture.
svn path=/trunk/; revision=31754
2010-02-01 14:55:47 +00:00
Anders Broman eca27931e0 Don't freeze/thaw the list when doing live captures.
svn path=/trunk/; revision=31748
2010-02-01 06:30:47 +00:00
Anders Broman eef24f0765 From Jim Young:
Wireshark GUI not reporting filename after save of new capture file.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4406

svn path=/trunk/; revision=31587
2010-01-20 06:44:03 +00:00
Stig Bjørlykke 47be3577a7 Introduce "Ignore Packet" in the packet list.
This will remove the package from the dissection functions without
removing it from the capture file.

svn path=/trunk/; revision=31287
2009-12-17 01:18:14 +00:00
Jaap Keuter 81b585cf8e From Valerio Messina:
As now, when Wireshark save capture files, it show "Loading" in status bar and
in the dialog box, warning many users of lost them packets. Saving work as expected.
Is simply a GUI use interaction problem.

svn path=/trunk/; revision=31269
2009-12-14 22:05:29 +00:00
Anders Broman cafad87fd9 From Stig:
Invalidate cfile.current_row instead(revert 30910).

svn path=/trunk/; revision=30925
2009-11-10 20:16:14 +00:00
Gerald Combs 5e34f21076 Add the ability to push temporary (and highlighted) messages onto the
statusbar. This lets us notify the user about something significant
without having to pop up an annoying window. Replace a few dialogs with
statusbar messages.

svn path=/trunk/; revision=30810
2009-11-04 00:02:52 +00:00
Stig Bjørlykke 1fc92dee03 Fixed 'Delta timestamp to previous captured frame' calculation in
old packet list.  This bug was introduced in r30052.

svn path=/trunk/; revision=30758
2009-10-29 13:27:05 +00:00
Stig Bjørlykke 2f199b9d96 Made some functions static.
svn path=/trunk/; revision=30616
2009-10-19 14:21:11 +00:00
Stig Bjørlykke e162470d6b Prime interesting fields when selecting a package, so Lua's ProtoField
can extract the field value correctly.

This fixes bug 4058.

svn path=/trunk/; revision=30252
2009-10-02 19:55:43 +00:00
Anders Broman ffcaf32074 Select the first packet when doing a live capture. In the old packet list this is automatically done as the clist emits a selct-row signal.
Seting focus in new_packet_list_moveto_end() seems also to be needed to make it work properly I'm not 100% sure if it should be done differently.

svn path=/trunk/; revision=30074
2009-09-22 18:51:33 +00:00
Kovarththanan Rajaratnam 07cb929d6b dfilter_free() can handle a NULL pointer so don't guard against that before calling it
svn path=/trunk/; revision=30072
2009-09-22 16:49:26 +00:00
Kovarththanan Rajaratnam 9398b679e8 Introduce cap_file_add_fdata() and start using it
svn path=/trunk/; revision=30071
2009-09-22 16:39:48 +00:00
Kovarththanan Rajaratnam 627a7c1f47 Switch Wireshark GUI (file.c) over to using frame_data.c
svn path=/trunk/; revision=30067
2009-09-22 14:41:30 +00:00
Kovarththanan Rajaratnam 054ef7aa0f Make sure that the old packet list works with the changes introduced in r30047
svn path=/trunk/; revision=30060
2009-09-22 05:23:45 +00:00
Kovarththanan Rajaratnam 1989aa700d Bring frame_data_init() and add_packet_to_packet_list() more in sync by adding 'ref_time' handling to frame_data_init(). For tshark/rawshark this is unused because they only do a single pass through the capture file
svn path=/trunk/; revision=30055
2009-09-21 20:17:59 +00:00
Kovarththanan Rajaratnam aa4af67e1b Only set cumulative bytes after passing the display filter test
svn path=/trunk/; revision=30053
2009-09-21 19:48:53 +00:00
Kovarththanan Rajaratnam c3647b4e3b Move 'Delta timestamp to previous captured frame' calculation inside add_packet_to_packet_list(). This is done in order to streamline add_packet_to_packet_list() with frame_data_init(). Hopefully we can switch to frame_data_init() soon
svn path=/trunk/; revision=30052
2009-09-21 19:30:06 +00:00
Kovarththanan Rajaratnam 7ca137e294 Rename capture_file.plist to capture_file.plist_start to make it consistent with capture_file.plist_end
svn path=/trunk/; revision=30047
2009-09-21 18:09:19 +00:00
Kovarththanan Rajaratnam 109875c775 Remove second (redundant) assignment to fdata->cum_bytes
svn path=/trunk/; revision=30046
2009-09-21 17:38:10 +00:00
Kovarththanan Rajaratnam 9831d4c4e1 Reverse order of NEW_PACKET_LIST guard, i.e. #ifdef NEW_PACKET_LIST instead of #ifndef NEW_PACKET_LIST
svn path=/trunk/; revision=30045
2009-09-21 17:32:35 +00:00
Stephen Fisher d923139789 Fix typo in comment
svn path=/trunk/; revision=30043
2009-09-21 17:09:15 +00:00
Kovarththanan Rajaratnam 3c9afabfe0 (cosmetic change) - reset cumulative bytes together with 'first_ts' and 'prev_dis_ts'
svn path=/trunk/; revision=30042
2009-09-21 15:50:15 +00:00
Kovarththanan Rajaratnam 8527133db0 cf->dfilter is only set if it's valid so assert if that's not the case
svn path=/trunk/; revision=30041
2009-09-21 15:38:40 +00:00
Kovarththanan Rajaratnam 112a677484 Reset cumulative bytes when we open the file
svn path=/trunk/; revision=30040
2009-09-21 15:29:32 +00:00
Kovarththanan Rajaratnam 8dc906da00 Set fdata->num up front and roll back if necessary
svn path=/trunk/; revision=30039
2009-09-21 15:23:33 +00:00
Kovarththanan Rajaratnam 03a9cfe84c Shuffle NEW_PACKET_LIST guard
svn path=/trunk/; revision=30038
2009-09-21 14:13:46 +00:00
Kovarththanan Rajaratnam d86635a3d8 Introduce a NEW_PACKET_LIST specialized version of add_packet_to_packet_list(). The old one contained too many #ifdef NEW_PACKET_LIST which reduced readability
svn path=/trunk/; revision=30036
2009-09-21 12:14:11 +00:00
Anders Broman 546014cdaf cf_change_time_formats() is not needed with new packet list.
svn path=/trunk/; revision=30034
2009-09-21 11:58:36 +00:00
Kovarththanan Rajaratnam 3b7a12dda0 Add NEW_PACKET_LIST guard wrt fdata->col_text
svn path=/trunk/; revision=30030
2009-09-21 04:29:25 +00:00
Kovarththanan Rajaratnam 2e282e7567 Introduce frame_data_cleanup() and start using it
svn path=/trunk/; revision=30023
2009-09-20 18:18:29 +00:00
Kovarththanan Rajaratnam ad7f82f9ce From Jakub Zawadzki:
Fix copy/paste error wrt. fdata->col_text_len

svn path=/trunk/; revision=29921
2009-09-15 14:01:40 +00:00
Anders Broman b0c3abfa79 Fix:
cleanup_dissection() calls se_free_all(); And after that fdata->col_text (which is allocated using se_alloc0()) no longer points to valid memory.

svn path=/trunk/; revision=29920
2009-09-15 13:18:13 +00:00
Stephen Fisher 5dfeb86fb7 Fix warning that variable may be unused and then declare volatile so it
survives the TRY/CATCH code.


svn path=/trunk/; revision=29863
2009-09-11 15:38:33 +00:00
Anders Broman 6edeb87ad7 Only move to last row if it's vissible.
svn path=/trunk/; revision=29861
2009-09-11 14:58:49 +00:00
Anders Broman 0772dd06b4 New_packet_list
Select the correct frame in packet details when filtering.

svn path=/trunk/; revision=29857
2009-09-11 11:58:00 +00:00
Anders Broman a65f72e8f0 Allocate col_text and col_text_len when the fdata struct is allocated.
(complete the checkin).

svn path=/trunk/; revision=29818
2009-09-09 08:51:33 +00:00
Kovarththanan Rajaratnam de23d92163 Add an option to col_fill_in() to allow us to disable column expression processing. This is rarely needed. It's only needed when the user right clicks on the packet list view to generate a display filter.
svn path=/trunk/; revision=29806
2009-09-08 19:00:54 +00:00
Kovarththanan Rajaratnam c6f96e4ec9 Make sure that reset the elapsed time to load a file before we reload/rescan the file
svn path=/trunk/; revision=29783
2009-09-07 21:07:51 +00:00
Kovarththanan Rajaratnam 8d909ba79e Rename new_packet_list_set_time_width() -> new_packet_list_resize_column() because it contains no time format specific code. Further this change also ensures that new_packet_list_resize_columns() uses the newly introduced new_packet_list_resize_column()
svn path=/trunk/; revision=29782
2009-09-07 20:45:32 +00:00
Kovarththanan Rajaratnam a65d590002 Store the packet encapsulation type as gint8. Saves 3 bytes per packet
svn path=/trunk/; revision=29767
2009-09-07 13:54:46 +00:00
Stig Bjørlykke e55129063b Fixed arguments to new_packet_list_set_time_width().
svn path=/trunk/; revision=29761
2009-09-07 12:01:19 +00:00
Anders Broman 5cc8d3e71d col_fmt not needed.
svn path=/trunk/; revision=29760
2009-09-07 11:50:08 +00:00
Kovarththanan Rajaratnam cd8831c72d Track length of columns strings. We'll need this in order to resize columns quickly
svn path=/trunk/; revision=29759
2009-09-07 11:33:38 +00:00
Anders Broman 7473e1e04c Automatically adjust the time column width when time format changes.
svn path=/trunk/; revision=29758
2009-09-07 10:03:55 +00:00
Kovarththanan Rajaratnam 0e5cef61be Split a bunch of init routines into init() and cleanup(). This allows us to free memory properly on shutdown.
This is an initial step. There's still some work to do.

svn path=/trunk/; revision=29754
2009-09-06 18:25:23 +00:00
Kovarththanan Rajaratnam 95ddec4d07 Get rid off GtkTreeModelFilter because the time to sort becomes unbearable when combined with GtkTreeSortable. This means that we now track which frames are visible in the our own packet list store. To do so, we now distinguish between physical and visible rows. All frames are added as physical rows. Only those that passes the display filter are marked as visible.
svn path=/trunk/; revision=29705
2009-09-05 10:36:29 +00:00
Kovarththanan Rajaratnam 6be0e11906 Remove superfluous assignment
svn path=/trunk/; revision=29686
2009-09-03 14:41:09 +00:00
Kovarththanan Rajaratnam bd69669e1d Make sure that we stop auto scroll if we start scrolling manually.
Caveat: we jump to first frame when auto scroll is stopped

svn path=/trunk/; revision=29685
2009-09-03 14:32:11 +00:00
Kovarththanan Rajaratnam 47b766a998 Only try and select the last row if not already selected. This fix doesn't seem to work. Any suggestions?
svn path=/trunk/; revision=29677
2009-09-02 19:31:56 +00:00
Kovarththanan Rajaratnam bc36849a9e Add seperate new_packet_list_moveto_end() which scrolls to the end _without_ selecting the last packet.
svn path=/trunk/; revision=29670
2009-09-02 17:29:52 +00:00
Kovarththanan Rajaratnam 6149d4be35 Make sure that we select the last row if autoscroll is enabled. The scrolling is still very jumpy. It seems that we always select the first packet before moving to the end.
svn path=/trunk/; revision=29668
2009-09-02 17:15:20 +00:00
Martin Mathieson e256fed975 Add volatile to avoid clobbered by longjmp warning.
svn path=/trunk/; revision=29651
2009-09-01 11:15:24 +00:00
Anders Broman 2d001ec762 - Read a min number if packets before checking if the progress bar should be updated.
- Calculate the progess before checking if progress bar should be
created or not.
- Dont update the progress to often on small files.
- Use data_offset rather than reading file_pos.

svn path=/trunk/; revision=29648
2009-09-01 08:51:41 +00:00
Anders Broman 2cd2eecd0a Compute the loading time and show it in the main status bar.
(Modified code from Didier Gautheron).

svn path=/trunk/; revision=29592
2009-08-28 05:19:52 +00:00
Kovarththanan Rajaratnam 27f7d88c84 Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
svn path=/trunk/; revision=29490
2009-08-21 11:03:30 +00:00
Anders Broman 1108352f00 Use col_text in frame data.
- colum-utils needs more work, based on
 Didier Gautherons optimizations patch http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=29489
2009-08-21 10:12:47 +00:00
Kovarththanan Rajaratnam 82adb33a48 We shouldn't conditionalise on _filtering_ tap listerners to determine whether tapping should be performed or not. We also need to handle _normal_ tap listerners. This change backs out the regression introduced in r29435.
Thanks to Didier: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3916

svn path=/trunk/; revision=29475
2009-08-19 13:52:15 +00:00
Kovarththanan Rajaratnam d4ba2208ec Inline a few checks in the add_packet_to_packet_list() function since it's called in tight loop. This will help us to avoid calling functions that simply returns. This is especially the case when we're dealing with the new packet list due to its dissect-on-demand nature where colour/column construction is delayed until the row becomes visible.
svn path=/trunk/; revision=29435
2009-08-15 14:13:36 +00:00
Kovarththanan Rajaratnam 81c7e34905 Make display filtering work for NEW_PACKET_LIST. This didn't work previously because we would simply append the new filtered packets onto the existing ones.
svn path=/trunk/; revision=29409
2009-08-14 05:49:57 +00:00
Kovarththanan Rajaratnam 68e75a961b Always add packet to the new packet list regardless of whether the packet passed the display filter test or not. We do this because we do the filtering inside the new packet list.
svn path=/trunk/; revision=29408
2009-08-14 05:22:12 +00:00
Kovarththanan Rajaratnam 80a6d3fbcf Introduce epan_dissect_init()/epan_dissect_cleanup(). These are used to initialise/cleanup stack allocated 'edt' structures. This should speed up dissection since we avoid some malloc traffic.
svn path=/trunk/; revision=29404
2009-08-13 19:42:46 +00:00
Anders Broman ca335d25cb From Kovarththanan Rajaratnam:
- Compute and cache color/custom filters dynamically.
- Delay column construction.

svn path=/trunk/; revision=29370
2009-08-10 20:52:56 +00:00
Kovarththanan Rajaratnam 3512e485ca Add PNODE_FINFO. We've been using PITEM_FINFO on proto_node's. This works because proto_item is typedefed to proto_node. We shouldn't rely on this since this is an implementation detail.
svn path=/trunk/; revision=29354
2009-08-09 17:33:23 +00:00
Kovarththanan Rajaratnam d2b61c0297 Free frame data slice on file reset
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3813

svn path=/trunk/; revision=29322
2009-08-07 12:15:46 +00:00
Anders Broman 3ec8398f16 From Kovarththanan Rajaratnam:
This patch fixes the "Decode as" crash. We now freeze the packetlist before
attempting to clear it. This way we don't have to issue a row deleted signal
either.

svn path=/trunk/; revision=29238
2009-07-29 21:32:49 +00:00
Anders Broman 26d1dfcf4c Add pinfo to new_packet_list_append() this should give us the abillity
to store (most) of the underlying data rather than the strings in the store and render it when we need it, thuss saving storage space and loading time.

Idealy we should not store the complete fdata or pinfo structures
but rather just the data relevant to the currently selected/used columns. I'm not entierly sure how to accomplish that however.

Dynamically allocated array to hold pointers to the actual data?

svn path=/trunk/; revision=29237
2009-07-29 20:58:47 +00:00
Anders Broman d4caa4ec50 Pacify the build bot.
svn path=/trunk/; revision=29222
2009-07-28 18:29:15 +00:00
Anders Broman 09c6b577f9 Set reftime without recreating the packet list.
svn path=/trunk/; revision=29220
2009-07-28 16:20:05 +00:00
Anders Broman cb771536df From Kovarththanan Rajaratnam:
Only fill in frame_data vals when needed.

svn path=/trunk/; revision=29203
2009-07-27 08:33:26 +00:00
Anders Broman 5fbc5d6f58 From Kovarththanan Rajaratnam:
Only clear packet list store if we need to redissect.

svn path=/trunk/; revision=29195
2009-07-26 10:34:07 +00:00
Stephen Fisher 53ded7dae6 Remove two unused variables and mark a function paramter as unused
svn path=/trunk/; revision=29193
2009-07-25 20:13:46 +00:00
Anders Broman be084ae799 From Kovarththanan Rajaratnam:
New packet list: enable goto first/last packet (Optimized)

svn path=/trunk/; revision=29190
2009-07-25 07:50:53 +00:00
Anders Broman 2e29868357 Use g_slice if glib >=2.10
svn path=/trunk/; revision=29187
2009-07-24 13:50:57 +00:00
Anders Broman 9bf46cd286 When using the new packet list select the first packet when the file read is complete. This should take care of the crash when closing WS.
svn path=/trunk/; revision=29186
2009-07-24 08:10:33 +00:00
Anders Broman 213a926bd9 From kovarththanan Rajaratnam:
Pass column_info as a pointer (new packet list).

svn path=/trunk/; revision=29169
2009-07-22 17:35:28 +00:00
Anders Broman 203fb3f25f Minor indentation fixes.
svn path=/trunk/; revision=29163
2009-07-22 06:00:53 +00:00
Stig Bjørlykke 8c4abdfb47 From didier gautheron via bug 3762:
This patch removes col_expr in frame_data structure,
it can be recomputed when needed.

svn path=/trunk/; revision=29159
2009-07-21 16:48:16 +00:00
Anders Broman 7c0fb707a5 Implement new_packet_list_find_row_from_data()
Goto frame should work now.

svn path=/trunk/; revision=29147
2009-07-20 16:09:50 +00:00
Stephen Fisher edc8ae64f1 Introduce packet list coloring for the NEW_PACKET_LIST. One caveat: when
enabling/disabling the coloring of the packet list from the menus, the user
has to drag the mouse cursor over each displayed row to take away/add the
coloring.  Dragging the scroll bar up or down will also take care of this as
only the displayed rows are colored.


svn path=/trunk/; revision=29142
2009-07-20 06:21:35 +00:00
Stig Bjørlykke 5afe405717 Removed an incorrect optimalization for invalidating packet in row 0.
svn path=/trunk/; revision=28950
2009-07-06 13:53:01 +00:00
Gerald Combs e0ebc32195 Updates to create_tempfile:
- Use g_get_tmp_dir, just like get_tempfile_path.
  - Don't make the caller worry about the path buffer length.

svn path=/trunk/; revision=28915
2009-07-01 23:36:51 +00:00
Anders Broman f0fbf120f2 Realy make the new packet list compile under Windows...
svn path=/trunk/; revision=28909
2009-07-01 17:39:19 +00:00
Anders Broman 3fe0c34110 Make the new packet list compile on Windows.
svn path=/trunk/; revision=28907
2009-07-01 14:37:02 +00:00
Stephen Fisher e6d0686f7b Introduce experimental new feature: GTK2 tree view based packet list
To use the GTK2 based packet list, define NEW_PACKET_LIST when compiling.
To do this with gcc, set the environment variable CPPFLAGS to
"-DNEW_PACKET_LIST" and re-run configure.

Many features do not yet work.  This work began with prototypes by Ulf
quite a while back.  I've put quite a bit of work into this so far and
as discussed with a few of the core team members at Sharkfest09 and it was
decided that it would be best to commit what I have so far to allow others to
help work on this.


svn path=/trunk/; revision=28892
2009-06-30 18:05:04 +00:00
Stig Bjørlykke 3f281d1280 Optimized criteria for invalidate packet in row 0.
svn path=/trunk/; revision=28698
2009-06-11 11:50:05 +00:00
Guy Harris 23a4f326b7 Clean up white space.
svn path=/trunk/; revision=28646
2009-06-06 00:12:43 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Stig Bjørlykke 09d8911d4a Popup a dialog in case we match a row outside the loaded frame area.
This adds some information for bug 3429.

svn path=/trunk/; revision=28556
2009-06-01 15:26:15 +00:00
Stig Bjørlykke 60dfa22754 From Kovarththanan Rajaratnam via bug 3429:
This patch downgrades the g_assert() to a proper if statement. This is needed
because we can end up with a match but _without_ any valid row attached to it.
This is the case when the user has aborted while dissecting.

svn path=/trunk/; revision=28555
2009-06-01 14:51:09 +00:00
Jaap Keuter 7f3d33513a Fix bug 3489:
Array overrun at copy of filter expression on GTK1 build.

svn path=/trunk/; revision=28538
2009-05-31 11:31:40 +00:00
Gerald Combs cde5843a5d Fix the build.
svn path=/trunk/; revision=28476
2009-05-26 00:30:08 +00:00
Gerald Combs ea115662fd From Didier Gautheron via bug 3391:
when loading files > 50 MB wireshark redraws the first pane on each
update_progress_dlg(). If auto_scroll_live is not set that's mean it redraws
the same rows again and again.

The patch attached only redraws it once or if cf->displayed_count < 1000, in
case you have a very big screen.

svn path=/trunk/; revision=28475
2009-05-25 23:48:29 +00:00
Guy Harris 54c159cb41 Turn on -Wshorten-64-to-32 by default, and fix some issues that turned
up (99 44/100% of which were assignments of double-precision
floating-point constants to floats).  Hopefully this will catch at least
some P64 issues on UN*X.

svn path=/trunk/; revision=28108
2009-04-21 16:57:52 +00:00
Gerald Combs e648060f0f Fix the last(?) of the Win64 compilation problems.
svn path=/trunk/; revision=28065
2009-04-16 04:05:39 +00:00
Bill Meier 63d7a7d712 Use wireshark (instead of ether) for temp file name prefix.
svn path=/trunk/; revision=27993
2009-04-08 12:43:51 +00:00
Bill Meier 1321c9981b sprintf --> g_snprintf
svn path=/trunk/; revision=27751
2009-03-17 01:47:20 +00:00
Stig Bjørlykke 0258be0b05 From Jakub Zawadzki:
More remove checking for NULL before g_free().

svn path=/trunk/; revision=27728
2009-03-15 18:08:46 +00:00
Guy Harris ace4af44fc Add a routine to report write errors to the list of failure-reporting
routines handled by epan/report_err.c.

Move copy_binary_file() in file.c to epan/filesystem.c, and rename it to
copy_file_binary_mode() (to clarify that it *can* copy text files;
arguably, *all* files are "binary" unless you're on, say, an IBM 1401
:-)).  Have it use the report_err.c routines, so it works in
console-mode programs.

Clean up some comments while we're at it.

svn path=/trunk/; revision=27456
2009-02-15 21:47:57 +00:00
Jaap Keuter acdf91e263 Make "Copy as Filter" on the packet list actually work.
Up till now every packet in the packet list got a copy of the pointer to the filter expressions for
the last packets' columns. Hence any 'Copy as Filter" on a column got the expression of the last
packet in the packet list. Instead every packet needs to get a pointer to the filter expressions 
for its own columns. This requires making a copy of the filter expressions themselves.

Since this is a bug in 1.0 as well the GLIB1 code is provided for backporting, which can later be dropped from the development tree.

svn path=/trunk/; revision=27396
2009-02-09 07:10:46 +00:00
Bill Meier ee908a7abd #include <epan/conversation.h> not req'd ...
svn path=/trunk/; revision=27392
2009-02-07 16:01:26 +00:00
Stig Bjørlykke 82fd44f303 Moved invalidation of cf->current_row when rescan packet to catch more cases
where packet list and packet details should be updated for row 0.

svn path=/trunk/; revision=26959
2008-12-10 11:05:45 +00:00
Stig Bjørlykke 076349374b Invalidate cf->current_row when rescan packet and the new selected row 0
has changed, to force update of packet list and packet details.

This fixes bug 3099.

svn path=/trunk/; revision=26937
2008-12-08 21:30:21 +00:00
Stig Bjørlykke 5498ec1dce Optimized finding current row from cfile.current_frame.
svn path=/trunk/; revision=26804
2008-11-18 14:50:51 +00:00
Stig Bjørlykke 58e2d7a0d6 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26649
2008-10-31 15:47:47 +00:00
Stig Bjørlykke ee2b7fd393 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26642
2008-10-31 10:30:17 +00:00
Sake Blok 2ce22e6bca From jmmikkel@mit.edu (Bug 2895):
We might receive new packets while redissecting and don't want to
dissect those before the packet-list is fully rebuilt.


svn path=/trunk/; revision=26309
2008-09-30 15:45:20 +00:00
Bill Meier 224b638586 #include <emem.h> not req'd
svn path=/trunk/; revision=26093
2008-08-26 02:38:57 +00:00
Stig Bjørlykke 341fba51c5 Remove a few warnings.
svn path=/trunk/; revision=25899
2008-08-01 16:49:12 +00:00
Guy Harris c4932893e3 Have separate callback mechanisms in file.c and capture.c; pass the
capture callbacks the capture_options * as its second argument in all
cases.  This makes it a bit clearer what arguments callbacks take, and
means we can get rid of all global_capture_opts references in
gtk/main_statusbar.c.

Put the interface between gtk/main.c and gtk/main_statusbar.c into a
private header.

svn path=/trunk/; revision=25576
2008-06-24 08:05:45 +00:00
Stig Bjørlykke c64847fe16 Update all time columns when changing the time precision.
Not implemented for conversation relative and delta time yet, because this
will need a reload as they are set by the dissectors and does not exist in
the frame data.

svn path=/trunk/; revision=25452
2008-06-14 16:51:11 +00:00
Guy Harris fa2b419e60 Return the appropriate "everything OK" types.
svn path=/trunk/; revision=25405
2008-05-30 07:15:05 +00:00
Guy Harris ffcb641149 Again, the err_info returned from wtap_read() and wtap_seek_read() is a
g_mallocated string, so it's not const.

Fix a comment to reflect reality (err_info is some additional
information about the error returned by Wiretap, e.g. some gory details
about the error, mainly useful to developers and support people).

svn path=/trunk/; revision=25401
2008-05-30 04:03:32 +00:00
Guy Harris be161ba460 Free up the err_info string returned by wtap_read() and
wtap_seek_read().

Clean up indentation.

svn path=/trunk/; revision=25400
2008-05-30 02:44:02 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Ulf Lamping 006d13d416 we don't need stat_menu.h here
svn path=/trunk/; revision=25010
2008-04-14 01:12:29 +00:00
Ulf Lamping d91e0e350a move tap_dfilter_dlg.h from / to /gtk (and use the callback mechanism in main.c instead)
svn path=/trunk/; revision=24956
2008-04-12 20:31:18 +00:00
Stig Bjørlykke 034d64cd83 Fetch return from g_list_remove.
svn path=/trunk/; revision=24945
2008-04-12 18:15:10 +00:00
Ulf Lamping 875e4ed653 improve the "simple" callback mechanism, so more than one listener is possible
svn path=/trunk/; revision=24936
2008-04-12 15:16:52 +00:00
Stig Bjørlykke aecd4254c6 Do not add packet length twice to cum_bytes when having a TIME REF frame.
This fixes bug 2387.

svn path=/trunk/; revision=24730
2008-03-26 16:56:45 +00:00
Stig Bjørlykke 056c5b49e1 Allow custom columns in export as CSV and PSML.
svn path=/trunk/; revision=24683
2008-03-18 00:48:24 +00:00
Stig Bjørlykke d01a2ac072 Bah, committed the wrong file.
Second try on allow custom columns when printing.

svn path=/trunk/; revision=24682
2008-03-18 00:11:52 +00:00
Stig Bjørlykke aa20d2b34a Allow custom columns when printing.
svn path=/trunk/; revision=24679
2008-03-17 23:40:00 +00:00
Stig Bjørlykke 5800abad46 From Francesco Fondelli (bug 2349):
Attached is a patch to export packets data as "C Arrays".  I often have
the need to [re]send data captured with wireshark using a raw/pf_packet socket.
Output format is one char[] per packet, it looks like almost the same as
the one produced by "Follow TCP stream".

svn path=/trunk/; revision=24604
2008-03-11 18:23:16 +00:00
Stig Bjørlykke 0d9d45f467 Removed an unused variable.
svn path=/trunk/; revision=24597
2008-03-10 09:31:49 +00:00
Stephen Fisher b0c33bd25b Fix bug #2343: Huge increase in Wireshark runtime memory foot print ...
svn path=/trunk/; revision=24595
2008-03-10 07:37:14 +00:00
Stephen Fisher 56226b49b8 Custom column updates:
- Change apply / prepare / ... as filter to use the field's value, which
   is now stored in fdata as well as cinfo.  Now we don't have to reprocess
   the entire packet list when using these features.  This also prevents
   the use of these features from overwriting custom column information.
   (custom columns can now be used in apply / prepare ... as filter)
 - Break col_expr and col_expr_val out into a struct that is included not only
   in cinfo, but now also fdata.
 - Have col_custom_set_fstr() quote FT_STRING & FT_STRINGZ when storing the
   col_expr_val value (for filter creation).


svn path=/trunk/; revision=24511
2008-03-01 05:16:45 +00:00
Stephen Fisher 8f3a1b0d16 Check in changes originally checked in as SVN revision 24308 (new column
type: Custom) that were backed out in SVN revision 24309.

Changes since that revision include a reworking of the handling of the
cfile/cinfo variables in epan/column-utils.c, addition of three new
functions to libwireshark.def and a bug fix to prevent a crash when no
custom columns were not in use.

Compilation verified locally on MacOS X, Linux and Windows.


svn path=/trunk/; revision=24317
2008-02-13 05:05:33 +00:00
Stephen Fisher 5e893a8b1c Revert commit 24308 until I can get it to compile on Windows/Linux/Solaris
(strangely, it compiled fine on my MacOS X machine).


svn path=/trunk/; revision=24309
2008-02-12 08:09:22 +00:00
Stephen Fisher 0a85a9e4c6 Introduce a new column type called custom, which lets you put any display
filter name in the description field and it will display that field in the
packet list if it occurs in that packet.  Note that the more common fields
are implemented, but a number of them remain to be implemented in
epan/proto.c.  I will work on these other fields as I have time.


svn path=/trunk/; revision=24308
2008-02-12 03:16:09 +00:00
Stig Bjørlykke 11a9f57c1a Fixed some malloc -> g_malloc, free -> g_free, strdup -> g_strdup.
svn path=/trunk/; revision=24179
2008-01-24 19:09:30 +00:00
Gerald Combs e66660cd84 Make sure the "auto scroll in live capture" toolbar button and menu item
correctly reflect the auto scroll state. Re-enable the ability to use
the auto scroll toolbar button and menu item during a live capture.

svn path=/trunk/; revision=23777
2007-12-05 23:50:28 +00:00
Sake Blok 42a968d407 Apply coloring rules also when a frame is marked so that when a frame
is un-marked *after* enabling coloring it is still colored.

Fixes bug 2038


svn path=/trunk/; revision=23648
2007-11-28 18:02:01 +00:00
Luis Ontanon 9865b6346f As per Ulf's request add ${proto.field} macros that will use the value of the given field has in the last selected packet.
svn path=/trunk/; revision=22427
2007-07-30 23:32:47 +00:00
Gerald Combs cc0f2c6efe From Dustin Johnson: If "Update list of packets in real time" and
"Automatic scrolling in live capture" are both enabled, make the scroll
bar behavior more natural.  If the packet list is scrolled to the
bottom, scroll automatically.  If the user scrolls back, keep the packet
list scrolled at that point instead of jumping back to the end.

svn path=/trunk/; revision=22277
2007-07-09 16:31:39 +00:00
Stephen Fisher d1d72fd232 Fix for bug #93: changes to the columns has no effect until restart
These changes allow the packet list clist to be destroyed and recreated
with the new column titles/values/order that the user changed in the
preferences without restarting Wireshark. 


svn path=/trunk/; revision=22038
2007-06-04 20:15:10 +00:00
Guy Harris 5a43799a17 Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLib
routines and routines using those routines.  GLib might use different
modifiers for 64-bit quantities than the platform's C library does.

svn path=/trunk/; revision=21990
2007-05-29 18:52:42 +00:00