Commit Graph

56 Commits

Author SHA1 Message Date
Chuck Craft a3625ec9f6 extcap: reword error message referencing captype
There exists a program called "captype" but it's not used here.
2021-10-13 05:03:31 +00:00
João Valverde 5362d0c31b ws_getopt: Rename struct and macros
This is part of the API and should also be renamed to avoid conflicts.
2021-09-30 13:59:28 +00:00
João Valverde 8df2a73594 Use the musl in-tree getopt_long() everywhere
Besides the obvious limitation of being unavailable on Windows,
the standard is vague about getopt() and getopt_long() has many
non-portable pitfalls and buggy implementations, that increase
the maintainance cost a lot. Also the GNU libc code currently
in the tree is not suited for embedding and is unmaintainable.

Own maintainership for getopt_long() and use the musl implementation
everywhere. This way we don't need to worry if optreset is available,
or if the $OPERATING_SYSTEM version behaves in subtly different ways.

The API is under the Wireshark namespace to avoid conflicts with
system headers.

Side-note, the Mingw-w64 9.0 getopt_long() implementation is buggy
with opterr and known to crash. In my experience it's a headache to
use the embedded getopt implementation if the system provides one.
2021-09-17 00:43:54 +01:00
João Valverde c6a920686c wslog: Check environment initialization for errors
Initialiaze the cmdarg error stream earlier.

Dumpcap also needs to know earlier if it is running in capture
child mode.
2021-06-26 00:18:26 +01:00
João Valverde 759bb234d0 wslog: Check if we are initialized and add missing inits
Instead of receiving the program name from GLib, pass it explicitly
to ws_log_init() instead  and use that to initialize the GLib program
name.

ws_log_parse_args() will now exit the program when it encounters an
argument error if exit_failure >= 0.
2021-06-21 16:03:29 +00:00
João Valverde 39df3ae3c0 Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
João Valverde e86ac706ca wslog: Parse cmd line options in one pass 2021-06-14 22:05:35 +00:00
João Valverde 5ddc007023 wslog: Include pid in format 2021-06-14 14:18:38 +01:00
João Valverde 5a662ba3fb wslog: Add support for domain filtering
A domain filter can be given in the environment variable
'WS_LOG_DOMAINS' or in a command-line options "--log-domains".

The filter is specified as a comma separated case insensitive list,
for example:

    ./tshark  --log-domains=main,capture

Domain data type switches from an enum to a string. There is no
constaint on adding new domains, neither in code or at runtime.
The string format is arbitrary, only positive matches will produce
output.
2021-06-14 13:13:12 +01:00
João Valverde dc7f0b88bb Refactor our logging and extend the wslog API
Experience has shown that:

  1. The current logging methods are not very reliable or practical.
A logging bitmask makes little sense as the user-facing interface (who
would want debug but not crtical messages for example?); it's
computer-friendly and user-unfriendly. More importantly the console
log level preference is initialized too late in the startup process
to be used for the logging subsystem and that fact raises a number
of annoying and hard-to-fix usability issues.

  2. Coding around G_MESSAGES_DEBUG to comply with our log level mask
and not clobber the user's settings or not create unexpected log misses
is unworkable and generally follows the principle of most surprise.
The fact that G_MESSAGES_DEBUG="all" can leak to other programs using
GLib is also annoying.

  3. The non-structured GLib logging API is very opinionated and lacks
configurability beyond replacing the log handler.

  4. Windows GUI has some special code to attach to a console,
but it would be nice to abstract away the rest under a single
interface.

  5. Using this logger seems to be noticeably faster.

Deprecate the console log level preference and extend our API to
implement a log handler in wsutil/wslog.h to provide easy-to-use,
flexible and dependable logging during all execution phases.

Log levels have a hierarchy, from most verbose to least verbose
(debug to error). When a given level is set everything above that
is also enabled.

The log level can be set with an environment variable or a command
line option (parsed as soon as possible but still later than the
environment). The default log level is "message".

Dissector logging is not included because it is not clear what log
domain they should use. An explosion to thousands of domains is
not desirable and putting everything in a single domain is probably
too coarse and noisy. For now I think it makes sense to let them do
their own thing using g_log_default_handler() and continue using the
G_MESSAGES_DEBUG mechanism with specific domains for each individual
dissector.

In the future a mechanism may be added to selectively enable these
domains at runtime while trying to avoid the problems introduced
by G_MESSAGES_DEBUG.
2021-06-11 09:40:28 +00:00
Guy Harris c33e2f7b51 Add more error-reporting routines that call through a function pointer.
Have routines to report capture-file errors, using libwireshark error
codes and strings, that call through a pointer, so they can pop up
dialogs in GUI apps, print a message to the standard error on
command-line apps, and possibly do something different on server
programs.

Have init_report_message() take a pointer to structure containing those
function pointers, rather than the function pointers themselves, as
arguments.

Make other API changes to make that work.
2021-03-15 12:17:59 -07:00
Guy Harris e4835191cb extcap: clean up the version number handling.
Have the version parameter be just the version number; other code
expects it to be that.

Have additional parameters for the "compiled with" and "running with"
information.

Add a extcap_version_print() routine to show the version message,
printing

	{exename} version {version}

and then printing

	Compiled with {compiled_with}

if "compiled with" information is supplied and printing

	Running with {running_with}

if "running with" information is supplied.

This fixes some messages, as well as fixing the display of extcap
modules in the About dialog.

Change-Id: I3d298d30e83bd363abd599d75adfc780a90f34fd
Reviewed-on: https://code.wireshark.org/review/37877
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-16 02:48:45 +00:00
João Valverde 97cb389a35 Revert "CMake: Don't install HTML manuals twice"
This reverts commit f1285fcf06.

NSIS package is broken with this commit.

Change-Id: Ief22a308edad188fa2d5fab79355f19493359fa6
Reviewed-on: https://code.wireshark.org/review/34758
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-10 15:58:41 +00:00
João Valverde f1285fcf06 CMake: Don't install HTML manuals twice
HTML docs are installed to both $docdir and $pkgdatadir. Fix that
to install to $docdir only.

Change-Id: I115158585b6df9170d9a01249adbc8548df91f14
Reviewed-on: https://code.wireshark.org/review/34640
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-09 13:24:58 +00:00
Tomasz Moń 3c245f2f46 randpktdump: Remove misleading tooltip
The number of packets to generate is unsigned and always finite. The
code supports 64 bits integers as the count and thus for most use cases
(2^64)-1 is good enough alternative for infinite.

Change-Id: I9f83002358d0ab11724dce22802390b145e4ac67
Reviewed-on: https://code.wireshark.org/review/34613
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-24 21:38:31 +00:00
Tomasz Moń 4853fb93b2 randpktdump: Initialize print error handler
When there is a problem with output pipe, randpktdump will call
cfile_write_failure_message() which in turn calls cmdarg_err() which
calls print_err. Call cmdarg_err_init() so print_err is not NULL.

Change-Id: Ie459596a473c83204e9aa1d48bb2d2d3717b340a
Reviewed-on: https://code.wireshark.org/review/34495
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-09-14 21:25:57 +00:00
Guy Harris 2ee483a222 Move the Winsock initialization and cleanup to wsutil routines.
Those routines exist on both Windows and UN*X, but they don't do
anything on UN*X (they could if it were ever necessary).

That eliminates some #ifdefs, and also means that the gory details of
initializing Winsock, including the Winsock version being requested,
are buried in one routine.

The initialization routine returns NULL on success and a pointer to a
g_malloc()ated error message on failure; report the error to the user,
along with a "report this to the Wireshark developers" suggestion.

That means including wsutil/socket.h, which obviates the need to include
some headers for socket APIs, as it includes them for you.

Change-Id: I9327bbf25effbb441e4217edc5354a4d5ab07186
Reviewed-on: https://code.wireshark.org/review/33045
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-02 09:29:01 +00:00
Gerald Combs cec5991f40 Windows: Modernize our WSAStartup usage.
Make sure we link each application that calls WSAStartup with ws2_32.lib.
Pass version 2.2 to WSAStartup. Wikipedia says it was introduced in 1996,
so we should be OK.

Ping-Bug: 15711
Change-Id: I431839e930e7c646669af7373789640b5180ec28
Reviewed-on: https://code.wireshark.org/review/33033
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-05-01 17:51:59 +00:00
Guy Harris bbc8cbfb9c If you use data_file_url(), you must first call init_progfile_dir().
And if you call init_progfile_dir(), you must call
init_process_policies() before that.

And even if you *don't* use data_file_url(), you might use it in the
future, or you might use other calls to get data file paths, so make
*all* the extcap programs make those calls.

(Yes, this is important on macOS, for example; it may also be important
on Windows.  On other UN*Xes we may just compile in the data file path,
but that's not true on *all* our platforms.)

Change-Id: I99265ed69ec24096884ec067feddd7d7f3855436
Reviewed-on: https://code.wireshark.org/review/32775
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-08 02:57:53 +00:00
Peter Wu e2e5b01d77 cli_main: remove real_main from stack traces for non-Windows
Restore the "main" name since that is used everywhere else except for
Windows. On Windows, "main" is renamed via a macro to avoid a conflict
with "wmain" and to allow it to be called in cli_main.c.

For those wondering, GUI applications (such as Qt) have a different
entry point, namely WinMain. In Qt5, src/winmain/qtmain_win.cpp defines
WinMain, but seems to convert its arguments from Unicode to CP_ACP
(ASCII). It might not support UTF-8, but I did not verify this.

Change-Id: I93fa59324eb2ef95a305b08fc5ba34d49cc73bf0
Reviewed-on: https://code.wireshark.org/review/31208
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-02 12:08:20 +00:00
Guy Harris a34cc98b2a Put the main() and wmain() routines for CLI programs into a separate file.
That means that code is only in one place, rather than having copies of
it in each of those programs.

CLI programs that, on Windows, should get UTF-8 arguments rather than
arguments in the local code page should:

	include the top-level cli_main.h header;

	define the main function as real_main();

	be built with the top-level cli_main.c file.

On UN*X, cli_main.c has a main() program, and just passes the arguments
on to real_main().

On Windows, cli_main.c has a wmain() function that converts the UTF-16
arguments it's handed to UTF-8 arguments, using WideCharToMultiByte() so
that it doesn't use any functions other than those provided by the
system, and then calls real_main() with the argument count and UTF-8
arguments.

Change-Id: I8b11f01dbc5c63fce599d1bef9ad96cd92c3c01e
Reviewed-on: https://code.wireshark.org/review/31017
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-13 00:52:11 +00:00
Gerald Combs aba59e5973 Win32: Make extcap utilities console applications.
Switch from using WinMain in extcap to wmain.

Change-Id: I54fafad598f5ff74fe84a3ce3e993ac5a31188f7
Reviewed-on: https://code.wireshark.org/review/30094
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-10-12 19:01:49 +00:00
Peter Wu f7b91633c4 randpktdump: add --delay option
For testing live capture mode in the Qt UI, it is useful to have a
continous capture source with some dummy packets.

Change-Id: Id76ecbf24828dd3212b208c96679524e4c25b00f
Reviewed-on: https://code.wireshark.org/review/28537
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-01 06:57:23 +00:00
Dario Lombardo b849730be7 randpktdump: use boolflag instead of boolean in config.
Change-Id: I259382352d4c79755c095b1e23325265226acd23
Reviewed-on: https://code.wireshark.org/review/27613
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 05:48:58 +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
Pascal Quantin fc9af81a13 wiretap: add a parameter to wtap_init() indicating whether plugins must be loaded
g995812c5f1 moved wiretap plugins registration from applications to
wiretap library init function.
As we do not want to load plugins for all users of libwiretap, let's
make it configurable.

Bug: 14314
Change-Id: Id8fdcc484e2d0d31d3ab0bd357d3a6678570f700
Reviewed-on: https://code.wireshark.org/review/25194
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09 21:25:06 +00:00
Dario Lombardo 66b5afa216 extcap: use SPDX identifiers for licences.
Change-Id: Id56687f86f4c60494dad0b6d58550ee45b0b203c
Reviewed-on: https://code.wireshark.org/review/24381
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-12 18:27:24 +00:00
Dario Lombardo f978465fb3 extcap: add debug log file feature to extcap-base.
Change-Id: I3bfc9b2fd7b73dcfef52c5101360384d205c0d12
Reviewed-on: https://code.wireshark.org/review/22835
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-08-02 17:41:24 +00:00
Dario Lombardo 963707ab3c extcap: add command line debug function to extcap-base.
This function is helpful to debug the interaction between the
calling UI and the extcap itself.

All extcaps have been changed accordingly.

Change-Id: I358caf4c50797501672bf77fdd91f7276897078c
Reviewed-on: https://code.wireshark.org/review/22806
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-07-27 15:19:47 +00:00
Peter Wu 2009dcc98d extcap: fix memleak via data_file_url
Commit v2.1.0rc0-2181-ga4e2263ac4 introduced a helppage parameter, but
all callers were NULL. In a later change, callers would use the
data_file_url() function, but this needs to be freed, so do that.

Fixes: v2.3.0rc0-1825-ge5596b74bd ("extcap: set help page for all extcaps.")
Change-Id: I967c0f8c6b50d9e78ac227575de24a81f97d376a
Reviewed-on: https://code.wireshark.org/review/19570
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-01-07 20:32:43 +00:00
Dario Lombardo e5596b74bd extcap: set help page for all extcaps.
They've been set to the manpage of the local filesystem.

Ping-Bug: 13218
Change-Id: Iacd5d2ba7ae39ee1718b59747c245d1c07785e8f
Reviewed-on: https://code.wireshark.org/review/19179
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-12-20 08:23:11 +00:00
Michal Labedzki b83ea46665 extcap: put missed parameters into the help
"--debug" and "--extcap-version" are part of extcap-base helper,
do not hide them.

Change-Id: I287b68dbed5344c188fede69d112ab007a6ee18b
Reviewed-on: https://code.wireshark.org/review/18279
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-19 06:44:05 +00:00
Dario Lombardo d67c1db3f2 extcap: make extcap use the ws_strtoi/u functions.
Change-Id: Id75c72eba869c8a0f413ce8b5d6329ce172aed1f
Reviewed-on: https://code.wireshark.org/review/17415
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-09-16 14:21:16 +00:00
Dario Lombardo 124fb83079 extcap: improve interface print in help.
Change-Id: Ife8e73b6cb1756623e937452fc042d8b31e2554f
Reviewed-on: https://code.wireshark.org/review/17321
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-08-26 21:05:12 +00:00
Dario Lombardo f597234785 extcap: add binary name and version to help message.
Change-Id: I8f8083c817065cf66fd006a1caeb309d26209509
Reviewed-on: https://code.wireshark.org/review/17305
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-25 12:29:49 +00:00
Dario Lombardo f269f56c1a extcap: make extcaps use the version registered in config.
Change-Id: I12d0d0bec06e02af0a9d0877c0f0f1d86261d752
Reviewed-on: https://code.wireshark.org/review/17296
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-24 12:25:56 +00:00
Dario Lombardo a671bab337 extcap: restyle the help function.
Change-Id: Ia742dffb1fd4cd5780b8ba44f7064d1874e473da
Reviewed-on: https://code.wireshark.org/review/16842
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-04 14:13:53 +00:00
Dario Lombardo 5adde36520 extcap: restyle the output subsystem.
Change-Id: I3e0674751eb97bf30ae6d70c4e51f347d63b1697
Reviewed-on: https://code.wireshark.org/review/16849
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-08-04 11:26:26 +00:00
Michael Mann db1e0bcf65 Fix printf style parameters complaints from VS Code Analysis
Change-Id: I5669e2442582f899643fae4a9f86ab6d505dde07
Reviewed-on: https://code.wireshark.org/review/16505
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 13:10:37 +00:00
Michael Mann 9a9c72ccea Have extcap executables mirror the GTK's WinMain signature.
This is for appeasing VS Code Analysis.

Change-Id: Ib7b3d8a3025dd764da283335051d0f77b45f6dee
Reviewed-on: https://code.wireshark.org/review/16499
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-16 19:52:00 +00:00
Dario Lombardo 01b28caf75 randpkt_core: change rand() to g_rand_int (CID 1355360).
Change-Id: I48560cbb6007eb16aa545a3e8e6a0e8e3b206930
Reviewed-on: https://code.wireshark.org/review/16326
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-07-09 15:29:55 +00:00
Dario Lombardo c119296504 randpkt: restyle the list generation to get rid of the const compiler warning.
Change-Id: Id7c62ef18f919ba8a476898bc88c02fd3b6bf5a1
Reviewed-on: https://code.wireshark.org/review/14730
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-01 00:33:09 +00:00
Peter Wu 130ecc3ab3 Fix modeline definitions
Fix mismatching emacs and vi modelines.

Change-Id: I5cab8c5b7692746a5fa731c977cef903ad19a6f6
Reviewed-on: https://code.wireshark.org/review/14688
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-03-29 09:45:27 +00:00
Peter Wu 0aa0fb25e0 Another round of extcap memleak fixes
Fix a bunch of memory leaks, mainly because extcap_base_cleanup is not
called on most execution paths and because memory allocated for options
were not freed.

Additionally, randpkt will now fail if no option is given (it previously
returned 0 if --capture was missing). Logic using "goto" is introduced
with the idea that a program should fail (ret = EXIT_FAILURE) unless
proven otherwise.

Now none of the extcap programs are leaking:

    for what in ssh cisco; do
    for arg in '' --help --extcap-interfaces --extcap-interface=$what; do
        extcap/${what}dump $arg; done; done
    ./tshark -D

Change-Id: I6df1027ed0c32bd53fe87e6c54d355bc8ddd01f5
Reviewed-on: https://code.wireshark.org/review/14671
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-29 06:01:31 +00:00
Michael Mann 3771a790b7 Fix randpktdump build in Windows.
Change-Id: If749635d771443542285a74f05f37156123b2991
Reviewed-on: https://code.wireshark.org/review/14238
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-29 13:15:07 +00:00
Roland Knall a4e2263ac4 extcap: Move extcap handling to base
Also add the extcap-version parameter to enable parsing of
version and helppage separately

Change-Id: I35ba5aa992940ffbb0cd9ebea8b7c3a1e8629d74
Reviewed-on: https://code.wireshark.org/review/14094
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-29 12:32:03 +00:00
Dario Lombardo 298012359b extcap: move windows functions into extcap-base
Change-Id: Iec7fed027a24992afd673b09c32470af51739ae5
Reviewed-on: https://code.wireshark.org/review/14075
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-26 10:02:59 +00:00
Guy Harris e9b2859c45 Clean up modelines and indentation.
HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT
character as tabbing to 4-space tab stops, or that even are configurable
but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are
broken.  tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever
expect anybody to look at your file with a UN*X tool, and every text
file will probably be looked at by a UN*X tool at some point, so Don't
Do That.

Adjust indentation to reflect the mode lines.

Change-Id: Icf0831717de10fc615971fa1cf75af2f1ea2d03d
Reviewed-on: https://code.wireshark.org/review/14150
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-25 21:34:36 +00:00
Dario Lombardo a376915fdd extcap: move includes into extcap-base.
Change-Id: I802cc3a3bb3989411216ed070ecc018345e0d54f
Reviewed-on: https://code.wireshark.org/review/14073
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-25 14:05:51 +00:00
Dario Lombardo c154c75fef extcap: move common code into extcap-base files
Change-Id: Ia4a73c7df39426c8773fce04cac223bda3c6ef1c
Reviewed-on: https://code.wireshark.org/review/14071
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-25 12:54:27 +00:00