aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
Commit message (Collapse)AuthorAgeFilesLines
* As per Ulf's request add ${proto.field} macros that will use the value of ↵Luis Ontanon2007-07-301-1/+4
| | | | | | the given field has in the last selected packet. svn path=/trunk/; revision=22427
* From Dustin Johnson: If "Update list of packets in real time" andGerald Combs2007-07-091-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
* Fix for bug #93: changes to the columns has no effect until restartStephen Fisher2007-06-041-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
* Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLibGuy Harris2007-05-291-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
* From Sake Blok:Stephen Fisher2007-05-211-6/+6
| | | | | | | Fix for bug #1056 svn path=/trunk/; revision=21867
* Fix warnings on Linux/gcc 4.1.1Stephen Fisher2007-04-031-2/+5
| | | | svn path=/trunk/; revision=21330
* Remove almost all of the casts I committed recently and in place ofStephen Fisher2007-03-281-3/+3
| | | | | | | them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. svn path=/trunk/; revision=21253
* Fix about 150 warnings new to gcc 4.0 in the error on warning directories.Stephen Fisher2007-03-231-3/+3
| | | | | | | Comment out -Werror in plugins/asn1/ until warnings can be fixed. svn path=/trunk/; revision=21158
* From Sake Blok:Stephen Fisher2007-03-231-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
* Add -Werror when using GCC only to the Makefile.am of the baseStephen Fisher2007-03-221-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
* Don't enable "Save As" if you don't have an unsaved live capture fileGuy Harris2007-03-141-0/+22
| | | | | | | | | 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
* Squelch some unused variable warningsJeff Morriss2007-02-201-1/+1
| | | | svn path=/trunk/; revision=20873
* we dont have auto_scroll_live if we dont have PCAP so ifdef this out unless ↵Ronnie Sahlberg2007-02-011-0/+2
| | | | | | | | | PCAP is available (to allow it to compile when pcap is not available) svn path=/trunk/; revision=20662
* Add separate union entries to fvalue.value for signed and unsignedMartin Mathieson2007-01-181-1/+1
| | | | | | | | | 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
* instead of simply doing an assert when running out of memory in emem, throw ↵Ulf Lamping2007-01-151-4/+60
| | | | | | | | 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
* minor bugfix of file loading: don't update the packet list if loading a ↵Ulf Lamping2007-01-151-1/+4
| | | | | | smaller file, the update takes longer than the file to load. svn path=/trunk/; revision=20434
* New "decode as ..." feature for BER-encoded files (WTAP_FILE_BER). Graeme Lunt2007-01-131-0/+6
| | | | | | | | | | 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
* Fix for bug #1140: Filtering messes up packet list sort orderStephen Fisher2007-01-111-0/+3
| | | | svn path=/trunk/; revision=20394
* Fix for bug #1196: packet detail & packet bytes windows not updated underStephen Fisher2007-01-111-0/+4
| | | | | | | | certain circumstances when applying a display filter that does not include the currently selected packet. svn path=/trunk/; revision=20389
* break out dfcode from the capture file structure and declare it locally ↵Ronnie Sahlberg2007-01-011-18/+84
| | | | | | | | | | | where it is needed. allocate and release the dfcode program as needed instead of having it hang around in the capture file structure. this will ensure that dfcode will not have longer than se scope lifetime in case we need that property of it later svn path=/trunk/; revision=20251
* while loading a huge capture file, enable the main window to show packets ↵Ulf Lamping2006-11-211-0/+6
| | | | | | rushing into the packet list svn path=/trunk/; revision=19943
* New feature to automatically highlight the field found when doing a find.Stephen Fisher2006-11-141-0/+8
| | | | | | | | This works for both string and hex searches. This resolves feature request bug #776. svn path=/trunk/; revision=19897
* change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping2006-11-051-6/+6
| | | | | | | | handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
* fix svn728: don't scroll down packet list while capturing, if no packets are ↵Ulf Lamping2006-11-051-6/+16
| | | | | | newly displayed (happens when a display filter is active) svn path=/trunk/; revision=19811
* fix #1188: scroll the packet list to the bottom (in a running capture) ↵Ulf Lamping2006-10-291-2/+5
| | | | | | | | *after* thawing the list - otherwise the scrolling won't be done correctly this one should go into 0.99.4 IMHO svn path=/trunk/; revision=19726
* fix the memory leak problem mentioned lately by adding and using ↵Ulf Lamping2006-10-031-0/+2
| | | | | | color_filters_cleanup() svn path=/trunk/; revision=19422
* changes of the coloring rules sometimes crashed as dissection keeps pointers ↵Ulf Lamping2006-10-031-10/+0
| | | | | | | | to the color_filter for later reference -> simply deleting the filters leave the pointers invalid -> crash. for now, don't delete the filters but keep them floating around in memory (leaking) -> at least better than crashing svn path=/trunk/; revision=19421
* Implement a real "Cancel" button for the coloring rules dialog - this was a ↵Ulf Lamping2006-10-031-0/+12
| | | | | | | | | | | | hard one! It seems to be working without bugs and as designed now. As this was a huge internal change, new bugs are very probable - please report. The implementation isn't still perfect, a new dialog internal list could possibly be removed again. However, I want to check in at this condition, just in case I make things worse - again. svn path=/trunk/; revision=19413
* coverity 170Ronnie Sahlberg2006-06-261-13/+0
| | | | | | | | remove some dead code svn path=/trunk/; revision=18575
* Ethereal->WiresharkAnders Broman2006-05-281-14/+14
| | | | svn path=/trunk/; revision=18235
* name changeRonnie Sahlberg2006-05-211-2/+2
| | | | svn path=/trunk/; revision=18197
* Add an extra null pointer check. Fixes Coverity CID 154.Gerald Combs2006-04-271-20/+25
| | | | svn path=/trunk/; revision=18018
* From diderAnders Broman2006-02-271-1/+3
| | | | | | | | | | | file.c time reference menu callback doesn't set cf->filter, it dumps a core if you have a file big enough in find next/ find prev. addr_resolv.c leak memory, break list chain when snooping address. svn path=/trunk/; revision=17419
* Move create_tempfile() to tempfile.c out of util.c. This means dumpcapGuy Harris2006-02-121-1/+1
| | | | | | | | | no longer needs util.c, so it no longer includes routines that use host_ip_af(), so it no longer needs to define its own host_ip_af(). That also means dumpcap.c no longer needs to include <sys/socket.h>. svn path=/trunk/; revision=17278
* show the number of packets captured, if "Update list of packets ..." isn't usedUlf Lamping2006-01-221-1/+8
| | | | svn path=/trunk/; revision=17071
* add matched coloring rule name and string to the frame dissector output (or ↵Ulf Lamping2006-01-211-0/+1
| | | | | | nothing if no coloring rule matched or none was set) svn path=/trunk/; revision=17068
* Allow a progress dialog to have "Stop" or "Cancel" as the "terminateGuy Harris2005-11-121-25/+38
| | | | | | | | | | | | | | | button"; "Stop" should be used for operations that can only be stopped (meaning that what it's already done isn't undone), not cancelled (meaning that whatever it's already done *is* undone), for which "Cancel" is used. Allow the merging process to be cancelled. Clean up indentation. Update some comments. svn path=/trunk/; revision=16489
* from Jaap Keuter:Ulf Lamping2005-11-081-8/+18
| | | | | | | | | | | | Anyone having objections to idea of stopping the load of a capture file i.s.o. cancelling it? I'm refering to WishList Data I/O item #6. It seems a very reasonable idea and easy to implement. I've done some extensions: -Improve the corresponding comment on the implications why this is useful -added a new simple_dialog text to explain what's really going on (simply using the WTAP truncated packet message was a bit misleading) svn path=/trunk/; revision=16441
* replace *a lot* of file related calls by their GLib counterparts. This is ↵Ulf Lamping2005-11-061-26/+19
| | | | | | | | | | | | necessary for the switch to GTK 2.6 (at least on WIN32). to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. svn path=/trunk/; revision=16403
* Fix uninitialized variable errors.Guy Harris2005-10-271-26/+39
| | | | | | | | Rename some variables to make the names used in progress bars more common. (Should more of that functionality be moved into common progress bar code?) svn path=/trunk/; revision=16347
* Check on every iteration of a loop whether to pop up a dialog box,Guy Harris2005-10-271-32/+63
| | | | | | | | rather than checking only on every progress bar update quantum, so that if the update quantum is *very* large, we don't end up waiting longer than the standard time for a dialog box before checking. svn path=/trunk/; revision=16327
* fix a packet_list_freeze / thaw pair, if a return comes in it's wayUlf Lamping2005-10-061-2/+11
| | | | | | | | add a g_warning() call if an error occured while reading from capture file (while doing a live update), usually shouldn't happen but is difficult to debug *if* it happens add a new log domain LOG_DOMAIN_MAIN and the standard log handler for it add some (partly commented out) g_log() calls, useful for GUI sequence debugging svn path=/trunk/; revision=16136
* minor bugfix: call cf_callback_invoke() from cf_close() even if the file is ↵Ulf Lamping2005-09-271-4/+6
| | | | | | already closed. Otherwise the GUI will remain in the wrong state if a capture couldn't be started (e.g. wrong interface). svn path=/trunk/; revision=16024
* add two new callbacks:Ulf Lamping2005-09-201-9/+11
| | | | | | | | | | cf_cb_file_closing (called before closing a capture file) cf_cb_file_closed will be called afterwards, but both only if a file is really closed as cf_close is called more often ... If we are closing large capture files (~20MB), the screen looks ugly while the file is closed. Change this so the screen will immediately go back to initial state and a dialog (without buttons) is shown that the file is currently closed. As the operation which takes most of the time to close the file is a single eth_clist_clear call, we can't use a progress bar here. cf_cb_live_capture_stopping: called when the user wants to stop the capture (toolbar or menu clicked). At least on Win32, the time between this and the actual stop completed can be noticeable (1-2 seconds), so the user doesn't know if the button press did anything at all. Do something similar as above, show a dialog box without buttons to inform that the close is in progress. svn path=/trunk/; revision=15891
* added compression support for capture file output. The Save/As dialog now ↵Ulf Lamping2005-09-141-3/+10
| | | | | | | | | | | | | | | | has a checkbox "Compress with gzip" currently limited to Ethereal and all the variants of libpcap filetypes only. We might want to add output compression support to the other tools as well (tethereal, mergecap, ...). We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek. One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ... svn path=/trunk/; revision=15804
* Have cf_retap_packets() take an argument that indicates whether toGuy Harris2005-09-141-4/+5
| | | | | | | generate columns; use cf_retap_packets instead of cf_redissect_packets() when running taps (the general flow graph stat uses the Info column). svn path=/trunk/; revision=15793
* Frame numbers are unsigned, and they start at 1; 0 is what's used forGuy Harris2005-09-111-1/+1
| | | | | | | | | | | | "unknown" for frame numbers. Note that in epan/frame_data.h, and make the frame number in experts unsigned, and use 0 for "unknown", and display it as an unsigned number - and, if it's 0, don't display it at all. Fix the signature of "expert_dlg_draw()" to match what a tap's draw routine's signature is expected to be. svn path=/trunk/; revision=15760
* start with fdata->num = -1, so we don't have an uninitialised value while ↵Ulf Lamping2005-09-081-0/+1
| | | | | | doing read_filter style dissection svn path=/trunk/; revision=15732
* timestamp display precision:Ulf Lamping2005-08-251-1/+54
| | | | | | | | | - automatic adjustment depending on file format - manual adjustment through menu items save the setting in the recent file svn path=/trunk/; revision=15534
* EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping2005-08-241-35/+24
| | | | | | | | | | | | | | I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520