aboutsummaryrefslogtreecommitdiffstats
path: root/globals.h
AgeCommit message (Collapse)AuthorFilesLines
2011-08-30Do as the comment says - move the variable to gtkglobals.etxrab1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38791 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-30Path from Joerg Mayer, I'm committing it as I think the right thing to do is ↵etxrab1-2/+0
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
2011-01-13Wrap include file in extern "C" { ... } for __cplusplussfisher1-1/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35521 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-12Add a routine to attempt to get the absolute pathname of the executableguy1-1/+0
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
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-1/+1
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
2004-06-01various code cleanupsulfl1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11053 f5534014-38df-0310-8fa8-9805f1628bb7
2004-03-18From Lars Roland: Move timestamp_type into libethereal and provide accessorobiot1-3/+1
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
2003-11-01Based on a patch from Brian Fundakowski Feldman, add support for settingguy1-3/+1
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
2003-09-24Make "finfo_selected" a member of a "capture_file" structure rather thanguy1-2/+1
an independent global variable. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8524 f5534014-38df-0310-8fa8-9805f1628bb7
2002-09-06Remove unused includejmayer1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6199 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-4/+4
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
2002-01-21Include files from the "epan" directory and subdirectories thereof withguy1-2/+2
"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
2002-01-10Separate the promiscuous mode, "Update list of packets in real time",guy1-1/+4
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
2001-06-05Enable "Match Selected" only if there's a field selected *and* we can doguy1-4/+2
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
2001-05-01"prefs.capture_real_time", not "prefs.capture_auto_scroll", shouldguy1-2/+1
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
2001-03-27Make "comp_info_str" static in Ethereal - there's no need for it outsideguy1-2/+1
"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
2000-10-19Move the declaration of "g_resolving_actif" from the top-levelguy1-2/+1
"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
2000-09-28More EPAN-related code movements. Get rid of usage of #include "globals.h"gram1-36/+1
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
2000-08-20Instead of having the normal-weight and bold fonts set separately,guy1-3/+1
generate the name of the boldface font from the Roman font; if the two fonts don't have the same widths, the display will look weird when a field is selected, and it's a bit of a pain for the user to have to select *two* fonts. On UNIX/X, default to "-*-fixed-medium-r-semicondensed-*-*-120-*-*-*-*-*-" rather than to "-*-lucidatypewriter-medium-r-normal-*-*-120-*-*-*-*-iso8859-1" - some Linux distributions appear to lack the Lucida typewriter font. Add a "gui.font_name" preference to the preferences file, specifying the normal-weight font to use. Have it settable from the "GUI" tab in the Preferences dialog box - the "Font..." button, when clicked, pops up a font selection dialog box. If we either can't open the selected font or the boldfaced version of the font, default to "6x13" and "6x13bold" as fallbacks - the former will probably be "fixed", and the latter would be "fixedbold" if X actually created such an alias, but it doesn't so we use "6x13bold" instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2304 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-11Miscellaneous code cleaningdeniel1-12/+1
- add <stdarg.h> or <varargs.h> in snprintf.h and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes - remove the check of multiple inclusions in source (.c) code (there is a bit loss of _cpp_ performance, but I prefer the gain of code reading and maintenance; and nowadays, disk caches and VM are correctly optimized ;-). - protect all (well almost) header files against multiple inclusions - add header (i.e. GPL license) in some include files - reorganize a bit the way header files are included: First: #include <system_include_files> #include <external_package_include_files (e.g. gtk, glib etc.)> Then #include "ethereal_include_files" with the correct HAVE_XXX or NEED_XXX protections. - add some HAVE_XXX checks before including some system header files - add the same HAVE_XXX in wiretap as in ethereal Please forgive me, if I break something (I've only compiled and regression tested on Linux). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2254 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-03Add a "Save As" feature to the TCP Follow dialogue, to save the streamgram1-2/+1
file to a user-specified file. Move the file-copy routine in save_cap_file() to an indepenent function in file.c (copy_binary_file()) so that follow_dlg.c can use it. Remove #include "follow.h" from the C files that don't need it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2200 f5534014-38df-0310-8fa8-9805f1628bb7
2000-06-27Patch from Ben Fowler to rename the global variable "cf" to "cfile", toguy1-2/+2
make it easier to use grep to find all references to it without getting a lot of false hits and to check, after allocating the memory chunk for "frame_data" structures, that the allocation succeeded. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2092 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-25Encapsulate the code to take a pointer to a pathname and return aguy1-8/+1
pointer to the name of the file to which it refers (i.e., to the last component of the pathname) in a "get_basename()" routine, and have the code in "file.c" call it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1552 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-25On Win32, when splitting file names into directory and last component,guy1-1/+8
search for '\' rather than '/'. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1545 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-24Heikki Vatiainen's patch to add a flag to control whether to interpretguy1-1/+2
the IPv4 TOS field as a TOS field or as a DiffServ field, and allow that field to be controlled by a command-line option or an option in the "Display:Options" dialog box. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1532 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-06Don't include "print.h" in "globals.h"; have the few files that needguy1-5/+1
stuff from it include it themselves. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1424 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-29Get rid of the commented-out GTK+ declarations.guy1-6/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1386 f5534014-38df-0310-8fa8-9805f1628bb7
1999-11-19Change match_selected() to produce a display filter using the selectedgram1-1/+2
field's name, if possible. (If the selected field is not a registered field, then of course, we still have to use the frame[x:y] syntax). tree_selected_start and tree_selected_len are on longer globals variables; finfo_selected has replaced them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1070 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-20Move GTK-related stuff out of globals.h and put it in gtk/gtkglobals.hgram1-8/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@896 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-02Move the declaration of global variables involved with packet captureguy1-9/+1
from "globals.h" to "capture.h". Only "capture.c" needs to include <pcap.h>; move the include of <pcap.h> from "capture.h" to "capture.c". We no longer need any DLT_ defines (that's handled inside Wiretap); remove the defines of DLT_ from "capture.h". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@753 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-30Add a new global flag "capture_child", which is TRUE if we're a childguy1-2/+2
process for a sync mode or fork mode capture. Have that flag control whether we do things that *only* the parent or *only* the child should do, rather than basing it solely on the setting of "sync_mode" or "fork_mode" (or, in the case of stuff done in the child process either in sync mode or fork mode, rather than basing it on the setting of those flags at all). Split "do_capture()" into a "run_capture()" routine that starts a capture (possibly by forking off and execing a child process, if we're supposed to do sync mode or fork mode captures), and that assumes the file to which the capture is to write has already been opened and that "cf.save_file_fd" is the file descriptor for that file, and a "do_capture()" routine that creates a temporary file, getting an FD for it, and calls "run_capture()". Use "run_capture()", rather than "capture()", for "-k" captures, so that it'll do the capture in a child process if "-S" or "-F" was specified ("do_capture()" won't do because "-k" captures should write to the file specified by the "-w" flag, not some random temporary file). For child process captures, however, just use "capture()" - the child process shouldn't itself fork off a child if we're in sync or fork mode, and should just write to the file whose file descriptor was specified by the "-W" flag on the command line. All this allows you to do "ethereal -S -w <file> -i <interface> -k" to start a sync mode capture from the command line. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@740 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-29Add an item to the "File/Print" dialog box to ask that the full hex dataguy1-1/+5
of the packet be printed (this is only done if "Print detail" is selected; it should be grayed out of "Print summary" is selected). If that item is selected, suppress the hex printing of uninterpreted data items in the protocol tree. Move some GTK+ keys not used outside of "gtk/print_dlg.c" from "gtk/keys.h" into "gtk/print_dlg.c". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@736 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-26Added name resolution in GUI part:deniel1-1/+2
- Capture->Start->"Active name resolution" Allows the user to turn on/off name resolution during a live capture. - Display->Options->"Name resolution" Turn on/off name resolution for the displayed data (or during the -S mode). E.g. clicking on a packet captured with resolution disabled will resolve names in the detailed list if this option is set. And applying or resetting a display filter allows the update of the packet list as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@726 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-23Move the toolkit-independent code to create a temporary capture file,guy1-2/+1
and to fork off and run a separate copy of "ethereal" for "-S" and "-F" captures or just call "capture()" otherwise, out of "gtk/capture_dlg.c" and into a routine in "capture.c". If the attempt to create said temporary capture file fails, pop up a dialog box and don't do the capture. Have the child capture process send a message upstream after it either successfully starts the capture and syncs out the header of the capture file, or fails to start the capture; the message indicates whether it succeeded or failed, and, if it failed, includes a failure message. This: avoids the use of a signal, and thus means we don't have to worry about whether to capture the signal, or whether to start or stop capturing depending on whether this particular capture is in sync mode or not; lets us pop up the message box for the error in the parent process if we're in sync mode, rather than doing it in the child, which didn't work well. Add a check button to the Capture/Start dialog box, so that we can control, for each capture, whether it's to be done in sync mode or not. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@708 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-19Added "Automatic scrolling in live capture".deniel1-1/+2
This display option is disabled by default. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@691 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-12Some old CPP or tools that take C code in input dodeniel1-10/+10
not like #preprocessor_macros that do not start at the first column. So write: #ifdef FOO # include <dummy1.h> # define DUMMY 1 #else # include <dummy2.h> # define DUMMY 2 #endif instead of #ifdef FOO #include <dummy1.h> #define DUMMY 1 #else #include <dummy2.h> #define DUMMY 2 #endif git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@668 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-10Give "globals.h" an RCS ID and copyright/GPL notice.guy1-0/+57
Move some defines that would be used even by a non-GTK+-based Ethereal from "gtk/main.h" to "globals.h". Remove the byte-order #defines from "packet.h", as they're now in "globals.h" (having been moved there from "gtk/main.h"). Fix up some files that use those #defines to include "globals.h". "resolv.c" doesn't use any GTK stuff, so it needn't include <gtk/gtk.h> nor "gtk/main.h" - it only did so to get the byte-order #defines for the benefit of "packet-ipv6.h", and "packet-ipv6.h" now includes them itself. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@649 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-09More shuffling of GTK-related routines to gtk subdirectory.gram1-0/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@636 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-01Moved GTK-dependent routines for file dialogues, print dialogues, printgram1-0/+50
preferences, and menus to gtk subdirectory. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@623 f5534014-38df-0310-8fa8-9805f1628bb7