Commit Graph

9 Commits

Author SHA1 Message Date
Guy Harris b8b3531883 wiretap: register most built-in file types from its module.
Remove most of the built-in file types from the table in
wiretap/file_access.c and, instead, have the file types register
themselves, using wtap_register_file_type_subtypes().

This reduces the source code changes needed to add a new file type from
three (add the handler, add the file type to the table in file_access.c,
add a #define for the file type in wiretap/wtap.h) to one (add the
handler).  (It also requires adding the handler's source file to
wiretap/CMakeLists.txt, but that's required in both cases.)

A few remain because the WTAP_FILE_TYPE_SUBTYPE_ #define is used
elsewhere; that needs to be fixed.

Fix the wiretap/CMakefile.txt file to scan k12text.l, as that now
contains a registration routine.  In the process, avoid scanning files
that don't implement a file type and won't ever have a registration
routine.

Add a Lua routine to fetch the total number of file types; we use that
in some code to construct the wtap_filetypes table, which we need to do
in order to continue to have all the values that used to come from the
WTAP_FILE_TYPE_SUBTYPE_ types.

While we're at it, add modelines to a file that lacked them.
2021-02-14 00:58:46 -08:00
Guy Harris 6e6233521a Have WTAP_ERR_INTERNAL include an err_info string giving details.
That way, users won't just see "You got an internal error", the details
will be given, so they can report them in a bug.
2020-10-14 04:51:45 +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
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
Dario Lombardo c440a24b1b wiretap: use SPDX identifiers (partial work).
Change-Id: I28436e003ce7fe31d53e6663f3cc7aca00845e4b
Reviewed-on: https://code.wireshark.org/review/25392
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-20 17:23:08 +00:00
Michał Orynicz 1cde318117 Fix for very big pid and tid numbers in logcat_text
There can be no space after pid colon if tid is big enough
in logcat long format.

Change-Id: I8e03e78c88e4bef1a5fdb3a04b77f58fa7d055bc
Reviewed-on: https://code.wireshark.org/review/5411
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-21 07:50:40 +00:00
Michał Orynicz 1d8673c0df Move text logcat regex strings to shared header
To avoid further duplication of work and bugfixing,
move regex strings to wiretap/logcat_text.h and include
this file in epan/dissectors/packet-logcat-text.c

Change-Id: I82773cda0e3240844139b104c68738ec82788014
Reviewed-on: https://code.wireshark.org/review/5410
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-21 07:45:58 +00:00
Guy Harris 5947291294 Fix declared types of open routines.
Change-Id: Ifa38dfec31ec5b03f00d6e077902184a9ae2ee0e
Reviewed-on: https://code.wireshark.org/review/4583
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-10 01:04:43 +00:00
Michał Orynicz 1a02ca0150 Add support for android logcat text files
Wireshark already supports reading and writing logcat
logs saved in binary files. Binary format, although
better, is used less often than saving those logs to
text files.

This patch extends wireshark's support for android logcat
logs to reading and writing logcat logs in text files.

Features:
* support for tag, brief, process, thread, time, threadtime
  and long formats
* saving in original format
* it's generally awesome

Change-Id: I013d6ac2da876d9a2b39b740219eb398d03830f6
Reviewed-on: https://code.wireshark.org/review/1802
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 06:46:50 +00:00