Fix leaks
- don't g_strdup a string just to use it in a g_strdup_printf
- clean up properly in error cases in lua bindings
- misc. other missing g_free() calls
- one missing fclose() in the new 80211_utils
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7454
svn path=/trunk/; revision=43617
"Find Next Mark" was duplicated in the Edit menu and "Find Previous Mark" was
missing (the 2nd "Find Next Mark" would, if selected, find the previous mark).
svn path=/trunk/; revision=43600
fill_capture_box():
if there are interfaces on which to capture, constructs the
interface list, otherwise destroys the interface list and puts
up a message.
update_capture_box():
updates the interface list to reflect current reality.
welcome_if_panel_reload():
if there is an interface list, and if there are interfaces on
which to capture (so that we still want that list), updates the
list by calling update_capture_box(), otherwise creates or
destroys it by calling fill_capture_box() (as either it doesn't
exist but now needs to or does exist but needs to go away).
Have refresh_local_interface_lists(), which re-fetches the list of local
interfaces and updates every interface list that includes local
interfaces, and refresh_non_local_interface_lists(), which only updates
interface lists that (also) include interfaces other than local
interfaces (such as pipes and remote interfaces). Call them in the
apprpriate places (if we know the list of local interfaces has been
updated, call refresh_local_interface_lists(), otherwise, if we know
interfaces other than local interfaces have been added or removed, call
refresh_non_local_interface_lists()).
Don't have any routine that updates the interface list for one widget
update the interface list for any other widget; leave the global
updating of interface lists up to refresh_local_interface_lists() and
refresh_non_local_interface_lists() - only call one of them if any
interface lists are to be updated.
svn path=/trunk/; revision=43517
add a capture_dlg_refresh_if() routine to redraw the list of
interfaces in the Capture -> Interfaces dialog if the lsit of
known interfaces is updated, and have it do that not by
destroying and reconstructing the entire dialog box, but just by
destroying and reconstructing the table containing the
interfaces and their statistics.
From me:
have a refresh_interfaces_cb() routine in ui/gtk/main.c that
scans the local interfaces and refreshes *all* the widgets that
have interface lists;
add a "Refresh Interfaces" item to the Capture menu that calls
that;
have the "Refresh" button in the "Manage Interfaces" window also
call that;
rename the Capture Options window routine dlg_window_present()
to capture_dlg_window_present() to make it clearer *which*
dialog it checks for;
fix Pontus' patch to call capture_stat_stop() *before* nulling
out the global pointer for the statistics cache - if it's called
*after* nulling it out, the argument passed to
capture_stat_stop() is null, and it doesn't kill off the dumpcap
gathering the statistics so they just pile up (and, at least on
OS X, chewing up BPF devices until you run out of BPF devices
that have the right ownership and permissions for dumpcap to use
as a normal user);
if refreshing the interfaces fails to get an interface list,
close the Capture Interfaces dialog.
svn path=/trunk/; revision=43515
the file has unsaved changes, and we can save it in some format
through Wiretap
or
the file is a temporary file and has no unsaved changes (so that
"saving" it just means copying it).
Only allow "Save As" if
we can save it in some format through Wiretap
or
the file is a temporary file and has no unsaved changes (so that
"saving" it just means copying it).
This means that we don't support using "Save As" for just copying the
file unless we can do that with Wiretap; copying the file byte-for-byte
only works as "saving" if there are no unsaved changes *and* we're
saving it in the same format that it's in *and* we're saving it with the
same form of compression (if any) that it has.
Rename cf_can_save_as() to cf_can_write_with_wiretap() to better reflect
what it really does.
svn path=/trunk/; revision=43477
It's probably not a good idea to read the menu bar code from file as it causes problems with permissions when Wireshark is run fom build dir.
svn path=/trunk/; revision=43367
out of main_menubar.c into routines in main.c.
Move some routines that are only used by main.c into
main_menubar_private.h.
svn path=/trunk/; revision=43298
used for popped-up packet windows, and it includes more than just code
to draw the protocol tree - it includes the hex dump pane code as well.
Rename it packet_panes.c; the stuff specific to the main window should
be moved into a different file.
svn path=/trunk/; revision=43290
capture to stop, so that we don't try to quit while we're in the middle
of quitting or try to stop or restart the capture we're in the middle of
stopping.
svn path=/trunk/; revision=43250
live capture" and colorization, so that the ones in main_menubar.c don't
have to know about anything other than the main menubar.
Move some toolbar routines that should only be used by routines in
main.c into a main_toolbar_private.h header.
svn path=/trunk/; revision=43053
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
saving files, and run it modal (which we're already doing with the
GtkFileChooserDialog); this means less callback-based state machine
stuff, simplifying the code paths a bit.
If we're saving a file before closing it, don't bother reloading it
after saving it.
svn path=/trunk/; revision=42855
capture_cb(): if we strrchr() didn't find a seperator, don't use
g_strdup_printf() to format the action_name (since that would have to be
freed), just set it to the action_name.
svn path=/trunk/; revision=42829
new file the current file, as is the case in most if not all other GUI
applications.
A new "Export Specified Packets" menu option allows you to specify which
packets to write out, with the default being the displayed packets (and
those on which the displayed packets depend for, e.g. reassembly), and
never makes the resulting file the current file.
The two operations are conceptually distinct. Lumping them into one
menu item, with the default for "Save As" being "displayed packets only"
and thus making it behave like the latter operation, was causing some
confusion; see, for example, bug 6640.
Make the dialog popped up if you try to "Save As" or "Export Specified
Packets" on top of an existing file ask the "do you want to do this?"
question in the main part of the message, and note in the secondary text
that doing that will overwrite what's in the file; that matches what
TextEdit on OS X and the GNOME text editor say.
svn path=/trunk/; revision=42792
File -> Export Packet Dissections
(for the "print to file", "export as CSV", "export as C array",
"export as PSML", and "export as PDML" items)
File-> Export Selected Packet Bytes
File -> Export SSL Session Keys
File -> Export Objects
(for exporting objects transferred over HTTP, DICOM, or SMB)
menu items.
The operations under Export really weren't that related - about all they
had in common was that they wrote to a file stuff other than packets
in a capture file format; the operations in the groups *under* Export
were related, so the groups are now menu items of their own.
This way, the File menu more immediately indicates what options of that
sort are available.
It also means that the Export Packet Dissections item might make it
clearer that what you get from that is *NOT* something that can just be
read back into Wireshark, as at least one user who asked "how do I get
my capture back from this?" on ask.wireshark.com thought. If that
doesn't suffice, perhaps renaming it to "Export Dissected Packets" would
help; if *that* doesn't suffice, perhaps Kevin Cullimore's suggestion
that it say "Report" rather than "Export" will do the trick:
From: Kevin Cullimore <kcullimo@runbox.com>
Subject: [Wireshark-users] Re: Should the "export as text" item be in an "Export Human-readable..." item in the File menu?
Date: May 19, 2012 8:31:23 PM PDT
To: wireshark-users <wireshark-users@wireshark.org>
Would classifying the asymmetric export (ones that lack a
corresponding "import" action) formats as "reports" help clear
up the original ambiguity/misunderstanding? It seems that most
of the gui-based network tools I'm forced to periodically
interact with rely upon that term with at least some success.
(Or perhaps some other verb would be right in some cases, e.g. "Save SSL
Session Keys".)
This also sets a pattern for another upcoming change - splitting "Save
As" into "Save As", which always saves every packet and makes the new
file the current file, and "{Verb} Specified Packets", which lets you
specify which packets to save and does *not* make the new file the
current file. That'd simplify the code a bit, and might clear up the
new only-in-the-trunk issue in bug 6640 - having "Save As" default to
saving displayed packets currently means that it acts more like the
latter of those functions.
svn path=/trunk/; revision=42778
"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
Separate "Toolbar" from the toolbar name in the View menu items.
Use "l", rather than "W", as the whatchamacallit for the wireless
toolbar - "W" is already used for "show packet in new window".
svn path=/trunk/; revision=42275
popup should also be available through a regular menu. So, make the
"Manually resolve address" function availble in under View->Name Resolution .
(Yes, technically this is an "Edit"-like action, but it just fits so well
under Name Resolution.)
While there, move "Resolve Name" from main_menu_bar_toggle_action_entries[]
into main_menu_bar_entries[] so it doesn't get a (useless) toggle indicator.
(At least as I understand this function, it's supposed to allow you to tell
Wireshark to go off and try to resolve the names in the current frame;
unfortunately it doesn't seem to actually work.)
svn path=/trunk/; revision=41747
I'm contributing a new dissector for the HART/IP protocol. This
protocol is specified by the HART Conformance Foundation (HCF). It is
a standard protocol used in the process control industry. It
essential wraps the multip-drop serial HART packets in TCP or UDP
packets. The standard has been approved by the HCF and has been
assigned UDP/TCP port 5094 by IANA.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6961
--This line, and those below,
will be ignored--
M AUTHORS
M epan/CMakeLists.txt
M epan/dissectors/Makefile.common
AM epan/dissectors/packet-hartip.c
M ui/gtk/main_menubar.c
svn path=/trunk/; revision=41644
description of existing menus must be accurate: if a name and action are
both specified then the to-be-added-XML must include both the name and the
action.
It appears that the formats given in stat_group_name()'s value_string were
designed to take this into account, but there was no code to separate the menu
name from its action. Adding that separation is complicated by the fact that
menus are separated by /'s and actions may also contain that character. To
deal with that, "escape" the /'s in actions by replacing them with #'s.
make_menu_xml() then un-escapes them back into /'s.
There has to be an easier way to do all of this...
svn path=/trunk/; revision=41591
the file (as is the case during a live capture).
Replace tabs with spaces (for consistency with the rest of the file).
svn path=/trunk/; revision=41415
"..." after it, as it pops up a dialog box to let you actually type in a
comment.
Add "Add or Edit Packet Comment" to the menubar's Edit menu.
svn path=/trunk/; revision=41005