Commit Graph

2235 Commits

Author SHA1 Message Date
John Thacker 61b402cbe9 doc: Update tshark documents of stat options
Lost one option when updating in the previous commit, restore
2021-12-10 08:12:57 -05:00
John Thacker c0933a18da doc: Update tshark manual for undocumented -z statistics
This commit includes all statistics / taps that exist up through the
3.4.x release. Another commit will handle the ones added in the 3.6
branch. Mention that statistics are unaffected by the display filter
(but are affected by capture and read filters, and usually have their
own filters) at the top rather than repeating the same boilerplate
in half the options.

Ping #8353
2021-12-10 00:20:44 +00:00
João Valverde 19dcb725b6 epan: Remove STR_ASCII and STR_UNICODE
These display bases work to replace unprintable characters so the
name is a misnomer. In addition they are the same option and this
display behaviour is not something that is configurable.

This does not affect encodings because all our internal text strings
need to be valid UTF-8 and the source encoding is specified using
ENC_*.

Remove the assertion for valid UTF-8 in proto.c because
tvb_get_*_string() must return a valid UTF-8 string, always, and we
don't need to assert that, it is expensive.
2021-12-03 04:35:56 +00:00
Jörg Mayer a0173cd7cf text2pcap: Support parsing of iso-8601 dates 2021-12-02 19:34:45 +00:00
John Thacker fd1c9b75ba doc: Update stats_tree README
Update README.stats_tree including the sample implementation for
changes in the API, such as the enum return value and needing to
set the node datatype as either int or float.

Also update the comments in the stats_tree header to make it clear
that abbrev and name refer to the abbreviation used in the tshark -z
option, and the name of the menu and window in the GUI for the stats
tree.
2021-11-23 22:20:16 -05:00
João Valverde b657396d44 plugins.example: Add missing header
Fixes 9bdccce574.
2021-11-23 17:16:27 +00:00
John Thacker b5917d0182 wmem: Add a multimap
A number of protocols have IDs that can be reused that are used as
lookup keys. In most cases the frame number should be used as well
to differentiate repeat appearances of an ID. For response/request
matching, it is frequently useful to find the most recent frame number
(greatest value less than or equal to the current one) that contained
an ID.

We can achieve that by using a multimap that stores values with a given
ID in a tree keyed with the frame number. This works better than using
a map or a tree alone:

1) A map isn't ordered, so doesn't allow for less than or equal comparison.
2) Using a tree requires an ordering on all the ID components, and then
   having to test all the components other than the frame number separately
   for equality after retrieval.

Currently the multimap does not support inserting items without specifying
the tree key (and having the multimap generate a key), because the total
capacity of trees (including deleted nodes) is not tracked. If other use
cases are needed, this could be added later along with more generic
multimap support.

Use a multimap in ANSI MAP, ANSI TCAP, and GSM SMS, all of which need to
match lookup IDs that can be reused. Fix #7653.
2021-11-21 07:16:55 -05:00
Gerald Combs e2703507c2 Update a bunch of GLib documentation links.
Change our developer.gnome.org/glib URLs to
developer-old.gnome.org/glib. The official documentation for GLib
appears to be at https://docs.gtk.org/glib/, but it has a different
layout than the gnome.org content (and is surprisingly resistant to
exploration IMHO). We can switch to developer-old.gnome.org using a
simple substitution and it still seems to be updated, so do that for
now.
2021-11-20 21:33:17 +00:00
Martin Mathieson 263189e23d Fix some spelling errors. 2021-11-18 04:43:51 +00:00
Guy Harris 6d96d8bbc2 Don't include config.h in the example plugin.
Wireshark's config.h isn't available to third-party plugins, and the
developers of the plugin might not even have their own config.h, so
don't include it in the example (if it *does* have its own config.h, the
developers will presumbly know that they should include it).
2021-11-12 12:53:21 -08:00
Guy Harris 2445180fa7 Don't use HAVE_CONFIG_H in sample code in the documentation.
We require config.h and don't define HAVE_CONFIG_H - it should *always*
be included.
2021-11-12 11:23:06 -08:00
João Valverde 237efe7b00 README.dissector: Reinforce a style recommendation. 2021-11-09 22:04:21 +00:00
João Valverde 070aeddf76 Lift restriction on upper case protocol display filter names
Unlike other header fields in filter expressions protocol names
cannot contain upper-case letters. Remove that restriction. This
should make start-up slightly faster as it remove an extra loop
for each protocol filter name.

This was added in 9ead15a6eb but
I don't see a reason to have different rules for protocols and
fields, it seems the README.developer was just being vague and
conflating PROTOABBREV with PROTOFILTERNAME.

The recommendation for lower case is a style recommendation,
and it's a good one, but it should be applied uniformly. As
long as we are not enforcing this for all field filter values
there is no point in enforcing it just for protocol names and
actually it is detrimental, e.g:

hi2operations
HI2Operations.IRIsContent
HI2Operations.UUS1_Content_element
HI2Operations.iRIContent
HI2Operations.iRISequence
HI2Operations.IRIContent
HI2Operations.iRI_Begin_record_element
HI2Operations.iRI_End_record_element
HI2Operations.iRI_Continue_record_element
HI2Operations.iRI_Report_record_element
(...)

It's weird and unexpected to have this difference and there is
no technical reason to require it. What we should probably do
is not include the protocol name in the FIELDFILTERNAME and
have the registration mechanism append it to the PROTOFILTERNAME.

Also disallow leading '-' everywhere in filter names, not just
protocol filter names. It's a universal requirement.
2021-11-02 08:35:24 +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 d635ff4933 dfilter: Remove redundant STTYPE_CHARCONST syntax node
A charconst uses the same semantic rules as unparsed so just
use the latter to avoid redundancies.

We keep the use of TOKEN_CHARCONST as an optimization to avoid
an unnecessary name resolution (lookup for a registered field with
the same name as the charconst).
2021-10-31 20:33:31 +00:00
John Thacker 6d52bf07a7 docs: Update wireshark-filter.adoc for recent filter changes.
Commas in sets, changes to != and ~=, changes to contains and matches,
changes to implicit conversions/comparisons to unquoted values.
Also fix #15392.
2021-10-31 08:56:48 +00:00
João Valverde e996c4f060 docs: Add some notes about project APIs 2021-10-26 20:30:18 +00:00
João Valverde c9abbde287 docs: Update wireshark-filter man page about "!="
Update man page to remove obsolete information about "!=".
2021-10-26 14:53:20 +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
Chuck Craft a541fcb528 docs/tshark: proper name is lopsided CamelCase (TShark)
This is a first pass that covers the WSDG, WSUG, man page, a code
comment and a README. Plenty left to do in the Debian files, a few
Lua examples and other misc files.
2021-10-21 19:54:20 +00:00
Gerald Combs 2c3b13834d CMake: Place all of the documentation in the "Documentation" folder. 2021-10-21 00:21:17 +00:00
Gerald Combs 44bd3a7d79 CMake+Docs: Update our man page targets.
Remove the generate_*_pages targets that were recently introduced,
since they're not really needed. Only add the "manpages" target
if we have Asciidoctor.
2021-10-20 19:29:08 +00:00
Martin Mathieson 54ac7b4424 Fix some spelling errors 2021-10-20 10:00:12 +01:00
Gerald Combs 01b0d9e077 Docs: Move includes to the top of our man pages.
Move our attributes.adoc includes to the very top of each man page.
Older versions of Asciidoctor complain if it's not at the top. and
additionally generate <file>.man instead of <file>.<section> if we don't
explictly supply an output file.
2021-10-19 16:26:37 -07:00
Gerald Combs b8a45f3638 CMake+Docs: Generate man pages all at once.
Asciidoctor lets us generate multiple documents at once, so do so for
our man pages. If we're using AsciidoctorJ this minimizes the number
of JVM instances we have to spin up. This reduces the build time on my
Windows VM here quite a bit, and will hopefully do so on the CI builders.

Add a .editorconfig file in cmake/modules.
2021-10-19 22:06:45 +00:00
Chuck Craft 947d3ff819 dftest: update man page and README.display_filter 2021-10-19 07:41:31 +00:00
Gerald Combs 1bcd51e34a CMake+Docs: Try to build our man pages in parallel.
Make sure man pages are included in the default build. Have the docs
and copy_data_files targets explicitly depend on the man page generator
targets.
2021-10-19 01:05:27 +00:00
Gerald Combs 46f27973ca CMake: Partially revert recent docs changes.
Revert recent "docs" target changes. It made that target build faster,
but broke other dependencies. Keep the AsciidoctorJ changes.

Revert "doc: fix the macOS build."

This reverts commit 119667d886.

Revert "CMake: Try to make our man page builds faster."

This reverts commit 74747c4d2f.
2021-10-14 19:34:18 +00:00
Guy Harris 119667d886 doc: fix the macOS build.
BUNDLE_RESOURCE_SHARE_MAN[14]_FILES shouold *not* have the generate_
prefixes; names with those prefixes are fake targets, not names of files
that we generate, so attempting to copy files with those names fails.

It should, however, have "doc/" before the names of the man pages, as
they're generated into the doc directory of the top-level build
directory.
2021-10-14 00:30:08 -07:00
Gerald Combs 74747c4d2f CMake: Try to make our man page builds faster.
Depend on our generator targets instead of the generated files, which
allows parallel builds outside of Ninja. Don't reserve JRE memory when
building HTML and man page targets. This reduces the "docs" target build
time on my Windows VM here from over two minutes to under one.
2021-10-13 23:10:35 +00:00
Chuck Craft 1e18f79373 captype: add options to Usage: and man page 2021-10-13 22:54:20 +00:00
Chuck Craft ade523d7ba docs: -z stats - bootp now dhcp; not all in man page 2021-10-12 21:17:25 +00:00
Chuck Craft 07143b1c47 docs: -z stats - bootp now dhcp; not all in man page 2021-10-12 21:17:25 +00:00
Chuck Craft 1998e7f34b capinfos: man page typos; add longopts to Usage:
The verbiage for first/last packets and start/end times seem
to not be consistent. Changing will also require a change to
Capture File Statistics in the Wireshark Gui. Future MR.
2021-10-12 20:35:15 +00:00
Martin Mathieson a5df18e51e Fix some spelling errors 2021-10-11 04:44:49 +00:00
Evan Huus 0eda51a646 to_str: scope tvb_ip6_to_str 2021-10-07 13:31:23 -04:00
Evan Huus 07f5472aa7 to_str: scope tvb_ip_to_str 2021-10-07 10:25:12 -04: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
Gerald Combs cfc3212ae2 Docs: Miscellaneous man page updates.
Add the program version to more commonly-used commands. We were labeling
output with "Output" and "Example output". Use "Example output"
everywhere. Other miscellaneous updates.
2021-10-01 23:57:21 +00:00
Gerald Combs 8705dfbe74 Docs: Update some man page markup and remove pod2adoc.py.
Remove pod2adoc.py since it's no longer needed. Add versions to the
Wireshark, TShark, and Dumpcap man pages. Use definition lists in the
TShark glossary descriptions. Other minor fixes.
2021-10-01 19:24:59 +00:00
Gerald Combs 84ab55cf75 Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This:

* Means we use the same markup for our man pages, the guides, and
  release notes.
* Lets us add versions to our man pages.
* Gives us more formatting options, e.g. AsciiDoc supports `commands`,
  nested lists and makes it easy to include version information. The
  manpage backend doesn't seem to support tables very well,
  unfortunately.

Convert our CMake configuration to produce *roff and html man pages
using Asciidoctor. Add a "manarg" block macro which makes our synopses
wrap correctly.

Similar to the release notes, guides, and FAQ, if Asciidoctor isn't
found the man pages won't be generated or installed.

Move Asciidoctor to the list of package build dependencies in various
places.

This commit includes the conversion script (pod2adoc.py), which will be
removed later.

Line count sanity check:

Man page         .pod .adoc
androiddump       260  280
asn2deb            93  105
capinfos          401  471
captype            54   55
ciscodump         241  269
dftest             42   42
dpauxmon          153  169
dumpcap           464  534
editcap           528  583
etwdump           136  156
extcap            157  181
idl2deb            91  103
idl2wrs           120  100
mergecap          206  207
mmdbresolve        75   75
randpkt           107  111
randpktdump       158  184
rawshark          558  610
reordercap         76   78
sdjournal         145  157
sshdump           272  302
text2pcap         274  312
tshark           2135 2360
udpdump           133  151
wireshark-filter  486  479
wireshark        2967 3420
2021-10-01 16:42:34 +00:00
Gerald Combs 9f1607ab47 Docs: Prep for POD to Asciidoctor conversion.
[skip ci]

Rename each of our .pod files to .adoc. Add pod2adoc.py, which converts
POD markup to Asciidoctor, along with customizations specific to us.
2021-10-01 16:42:34 +00:00
Gerald Combs 440bbd37a0 Docs: More POD markup cleanup. 2021-09-28 16:41:32 +00:00
João Valverde eba84d06e4 docs: Fix fatal log level description 2021-09-25 17:45:33 +01:00
Martin Mathieson b84aa6b243 Fix some spelling errors. 2021-09-23 21:22:46 +00:00
Gerald Combs da817af974 Docs: More POD markup cleanup. 2021-09-23 13:35:05 -07:00
Gerald Combs 9d10838314 Docs: Clean up wireshark.pod markup.
Clean up some list items and a quote.
2021-09-23 07:02:36 +00:00
John Thacker 07330b392e documentation: update PDML/PSML doc
Provide Internet Archive links for dead URLs.
Update to note that PSML output is supported by tshark and not
a future feature (true since 17 years ago, when it was still tethereal).
Note "fake-field-wrapper" protocol for top level fields (including data,
which is converted from a protocol to a field for PDML).
Note "_ws.expert" protocol replaced by field, as with data.
Note that some dissectors place subdissected protocols in subtrees
instead of at the top level, and that this is _not_ changed, violating
the PDML spec.
Fix #10588.
2021-09-22 21:19:55 -04:00