summaryrefslogtreecommitdiff
path: root/ui/gtk/capture_file_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-24Allow wtap_read() and wtap_seek_read() to return records other than packets.Guy Harris1-3/+3
Add a "record type" field to "struct wtap_pkthdr"; currently, it can be REC_TYPE_PACKET, for a record containing a packet, or REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific data. Modify code that reads packets to be able to handle non-packet records, even if that just means ignoring them. Rename some routines to indicate that they handle more than just packets. We don't yet have any libwiretap code that supplies records other than REC_TYPE_PACKET or that supporting writing records other than REC_TYPE_PACKET, or any code to support plugins for handling REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug 8590. Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813 Reviewed-on: https://code.wireshark.org/review/1773 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23Revert "Allow wtap_read() and wtap_seek_read() to return non-packet records."Guy Harris1-20/+15
This reverts commit c0c480d08c175eed4524ea9e73ec86298f468cf4. A better way to do this is to have the record type be part of struct wtap_pkthdr; that keeps the metadata for the record together and requires fewer API changes. That is in-progress. Change-Id: Ic558f163a48e2c6d0df7f55e81a35a5e24b53bc6 Reviewed-on: https://code.wireshark.org/review/1741 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23Allow wtap_read() and wtap_seek_read() to return non-packet records.Guy Harris1-15/+20
This is the first step towards implementing the mechanisms requestd in bug 8590; currently, we don't return any records other than packet records from libwiretap, and just ignore non-packet records in the rest of Wireshark, but this at least gets the ball rolling. Change-Id: I34a45b54dd361f69fdad1a758d8ca4f42d67d574 Reviewed-on: https://code.wireshark.org/review/1736 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09Revert "Refactor Wiretap"Guy Harris1-6/+6
This reverts commit 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a. This isn't building, and looks as if it requires significant work to fix. Change-Id: I622b1bb243e353e874883a302ab419532b7601f2 Reviewed-on: https://code.wireshark.org/review/1568 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09Refactor WiretapMichael Mann1-6/+6
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality. The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes. bug:9607 Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae Reviewed-on: https://code.wireshark.org/review/1485 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-21Fix Bug 9903: 'Clicking reload-file ignores selected file format reader'Hadriel Kaplan1-2/+2
There's a relatively new feature in 1.11.3 to select a specific file format reader, instead of relying on magics or heuristics. If you select a file reader and open a file, open it, and then click the reload-file button or go to View->Reload or press the ctrl-R keymap, the file is reloaded but using the magic/heuristics again instead of the file format reader you previously chose. Likewise, the Lua relaod() function has the same issue (which is how I found this problem). I have tested this change by hand, using a Lua script, but I didn't add it to the testsuite because I need another change for my test script to work correctly. (an enhancement rather than a bug fix, which I'll submit separately) Change-Id: I48c2d9ea443e37fd9d41be43d6b6cd5a866d5b01 Reviewed-on: https://code.wireshark.org/review/764 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-11Migrate GTK icon handling to GTK 3.10 APIBalint Reczey1-2/+2
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids. We keep a stock id based approach but without relying on GTK's GtkStockItem system. We create our own internal stock ids for {icon, label} tuples and keep the original GTK stock id #define-s and values to preserve backward compatibility. Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0 Reviewed-on: https://code.wireshark.org/review/302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04win32: Implement format type selector in open file dialogMichal Labedzki1-1/+1
Change-Id: Idef1829fcc2b7b08783e5288bb6486ce19c4779b Reviewed-on: https://code.wireshark.org/review/405 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Use correct macro to really fix MacOSX buildbotEvan Huus1-3/+3
Change-Id: Ibb7b13c0c9c5699642cda48522b34ace34c28b46 Reviewed-on: https://code.wireshark.org/review/377 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-25Include old-gtk-compat.h to fix build.Evan Huus1-0/+1
Change-Id: I3614e11fb0e76625b2b9686be423bf421c295e6f Reviewed-on: https://code.wireshark.org/review/376 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-25Wireshark: Add option to choose format type of capture fileMichal Labedzki1-5/+26
The best heuristic can fail, so add possibility to manually choose capture file format type, so not correctly recognize file format can be loaded in Wireshark. On the other side now it is possible to open capture file as file format to be dissected. Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a Reviewed-on: https://code.wireshark.org/review/16 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2014-01-20Split the GUI and the tap part to make it possible to adapt to Qt.Anders Broman1-1/+1
svn path=/trunk/; revision=54850
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-09Replace wtap_nstime with nstime_t, remove wtap_nstime_to_sec.Jakub Zawadzki1-1/+1
After r50154 nstime_t is inside wsutil/ so wiretap don't need it's own copy. svn path=/trunk/; revision=53184
2013-11-08The "file types" we have are actually combinations of types andGuy Harris1-9/+10
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2 are separate "file types", even though they both come from Network Monitor. Rename various functions, #defines, and variables appropriately. svn path=/trunk/; revision=53166
2013-10-11Remove GTK+ and global cfile dependencies from file_dlg_win32.c.Gerald Combs1-2/+2
Move the declaration of set_last_open_dir() to ui/util.h. It still has separate GTK+ and Qt implemenations. We might want to move it to ui/util.c at some point. Remove a lot of unnecessary GTK+ includes. Remove most of the references to the global cfile while we're at it. svn path=/trunk/; revision=52542
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
svn path=/trunk/; revision=51681
2013-08-21The export PDU mechanism creates a new capture which contains only theMartin Kaiser1-0/+70
exported PDUs. The currently opened capture file is closed. Make sure that this does not discard any unsaved data. Ask the user for confirmation and save the changes before running the export. svn path=/trunk/; revision=51459
2013-07-16Move merge.{h,c} into wiretap: these modules use wiretap to merge files.Jeff Morriss1-2/+3
svn path=/trunk/; revision=50656
2013-07-11Move some more modules into epan.Jeff Morriss1-1/+0
svn path=/trunk/; revision=50517
2013-05-14Give file_selection_new() an argument to specify the parent window ofGuy Harris1-7/+7
the file selection dialog. Call gtk_file_chooser_set_do_overwrite_confirmation() in file_selection_new() for FILE_SELECTION_SAVE file selection dialogs, rather than doing it in the individual callers of file_selection_new(). Use gtk_dialog_set_alternative_button_order() in file_selection_new() to set the alternative button order, rather than using #ifdefs. Use file_selection_new() and file_selection_run() in the graph analysis code. (We should clean up other code that uses file_selection_new() to use file_selection_run(), and clean up other code that uses gtk_file_chooser_dialog_new() to use file_selection_new() and file_selection_run().) svn path=/trunk/; revision=49308
2013-05-14Fix indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=49295
2013-05-14Use gtk_dialog_set_alternative_button_order() to set the "alternative"Guy Harris1-68/+31
button order (that order is what's used on Windows). Put the affirmative answer on the right by default. svn path=/trunk/; revision=49284
2013-05-13Eliminate some includes of ui/simple_dialog.h by files that don't useGuy Harris1-1/+0
anything from it. svn path=/trunk/; revision=49277
2013-04-02Rename cf_not_saved() to cf_has_unsaved_data() to clarify what itGuy Harris1-2/+2
indicates. (Note: "unsaved data" is more than just "unsaved changes"; it could also mean "temporary file that hasn't been saved anywhere".) svn path=/trunk/; revision=48709
2013-04-01Add routines to file.c to indicate whether:Guy Harris1-7/+6
a save can be done ("can" in the sense of "there's something to save" and in the sense of "we can write that something out"); a "save as" can be done (in the sense of "we can write what we have out"); there's unsaved data to save (which might be unsaved changes or might be a temporary file full of packets); and use them as appropriate. This means that the "unsaved data" indicator in the UI will be turned on for temporary files full of packets as well as for files with unsaved changes; that's what we want. svn path=/trunk/; revision=48693
2013-04-01Add a wtap_dump_can_write() routine that indicates whether WiretapGuy Harris1-12/+2
supports writing files with a given set of encapsulations and comment types. Use it, rather than asking for a list of file formats that support the given set of encapsulation and comment types and checking whether we got back such a list, or duplicating its logic. Having file.c use it means that nobody's using wtap_dump_can_write_encaps() any more; get rid of it. Instead, have a private routine that checks whether a given file format supports a given set of encapsulations *and* comment types, and use that internally. svn path=/trunk/; revision=48690
2013-04-01Define a collection of bits for different types of capture file comments.Guy Harris1-47/+52
For each capture file type, have a bitset of comment types supported by that capture file type. Add a Wiretap routine that, for a given file type, returns the bitset of comment types it supports. Have wtap_get_savable_file_types() take a bitset of comment types that need to be supported by the file types it returns. Replace cf_has_comments() with a routine that returns a bitset of capture file comment types in the capture file. Use those routines in the capture file dialogs; don't wire in the notion that pcap-NG supports all comment types and no other file formats support any comment types. (That's currently true, but we don't want to wire that in as being forever true.) svn path=/trunk/; revision=48689
2013-03-21From beroset:Bill Meier1-6/+6
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404 Note: The following parts of the patch had been previously done: asn1/snmp/packet-snmp-template.c epan/dissectors/packet-snmp.c epan/dissectors/packet-x11.c Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP' didn't compile and needed a few additional patches. svn path=/trunk/; revision=48447
2013-03-11Remove leftover "//".Bill Meier1-6/+6
svn path=/trunk/; revision=48242
2013-03-11From the proposed patch by Peter Hatina in Bug #8315.Bill Meier1-7/+7
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8315 svn path=/trunk/; revision=48241
2013-03-08Use explicit casts.Anders Broman1-3/+3
svn path=/trunk/; revision=48187
2013-03-04With Jim Young's suggestion, revert r43785. Currently the file->open dialog ↵Chris Maynard1-1/+0
contains a *Read* filter field, not a display filter, so after the packets matching the read filter are loaded, there is no actual display filter applied. This resolves https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8344 svn path=/trunk/; revision=48046
2013-01-10Fix indentation to match editor modelines.Bill Meier1-254/+254
svn path=/trunk/; revision=47009
2013-01-10Fixes:Bill Meier1-19/+35
1. 'File ! Open' changes applied to the 'File ! Merge' window; 2. Small change made so that the GTk2 & Gtk3 behavior are the same (Finally !) 3. window structure picture and notes updated. svn path=/trunk/; revision=47008
2013-01-09Add a picture and some notes about the capture_file-dialog window.Bill Meier1-0/+52
svn path=/trunk/; revision=47007
2013-01-09Use ws_gtk_grid...() in place of gtk_table...().Bill Meier1-136/+142
The Gtk2 vs Gtk3 behavior is not precisely the same when resizing the window hozizontally; IMO it's "good enough" (after several days of playing around trying to make the behaviour identical). svn path=/trunk/; revision=47004
2012-12-22The Wireshark file icon makes more sense than a floppy disk[1]. SwitchGerald Combs1-4/+4
back to it and name it "Save" instead of "File". [1] http://www.hanselman.com/blog/TheFloppyDiskMeansSaveAnd14OtherOldPeopleIconsThatDontMakeSenseAnymore.aspx svn path=/trunk/; revision=46696
2012-12-22R46374 replaced too many GTK_STOCK_SAVEs. Put them back.Gerald Combs1-4/+4
svn path=/trunk/; revision=46690
2012-12-04Replace GTK_STOCK_SAVE with WIRESHARK_STOCK_FILE in a few places,Gerald Combs1-4/+4
including the GTK+ and Qt main toolbars. svn path=/trunk/; revision=46374
2012-10-05Add a capture_file * element to packet_range_t and pass it explicitly inGerald Combs1-6/+8
packet_range_init(). Get rid of global cfile references in packet-range.c. C++-ize packet-range.h. Shuffle some includes around. svn path=/trunk/; revision=45333
2012-10-03Unify the GTK+ and Win32 versions of "Export Specified Packets". Add aGerald Combs1-188/+184
shared "file_add_extension" routine. We no longer support _MSC_VER < 1400 so get rid of some clutter. Add a gzip checkbox to the Win32 export packets dialog. Windows code hasn't yet been tested (and is likely broken). I'll fix it shortly. svn path=/trunk/; revision=45296
2012-09-26Implement "Save" and "Save As".Gerald Combs1-1/+1
svn path=/trunk/; revision=45156
2012-09-24fix compilation on linuxMartin Kaiser1-0/+1
ui/gtk/capture_file_dlg.c needs ui/file_dialog.h svn path=/trunk/; revision=45107
2012-09-24Fix compilation on Windows.Gerald Combs1-4/+3
svn path=/trunk/; revision=45106
2012-09-24Unify some of the GTK+ and Win32 "Save As" code and behavior. This willGerald Combs1-176/+196
likely break compilation on Windows. I'll take care of it shortly. svn path=/trunk/; revision=45105
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45016
2012-09-19Add gzip support to the Win32 "Save As" dialog. Don't crash in the Win32Gerald Combs1-5/+7
merge dialog if we cancel. Adjust the size and location of the controls in the Win32 open and merge file templates. svn path=/trunk/; revision=45014
2012-09-10Fix breakage from r44859.Gerald Combs1-16/+16
svn path=/trunk/; revision=44862