summaryrefslogtreecommitdiff
path: root/ui/gtk/summary_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-05Allow bigger snapshot lengths for D-Bus captures.Guy Harris1-2/+2
Use WTAP_MAX_PACKET_SIZE_STANDARD, set to 256KB, for everything except for D-Bus captures. Use WTAP_MAX_PACKET_SIZE_DBUS, set to 128MB, for them, because that's the largest possible D-Bus message size. See https://bugs.freedesktop.org/show_bug.cgi?id=100220 for an example of the problems caused by limiting the snapshot length to 256KB for D-Bus. Have a snapshot length of 0 in a capture_file structure mean "there is no snapshot length for the file"; we don't need the has_snap field in that case, a value of 0 mean "no, we don't have a snapshot length". In dumpcap, start out with a pipe buffer size of 2KB, and grow it as necessary. When checking for a too-big packet from a pipe, check against the appropriate maximum - 128MB for DLT_DBUS, 256KB for everything else. Change-Id: Ib2ce7a0cf37b971fbc0318024fd011e18add8b20 Reviewed-on: https://code.wireshark.org/review/21952 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-21No need to check for string option values being null.Guy Harris1-8/+8
A string option, if present, always has a value; it might be a null *string*, but you won't get a null pointer (if the option isn't present, it simply isn't present). Fix some comments while we're at it. Change-Id: I9c1420f56998a7d04de5c5cc2e92631b181f303a Reviewed-on: https://code.wireshark.org/review/16564 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-14Redo the block options APIs.Guy Harris1-24/+21
A block can have zero or more instances of a given option. We distinguish between "one instance only" options, where a block can have zero or one instance, and "multiple instances allowed" options, where a block can have zero or more instances. For "one instance only" options: "add" routines add an instance if there isn't one already and fail if there is; "set" routines add an instance if there isn't one already and change the value of the existing instance if there is one; "set nth" routines fail; "get" routines return the value of the instance if there is one and fail if there isn't; "get nth" routines fail. For "multiple instances allowed" options: "add" routines add an instance; "set" routines fail; "set nth" routines set the value of the nth instance if there is one and fail otherwise; "get" routines fail; "get nth" routines get the value if the nth instance if there is one and fail otherwise. Rename "optionblock" to just "block"; it describes the contents of a block, including both mandatory items and options. Add some support for NRB options, including IPv4 and IPv6 option types. Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e Reviewed-on: https://code.wireshark.org/review/16444 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-06Add a routine to get an array of all instances of a string option.Guy Harris1-10/+17
Use it for OPT_COMMENT in the SHB, as there may be ore than one instance of OPT_COMMENT in an SHB. Also, use wtap_optionblock_get_option_string for OPT_SHB_HARDWARE, OPT_SHB_OS, and OPT_SHB_USERAPPL; they're specified as "only one instance allowed". Change-Id: I23ad87e41e40b7ae1155e96c0523a6f8caad5204 Reviewed-on: https://code.wireshark.org/review/15750 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-06Directly use wtap_opttypes calls to fetch SHB options.Guy Harris1-41/+63
Don't put them in the summary structure; the summary routines should calculate summary statistics, not dig up every bit of information that *could* appear in a summary. Instead, have the GUI code call wtap_file_get_shb() to get the SHB information and call wtap_optionblock_get_option_string() to fetch the option values. Move the option code definitions into wtap_opttypes.h, as they're used by the API. Change-Id: Icef11f5fb30fdc3df1bb0208aae9ed0aebaf0182 Reviewed-on: https://code.wireshark.org/review/15748 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-21Link version code statically againJoão Valverde1-1/+1
This allows keeping the code-sharing with the static linking. This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more external dependencies to wsutil than strictly necessary. A nice side-effect is that libwsutil no longer depends on version.h. Follow up to f95976eefcbeb5d24df383c29d29ef888b503945. Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23 Reviewed-on: https://code.wireshark.org/review/15002 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-18Don't add the wiretap directory to the list of include directories.Guy Harris1-2/+2
If you include something from the wiretap directory, always precede it with wiretap/. Fix some includes of files in the top-level directory to use a path relative to the current directory, not relative to the wiretap directory. This makes it a bit clearer what's being included. Change-Id: Ib99655a13c6006cf6c3112e9d4db6f47df9aff54 Reviewed-on: https://code.wireshark.org/review/13990 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-4/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-20Get rid of #if 0'ed out includes of capture-pcap-util.h.Guy Harris1-3/+0
Change-Id: Ie3678a08ed9b3d46b22e7c59eef74e6e9636ae59 Reviewed-on: https://code.wireshark.org/review/3140 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04Move utility routines for capturing into a libcaputils static library.Guy Harris1-0/+2
Some of those routines are used only in dumpcap; others are used in TShark and Wireshark as well. Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7 Reviewed-on: https://code.wireshark.org/review/2841 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30Move capture.[ch] to libui.Guy Harris1-1/+1
Change-Id: I86e7e781cc9e14abab0374a18b95438529b046f0 Reviewed-on: https://code.wireshark.org/review/2711 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22Add a routine to return a version string including VCS information.Guy Harris1-2/+3
Add a routine get_ws_vcs_version_info() that, for builds from a tree checked out from Wireshark's version control system, returns a string that includes both the Wireshark version number and an indication of what particular VCS version was checked out, and just returns Wireshark's version number for other builds. Use that routine rather than manually gluing VERSION and the Git version number together. ("vcs", not "git", just in case we do something bizarre or mercurial some day. :-)) Change-Id: Ie5c6dc83b9d3f56655eaef30fec3ec9916b6320d Reviewed-on: https://code.wireshark.org/review/2529 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19Don't crash when closing the Summary window if the file has been closed.Jeff Morriss1-1/+1
Yes, this is a Gtk-UI fix but it's a one-liner and easy enough. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8715 Bug: 8715 Change-Id: I554b6c953e83ff3d8cb57029e844f2f481b751dd Reviewed-on: https://code.wireshark.org/review/2460 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-03-19fix of bug 9836. Avg. packet size in Statistics -> Summary is rounded to ↵Jan Kaisrlik1-9/+6
nearest. GTK QT Change-Id: I34e84e6cf4587fee999764435fa1a407c8aa04bb Reviewed-on: https://code.wireshark.org/review/687 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@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-07Replace "svn" with "git" all over the place.Gerald Combs1-1/+1
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate. Rename "svnversion.h" to "version.h" as Evan suggested. Update some URLs. In make-version.pl, make sure we don't set an improper upstream branch name. Use the number of commits + short hash from `git describe` for package names by default. Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96 Reviewed-on: https://code.wireshark.org/review/139 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-01-26Drop support of Visual Studio 2005Alexis La Goutte1-8/+0
* Remove _MSC_VER < 1500 check * Cleanup config.nmake See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html svn path=/trunk/; revision=54965
2013-11-12Don't do our own line wrapping of the display filter, let GTK do it for us.Jeff Morriss1-21/+2
(With this change all the right-hand columns in this dialog will wrap if necessary whereas before only the display filter would wrap lines.) svn path=/trunk/; revision=53282
2013-11-08The "file types" we have are actually combinations of types andGuy Harris1-2/+2
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-08-07Do not use overlapping memory in g_snprintf.Stig Bjørlykke1-12/+13
Use consistent spacing between title and value. svn path=/trunk/; revision=51181
2013-04-02Handle the case of there being no comment view.Guy Harris1-9/+11
svn path=/trunk/; revision=48708
2013-04-02Show the comment area only if we could write out the comments were theGuy Harris1-20/+22
user to enter any. svn path=/trunk/; revision=48707
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-04Fir Gtk 3.8 & newer: gtk_scrolled_window_add_with_viewport() ==> ↵Bill Meier1-0/+4
gtk_container_add(). svn path=/trunk/; revision=48065
2013-01-16Replace gtk_table...() with ws_gtk_grid...();Bill Meier1-63/+75
Also; do some whitespace cleanuyp. svn path=/trunk/; revision=47118
2013-01-04Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8105 :Pascal Quantin1-1/+1
Allow use of huges values for localtime / ctime / gmtime with MSVC 2008 or later svn path=/trunk/; revision=46930
2012-12-29Add a vertical scrollbar to the summary dialog window.Bill Meier1-2/+8
(The window has gotten pretty tall; Creating a multiline 'Capture File Comments'" entry may make the buttons inaccessible w/o a scrollbar). ##backport 1.8 svn path=/trunk/; revision=46844
2012-12-26Move summary related stuff to summary_dlgAnders Broman1-0/+85
svn path=/trunk/; revision=46782
2012-11-29Add missing newline at end of filePascal Quantin1-1/+1
svn path=/trunk/; revision=46284
2012-11-27Add more information about the capture.Anders Broman1-1/+132
svn path=/trunk/; revision=46224
2012-11-27Start including info from Statistics/Summary.Anders Broman1-0/+114
svn path=/trunk/; revision=46219
2012-10-01update the capture comment icon in the statusbarMartin Kaiser1-0/+3
when a capture comment was edited via Statistics/Summary svn path=/trunk/; revision=45238
2012-09-30Add displayed and marked percent columns and percent calculations for ↵Chris Maynard1-64/+118
dropped and ignored packets in summary dialog. Also display percent calculations for displayed, marked, ignored and dropped packets in statusbar. Like ignored packets, only display marked packet count and percent in the statusbar if there are any. Fixes enhancement bug: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2377 svn path=/trunk/; revision=45226
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-08-03Move capture_globals.h from ui/gtk/ to ui/. Show interface activityGerald Combs1-1/+1
using sparklines in the qtshark main window. svn path=/trunk/; revision=44253
2012-07-20gtk_container_add() -> gtk_box_pack_start() [bug #7377]Jakub Zawadzki1-14/+14
svn path=/trunk/; revision=43874
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-15For a capture file, keep an array of all encapsulation types seen.Guy Harris1-3/+11
Show all of them in the summary dialog; we will be using it in the future to figure out what capture file formats we can write to (just because a capture file format supports per-packet encapsulations, that doesn't mean that it supports *all possible* encapsulations). svn path=/trunk/; revision=43278
2012-06-04We need main.h for main_update_for_unsaved_changes(), regardless ofGuy Harris1-2/+1
whether we have pcap or not. svn path=/trunk/; revision=43052
2012-06-04Have a main_update_for_unsaved_changes() routine that, if changes areGuy Harris1-3/+2
made to the capture file (adding/removing/editing comments, for now) or if a capture file with unsaved changes are unsaved, updates the menu bar, the toolbar, *and* the titlebar, which now has a GNOME-style "*" to indicate unsaved changes. Make set_menus_for_capture_file() a private interface between main.c and main_menubar.c, and have its callers, such as main_update_for_unsaved_changes(), be responsible for updating the toolbar as well. svn path=/trunk/; revision=43051
2012-05-28Don't use pcap LINKTYPE_ values in the iface_options structure, useGuy Harris1-7/+1
Wiretap encapsulation values; rename the field in question encap_type to emphasize that. (Code that looks at that field already assumes it's a Wiretap encapsulation value.) For live captures, map the LINKTYPE_ value to a Wiretap encapsulation value. wtap_encap_string() never returns NULL, so don't check for a null return value. svn path=/trunk/; revision=42871
2012-05-24Enable word wrapping for capture-file comments.Jeff Morriss1-0/+1
svn path=/trunk/; revision=42835
2012-05-24Get rid of the button row for the capture-file comments. Instead, turn theJeff Morriss1-72/+50
whole summary dialog into an editor-like dialog with an OK and Cancel buttons (OK sets the new capture file comment, Cancel doesn't). In order to keep the dialog the same regardless of the file type (and avoid having a Cancel and OK button when there's no text field to edit), allow users to create or edit capture-file comments even if the file type is not PCAPNG (they can add a comment via the add/edit comment UI anyway). Don't include a Clear button: the user can just Ctrl-A + backspace if they want to do that. Don't set the comment text to "[None]" if there's no comment, just leave it blank. Don't allow the user to create more than 1 Summary dialog at a time. svn path=/trunk/; revision=42834
2012-05-24Use cf_update_capture_comment() to save the capture comment (instead ofJeff Morriss1-4/+3
summary_update_comment() which is no longer necessary). cf_update_capture_comment() has the advantage that it doesn't mark the file as unsaved unless the comment actually changed. svn path=/trunk/; revision=42832
2012-05-24Free the new comment after calling gtk_text_buffer_set_text().Jeff Morriss1-3/+4
svn path=/trunk/; revision=42831
2012-05-24Also allow the user to edit the capture-file comment if there is one (notJeff Morriss1-26/+27
only if the capture file format is PCAPNG). This can happen if the user does not have a PCAPNG file but has added a capture-file comment via the add/edit capture file comment UI. Replace some tabs with spaces and wrap a few long lines. svn path=/trunk/; revision=42827
2012-05-24Keep track, in Wiretap, of whether the file is compressed, and provideGuy Harris1-1/+3
an API to fetch that. When doing "Save" on a compressed file, write it out compressed. In the Statistics -> Summary dialog and in capinfos, report whether the file is gzip-compressed. svn path=/trunk/; revision=42818
2012-05-20Change the "user_saved" member of a capture_file structure toGuy Harris1-2/+2
"unsaved_changes", and have it be TRUE iff changes have been made to the file since it was read - *not* if it's a temporary file from a live capture. Check the "is_tempfile" member, and the "unsaved_changes" member, when appropriate. Just have a set_toolbar_for_capture_file() routine that updates the "save", "close", and "reload" toolbar as appropriate, given a capture_file structure - absorb the function of set_toolbar_for_unsaved_capture_file() into it. svn path=/trunk/; revision=42721
2012-05-05AFAICT '#include sys/types.h' is not needed for these files.Bill Meier1-3/+0
svn path=/trunk/; revision=42443
2012-04-21Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().Anders Broman1-2/+2
svn path=/trunk/; revision=42176