aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2009-04-21Turn on -Wshorten-64-to-32 by default, and fix some issues that turnedGuy Harris1-10/+10
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-16Fix the last(?) of the Win64 compilation problems.Gerald Combs1-5/+5
svn path=/trunk/; revision=28065
2009-04-08Use wireshark (instead of ether) for temp file name prefix.Bill Meier1-1/+1
svn path=/trunk/; revision=27993
2009-03-17sprintf --> g_snprintfBill Meier1-4/+4
svn path=/trunk/; revision=27751
2009-03-15From Jakub Zawadzki:Stig Bjørlykke1-8/+4
More remove checking for NULL before g_free(). svn path=/trunk/; revision=27728
2009-02-15Add a routine to report write errors to the list of failure-reportingGuy Harris1-70/+1
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-09Make "Copy as Filter" on the packet list actually work.Jaap Keuter1-2/+29
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-07#include <epan/conversation.h> not req'd ...Bill Meier1-1/+0
svn path=/trunk/; revision=27392
2008-12-10Moved invalidation of cf->current_row when rescan packet to catch more casesStig Bjørlykke1-4/+4
where packet list and packet details should be updated for row 0. svn path=/trunk/; revision=26959
2008-12-08Invalidate cf->current_row when rescan packet and the new selected row 0Stig Bjørlykke1-0/+4
has changed, to force update of packet list and packet details. This fixes bug 3099. svn path=/trunk/; revision=26937
2008-11-18Optimized finding current row from cfile.current_frame.Stig Bjørlykke1-0/+5
svn path=/trunk/; revision=26804
2008-10-31Fix some "format not a string literal and no format arguments" warnings.Stig Bjørlykke1-3/+1
svn path=/trunk/; revision=26649
2008-10-31Fix some "format not a string literal and no format arguments" warnings.Stig Bjørlykke1-3/+1
svn path=/trunk/; revision=26642
2008-09-30From jmmikkel@mit.edu (Bug 2895):Sake Blok1-1/+10
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-08-26#include <emem.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26093
2008-08-01Remove a few warnings.Stig Bjørlykke1-3/+3
svn path=/trunk/; revision=25899
2008-06-24Have separate callback mechanisms in file.c and capture.c; pass theGuy Harris1-2/+2
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-14Update all time columns when changing the time precision.Stig Bjørlykke1-11/+12
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-05-30Return the appropriate "everything OK" types.Guy Harris1-2/+2
svn path=/trunk/; revision=25405
2008-05-30Again, the err_info returned from wtap_read() and wtap_seek_read() is aGuy Harris1-1/+1
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-30Free up the err_info string returned by wtap_read() andGuy Harris1-2/+4
wtap_seek_read(). Clean up indentation. svn path=/trunk/; revision=25400
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-23/+23
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-04-14we don't need stat_menu.h hereUlf Lamping1-1/+0
svn path=/trunk/; revision=25010
2008-04-12move tap_dfilter_dlg.h from / to /gtk (and use the callback mechanism in ↵Ulf Lamping1-2/+0
main.c instead) svn path=/trunk/; revision=24956
2008-04-12Fetch return from g_list_remove.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=24945
2008-04-12improve the "simple" callback mechanism, so more than one listener is possibleUlf Lamping1-14/+40
svn path=/trunk/; revision=24936
2008-03-26Do not add packet length twice to cum_bytes when having a TIME REF frame.Stig Bjørlykke1-5/+5
This fixes bug 2387. svn path=/trunk/; revision=24730
2008-03-18Allow custom columns in export as CSV and PSML.Stig Bjørlykke1-4/+10
svn path=/trunk/; revision=24683
2008-03-18Bah, committed the wrong file.Stig Bjørlykke1-2/+2
Second try on allow custom columns when printing. svn path=/trunk/; revision=24682
2008-03-17Allow custom columns when printing.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=24679
2008-03-11From Francesco Fondelli (bug 2349):Stig Bjørlykke1-0/+59
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-10Removed an unused variable.Stig Bjørlykke1-1/+0
svn path=/trunk/; revision=24597
2008-03-10Fix bug #2343: Huge increase in Wireshark runtime memory foot print ...Stephen Fisher1-13/+2
svn path=/trunk/; revision=24595
2008-03-01Custom column updates:Stephen Fisher1-0/+17
- 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-02-13Check in changes originally checked in as SVN revision 24308 (new columnStephen Fisher1-3/+7
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-12Revert commit 24308 until I can get it to compile on Windows/Linux/SolarisStephen Fisher1-7/+3
(strangely, it compiled fine on my MacOS X machine). svn path=/trunk/; revision=24309
2008-02-12Introduce a new column type called custom, which lets you put any displayStephen Fisher1-3/+7
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-01-24Fixed some malloc -> g_malloc, free -> g_free, strdup -> g_strdup.Stig Bjørlykke1-3/+3
svn path=/trunk/; revision=24179
2007-12-05Make sure the "auto scroll in live capture" toolbar button and menu itemGerald Combs1-15/+13
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-11-28Apply coloring rules also when a frame is marked so that when a frameSake Blok1-5/+6
is un-marked *after* enabling coloring it is still colored. Fixes bug 2038 svn path=/trunk/; revision=23648
2007-07-30As per Ulf's request add ${proto.field} macros that will use the value of ↵Luis Ontanon1-1/+4
the given field has in the last selected packet. svn path=/trunk/; revision=22427
2007-07-09From Dustin Johnson: If "Update list of packets in real time" andGerald Combs1-2/+6
"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-06-04Fix for bug #93: changes to the columns has no effect until restartStephen Fisher1-0/+1
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-05-29Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLibGuy Harris1-2/+2
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-21From Sake Blok:Stephen Fisher1-6/+6
Fix for bug #1056 svn path=/trunk/; revision=21867
2007-04-03Fix warnings on Linux/gcc 4.1.1Stephen Fisher1-2/+5
svn path=/trunk/; revision=21330
2007-03-28Remove almost all of the casts I committed recently and in place ofStephen Fisher1-3/+3
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. svn path=/trunk/; revision=21253
2007-03-23Fix about 150 warnings new to gcc 4.0 in the error on warning directories.Stephen Fisher1-3/+3
Comment out -Werror in plugins/asn1/ until warnings can be fixed. svn path=/trunk/; revision=21158
2007-03-23From Sake Blok:Stephen Fisher1-7/+11
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-22Add -Werror when using GCC only to the Makefile.am of the baseStephen Fisher1-7/+8
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