Commit Graph

366 Commits

Author SHA1 Message Date
João Valverde 02238edf92 Do not require using wsgcrypt.h
The reason to use wsgcrypt.h was to wrap it around DIAG_OFF()
macros and that should no longer be necessary.
2023-02-06 15:52:10 +00:00
João Valverde 25d4a099f7 Remove WS_DISABLE_ASSERT
Assertions can be enabled/disabled using WS_DISABLE_DEBUG. The extra
granularity afforded by WS_DISABLE_ASSERT seems unnecessary.
2023-01-12 00:59:15 +00:00
João Valverde e28ef20c8b README.Developer: Add notes about string encoding and best-practices 2022-09-27 17:04:44 +00:00
Roland Knall 645b9ab7f4 Qt6: Adapt various docs 2022-08-23 10:37:14 +00:00
John Thacker 536c685ea5 docs: Update reference to minimum versions of GLib and Qt 2022-04-28 23:12:24 -04:00
Jim Young 42106c9688 Docs: Accurately describe our minimum GLib and where to get it 2022-02-06 10:17:25 +00:00
João Valverde 2f572659f5 Docs: Fix a README.developer code example
Remove spurious "int".

Also prefer "g_string_printf", just for stylistic reasons.
2021-12-18 21:13:20 +00:00
João Valverde a8acda8fcc Docs: Add more info about transitioning to C99 fixed-width types 2021-12-18 07:24:46 +00:00
João Valverde 06e6f7d922 Docs: First pass to update README.developer to C11
Update to reflect the transition from C99 to C11. Remove obsolete
comments and recommendations. Add a bit about transitioning to C
fixed width types.

Related to #17768.
2021-12-16 04:59:04 +00:00
Guy Harris 1cf1684504 README.developer: put items about Windows together.
Move the item about MinGW-w64 up after the earlier item about Windows
portability in general.
2021-11-01 13:38:36 -07:00
João Valverde 4ff22025e8 README.developer: Add note about portability on Windows 2021-11-01 20:01:11 +00:00
João Valverde e996c4f060 docs: Add some notes about project APIs 2021-10-26 20:30:18 +00:00
João Valverde 59c082c046 Add new global header wireshark.h with guideline
Remove ws_diag_control.h from config.h because that was a workaround
for the lack of a public global header. Fix the resultant build errors.
2021-10-22 06:41:44 +00:00
Martin Mathieson a5df18e51e Fix some spelling errors 2021-10-11 04:44:49 +00:00
AndersBroman 60899ed216 Update README.developer 2021-10-05 05:40:16 +00:00
João Valverde 6898210ded docs: Add section about architecture to README.developer 2021-10-05 05:40:16 +00:00
Evan Huus d6d7dd1e56 First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.

I also tweaked a few of the docs which got caught up.
2021-07-21 05:38:29 +00:00
João Valverde ffcfc83ecb Rename version.h to be more descriptive
Version.h is too generic. This is specific to VCSVERSION and that
should be made more obvious and discoverable.
2021-07-09 18:27:41 +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 73d793788c Remove and replace obsolete ws_snprintf() definition
Since fe94133f0d ws_snprintf()
and ws_vsnprintf() don't actually do anything anymore.

The return value of ws_[v]snprintf was discarded before,
now it too conforms to C99.
2021-02-28 22:03:42 +00:00
Gerald Combs eceff254b6 Docs: Recommend EditorConfig.
Note that we use EditorConfig in the WSDG and README.developer, and that
you should make sure your editor uses it. Recommend 4 space indentation
more strongly. Ping #17253.

Reorder and reword the coding style sections of each document while
we're here.
2021-02-25 09:37:49 -08:00
Роман Донченко 88b0370f86 Fix spelling errors in the documentation 2020-10-12 11:43:47 +00:00
Thomas Vogt acdaf33630 README.developer: Fix some quotation marks around function names 2020-09-25 15:29:14 +00:00
Gerald Combs 188b4a655f README.developer: Note that sources can use UTF-8.
We started allowing source files to be encoded as UTF-8 in April 2019 in
bd75f5af0a. Update README.developer to match.

README.developer no longer has a "Code style" section, so update the
Developer's Guide to point to the "Portability" section.
2020-09-04 10:01:23 +00:00
Gerald Combs 6f9efa7583 More Qt minimum version updates.
Update the minimum version in various documents. Remove some
no-longer-needed code from scripts that call windeployqt.

Change-Id: I16da4bced9780c9f1b1969aae7c52e2fce1968aa
Reviewed-on: https://code.wireshark.org/review/35391
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-10 19:52:58 +00:00
Gerald Combs 0cb3176ab7 Remove some references to Qt4.
Change-Id: I50f5abafb8adf18a5407427f7feb260301df45cc
Reviewed-on: https://code.wireshark.org/review/26771
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-06 03:11:52 +00:00
Dario Lombardo 9dde6d4b5f doc: minor changes in README files.
Change-Id: I5b21ade727f9c4bed6545e69d87082baafaefa2b
Reviewed-on: https://code.wireshark.org/review/26702
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-02 06:29:33 +00:00
Gerald Combs 0d9b8eaf08 Warn the developer if we're building with GTK+.
Move The Slowest Migration In The History Of Ever a little further
along.

Change-Id: Ib8b49708e7036dd412a7ffc8660ded9f681374c0
Reviewed-on: https://code.wireshark.org/review/24006
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>
2017-10-21 08:23:45 +00:00
Gerald Combs 719adb4fdc Convert README to README.md.
Convert the contents of the top-level README to Markdown and give it a
.md extension. Most of our documentation is plain text or AsciiDoc, but
the top-level README file in a Git repository is special in that many
online browsers will show the README contents along with the directory
listing and those browsers tend to favor Markdown. This is true of
GitHub (which we're currently mirroring to), Gerrit via its Gitiles
plugin (which we're not yet using but likely will), and other places.

Add "foreign" to AM_INIT_AUTOMAKE. There is probably a joke to be
made here about the FSF and border walls.

Change-Id: I87c306d74864e1f0a432225b160a1b4483ee946c
Reviewed-on: https://code.wireshark.org/review/23049
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-15 14:48:29 +00:00
Guy Harris e0a9192ebc Don't worry about initializing auto aggregates with non-constant values.
On UN*X, you can get C99-or-later compilers, and we request that in the
autoconf script, so it's really a requirement.

At least as I read

	https://msdn.microsoft.com/en-us/library/34h23df8%28v=vs.100%29.aspx

Visual Studio 2010 (and earlier, going back to VS .NET 2003) supports
the "Use of block-scope variables initialized with nonconstant
expressions", with an example of an aggregate (array) initialization
involving function calls, so it sounds as if it's available on Windows
with any version of VS that we support.

(If I've missed something, it'll presumably show up when something is
built with MSVC, and we can update this at that point.)

So the only thing to avoid is initializing global or static variables
with a value that has to be evaluated at run time (the ability to do
that is probably present in most environments, as I think C++
constructors for variables with static storage duration might have to be
evaluated before main() is called, but I guess few C compilers bother to
use it).

Expand the example in the hopes of avoiding confusion between "static
storage duration" (which something declared "static" has, but which
anything declared with file scope, whether declared "static" or not,
also has) and "static storage duration and internal linkage", which is
what the "static" keyword specifies.

Change-Id: I338eb0892e656c2ab59519e4bf76e1dfbec2fa7d
Reviewed-on: https://code.wireshark.org/review/22434
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-28 01:35:39 +00:00
Guy Harris 7321df2a45 Fix the "don't initialize with non-constant variables" item.
It only applies to variables with static storage duration, i.e. global
and static variables.  Expand the example of how to do it, to make it a
bit clearer.

Change-Id: Ie0c473a35a77351dd10d6c9df2c34a39f077fca4
Reviewed-on: https://code.wireshark.org/review/22430
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-27 21:38:45 +00:00
Peter Wu 6b84ddee83 Make Libgcrypt a mandatory dependency
Removed all guards for HAVE_LIBGCRYPT, change autotools and CMake to
error out if it is not available. Update release notes, developer
documentation and README with the new status. Clarify relation with
GnuTLS in macosx-setup.sh. Install Libgcrypt via brew script.

Motivation for this change is that many dissectors depend on Libgcrypt
and having it optional increases the maintenance burden (there have been
several compile issues in the past due to the optional status).
Furthermore, wsutil has crypto code that can be replaced by Libgcrypt.

Change-Id: Idf0021b8c4cd5db70b8766f7dcc2a8b3acbf042f
Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html
Reviewed-on: https://code.wireshark.org/review/20030
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-02-13 18:35:47 +00:00
Peter Wu 9c3d81adde Officially require Qt 4.8 or newer
Since v2.3.0rc0-1002-g1cd2255, Qt 4.8 became mandatory, reflect this in
the version requirements. This will not affect a lot of distributions
(RHEL and SLES only had Qt 4.6).

For a more complete list of supported platforms, see
https://wiki.wireshark.org/Development/Support_library_version_tracking

While at it, correct some other minimum versions in documentation.

Change-Id: I11f2dfba72c75429f6838404a81ed3b3dc302d5f
Reviewed-on: https://code.wireshark.org/review/18314
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-20 05:03:07 +00:00
Peter Wu 232a879429 Allow a lot more C99 features
Flexible array members are supported by gcc, clang and even MSVC2013.
Note, so far it was only used in the Windows-specific airpcap.h.

Trailing commas in enum declaration are already in use since for
these dissectors (commit ID is the first occurrence):
epan/dissectors/packet-gluster.h v2.1.0rc0-1070-g3b706ba
epan/dissectors/packet-ipv6.c v2.1.2rc0-81-ge07b4aa
epan/dissectors/packet-netlink.h v2.3.0rc0-389-gc0ab12b
epan/dissectors/packet-netlink-netfilter.c v2.3.0rc0-239-g1767e08
epan/dissectors/packet-netlink-route.c v2.3.0rc0-233-g2a80b40
epan/dissectors/packet-quic.c v2.3.0rc0-457-gfa320f8

Inline functions using the "inline" keyword are supported via all glib
versions we support (if it is missing, glib will define a suitable
inline macro).

Other c99 functions listed in the README.developer document were found
to be compatible with GCC 4.4.7, Clang 3.4.2 and MSVC 2013.

Change-Id: If5bab03bfd8577b15a24bedf08c03bdfbf34317a
Reviewed-on: https://code.wireshark.org/review/17421
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-06 02:42:27 +00:00
Balint Reczey a8f73e92fd documentation: Suggest using prefixed public symbols
Change-Id: I9153756b0e921fd74d7df9d119337f5484856ba0
Reviewed-on: https://code.wireshark.org/review/15940
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15 21:21:54 +00:00
João Valverde eeded812f7 Add option to disable version.h
If the file '.git/wireshark-disable-versioning' exists then version.h
will be commented out.

Change-Id: If481b673463408a69c2ecf7c2e66d08c5855537f
Reviewed-on: https://code.wireshark.org/review/14932
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-21 18:59:24 +00:00
Jaap Keuter 1fe8d892dd Update min. GLib version and add Qt version checks
The document describes why and how to version check, but
1) is not up to date with respect to minimum GLib version
2) does not yet mention Qt version requirement and check.
This change addresses both issues.

Change-Id: Ibb56c02cf48f6a4c6270b20686ca4d6e8aaf99d1
Reviewed-on: https://code.wireshark.org/review/14669
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-03-29 15:21:19 +00:00
João Valverde 11cd41d922 Add EditorConfig reference to README.developer
Change-Id: I595e94bd0274e3ee3c1d8764fc6c93f28993c30f
Reviewed-on: https://code.wireshark.org/review/14468
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-14 22:44:43 +00:00
Guy Harris f9df9ffb3f Note that variadic macros *can* be sued.
Change-Id: I15bfda76256e5d1084ad7c64006f93afaf071a9e
Reviewed-on: https://code.wireshark.org/review/13010
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-02 23:18:49 +00:00
Guy Harris 11bdadacc2 Update to reflect current reality.
Change-Id: I98a104407feb21d038653e41c547c7ebc27771cb
Reviewed-on: https://code.wireshark.org/review/11636
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-08 10:00:00 +00:00
Peter Wu 6d7b29592a Allow use of variadic macros
Remove variadic macros restriction (c99, c++11 feature) from
README.developer. GCC, Clang, MSVC 2005 all support it.

Enable -Wno-variadic-macros in configure.ac and CMakeLists.txt when
-Wpedantic is enabled (which would enable -Wvariadic-macros).

For all files matching 'define\s*\w+[0-9]\(', replace "FOO[0-9]" by
"FOO" and adjust the macro definition accordingly. The nbap dissector
was regenerated after adjusting its template and .cnf file. The
generated code is the same since all files disabled the debug macros.

Discussed at:
https://www.wireshark.org/lists/wireshark-dev/201209/msg00142.html
https://www.wireshark.org/lists/wireshark-dev/201510/msg00012.html

Change-Id: I3b2e22487db817cbbaac774a592669a4f44314b2
Reviewed-on: https://code.wireshark.org/review/10781
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-05 07:57:14 +00:00
Pascal Quantin 33c26a09f4 doc: remove some references to the now defunct python support
Change-Id: Ibba3168516ef28ad050f5f70045acf3935f2b233
Reviewed-on: https://code.wireshark.org/review/5738
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-12 21:25:00 +00:00
Gerald Combs 175039128a Update the doc directory to use https://www.wireshark.org.
Change-Id: I9bfc57cb6b6ab6962b80ff58d98eb351d6f69829
Reviewed-on: https://code.wireshark.org/review/4140
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-17 00:12:26 +00:00
Joerg Mayer 6a7414f726 README.dissector was split from README.developer in 2013 - update some
documents referring to the split out sections.
Remove trailing whitespace while at this.

Change-Id: I36cfe0ac55e8f653bffbf850e01f582aacf85557
Reviewed-on: https://code.wireshark.org/review/4094
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-09-13 05:34:39 +00:00
Jeff Morriss b6a9b8494c Remove $Id$ and other Subversion leftovers from the doc files.
Change-Id: I28a376f7e0fd90971f65ae9c1105a3ec85221470
Reviewed-on: https://code.wireshark.org/review/204
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-14 01:33:14 +00:00
Jakub Zawadzki 064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Bill Meier 2a69c2d05c Remove a phrase which implies that tab widths other than 8 are OK.
svn path=/trunk/; revision=53030
2013-11-01 20:39:11 +00:00
Evan Huus e7a0c26bec Subsume README.binarytrees into wmem doxygen. The README was out of date
anyways, since Michael made key operations non-destructive in r44380.

svn path=/trunk/; revision=52583
2013-10-13 13:13:24 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Gerald Combs b5e4fd5a01 Document the current state of naming in ui/qt. Say it's OK to use C++
comments in C++ code.

svn path=/trunk/; revision=51739
2013-09-03 18:50:17 +00:00