Commit Graph

30 Commits

Author SHA1 Message Date
João Valverde 0cea64a632 Move ui/cmdarg_err.[ch] to wsutil 2023-02-10 20:59:22 +00:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
João Valverde fe5248717f Replace g_snprintf() with snprintf()
Use macros from inttypes.h with format strings.
2021-12-19 20:06:13 +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
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +00:00
Guy Harris ba589a4e44 Move some command-line-oriented routines from wsutil to ui.
cmdarg_err() is for reporting errors for command-line programs and
command-line errors in GUI programs; it's not something for any of the
Wireshark libraries to use.

The various routines for parsing numerical command-line arguments are
not for general use, they're just for use when parsing arguments.

Change-Id: I100bd4a55ab8ee4497f41d9651b0c5670e6c1e7f
Reviewed-on: https://code.wireshark.org/review/31281
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 02:07:06 +00:00
Guy Harris aaf709da67 Use cmdarg_err() to report errors in CLI taps.
Change-Id: Ic6b35220e394f8c67848ed067e4bbddb980d5bc0
Reviewed-on: https://code.wireshark.org/review/31253
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
2018-12-30 02:58:05 +00:00
Guy Harris 9b731e2b32 Add a tap "finish" callback, called when a listener is removed.
Change-Id: Ic6c23dbd39d1adf8f730f1c866e409f731947475
Reviewed-on: https://code.wireshark.org/review/28786
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-21 00:51:13 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56:37 +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 819b8174a9 cli: use SPDX identifiers.
Change-Id: I7ce9b2a32f4ddad93ca1d9697c2a76b067f9e5f7
Reviewed-on: https://code.wireshark.org/review/25564
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:40:28 +00:00
Pascal Quantin a383e692c8 Revert "tap: change glib functions to wmem."
This reverts commit 2e9f3c5d36.

It breaks the registration of codec, dissector and libwiretap plugins.

Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de
Reviewed-on: https://code.wireshark.org/review/16012
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-19 10:47:10 +00:00
Dario Lombardo 2e9f3c5d36 tap: change glib functions to wmem.
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf
Reviewed-on: https://code.wireshark.org/review/15270
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-17 15:38:03 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Guy Harris a7f470fa24 More pinfo->fd->abs_ts to pinfo->abs_ts.
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac
Reviewed-on: https://code.wireshark.org/review/13501
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:58:56 +00:00
Guy Harris 5e67ae78ba Get rid of an unused structure member.
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801
Reviewed-on: https://code.wireshark.org/review/7573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-07 04:41:09 +00:00
Bill Meier e88a11f5c9 (Trivial) Fix printf-related 'Mismatch on sign' warnings
Found by MSVC2013 Code Analysis

Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79
Reviewed-on: https://code.wireshark.org/review/7045
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-09 18:57:14 +00:00
Guy Harris 4d3c4c4f12 Rename stat_cmd_args.[ch] to stat_tap_ui.[ch].
The intent is to handle more than just command-line arguments; reflect that.

Change-Id: Ia10efda85a9d11c6579d1bec6f789cee30d9e825
Reviewed-on: https://code.wireshark.org/review/5304
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 18:52:06 +00:00
Guy Harris a21436eaed tap_ui -> stat_tap_ui.
The old routine had stat_ in the name, as the expectation was that they
were for statistics taps; that's still the expectation, so have stat_ in
the data structure and routine names.

Change-Id: Ic98d011012b8641173d41fa0ec4f4e625614370a
Reviewed-on: https://code.wireshark.org/review/5303
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 18:42:50 +00:00
Guy Harris 7390516f61 For tap UIs, register a list of parameters and some menu information.
The intent here is to centralize more UI information so that we can move
more tap UI stuff to common code.  This is a beginning.

Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30
Reviewed-on: https://code.wireshark.org/review/5301
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 18:31:34 +00:00
Bill Meier 6a9479ecf9 Add editor modelines and/or adjust whilespace.
Change-Id: I626b7bd8ac6e4b91c57cc9152e7ce038754e7278
Reviewed-on: https://code.wireshark.org/review/4658
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-13 19:09:07 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Anders Broman a7e417bf24 Get rid of Warinings [-Wmissing-prototypes]
svn path=/trunk/; revision=53311
2013-11-14 06:21:02 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Guy Harris ab3aeb63e4 Get rid of -Wshadow warning - I guess we're including something that
gets <getopt.h>, so we get the optarg global.

svn path=/trunk/; revision=51350
2013-08-14 01:18:58 +00:00
Anders Broman 5d698bfd88 Use explicit casts.
svn path=/trunk/; revision=48161
2013-03-07 07:05:45 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 1783543e92 AFAICT '#include sys/types.h' is not needed for these files.
svn path=/trunk/; revision=42446
2012-05-05 21:29:13 +00:00
Jörg Mayer 35508464b2 Start moving files to ui/ and ui/cli/
svn path=/trunk/; revision=41047
2012-02-17 12:30:27 +00:00