Commit Graph

172 Commits

Author SHA1 Message Date
João Valverde 9e1be36071 version info: Clean clang version
__VERSION__ is copied from GCC, clang has __clang_version__.

Apparently clang's __VERSION__ already includes the name:

  Compiled (64-bit) using clang Clang 11.1.0
2021-06-07 00:20:14 +00:00
João Valverde 783fa48ea6 Cosmetic change to compiler information
Move compiler information from last sentence to "compiled with"
paragraph.

Before:
    Compiled (64-bit) with ...

    Running on Linux ...

    Built using gcc 11.1.0.

After:
    Compiled (64-bit) using GCC 11.1.0, with ...

    Running on Linux ...
2021-06-05 07:57:10 +00:00
João Valverde e8e2167e0f version_info: Reorder some items
Group runtime library versions and order by relevance.
2021-05-24 16:43:24 +00:00
João Valverde 63b9c8227c version_info: Add GLib version. 2021-05-24 16:43:24 +00:00
João Valverde 3100b9ac4d version_info: Move locale to the end.
The locale information can be very noisy and span several lines
if all locale categories are set so move it to the end to improve
readibility and prioritize more important parameters.
2021-05-24 16:43:24 +00:00
João Valverde 9ba97d12d6 Add ws_debug() and use it
Replace most instances of ws_debug_printf() except in
epan/dissectors and dissector plugins.

Some replacements use printf(), some use ws_debug(), and
some were removed because they were dead or judged to be
temporary.
2021-05-24 01:13:19 +00:00
João Valverde 8eacd615c8 Disable assertions for release builds
Currently our build generates very many warnings if
G_DISABLE_ASSERT is defined.

Add ws_assert() and ws_assert_not_reached() to incrementally
replace existing assertions and then disable them using
WS_DISABLE_ASSERT.

Assertions are disabled with CMake build type Release.
By default the build type is RelWithDebInfo so the current
behaviour of enabling assertions by default is (for now) preserved.

Add some notes to README.Developer.
2021-05-19 03:52:45 +01:00
João Valverde 89fee9321e Avoid exposing HAVE_PLUGINS in the public API
Instead *_register_plugin() is turned into a noop (with a warning).

The test suit is failing with ENABLE_PLUGINS=Off (it was already failing
before and this patch didn't affect that).

Closes #17202.
2021-02-06 16:35:51 +00:00
Dario Lombardo c7c6927332 version_info: make indentation more consistent.
The preprocessor statements in the function get_compiler_info were
indented with a mixed approach: indented, but not following the style
of the rest of the file. The indented approach has been followed to
increase the readability, but with tabs, as in the rest of the file.

Other indentation issues fixed.

Change-Id: I6486c2cfa640f87c90a7fe4b7d95848d02249d23
Reviewed-on: https://code.wireshark.org/review/37481
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-17 05:31:19 +00:00
Dario Lombardo 326a43627a version_info: fix clang output.
Clang's __VERSION__ shows a trailing space. This ends up in a useless
space before the period, that shows a different output from other
compilers. Example:

Built using clang Clang 10.0.0 .
Built using gcc 7.5.0.

Fixed by stripping it in clang only.

Change-Id: I98dfce46b189fc6b2b58950dbb27f69d271bd729
Reviewed-on: https://code.wireshark.org/review/37480
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-15 11:55:55 +00:00
Guy Harris 245086eb83 HTTPS In Still More Places, update more URLs.
Microsoft reshuffled their documentation - almost all of it moved from
msdn.microsoft.com to docs.microsoft.com.  Some blogs moved to
devblogs.microsoft.com; the comments *didn't* move, so in one case we go
to the Wayback Machine - the link isn't dead, but it formats horribly,
at least on my browser, but the archived version formats OK.

Use the Wayback Machine for some URLs, and update others.

Update the sections for MS-ADTS.

Point to the HTML versions of some RFCs and I-Ds.

Change-Id: I344b20f880de63f1ae2a4e3f9ff98af78a7fe139
Reviewed-on: https://code.wireshark.org/review/34101
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 22:56:35 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
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>
2019-07-26 18:44:40 +00:00
Anders Broman 865df87918 version_info.c: Handle Visual Studio 2019
https://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd
tested OK.

Change-Id: Ia379dcf1bd412ae542de5b8a64ad61b64f9cebc8
Reviewed-on: https://code.wireshark.org/review/32822
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-11 13:34:39 +00:00
Guy Harris 43dfd45faa Move more version-info-related stuff to version_info.c.
Have a ws_init_version_info() routine that, given an application name
string:

	constructs the app-name-and-version-information string, and
	saves it;

	adds the initial crash information on platforms that support it,
	and saves it.

Have show_version() use the saved information and take no arguments.

Add a show_help_header() routine to print the header for --help
command-line options, given a description of the application; it prints
the application name and version information, the description, and the
"See {wireshark.org URL}" line.

Use those routines in various places, including providing the
"application name" string in pcapng SHBs.

Change-Id: I0042a8fcc91aa919ad5c381a8b8674a007ce66df
Reviewed-on: https://code.wireshark.org/review/31029
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-13 03:16:13 +00:00
Guy Harris 4d3e727273 Also need a period at the end of the "Built using" clause.
Change-Id: Ia872e912f1331ef8d6b54b6751f5c132fbf0b4f3
Reviewed-on: https://code.wireshark.org/review/30148
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-12 07:32:00 +00:00
Guy Harris 0ddc082b9f Need a space between the VS year number and the toolchain version.
Change-Id: I5e0047fde7a2d5a98767c6ed440b85575f711b9e
Reviewed-on: https://code.wireshark.org/review/30145
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-12 07:24:14 +00:00
Guy Harris 865041f66e 3.0 requires VS 2015 or later.
Change-Id: I20c40ea923df12747f6aec9dd672b3a9a1d6403f
Reviewed-on: https://code.wireshark.org/review/30144
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-12 06:33:20 +00:00
Guy Harris f7596b82ab Clean up MSVC version string generation.
Don't bother with versions prior to VS 2010; as of Wireshark 2.4, we
don't support them.

Show it as "Visual Studio (year)", followed by the toolchain version
(not to be confused with the compiler version - or with the Visual
Studio version!).

Do the same thing for the clang/C2 compiler; just append the clang
version stuff after that.

Indent the #if/#elif/#else/#endif to make it a little clearer how
they're nested.

Change-Id: Ib7a3af3251e6375d267b3b5da9f8e26a377ceeac
Reviewed-on: https://code.wireshark.org/review/30138
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-12 06:11:19 +00:00
Gerald Combs 08c2344458 Remove some references to PortAudio.
Change-Id: Icfe9516ff814db5362aa345e6f527551dcb13935
Reviewed-on: https://code.wireshark.org/review/26946
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:33:12 +00:00
Guy Harris 5f739fb837 Handle Clang/C2.
Microsoft have a C/C++ compiler with a Clang front end and their code
generator:

	https://blogs.msdn.microsoft.com/vcblog/tag/clang/

Try to detect it.  (It's not too late.)

Change-Id: I574e3f985f376727df77081b429cad7f3d1f5d70
Reviewed-on: https://code.wireshark.org/review/26563
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-20 07:32:41 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
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>
2018-02-08 14:57:36 +00:00
Gerald Combs 775bbbcded Start using SPDX license identifiers.
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>
2017-11-09 20:03:51 +00:00
João Valverde 14e687c1dd Make plugin support a runtime property
Keep the option to disable at compile-time but use AC_ARG_ENABLE instead.

Change-Id: Ie8c3f5ba0db1eb6d9d4ffd742cd3aa049ead5007
Reviewed-on: https://code.wireshark.org/review/24026
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-23 20:04:14 +00:00
João Valverde a269ae1b6a Rename "ws_version_info.h", also .c
It's not installed so like most other files it doesn't need or benefit
from the prefix.

Change-Id: I01517e06f12b3101fee21b68cba3bc6842bbef5c
Reviewed-on: https://code.wireshark.org/review/23751
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>
2017-09-26 17:32:08 +00:00
Guy Harris c1f30471ca Move the version_info.c stuff to wsutil/ws_version_info.c.
Change-Id: I3a5c7e219974bfb924819b43b4d445eaf00e5bde
Reviewed-on: https://code.wireshark.org/review/6153
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 03:41:02 +00:00
Stephen Fisher afbdf1043f Change version info string "without locale" to "with default locale" so
it doesn't sound as though something is missing.

Change-Id: Ifa584357c4613fd898824db011329971c9561c41
Reviewed-on: https://code.wireshark.org/review/6027
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-23 22:26:14 +00:00
Graham Bloice 97546165fa Modify includes of config.h so that out-of-tree builds, i.e. CMake
don't pick up the in-tree copy.

Change-Id: I7ec473876cdba1a025c52362d7f6adc62d24ce71
Reviewed-on: https://code.wireshark.org/review/3798
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-08-24 08:04:08 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
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-07-04 07:25:26 +00:00
Guy Harris 66b02c75ed Include <sys/capaibility.h> to get _LINUX_CAPABILITY_VERSION defined.
It's no longer used in version_info.c, but is used in the main source
files of TShark and Wireshark (it's already included in dumpcap).

Change-Id: I2169a2bbed678baf26fc8711d7c13d95cce3ee2a
Reviewed-on: https://code.wireshark.org/review/2819
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 15:22:45 +00:00
Guy Harris f3c62edc77 Move the GLib version info string stuff to get_glib_version_info().
Change-Id: I1013ad9a0a98bcbf07fe597f9e932f2ea1a5cd28
Reviewed-on: https://code.wireshark.org/review/2818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 15:10:25 +00:00
Guy Harris b4ce352539 Make --help and --version information a bit more uniform.
Have --version print the version number, the copyright information, the
"compiled with" information, the "running on/with" information, and the
compiler information.

Have --help print the version number, a one-line summary of what the
program does, a reference to http://www.wireshark.org for more
information, a Usage: line, and a list of command-line options.

This means programs doing that don't need to include version.h; that's
left up to get_ws_vcs_version_info() to do.

Change-Id: Idac641bc10e4dfd04c9914d379b3a3e0cc5ca8cb
Reviewed-on: https://code.wireshark.org/review/2794
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 08:46:01 +00:00
Guy Harris 1d92195de8 Have individual programs get libpcap and libz version info.
That way, the code that constructs the runtime version string doesn't
itself have to call libpcap and libz, and could be usable in programs
that don't call them.

While we're at it, add "with" to the run-time version information for
GnuTLS and libgcrypt, to match the compile-time version information, and
add the version information from libwireshark to TShark.

Change-Id: I3726a027d032270b032292da9314c1cec535dcd2
Reviewed-on: https://code.wireshark.org/review/2587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-23 21:56:42 +00:00
Guy Harris c46329c27b Add a routine to return a version string including VCS information.
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-22 01:06:25 +00:00
Guy Harris a70dea1956 Move get_os_major_version() to wsutil and rename it to get_windows_major_version().
It's Windows-specific, so name it appropriately.

Change-Id: Ic518cbfabebf95757f6b308a4d547a6cabed6a5e
Reviewed-on: https://code.wireshark.org/review/2528
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 21:33:11 +00:00
Guy Harris 73c7addfa6 Move the routine to get memory information to wsutil.
Change-Id: I94717cec5a464166585b258a83f8ccdaccf8d5ff
Reviewed-on: https://code.wireshark.org/review/2525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 20:31:53 +00:00
Guy Harris 00f23a4f5c Move the routine to get a CPU information string to wsutil.
Change-Id: Ibf6e57d7382cbbd831a0367fd48d684118712408
Reviewed-on: https://code.wireshark.org/review/2523
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 20:21:03 +00:00
Guy Harris d99d1b90f8 Add a get_compiler_info() routine in libwsutil to get compiler information.
Change-Id: I8ccb6187f2ee0255460f448aee170768b6fa3f5d
Reviewed-on: https://code.wireshark.org/review/2519
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:35:06 +00:00
Guy Harris e5abf34f89 Is <stdio.h> necessary here?
Change-Id: Ibfe4fa8b2c1f092781c4137cde7febe2d6f49e81
Reviewed-on: https://code.wireshark.org/review/2518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:09:03 +00:00
Guy Harris a1112249fa Move get_os_version_info() to libwsutil.
This mean we also have to move CFString_to_C_string() there for OS X.

Change-Id: Ic91ad872e9d5290cf34f842503ededd5452e4337
Reviewed-on: https://code.wireshark.org/review/2511
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 18:02:32 +00:00
Guy Harris 43443af0ac Move get_copyright_info() to wsutil.
Change-Id: I75c1c747cd2b4a9845c659636582d54b2caecf1a
Reviewed-on: https://code.wireshark.org/review/2510
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 17:33:05 +00:00
Jakub Zawadzki 4571283379 CPUID improvements
- Make ws_cpuid() return boolean when CPUID is support or no, this way
it's easier for caller to determinate if it works (and can use cpuinfo[X] or no).

- Add function ws_cpuid_sse42(), use it in ws_mempbrk() [cached] &
  version information.

Change-Id: I4e77699f9f3d11bb9b2e8ea599e48d3c5ad84ed7
Reviewed-on: https://code.wireshark.org/review/2088
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 08:12:43 +00:00
Jakub Zawadzki 531541660b Move cpuid to seperate header file.
It'll be later used also for detecting sse4.2

Change-Id: I1930abb29026b455d453a79b5f301cdf37585160
Reviewed-on: https://code.wireshark.org/review/1803
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-31 13:01:08 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Gerald Combs f966980937 Replace "svn" with "git" all over the place.
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-02-07 23:03:03 +00:00
Stig Bjørlykke ddda691c2b Happy new year!
svn path=/trunk/; revision=54529
2014-01-01 12:20:27 +00:00
Guy Harris 2f78757f42 libcap is UN*X-only; libnl is Linux-only.
svn path=/trunk/; revision=53039
2013-11-02 01:12:30 +00:00
Pascal Quantin 5e641a636c Add identification of Windows 8.1 / Windows Server 2012 R2
svn path=/trunk/; revision=52305
2013-09-30 20:14:42 +00:00
Alexis La Goutte 2b3b994b01 Fix indent (use Tabs)
svn path=/trunk/; revision=50088
2013-06-20 21:10:23 +00:00
Alexis La Goutte 874ff29b40 Fix warning about CPUInfo in Linux (when use qmake to build qtshark)
../../version_info.c: In function 'get_cpu_info':
../../version_info.c:662:5: warning: pointer targets in passing argument 1 of 'do_cpuid' differ in signedness [-Wpointer-sign]
../../version_info.c:622:1: note: expected 'guint32 *' but argument is of type 'int *'
../../version_info.c:670:5: warning: pointer targets in passing argument 1 of 'do_cpuid' differ in signedness [-Wpointer-sign]
../../version_info.c:622:1: note: expected 'guint32 *' but argument is of type 'int *'
../../version_info.c:672:5: warning: pointer targets in passing argument 1 of 'do_cpuid' differ in signedness [-Wpointer-sign]
../../version_info.c:622:1: note: expected 'guint32 *' but argument is of type 'int *'
../../version_info.c:674:5: warning: pointer targets in passing argument 1 of 'do_cpuid' differ in signedness [-Wpointer-sign]
../../version_info.c:622:1: note: expected 'guint32 *' but argument is of type 'int *'

svn path=/trunk/; revision=50087
2013-06-20 21:10:18 +00:00
Stig Bjørlykke 114657b0cb Added a missing CFRelease.
svn path=/trunk/; revision=49976
2013-06-17 07:20:54 +00:00