Commit Graph

2167 Commits

Author SHA1 Message Date
Gerald Combs fe92029dd4 Docs: Remove sgml.doc.template.
It looks like we haven't used this since 2004: 556f1245e4.
2021-06-22 01:55:14 +00:00
João Valverde 2080661e88 wslog: Documentation fixups 2021-06-21 22:39:54 +01:00
Guy Harris 628fe2549a mergecap: improve the example.
Explain, in detail, exactly what it's trying to do and, for each of the
three commands in the example, what each step does, as well as
explaining what the calculation using the end time of one capture and
start time of another capture is doing.

(Where did this example come from?  What is the real-world goal of this
exercise?  And why is it an example in which all the fancy stuff is done
in commands *other* than mergecap?)
2021-06-20 23:50:25 +00:00
Gerald Combs 0ae9c3e8eb Docs: Remove the authors list from wireshark(1).
The AUTHORS section of wireshark(1) is about half the content of the man
page. While it's important to acknowledge the people who have
contributed to the project, the goal of the man page is to tell people
how to use Wireshark.

Replace the list of authors with text that acknowledges their
contributions along with pointers to the AUTHORS file and the list on
the main web site.
2021-06-17 18:33:09 -07:00
João Valverde c5b3842639 wslog: Add more documentation 2021-06-17 12:00:10 +01:00
João Valverde 586535bdb8 Add documentation for display filter raw string syntax 2021-06-07 18:58:49 +00:00
João Valverde e931336a2d doc: Replace link to pcrepattern(3) 2021-06-07 18:04:35 +00:00
John Thacker 17f2fc32f7 tshark: Correct documentation about name resolution.
The tshark help and documentation has been incorrect for at least
eight years, claiming that by default all name resolutions are
performed. Fixes #11762
2021-05-26 23:09:53 +00:00
Toff 2df04e5bb0 Follow stream: Modify YAML format, add timestamps and peers
Modify YAML output format so it includes information about peers and
absolute timestamps for each packet.
This also adds yaml output to tshark: -z follow,tcp,yaml,X
2021-05-25 08:09:31 +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
Odysseus Yang c4b32c8f46 ETWDUMP: Update to support live capture
etwdump will read events from a live session with the params as the filter, also the params can be used as filter when reading from a etl file.
2021-05-13 21:17:09 +00:00
Chuck Craft 9f72d4ce60 DOC: tshark io,stat - function name not optional 2021-04-19 21:55:45 -05:00
Chuck Craft 8390771a56 Update README.plugins (typo - ENABLE_PLUGIN_IFDEMO) 2021-04-15 07:51:38 +00:00
Uli Heilmeier c2f3b654f7 Manpage tshark: Add option '-A'
This commit adds option '-A' for rpcap authentication.

Fixes: wireshark/wireshark#16674
2021-04-10 07:32:08 +00:00
João Valverde e4d4814168 Don't install HTML manuals twice.
Wireshark loads HTML files as resources from "/usr/share/wireshark"
on Unix-like systems and from the $build/run directory when run that
way. There are also other locations specific to other platforms and
packaging solutions and multi-config builds.

HTML manuals are installed both to "/usr/share/wireshark" and
"/usr/share/doc/wireshark" for Unix-like systems. For now install them
only to the former to avoid unnecessary clutter and duplication. The
manuals can be consulted using 'man' or launched in HTML format from
Wireshark's help menu (or found in $pkgdatadir instead of $docdir).

Eventually we may want to simplify that maze of locations for HTML
resources and have Wireshark load the manuals from $docdir instead
on Unix, and do the right thing for the other platforms, etc.
2021-03-29 20:20:11 +01:00
Guy Harris d18e1f19e9 Add dumpcap options to set the name and description for a capture source.
Add --ifname and --ifdescr to allow the name and description for an
interface or pipe to be set; this overrides the specified name or
reported description for an interface, and overrides the pipe path name
and provides a description for a pipe.

Provide those arguments when capturing from an extcap program.

This is mainly for extcaps, so you have something more meaningful than
some random path name as the interface name and something descriptive
for the description.
2021-03-25 07:34:37 +00:00
Guy Harris 9bd144b8ea tshark: clean u the way the -U option lists available taps.
Allow "-U ?" as well as an empty argument; an empty argument is a bit
counterintuitive.

Simplify the introductory line of output - asking for a list of taps
isn't an error in which the user failed to supply a tap name, it's a
case where the user suplied a request for a list of tap names.

Just use fprintf() to print the list, and indent the elements of the
list, as we do with other lists of valid arguments.

List the valid arguments if the user specified an invalid argument as
well.
2021-03-13 15:32:14 -08:00
Guy Harris 5d39e36198 doc: Clean up lists of file types.
Add missing entries, regularize the descriptions, etc..

Note that pcap and pcapng are the native formats.

Fix various issues.

Update the editcap -F output to match urrent reality.

While we're at it, sort the libwiretap modules, putting observer.c in
the right place.
2021-03-13 10:02:02 +00:00
Guy Harris e0afa7f2a4 Observer is now a product of Viavi.
JDSU bought Network Instruments, and then split into Viavi and Lumentum,
with Viavi getting Observer.
2021-03-11 20:02:14 +00: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
João Valverde 72dcf04a1b plugins.example: Be less terse in the README description 2021-02-26 16:19:51 +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
Nicolás Alvarez ebfbf958f6 Add ENC_TIME_NSECS timestamp encoding
Add a new timestamp encoding format ENC_TIME_NSECS, like ENC_TIME_SEC but
for nanosecond values. Needed for my work-in-progress dissector for Apple
push notifications.
2021-02-10 12:45:54 +00: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
Nicolás Alvarez 981e662a0a Minor changes to ENC_TIME documentation
- Fix duplicate "are are".
- Fix NTP epoch year in ENC_TIME_NTP docs (572b80d2 fixed it in the README
  but not in proto.h).
- Remove completely redundant "(ie. )" clauses.
2021-02-04 10:13:36 +00:00
Nicolás Alvarez 0e86ea6c57 Update documentation for ENC_TIME_* constants
ENC_TIME_MIP6 and ENC_TIME_CLASSIC_MAC_OS_SECS were added recently by
factoring them out of specific dissectors, but they weren't documented.
I added documentation, based on comments in the dissector code they came
from.
2021-02-03 21:03:11 -03:00
heinrich5991 5c3a651ea2 Fix doc/README.plugins mentioning the wrong symbols
Since 2.9.0, plugin_release has been split up into two different
variables, plugin_want_major and plugin_want_minor.
2021-02-03 02:46:32 +00:00
Chema Gonzalez 03baf65ae7 editcap: add support for epoch timestamps in `-A` and `-B` options
Inspired in https://gitlab.com/wireshark/wireshark/-/merge_requests/1618.

Tested:

Timestamps on file used for comparison:
```
$ tshark -r test/captures/snakeoil-dtls.pcap -T fields -e frame.time_epoch
1150121069.248818000
1150121069.249193000
1150121069.251152000
1150121069.251384000
1150121069.293686000
1150121069.319315000
1150121075.230753000
1150121105.510885000
1150121105.510934000
```

Before:
```
$ ./build/run/editcap -B 1150121069.3 test/captures/snakeoil-dtls.pcap -
editcap: "1150121069.3" isn't a valid date and time
$ ./build/run/editcap -A 1150121069.3 test/captures/snakeoil-dtls.pcap -
editcap: "1150121069.3" isn't a valid date and time
$ ./build/run/editcap -A 1150121069 test/captures/snakeoil-dtls.pcap -
editcap: "1150121069" isn't a valid date and time
$ ./build/run/editcap -B 1150121069 test/captures/snakeoil-dtls.pcap -
editcap: "1150121069" isn't a valid date and time
```

After:
```
$ ./build/run/editcap -A 1150121069.3 test/captures/snakeoil-dtls.pcap - | tshark -r - -T fields -e frame.time_epoch
1150121069.319315000
1150121075.230753000
1150121105.510885000
1150121105.510934000
$ ./build/run/editcap -A 1150121069 test/captures/snakeoil-dtls.pcap - | tshark -r - -T fields -e frame.time_epoch
1150121069.248818000
1150121069.249193000
1150121069.251152000
1150121069.251384000
1150121069.293686000
1150121069.319315000
1150121075.230753000
1150121105.510885000
1150121105.510934000
$ ./build/run/editcap -B 1150121069.3 test/captures/snakeoil-dtls.pcap - | tshark -r - -T fields -e frame.time_epoch
1150121069.248818000
1150121069.249193000
1150121069.251152000
1150121069.251384000
1150121069.293686000
$ ./build/run/editcap -B 1150121069 test/captures/snakeoil-dtls.pcap - | tshark -r - -T fields -e frame.time_epoch
```
2021-01-11 18:01:08 +00:00
Eugene Adell 9b0c3f5eaf Just correct the documentation for this obvious mistake. Closes #17141. 2021-01-09 19:07:30 +01:00
David Perry b758fdaede Add iso8601_to_nstime() for editcap and nettrace
This adds a function to parse a string date-time in ISO 8601 format into
a `nstime_t` structure. It's based on code from epan/tvbuff.c and
wiretap/nettrace_3gpp_32_423.c and meant to eventually replace both.
(Currently only replaces the latter.)

Since most of Wireshark expects ISO 8601 date-times to fit a fairly
strict pattern, iso8601_to_nstime() currently rejects date-times without
separators between the components, even though ISO 8601 actually permits
this. This could be revisited later.

Also uses iso8601_to_nstime in editcap to parse the -A/-B options,
thus allowing the user to specify a time zone if desired. (See #17110)
2021-01-08 09:18:39 +00:00
Gerald Combs dfc05555eb [Automatic update for 2021-01-03]
Update manuf, services enterprise numbers, translations, and other items.
2021-01-03 17:38:31 +00:00
Jaap Keuter b3d6580b4f editcap: clarify relation between -A/-B and -r
Change wording so that the order of processing becomes more apparent.

Closes #17109
2020-12-31 10:50:17 +00:00
Jim Young 9fb22c1ec0 Four trivial comment typo fixes of ‘ad’ to ‘as’ 2020-12-06 19:07:08 +00:00
Odysseus Yang 2a5b34d8b0 MBIM: Update dissector to support DLT_ETW
New link type DLT_ETW is added for write and read Event Trace on Windows.
This change updates MBIM dissector to decode a MBIM message from
a DLT_ETW packet.
2020-12-02 09:05:11 +00:00
Martin Mathieson df651aca91 Spelling improvements
Improve script by ignoring common contractions, dealing with
e.g. \n within strings, and finding multiple concatenated words even
when no camelCase is used.

Also includes some actual spelling fixes.
2020-11-22 11:30:24 +00:00
John Thacker e20bd408de Use iconv to support GB 18030 and EUC-KR, allow future encodings
Add support internally to using iconv (always present with glib) to convert
strings from various encodings to UTF-8 (using REPLACEMENT CHARACTER as
recommended), and use that to support GB 18030 and EUC-KR. Replace call
directly to iconv in ANSI 637 for EUC-KR to new API. Update comments
and documentation around character encodings. It is possible to replace
the calls to iconv with an internal decoder later. Tested on Linux and
on Windows (including with illegal characters). Closes #16630.
2020-10-21 11:26:23 +00:00
Chuck Craft 90cd509d92 Consistent "Prepare as Filter" - menus and screenshots #16892 2020-10-15 09:18:56 +00:00
Роман Донченко 88b0370f86 Fix spelling errors in the documentation 2020-10-12 11:43:47 +00:00
Jeff Widman 46c9f2579d typo: is require --> is required 2020-10-07 17:32:54 -07:00
Jeff Widman 8d7ebc732e Fix issues discovered by common python linters
Fix some issues discovered by common python linters including:
* switch `None` comparisons to use `is` rather than `==`. Identity !=
equality, and I've spent 40+ hours before tracking down a subtle bug
caused by exactly this issue. Note that this may introduce a problem if
one of the scripts is depending on this behavior, in which case the
comparison should be changed to `True`/`False` rather than `None`.
* Use `except Exception:` as bare `except:` statements have been
discouraged for years. Ideally for some of these we'd examine if there
were specific exceptions that should be caught, but for now I simply
caught all. Again, this could introduce very subtle behavioral changes
under Python 2, but IIUC, that was all fixed in Python 3, so safe to
move to `except Exception:`.
* Use more idiomatic `if not x in y`--> `if x not in y`
* Use more idiomatic 2 blank lines. I only did this at the beginning,
until I realized how overwhelming this was going to be to apply, then I
stopped.
* Add a TODO where an undefined function name is called, so will fail
whenever that code is run.
* Add more idiomatic spacing around `:`. This is also only partially
cleaned up, as I gave up when I saw how `asn2wrs.py` was clearly
infatuated with the construct.
* Various other small cleanups, removed some trailing whitespace and
improper indentation that wasn't a multiple of 4, etc.

There is still _much_ to do, but I haven't been heavily involved with
this project before, so thought this was a sufficient amount to put up
and see what the feedback is.

Linters that I have enabled which highlighted some of these issues
include:
* `pylint`
* `flake8`
* `pycodestyle`
2020-09-26 04:38:18 +00:00
Martin Mathieson 906ead6993 Fix some more doc folder spelling errors. 2020-09-25 22:20:21 +01:00
Thomas Vogt acdaf33630 README.developer: Fix some quotation marks around function names 2020-09-25 15:29:14 +00:00
Gerald Combs 4a7be0aaa7 doc: Update wiki URLs in man pages. 2020-09-17 14:18:43 -07:00
Guy Harris 272502790b Add FT_STRINGZTRUNC.
FT_STRINGZPAD is for null-*padded* strings, where the field is in an
area of specified length, and, if the string is shorter than that
length, all bytes past the end of the string are NULs.

FT_STRINGZTRUNC is for null-*truncated* strings, where the field is in
an area of specified length and, if the string is shorter than that
length, there's a null character (which might be more than one byte, for
UCS-2, UTF-16, or UTF-32), and anything after that is not guaranteed to
have any particular value.

Use IS_FT_STRING() in some places rather than enumerating all the string
types, so that those places get automatically changed if the set of
string types changes.
2020-09-12 14:16:12 -07: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
Martin Mathieson 38d77e6c7c Fix some typos detected in man pages. 2020-09-03 21:07:35 +00:00
Gerald Combs 97dcaf97fc Convert Gerrit URLs to GitLab.
Convert various code.wireshark.org URLs to their
gitlab.com/wireshark/wireshark equivalents.

Change-Id: I0150d1bd14208eb451a7de818dce6573363b1d27
2020-08-24 23:31:32 +00:00
Gerald Combs 9977ca2132 doc: Update README.dissector for GitLab.
Change-Id: I0fd52a17a80f3d4f6acc3c38d53c7d452e85382f
2020-08-24 04:58:11 +00:00
Guy Harris efd7cb38e6 doc: explain when to use FT_STRINGZ, and document FT_STRINGZPAD.
FT_STRINGZ should be used *ONLY* if the string is *ALWAYS* supposed to
have a null terminator, either because the length isn't otherwise
specified, so that it can only be determined by finding the terminating
null character, or because a character count *and* a NULL terminator are
both used (yes, there appear to be some cases where that's true).

FT_STRINGZPAD is null-padded rather than null-terminated; this is
typically used for fixed-length fields that contain a string value that
might be shorter than the fixed length.

Change-Id: Ifdf421ca666482583a4dfc76167eae6dc473f48a
Reviewed-on: https://code.wireshark.org/review/38137
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-08-12 09:03:54 +00:00
David Perry e4379f0ea1 Dumpcap: print closed ring-buffer file names
This proposal adds a new option '-b printname:<filename>' to dumpcap. If
used, dumpcap will print the name of each ring buffer file it creates
after it is closed. Allows the use of '-'/'stdout' and 'stderr'.

Use case: Since the file name is printed after the file is closed for
writing, an automated capture process can do something like the
following with the guarantee that the file in question will not be
changed.

    dumpcap -i eth0 -b files:2 -b printname:stdout [-b ...] | \
    while read cap_file_name ; do
        # Do something with $cap_file_name
    done

This sort of scripting is difficult in dumpcap's current form. Dumpcap
prints the names of new files to stderr as it *opens* them, so a script
attempting to use this must sleep for "-b duration:value" seconds plus
some fudge time to be sure it's getting a closed, unchanging file.

Change-Id: Idb288cc7c8c30443256d35c8cd4460a2e3f0861c
Reviewed-on: https://code.wireshark.org/review/37994
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-08 08:04:13 +00:00