path: root/globals.h
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-04Put the structure of a capture_file back in cfile.h.Guy Harris1-1/+0
The split isn't necessary now that epan no longer uses the capture_file structure. Change-Id: Ia232712a2fb5db511865805518e8d03509b2167f Reviewed-on: https://code.wireshark.org/review/24693 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03Use cfile.h to define the capture_file type.Guy Harris1-0/+1
Have cfile-int.h declare the structure, and use it in files that directly access the structure. Have cfile.h just incompletely declare the structure and include it rather than explicitly declaring it in source files or other header files. Never directly refer to struct _capture_file except when typedeffing capture_file. Add #includes as necessary, now that cfile.h doesn't drag in a ton of Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556 Reviewed-on: https://code.wireshark.org/review/24686 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-09Start using SPDX license identifiers.Gerald Combs1-13/+1
A while back Graham pointed out the SPDX project (spdx.org), which is working on standardizing license specifications: https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html Appendix V of the specification describes a short identifier (SPDX-License-Identifier) that you can use in place of boilerplate in your source files: https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b Start the conversion process with our top-level C and C++ files. Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878 Reviewed-on: https://code.wireshark.org/review/24302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-14Always put editor-modelines at the end of the file ...Bill Meier1-2/+2
... to ensure that there are no potential issues with respect to editors limiting the number of lines scanned at the end of the file when checking for editor modelines. Change-Id: Ic85cbb108bb5159d6ec4116fea11f5eebb4e44a4 Reviewed-on: https://code.wireshark.org/review/4688 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-12Add editor modelines; Adjust whitespace as needed.Bill Meier1-0/+13
Change-Id: I4da7b335d905dbca10bbce03aa88e1cdeeb1f8ad Reviewed-on: https://code.wireshark.org/review/4626 Reviewed-by: Bill Meier <wmeier@newsguy.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>
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-12-29Add 'extern "C"' wrappers and #include guards to various header files.Gerald Combs1-3/+3
svn path=/trunk/; revision=40321
2011-08-30Do as the comment says - move the variable to gtkglobals.Anders Broman1-2/+0
svn path=/trunk/; revision=38791
2011-08-30Path from Joerg Mayer, I'm committing it as I think the right thing to do is ↵Anders Broman1-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. svn path=/trunk/; revision=38789
2011-01-13Wrap include file in extern "C" { ... } for __cplusplusStephen Fisher1-1/+9
svn path=/trunk/; revision=35521
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-02-12Add a routine to attempt to get the absolute pathname of the executableGuy Harris1-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. svn path=/trunk/; revision=17267
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-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. svn path=/trunk/; revision=11400
2004-06-01various code cleanupsUlf Lamping1-2/+2
svn path=/trunk/; revision=11053
2004-03-18From Lars Roland: Move timestamp_type into libethereal and provide accessorOlivier Biot1-3/+1
methods for getting and setting the timestamp type. This is a move towards a real libethereal shared library. svn path=/trunk/; revision=10402
2003-11-01Based on a patch from Brian Fundakowski Feldman, add support for settingGuy Harris1-3/+1
link-layer type when capturing, using the "pcap_set_datalink()" and related APIs. svn path=/trunk/; revision=8848
2003-09-24Make "finfo_selected" a member of a "capture_file" structure rather thanGuy Harris1-2/+1
an independent global variable. svn path=/trunk/; revision=8524
2002-09-06Remove unused includeJörg Mayer1-2/+1
svn path=/trunk/; revision=6199
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-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/"). svn path=/trunk/; revision=4586
2002-01-10Separate the promiscuous mode, "Update list of packets in real time",Guy Harris1-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. svn path=/trunk/; revision=4514
2001-06-05Enable "Match Selected" only if there's a field selected *and* we can doGuy Harris1-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). svn path=/trunk/; revision=3513
2001-05-01"prefs.capture_real_time", not "prefs.capture_auto_scroll", shouldGuy Harris1-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. svn path=/trunk/; revision=3388
2001-03-27Make "comp_info_str" static in Ethereal - there's no need for it outsideGuy Harris1-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). svn path=/trunk/; revision=3196
2000-10-19Move the declaration of "g_resolving_actif" from the top-levelGuy Harris1-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. svn path=/trunk/; revision=2517
2000-09-28More EPAN-related code movements. Get rid of usage of #include "globals.h"Gilbert Ramirez1-36/+1
and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c as it's used by plugins.c. svn path=/trunk/; revision=2461
2000-08-20Instead of having the normal-weight and bold fonts set separately,Guy Harris1-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. svn path=/trunk/; revision=2304
2000-08-11Miscellaneous code cleaningLaurent Deniel1-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). svn path=/trunk/; revision=2254
2000-08-03Add a "Save As" feature to the TCP Follow dialogue, to save the streamGilbert Ramirez1-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. svn path=/trunk/; revision=2200
2000-06-27Patch from Ben Fowler to rename the global variable "cf" to "cfile", toGuy Harris1-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. svn path=/trunk/; revision=2092
2000-01-25Encapsulate the code to take a pointer to a pathname and return aGuy Harris1-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. svn path=/trunk/; revision=1552
2000-01-25On Win32, when splitting file names into directory and last component,Guy Harris1-1/+8
search for '\' rather than '/'. svn path=/trunk/; revision=1545
2000-01-24Heikki Vatiainen's patch to add a flag to control whether to interpretGuy Harris1-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. svn path=/trunk/; revision=1532
2000-01-06Don't include "print.h" in "globals.h"; have the few files that needGuy Harris1-5/+1
stuff from it include it themselves. svn path=/trunk/; revision=1424
1999-12-29Get rid of the commented-out GTK+ declarations.Guy Harris1-6/+1
svn path=/trunk/; revision=1386
1999-11-19Change match_selected() to produce a display filter using the selectedGilbert Ramirez1-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. svn path=/trunk/; revision=1070
1999-10-20Move GTK-related stuff out of globals.h and put it in gtk/gtkglobals.hGilbert Ramirez1-8/+4
svn path=/trunk/; revision=896
1999-10-02Move the declaration of global variables involved with packet captureGuy Harris1-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". svn path=/trunk/; revision=753
1999-09-30Add a new global flag "capture_child", which is TRUE if we're a childGuy Harris1-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. svn path=/trunk/; revision=740
1999-09-29Add an item to the "File/Print" dialog box to ask that the full hex dataGuy Harris1-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". svn path=/trunk/; revision=736
1999-09-26Added name resolution in GUI part:Laurent 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. svn path=/trunk/; revision=726
1999-09-23Move the toolkit-independent code to create a temporary capture file,Guy Harris1-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. svn path=/trunk/; revision=708
1999-09-19Added "Automatic scrolling in live capture".Laurent Deniel1-1/+2
This display option is disabled by default. svn path=/trunk/; revision=691
1999-09-12Some old CPP or tools that take C code in input doLaurent Deniel1-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 svn path=/trunk/; revision=668
1999-09-10Give "globals.h" an RCS ID and copyright/GPL notice.Guy Harris1-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. svn path=/trunk/; revision=649
1999-09-09More shuffling of GTK-related routines to gtk subdirectory.Gilbert Ramirez1-0/+2
svn path=/trunk/; revision=636
1999-09-01Moved GTK-dependent routines for file dialogues, print dialogues, printGilbert Ramirez1-0/+50
preferences, and menus to gtk subdirectory. svn path=/trunk/; revision=623