Commit Graph

538 Commits

Author SHA1 Message Date
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
Stephen Fisher 0fc9e207d2 From Sake Blok:
Fix for bug #1056


svn path=/trunk/; revision=21867
2007-05-21 20:41:05 +00:00
Stephen Fisher 6625e7503f Fix warnings on Linux/gcc 4.1.1
svn path=/trunk/; revision=21330
2007-04-03 21:17:13 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 2896811274 Fix about 150 warnings new to gcc 4.0 in the error on warning directories.
Comment out -Werror in plugins/asn1/ until warnings can be fixed.


svn path=/trunk/; revision=21158
2007-03-23 22:49:23 +00:00
Stephen Fisher 6d8d2854c8 From Sake Blok:
Fix for bug #491: Unexpected frame.time_delta behavior

This patch ... fixes bug 491. It does this by changing the
behaviour of the frame.time_delta field so it reflects the delta
time between captured packets (tshark already did this).  To keep
the delta time between displayed packets, the field 
frame.time_delta_displayed is created.


svn path=/trunk/; revision=21154
2007-03-23 18:08:17 +00:00
Stephen Fisher cdf47e536b Add -Werror when using GCC only to the Makefile.am of the base
directory and most of the plugins to match the same command 
put in the Makefile.nmake files for Windows compliations.  Fix
a few warnings when compiling under gcc 3.4.4 on FreeBSD.  Create
new automake file variable called USING_GCC in configure.in and
wiretap/configure.in to acomplish the above -Werror addition. 


svn path=/trunk/; revision=21127
2007-03-22 23:03:39 +00:00
Guy Harris 082282b6f4 Don't enable "Save As" if you don't have an unsaved live capture file
and there are no formats in which the file can be saved by some means
other than copying the raw data; "Save As" isn't a very useful function
in that case, and that prevents us from having an empty list of formats
in which the file can be saved.

svn path=/trunk/; revision=21032
2007-03-14 19:30:19 +00:00
Jeff Morriss c39d342a40 Squelch some unused variable warnings
svn path=/trunk/; revision=20873
2007-02-20 14:00:53 +00:00
Ronnie Sahlberg b1a499190e we dont have auto_scroll_live if we dont have PCAP so ifdef this out unless PCAP is available
(to allow it to compile when pcap is not available)


svn path=/trunk/; revision=20662
2007-02-01 08:37:54 +00:00
Martin Mathieson 997e5415f9 Add separate union entries to fvalue.value for signed and unsigned
32-bit numbers.  Separate signed and unsigned accessors have been
added and used where appropriate.

Definitely not for 0.99.5.

svn path=/trunk/; revision=20472
2007-01-18 11:02:26 +00:00
Ulf Lamping e3330fd922 instead of simply doing an assert when running out of memory in emem, throw a new OutOfMemoryError Exception, so file.c can show at least a better explanation to the user before Wireshark terminates
XXX - to prevent a busy wait, I need a portable way to wait for a short time period, like Sleep() for Windows

svn path=/trunk/; revision=20437
2007-01-15 05:16:13 +00:00
Ulf Lamping 16ac7832b4 minor bugfix of file loading: don't update the packet list if loading a smaller file, the update takes longer than the file to load.
svn path=/trunk/; revision=20434
2007-01-15 00:17:32 +00:00
Graeme Lunt 2fd7d2c620 New "decode as ..." feature for BER-encoded files (WTAP_FILE_BER).
A BER-encoded file can be dissected as one of a number of registered syntaxes (registered using register_ber_syntax_dissector()). 
Syntaxes may also be associated with OIDs (or other strings) using register_ber_oid_syntax(). 

A default syntax with which to dissect a BER-encoded file is determined from its filename (extension). For example, ".cer" and ".crt" files will be dissected as "Certificate".


svn path=/trunk/; revision=20414
2007-01-13 12:59:27 +00:00
Stephen Fisher cbe42b8a24 Fix for bug #1140: Filtering messes up packet list sort order
svn path=/trunk/; revision=20394
2007-01-11 19:50:19 +00:00
Stephen Fisher 1f42c23012 Fix for bug #1196: packet detail & packet bytes windows not updated under
certain circumstances when applying a display filter that does not include
the currently selected packet.


svn path=/trunk/; revision=20389
2007-01-11 06:36:14 +00:00