Commit Graph

2803 Commits

Author SHA1 Message Date
AndersBroman 9d1afef1df isdigit -> g_ascii_isdigit to make the build work.
Change-Id: I670b7b83976a9db9491e017015d570a4dc8f433d
Reviewed-on: https://code.wireshark.org/review/4771
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-17 08:52:10 +00:00
Guy Harris 87545f39da Remove unnecessary includes of <ctype.h>.
Change-Id: I8eacec5fa8d57b10d40a3627197461dae89c6cb2
Reviewed-on: https://code.wireshark.org/review/4768
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:57:41 +00:00
Guy Harris f90d8dcbbb Use g_ascii_isspace() instead of isascii() && isspace().
This eliminates one more use of <ctype.h> macros; we're using
g_ascii_isXXX() instead of isXXX() elsewhere.

Change-Id: I184caeefab95dda2cf207acf9539eabbd7c32a51
Reviewed-on: https://code.wireshark.org/review/4767
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:54:54 +00:00
Guy Harris 63ab36be92 Don't use <ctype.h> macros, and eliminate an include of <ctype.h>.
This avoids locale-dependent tests, and fixes cases where we passed
signed char values to those macros (which is not safe with char being
signed, as it is on most, but not all, platforms).

Change-Id: Iea962cd7e4dfaf33c3c873ba43814cc6ed298d94
Reviewed-on: https://code.wireshark.org/review/4764
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:41:58 +00:00
Dario Lombardo 7f74471229 Added italian translation to qt.
Change-Id: If58ed29e78a9994fc488a4d01cf665f7e8d82830
Reviewed-on: https://code.wireshark.org/review/4707
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-16 18:55:33 +00:00
Dario Lombardo 9b7ee18f8b Typos in source code and in README.qt
Change-Id: I5aef31ef7ad604352f6e108835f0e9c2d10cdf8a
Reviewed-on: https://code.wireshark.org/review/4706
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-15 16:43:14 +00:00
Bill Meier bfe3706035 Always put editor-modelines at the end of the file ...
... to ensure that there are no potential issues with respect to
editors limiting the number of lines scanned at the end of the file
when checking for editor modelines.

Change-Id: Ic85cbb108bb5159d6ec4116fea11f5eebb4e44a4
Reviewed-on: https://code.wireshark.org/review/4688
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-14 20:08:29 +00:00
Pascal Quantin 89a95f2205 Add Kerberos 3.2.2 package for Win64
Change-Id: If02469aa1a01972d2032478dce3bf872802f37cb
Reviewed-on: https://code.wireshark.org/review/4661
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-13 20:15:27 +00:00
Pascal Quantin 1f481258da Upgrade Win64 GTK2 package to 2.24.23-3.39
Change-Id: I0f5f27aa2fc13f38af73a42e1c6e4a36636d2fc7
Reviewed-on: https://code.wireshark.org/review/4656
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-13 19:33:07 +00:00
Roland Knall 05a6615965 extcap: Remove single-space argument for boolflags
Boolflags will be added with a NULL argument to the
 list and therefore the original fix will work.

 Note: extcap_get_complex_as_string will convert any NULL
 value into a single character argument (' '). Therefore
 any argument type, where NULL is a special value should
 be handled seperately here. For now, the only datatype
 will be BOOLFLAG

Change-Id: Icfc9b573214e05ea713a3b70ea37953d470dafae
Reviewed-on: https://code.wireshark.org/review/4649
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-13 19:26:46 +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 c4acc4bea4 extcap (GTK): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ifdba972e3a12e01ac80bc920a2100bd7aa0f733c
Reviewed-on: https://code.wireshark.org/review/4622
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-13 15:43:34 +00:00
Pascal Quantin b3ad51db7c Follow-up of ged0b19b (Make boolean bitmask type 64-bit wide)
- use G_GINT64_MODIFIER instead of "%ll"
- use G_GUINT64_CONSTANT instead of ULL
- add some missing explicit casts

Change-Id: Ic048d9ee8966ea504ea542cefe55688edcfb2dc7
Reviewed-on: https://code.wireshark.org/review/4644
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-13 15:34:09 +00:00
Tomasz Moń fc2f31810a Fix handling of extcap boolflags which defaults to true.
Example:
arg {number=0}{call=--test}{type=boolflag}{default=true}

Before this change --test was never added to argument list (no matter if
user left it selected or explicitly deselected it).

After this change --test will be added to argument list unless user
explicitly deselects it.

Change-Id: Ia5bc11f900b03e630aba882ef918dcb7f0b79291
Reviewed-on: https://code.wireshark.org/review/4618
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-12 19:54:57 +00:00
Bill Meier 1b8b2a8aa8 Add editor modelines; Adjust whitespace as needed.
Change-Id: I4da7b335d905dbca10bbce03aa88e1cdeeb1f8ad
Reviewed-on: https://code.wireshark.org/review/4626
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-12 18:58:32 +00:00
Daniel Mack ed0b19b94b Make boolean bitmask type 64-bit wide
There are protocols out there that have 64-bit wide bit mask fields, so
make the internal representation and bitfield decoders 64-bit aware.

For this, the ws_ctz() fallback and bits_count_ones() have to be tweaked
slightly.

Change-Id: I19237b954a69c9e6c55864f281993c1e8731a233
Reviewed-on: https://code.wireshark.org/review/4158
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-12 14:15:12 +00:00
Gerald Combs 3ee8efdfea Be less lazy about disabling a Visual C++ warning.
As Graham pointed out, "#pragma warning(disable..." affects the rest
of the file. Add a push+pop so that we only operate on the line in
question. Ideally we'd be able to use "suppress" but an "#endif"
prevents that.

Change-Id: Ia01d6c245879f1c845dc68c18caea2cbceb273ef
Reviewed-on: https://code.wireshark.org/review/4569
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-08 22:50:17 +00:00
Evan Huus 6c41f5058c Qt capture interfaces dialogue string tweaks
To clarify that capturing always uses a file, the checkbox only controls whether
that file is temporary or persisted.

Change-Id: I939e1fdf488f53245166612193c60a366f63a18b
Reviewed-on: https://code.wireshark.org/review/4537
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-08 09:50:27 +00:00
Tomasz Moń e881036b1a Fix extcap boolean flag handling.
Change-Id: I4c6b32805d4138ef0912fbf1b129a5e97776ab9c
Reviewed-on: https://code.wireshark.org/review/4535
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-08 05:48:05 +00:00
Gerald Combs 6397ad43c2 Revert "Qt: Try to fix a Visual C++ encoding warning."
Revert gafa8c02 since it didn't work on Windows. Use a pragma to squelch
Visual C++ instead.

Qt's rich text renderer doesn't handle "&apos;". Replace it with "&#x27;".
Remove a QDebug include.

Change-Id: I0e6308efda74a4bc0e67ce841a50a0a9b68f4a8b
Reviewed-on: https://code.wireshark.org/review/4511
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 23:34:56 +00:00
Gerald Combs a17067abb1 Qt: Rename the "check for updates" slot.
The "Check for Updates..." action doesn't exist when
QMetaObject::connectSlotsByName is called. Rename
on_actionHelpCheckForUpdates_triggered to checkForUpdates so that we
don't get the warning

QMetaObject::connectSlotsByName: No matching signal for on_actionHelpCheckForUpdates_triggered()

at startup.

Change-Id: Icbd7eb98731023c323212e6ec3d3c98f1321e245
Reviewed-on: https://code.wireshark.org/review/4510
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 22:59:40 +00:00
Martin Kaiser 0644b34067 after an lupdate, I should also do an lrelease to keep the .ts file and
the .qm file in sync

Change-Id: I588f5ff7386bac13c8ce0bba82fee4807c490682
Reviewed-on: https://code.wireshark.org/review/4509
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-06 22:05:02 +00:00
Martin Kaiser b80d330746 lupdate for Japanese
Change-Id: Ifa7af35cfc18f85cd547aa7621c5ca7305a9242d
Reviewed-on: https://code.wireshark.org/review/4508
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-06 22:02:05 +00:00
Martin Kaiser 02e902f671 From 竹下 恵 (Megumi Takeshita)
another update of the Japanese translation
the translation is fairly complete now, only some recently added items
are missing

Change-Id: Iacd4ee2da7a83681b6119c5d02a40156b441065b
Reviewed-on: https://code.wireshark.org/review/4507
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-06 22:01:45 +00:00
Gerald Combs 25683ca220 Qt: QVector::length was added in Qt 5.2.
Use ::count instead.

Change-Id: Ic890ed8061b7e92eea65c3102de5219e5ac97a93
Reviewed-on: https://code.wireshark.org/review/4505
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 21:45:38 +00:00
Alexis La Goutte cf201b03ac UI (simple_dialog): fix warning: redundant redeclaration of .. [-Wredundant-decls]
simple_dialog.h:78:13: warning: redundant redeclaration of ‘simple_message_box’ [-Wredundant-decls]
simple_dialog.h:85:13: warning: redundant redeclaration of ‘vsimple_error_message_box’ [-Wredundant-decls]
simple_dialog.h:90:13: warning: redundant redeclaration of ‘simple_error_message_box’ [-Wredundant-decls]

Change-Id: I8f6363fc8ec46ba24895e5236368544f64354e42
Reviewed-on: https://code.wireshark.org/review/4460
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-06 21:15:25 +00:00
Gerald Combs 798eb97053 Qt: Packet list column sorting.
Sorting behavior should be identical to GTK+.

Pass the correct position to beginInsertRows. Add a list of to-do items
to packet_list.cpp.

Change-Id: Ie6ab4b9f2d780a2af430d0f90529edca5485dada
Reviewed-on: https://code.wireshark.org/review/4481
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 21:10:11 +00:00
Bill Meier 5051ae1cbe Convert "4 space tabs" to spaces; Adjust editor modelines.
Change-Id: I8d61d959c79e6aa9875c58680c54a331d18079cc
Reviewed-on: https://code.wireshark.org/review/4504
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 18:29:40 +00:00
Tomasz Moń 9c1225f735 Modify multicheck to accept parent parameter.
This makes it possible for multicheck to become a tree-like structure.

Example:
arg {number=4}{call=--devices}{display=Devices}{tooltip=Device selector}{type=multicheck}
value {arg=4}{value=dev1}{display=Parent Device}{enabled=t}{default=t}
value {arg=4}{value=dev2}{display=Child Device}{parent=dev1}{enabled=t}
value {arg=4}{value=dev3}{display=Another Parent Device}{enabled=t}
value {arg=4}{value=dev4}{display=Non-clickable Child Device}{parent=dev3}
value {arg=4}{value=dev5}{display=Non-clickable Child of Child}{parent=dev4}

Change-Id: I59dd7208ca0ec90cccfc49ae049559cdc6c69a4b
Reviewed-on: https://code.wireshark.org/review/4192
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-06 09:51:56 +00:00
Bill Meier 0784451200 Adjust some whitespace to match editor modelines.
Change-Id: I9fda7de49255857cc1cf270d6202c85573d91674
Reviewed-on: https://code.wireshark.org/review/4490
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 03:42:51 +00:00
Bill Meier 07698d536b Adjust some whitespace to match editor modelines.
Change-Id: Ia22cac3ebd7a454c156f98d967e6fd61f708a2b3
Reviewed-on: https://code.wireshark.org/review/4489
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 02:55:49 +00:00
Alexis La Goutte fa5b76f5dc GTK (hostlist_table) fix indent (use 4 spaces) and modelines info
Change-Id: I072de752df0c0e41be663889dafd0f5860a29c37
Reviewed-on: https://code.wireshark.org/review/4458
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 16:19:29 +00:00
Alexis La Goutte 6d445524bc GTK (hostlist_table) warning: comma at end of enumerator list [-Wpedantic]
Change-Id: I83e930b3179ce954fa4c09d1f46cc833517aa1f6
Reviewed-on: https://code.wireshark.org/review/4457
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 16:18:27 +00:00
Alexis La Goutte 75727dca26 Qt (manage interface): fix warning: comma at end of enumerator list [-Wpedantic]
Change-Id: I728a50e47fd0d8eea77bc1cdebe2a155184ea953
Reviewed-on: https://code.wireshark.org/review/4456
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 16:17:19 +00:00
Alexis La Goutte acc19b7679 extcap: warning: no previous prototype for ‘extcap_free_arglist’ [-Wmissing-prototypes]
Remove extcap_free_arglist (never used)

Change-Id: I1f751512be627380a992db63c3e4abd22b3aa486
Reviewed-on: https://code.wireshark.org/review/4455
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 16:16:36 +00:00
Gerald Combs c0cdf9473a Qt: Keep dialogs from blocking tests.
If WIRESHARK_QUIT_AFTER_CAPTURE is set, call exit(0). This keeps us from
emitting the aboutToQuit signal and doing things that might pop up
dialogs.

Change-Id: I6e986b6e7ad824d8b5258e34a12c32869f5b2d34
Reviewed-on: https://code.wireshark.org/review/4421
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-02 17:40:20 +00:00
Gerald Combs 58cde5c74a Add tests for the Qt UI.
Make sure the Qt UI quits if WIRESHARK_QUIT_AFTER_CAPTURE is set. Make
sure Bourne shell scripts (*.sh) have UNIX/POSIX line endings. Reduce
some time values so that the tests run faster.

Change-Id: I81df7c6f72d7d807d1856863cbea1bb6326ca711
Reviewed-on: https://code.wireshark.org/review/4407
Tested-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-01 22:30:33 +00:00
Gerald Combs b5aa0d2a4f Qt: Try to reduce the initialization time.
Change-Id: I4f7e9abee9ebb7ecc862e2122bc47ec65252c3ec
Reviewed-on: https://code.wireshark.org/review/4410
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-01 22:03:45 +00:00
Gerald Combs afa8c02e6f Qt: Try to fix a Visual C++ encoding warning.
Try to fix

.\simple_dialog.cpp(49) : warning C4566: character represented by universal-character-name '\uFFFF' cannot be represented in the current code page (1252)

We're assigning a delimiter. "Cannot be represented" is a feature,
not a bug.

Change-Id: Iba8bc5f5b42a43ec971d822b0e00f932787c7b16
Reviewed-on: https://code.wireshark.org/review/4409
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-01 21:22:19 +00:00
Gerald Combs ff307c72bc Add more HAVE_LIBPCAP checks.
Change-Id: I82e62f6be03a2ae1617cd5b8e430b73ca8fbe7f8
Reviewed-on: https://code.wireshark.org/review/4385
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 20:21:35 +00:00
Gerald Combs 00509025e8 Qt: Finish implementing -g
Should fix the current dist failure.

Change-Id: Ib1b8d92f6267040c9eef2e4c27ca78c6dd0631be
Reviewed-on: https://code.wireshark.org/review/4384
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 20:04:44 +00:00
Gerald Combs 9fdc85d6c0 Qt: Try to fix libpcap-less builds.
Change-Id: I64f4d6490388858306180445b58863d57217986a
Reviewed-on: https://code.wireshark.org/review/4383
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 19:16:07 +00:00
Gerald Combs ced39b6de8 Qt: Start capture from the command line.
Fill in the capture-related mise en place so that -k and -i work. Get
rid of global_capture_session in ui/qt and make it a member of
MainWindow.

Copy over privilege checking from GTK+.

Move the global capture session struct to MainWindow.

Change-Id: Iab5ec683860a40255a7e1d82e3872ced24fd55cb
Reviewed-on: https://code.wireshark.org/review/4382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 18:44:59 +00:00
Guy Harris 54b733ce9a Make the time stamp resolution per-packet.
Pcap-ng files don't have a per-file time stamp resolution, they have a
per-interface time stamp resolution.  Add new time stamp resolution
types of "unknown" and "per-packet", add the time stamp resolution to
struct wtap_pkthdr, have the libwiretap core initialize it to the
per-file time stamp resolution, and have pcap-ng do the same thing with
the resolution that it does with the packet encapsulation.

Get rid of the TS_PREC_AUTO_XXX values; just have TS_PREC_AUTO, which
means "use the packet's resolution to determine how many significant
digits to display".  Rename all the WTAP_FILE_TSPREC_XXX values to
WTAP_TSPREC_XXX, as they're also used for per-packet values.

Change-Id: If9fd8f799b19836a5104aaa0870a951498886c69
Reviewed-on: https://code.wireshark.org/review/4349
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-28 18:38:18 +00:00
Gerald Combs efea8ce1c6 CMake: Conditional build fixes and updates.
HAVE_PORTAUDIO_H didn't work for Stig. Use PORTAUDIO_FOUND instead,
which is the correct name to use according to the
FIND_PACKAGE_HANDLE_STANDARD_ARGS documentation. Use xxx_FOUND in a
couple of other places.

Conditionally build caputils/airpcap_loader.c.

Change-Id: I6a134192902229a446dccf43bfb7bbfe2a55d1e2
Reviewed-on: https://code.wireshark.org/review/4291
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-09-28 18:22:48 +00:00
Guy Harris e9c4217dca Don't change the packet list column precision in taps.
The only place where the packet list column precision should be set is
in the code for the column precision menu item, the code for the recent
file item for that precision, and, if we were to provide it, code for a
command-line optpion to set it.  It's not up to some tap to change it.

Change-Id: I547e606fb346b4c21674a66e883cbbe382055a37
Reviewed-on: https://code.wireshark.org/review/4336
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-28 08:02:26 +00:00
Gerald Combs 1749e5eace Qt: Adjust X11 font search order.
Liberation Mono appears to be the preferred font nowadays.

Change-Id: Ie953bdb8ba77df6486607dc076daa24225b2f08f
Reviewed-on: https://code.wireshark.org/review/4326
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-26 22:56:28 +00:00
Gerald Combs c90acf26f8 Qt: Capture fixes.
Don't check syntax when we rebuild the CaptureFilterCombo.

Make sure we switch back to the main window when capturing fails.

Change-Id: Id4137e33a8135645f29ca7b2836c76b90f09e3ac
Reviewed-on: https://code.wireshark.org/review/4311
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-26 18:43:32 +00:00
Gerald Combs 2d7c1135ed Move the console log handling code to ui/console.[ch].
Change-Id: I8e554a8e17399d78b0ef29dfb68109a219cd9f1b
Reviewed-on: https://code.wireshark.org/review/4294
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-26 14:15:45 +00:00
Gerald Combs ea6fa049c9 Update the simple dialog code.
Rename simple_dialog_qt.{cpp,h} to simple_dialog.{cpp,h}. Make it a
subclass of QMessageBox. Queue messages at startup similar to GTK+.

Move the GTK+-specific simple_dialog declarations to
gtk/simple_dialog.h.

Don't yell at the user so much. Replace exclamation points with periods.

Change-Id: I1cc771106222d5e06f1f52d67ac29d6dc367cce4
Reviewed-on: https://code.wireshark.org/review/4288
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-25 22:02:43 +00:00