Commit Graph

340 Commits

Author SHA1 Message Date
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
Evan Huus 602cf9cd4e Split README.developer into two: README.developer and README.dissector. All the
documentation specific to dissectors should now live in README.dissector - what
remains in README.developer should be useful to anybody coding on Wireshark
regardless of if you're working on the GUI, wiretap, dissectors, etc.

This first pass I did a fairly dumb split of copy-pasting relevant chunks from
one file to the other. There are probably fragments that aren't in the right
file anymore, so cleanup welcome.

svn path=/trunk/; revision=50092
2013-06-20 22:46:08 +00:00
Chris Maynard ab10fed503 Trivial: remove extraneous word, 'is'.
svn path=/trunk/; revision=49423
2013-05-20 01:35:17 +00:00
Evan Huus b39cf04f14 Add CppCheck to the list of things to run before submitting code for review.
svn path=/trunk/; revision=49077
2013-04-27 23:11:06 +00:00
Evan Huus 4e3c836273 Major cleanup of skeleton dissector and related bits of README.developer.
Changes of note:
- Removed the 'Copied from' notice, it's only relevant if they're *not* using
  the skeleton code. Added a paragraph to README.developer instead.
- Exorcised all references to if (tree) and placed them in their own section
  at the bottom as an optimization. Hopefully this will be less confusing.

svn path=/trunk/; revision=48861
2013-04-15 21:43:40 +00:00
Evan Huus bb2820deb0 Put the skeleton sample code from README.developer into its own file - it's
much easier to edit/maintain that way as well as much easier to copy for a
new dissector. Explicitly don't set the SVN id tag since this is a template.

svn path=/trunk/; revision=48860
2013-04-15 20:56:55 +00:00
Chris Maynard 07b35a96b7 Add some missing tvb_get_'s, proto_tree_add_'s, fix args and change all little_endian's to encoding. Some detailed descriptions are still missing though.
svn path=/trunk/; revision=48629
2013-03-28 20:22:47 +00:00
Evan Huus 8569907b9f From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8339
This patch adds a new public API, proto_tree_add_bitmask_len(), identical to
proto_tree_add_bitmask() but using a caller-supplied length rather than an
inferred one. The underlying proto_item_add_bitmask_tree() code is modified
to display only fields for which all defined bits are available, and to
ignore bits that have no corresponding defined field ("forward compatibility"
cases).

From me: minor edits, see the bug for more details.

svn path=/trunk/; revision=48049
2013-03-04 14:18:18 +00:00
Martin Kaiser 29de8baed5 mention gcrypt wrapper in README.developer
svn path=/trunk/; revision=47812
2013-02-21 22:24:43 +00:00
Alexis La Goutte ecb898db1e Fix the dev guide to use the correct indent (Tab => 4 Spaces) and add Modelines info
svn path=/trunk/; revision=47415
2013-02-01 09:22:40 +00:00
Chris Maynard 8ee3809edc Add 2 more verification steps to run in the "Submitting code for your new dissector" section.
svn path=/trunk/; revision=47388
2013-01-31 17:17:34 +00:00
Evan Huus a19980c23d Replace another instance of emem in README.developer with wmem.
svn path=/trunk/; revision=46847
2012-12-29 20:41:12 +00:00
Jeff Morriss 456acec892 Do a little more to discourage the use of proto_tree_add_text(): don't
use it as example in a few places and point out that if you're not using the
return value to build a subtree, you probably shouldn't be using the function.

svn path=/trunk/; revision=46617
2012-12-19 15:54:40 +00:00
Jeff Morriss ed87fa9e3b Come down harder on the evils of tvb_get_ptr(): advise not to use it.
Combine the two comments in the Portability section (which largely said the
same thing) on the perils of that function.

Don't suggest it as an option to ensure there are enough bytes in the TVB.

svn path=/trunk/; revision=46590
2012-12-18 16:42:16 +00:00
Evan Huus 7f23c2f8b7 Recommend wmem over emem in the READMEs where possible.
svn path=/trunk/; revision=46472
2012-12-08 21:57:05 +00:00
Jörg Mayer 015cdcef78 Fix the main dissect_PROTO signature
svn path=/trunk/; revision=46046
2012-11-16 20:52:30 +00:00
Jeff Morriss 22b7086fb9 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=44997
2012-09-19 01:37:13 +00:00
Chris Maynard b840ba44b4 Trivial typo fix and duplicate word removal.
svn path=/trunk/; revision=44695
2012-08-29 17:05:38 +00:00
Bill Meier 0035a9076b Force extended value string linear search (not binary search) in one case:
Fixed: { -2, -1, 0, 1, 3} (note gap) used a binary search (which would fail);

 Note:  { -2, -1, 0, 1, 2 ,3 } (no gap) allowed; will still do a direct access;

Also: Add a comment to README.developer extended value string section.

svn path=/trunk/; revision=44659
2012-08-24 20:44:33 +00:00
Bill Meier 7d891022e6 Minor update to tcp_dissect_pdus() section.
svn path=/trunk/; revision=44658
2012-08-24 20:22:48 +00:00
Jörg Mayer 409f711889 Add a link where to find some GUIs for git.
svn path=/trunk/; revision=44554
2012-08-17 18:13:39 +00:00
Evan Huus 81f3e4f4a8 Add note to README.developer about not passing NULL to %s format strings.
Part of wireshark-dev conversation starting with:
http://www.wireshark.org/lists/wireshark-dev/201208/msg00125.html

svn path=/trunk/; revision=44548
2012-08-17 01:12:10 +00:00
Jeff Morriss 4fdc3c3cc2 Create, and start using, file name preferences.
File name preferences are basically just string preferences except that the
GUI will present a "Browse" button that allows the user to go and find the
file s/he wants (rather than having to blindly type in the full path).

svn path=/trunk/; revision=43228
2012-06-13 01:13:12 +00:00
Bill Meier 5b53b81835 Note that calls to "expert" functions should not be under 'if (tree)'.
svn path=/trunk/; revision=43224
2012-06-12 13:03:05 +00:00
Guy Harris 1c7269a6d1 Mention ENC_UCS_2 and ENC_UTF_16.
svn path=/trunk/; revision=42602
2012-05-12 20:10:18 +00:00
pascal c69d317daf Fix typo errors
svn path=/trunk/; revision=42340
2012-04-29 18:25:06 +00:00
pascal e94974887c Convert spaces to tabs
svn path=/trunk/; revision=42247
2012-04-25 21:37:10 +00:00