Add 'extern "C"' wrappers and #include guards to various header files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40321 f5534014-38df-0310-8fa8-9805f1628bb7
Do as the comment says - move the variable to gtkglobals. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38791 f5534014-38df-0310-8fa8-9805f1628bb7
Path from Joerg Mayer, I'm committing it as I think the right thing to do is to have all menus defined in the GUI and then hide the ones not available/usable and thuss get rid of a lot of #ifdefs. As for the icons we should load all of them even if some are not needed in all configurations. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38789 f5534014-38df-0310-8fa8-9805f1628bb7
Wrap include file in extern "C" { ... } for __cplusplus git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35521 f5534014-38df-0310-8fa8-9805f1628bb7
name change git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
Add a routine to attempt to get the absolute pathname of the executable file, strip off the last component to get the pathname of the directory containing the executable file, and save it for future use. On Windows, you can get that from the OS, but, on UN*X, you have to look at argv[0] and derive the absolute path from that (argv[0] is not guaranteed to be an absolute path, or even a path at all). (In addition, if you're running from the build directory, you might have to strip off a ".libs/" added to argv[0] as an artifact of the libtoolizing script.) Use that in the About dialog, and use it to construct the path of dumpcap. Don't put quotes into the path of dumpcap; you don't have to quote strings with spaces in them when handing them to execvp and, in fact, you *mustn't* quote them, as the quotes will be treated as part of the pathname. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17267 f5534014-38df-0310-8fa8-9805f1628bb7
Set the svn:eol-style property on all text files to "native", so that they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
various code cleanups git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11053 f5534014-38df-0310-8fa8-9805f1628bb7
From Lars Roland: Move timestamp_type into libethereal and provide accessor methods for getting and setting the timestamp type. This is a move towards a real libethereal shared library. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10402 f5534014-38df-0310-8fa8-9805f1628bb7
Based on a patch from Brian Fundakowski Feldman, add support for setting link-layer type when capturing, using the "pcap_set_datalink()" and related APIs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8848 f5534014-38df-0310-8fa8-9805f1628bb7
Make "finfo_selected" a member of a "capture_file" structure rather than an independent global variable. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8524 f5534014-38df-0310-8fa8-9805f1628bb7
Remove unused include git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6199 f5534014-38df-0310-8fa8-9805f1628bb7
Removed trailing whitespaces from .h and .c files using the winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
Include files from the "epan" directory and subdirectories thereof with "epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4586 f5534014-38df-0310-8fa8-9805f1628bb7
Separate the promiscuous mode, "Update list of packets in real time", and "Automatic scrolling in live capture" options from the preference settings for them, so that the preference settings affect the initial values of those options, but changing those values in a capture don't affect the preferences, and don't automatically get saved when you save the preferences. If we're building without libpcap, don't have an "Automatic scrolling in live capture" option anywhere. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4514 f5534014-38df-0310-8fa8-9805f1628bb7
Enable "Match Selected" only if there's a field selected *and* we can do a "Match Selected" on it - we can't do a "Match Selected" if the field has no value (e.g., FT_NULL) and has a length of 0. If we unselect the current packet, we don't have a protocol tree, so we don't have a currently selected field - clear the "Match Selected" menu item and the display in the status line of information about the currently selected field. Move the low-level statusbar manipulation into "gtk/main.c", in routines whose API doesn't expose anything GTK+-ish. "close_cap_file()" calls one of those routines to clear out the status bar, so it doesn't need to take a pointer to the statusbar widget as an argument. "clear_tree_and_hex_views()" is purely a display-manipulating routine; move it to "gtk/proto_draw.c". Extract from "tree_view_unselect_row_cb()" an "unselect_field()" routine to do all the work that needs to be done if the currently selected protocol tree row is unselected, and call it if the currently selected packet list row is unselected (if it's unselected, there *is* no protocol tree, so no row can be selected), as well as from "tree_view_unselect_row_cb()". Before pushing a new field-description message onto the statusbar, pop the old one off. Get rid of an unused variable (set, but not used). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3513 f5534014-38df-0310-8fa8-9805f1628bb7
"prefs.capture_real_time", not "prefs.capture_auto_scroll", should control whether we have a child process do the capturing; a user might want the packet list to be updated as packets arrive but *not* want it to scroll so that the most recently arrived packets are shown. "prefs.capture_auto_scroll", not "auto_scroll_live", should control whether we scroll a real-time-update capture's packet list; "auto_scroll_live" isn't set by the capture dialog box, "prefs_capture_auto_scroll" is. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3388 f5534014-38df-0310-8fa8-9805f1628bb7
Make "comp_info_str" static in Ethereal - there's no need for it outside "gtk/main.c" in Ethereal. Add the GLib version to it in Ethereal, and put in the GLib version rather than the GTK+ version in Tethereal (which isn't linked with GTK+...). Make it a GString; this makes the code to construct it slightly less ugly, especially now that we're putting the GLib version in. Fix the code for the "-D" flag in Tethereal to compile in a no-libpcap version (in a no-libpcap version, it just says that this version of Tethereal wasn't compiled with capture support). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3196 f5534014-38df-0310-8fa8-9805f1628bb7
Move the declaration of "g_resolving_actif" from the top-level "globals.h" file to "epan/resolv.h", as it's exported by "epan/resolv.c", have files that use "g_resolving_actif" include "resolv.h", and don't have "epan/resolv.c" include "globals.h" so that it doesn't drag in, for example, headers that, in turn, drag in GTK+ headers. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2517 f5534014-38df-0310-8fa8-9805f1628bb7
More EPAN-related code movements. Get rid of usage of #include "globals.h" and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c as it's used by plugins.c. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2461 f5534014-38df-0310-8fa8-9805f1628bb7