Commit Graph

65643 Commits

Author SHA1 Message Date
Michael Mann c302812566 Add enabled protocol list for dissectors who are disabled by default
We save a list of dissectors that are disabled through the Enabled Protocols
dialog.  This is because we assume dissectors are enabled by default.

For dissectors that are disabled by default, we have no way to keep them
enabled through the Enabled Protocols dialog.  A dissector that defaults
to being disabled has to be reset to enabled each time Wireshark is launched.

Add a list similar to the disabled list for enabling dissectors that are
disabled by default.
This mostly applies to post-dissectors.

Change-Id: I31a8d97a9fdbc472fe2a8666384e0f8786bb8e9f
Reviewed-on: https://code.wireshark.org/review/19405
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-12-24 02:30:21 +00:00
Michael Mann fb9a4d7413 Set BCP BPDU to size of bytes used by the protocol, not whole packet.
Bug: 13188
Change-Id: I29b2712d4d6ae57e4b0ea4bc0ec126cb80172779
Reviewed-on: https://code.wireshark.org/review/19400
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-12-23 16:32:55 +00:00
Alexis La Goutte ec54234e73 bthci_cmd: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I84472632e715a6f13e2fa5b58ae95f9dc9d16776
Reviewed-on: https://code.wireshark.org/review/19399
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>
2016-12-23 14:39:33 +00:00
Martin Kaiser a1ecbc92b0 make proto_tree_add_bitmask_value_with_flags() work for tvb==NULL
proto_tree_add_bitmask_value_with_flags() eventually calls
proto_tree_add_XXX() for the main hf and for the field elements.

These functions work for tvb==NULL if the length is also set to 0.
Otherwise, we'll end up in proto_tree_add_pi(), get_hfi_length() and
run into the DISSECTOR_ASSERT() there.

proto_tree_add_bitmask_value...() are meant for cases where the data is
passed directly and not read from a tvb. If tvb==NULL, set our length to
0 instead of using the field length from the main hf.

Change-Id: Ia55b068e9842ba4a1ae8be8692320a8e93ea8631
Reviewed-on: https://code.wireshark.org/review/19394
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-23 12:40:05 +00:00
Dario Lombardo 46caff30c8 Qt: add local file existence check for extcap help.
The extcap help pages point to local manpages. Check the existence
of local file before attempting to open them, and if it fails, give
the user an error.

Ping-Bug: 13218
Change-Id: I0e0ff1e66e439d3ff8c992dbb42652782c047bb5
Reviewed-on: https://code.wireshark.org/review/19180
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-12-23 10:27:09 +00:00
Guy Harris f15b3a0f73 Make sure we know that a RNG_RSP_DL_FREQ_OVERRIDE item is present.
Set a variable that we were supposed to be setting.

Also, note some items that should probably be expert info items instead
of, or in addition to, additional text at the end of protocol tree items.

Addresses CID 1397702.

Change-Id: I2ff0c2549f229546035964efa6af19b77646f7d2
Reviewed-on: https://code.wireshark.org/review/19397
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-23 09:02:37 +00:00
Martin Kaiser 933a731777 DVB-CI: don't call proto_tree_add_subtree_format() with tvb==NULL
When I first implemented this, proto_tree_add_subtree_format() worked
for tvb==NULL if len was also 0. The bounds check added in
56706427f5 breaks this use case and makes
DVB-CI spill out dissector asserts.

Warn Dissector bug, protocol DVB-CI, in packet 625:
../epan/tvbuff.c:532: failed assertion "tvb && tvb->initialized"

Create a proto_item first and link the subtree to this item. This will
work as long as proto_tree_add_uint() accepts tvb==NULL.

Thanks to Kay Katzorke for reporting this bug.

Change-Id: I25a071c21925f7d362c92852fd5a8136e4d361c8
Reviewed-on: https://code.wireshark.org/review/19389
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-12-23 08:59:51 +00:00
Pascal Quantin abe78e915e GSM A GM: align protocol / container id filter format with displayed one
Change-Id: If5dcee6a2a9dd6de304e78f84456903c932ad452
Reviewed-on: https://code.wireshark.org/review/19393
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-12-23 08:47:46 +00:00
Pascal Quantin c1e1f62cb8 GSM A GM: use same spelling as the 3GPP specification
Change-Id: I706b64bb3875a15d8be0e486a03784e19ab5af23
Reviewed-on: https://code.wireshark.org/review/19392
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-12-23 08:47:27 +00:00
Guy Harris b013d5c4d9 Initialize the dissection options along with the other command-line options.
Change-Id: I35ff8f36d12831d408666c3422444371a2ac0c25
Reviewed-on: https://code.wireshark.org/review/19391
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-23 03:33:41 +00:00
Jiri Novak 5c1b898a43 packet-rtp.c: Fix of decoding RTP over TCP
During patch modification in https://code.wireshark.org/review/#/c/19293/ we made mistake :-(

Change-Id: I2ff65170dbcf3b5c4d27d6d7c629092d5080ed28
Reviewed-on: https://code.wireshark.org/review/19382
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-22 19:35:47 +00:00
Dario Lombardo b97af3af2c udpdump: set default value for payload
Change-Id: Iad8624cbb9102611f806cdcce152b8ed14ce4474
Reviewed-on: https://code.wireshark.org/review/19383
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-12-22 19:34:52 +00:00
Pascal Quantin 8c70558d16 RPC: fix crash when using "Dissect unknown RPC program numbers" option
When using this option, rpc_prog_info_value structure is not fully initialized.
Depending on the memory allocator used, this can lead to a NULL pointer
dereference or an access to a random memory block.
Ensure that the structure if fully initialized and test pointer before
dereferencing it.

Bug: 13266
Change-Id: Ifdc54b31c8dd3b2b6220dbe9ee27272758ff60ca
Reviewed-on: https://code.wireshark.org/review/19385
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: Anders Broman <a.broman58@gmail.com>
2016-12-22 16:17:24 +00:00
Pascal Quantin 541beaad6e Qt: use references on tap_rtp_stat_t private members (CID 1397703 and 1397704)
This should solve the "passing parameter statinfo of type "tap_rtp_stat_t"
(size 5040 bytes) by value" warnings reported by Coverity.

Change-Id: I327906f7925ab21a914b8a98ff8481a0af9f7a2f
Reviewed-on: https://code.wireshark.org/review/19380
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-22 12:54:48 +00:00
Pascal Quantin 61d2c8f4a4 RTP: fix a possible NULL pointer dereference (CID 1397705 & 1397706)
As those dissectors are registered by name, let's not make the assumption
that rtp_info is always present.

Change-Id: I959b8c71485471b3be4cd2e71a6d96c2d4b278ff
Reviewed-on: https://code.wireshark.org/review/19381
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: Anders Broman <a.broman58@gmail.com>
2016-12-22 12:53:49 +00:00
Dario Lombardo b3b23ff134 Gtk: add initializers.
As per coverity multiple CIDs.

Change-Id: I30b5a5e45de2fc9b3c563c56151bd33483c754cd
Reviewed-on: https://code.wireshark.org/review/19379
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2016-12-22 09:44:55 +00:00
Jiri Novak 1a38cdeef7 RTSP dissector: Decode RTP/AVP/TCP and configure RTP session for it
rtsp_create_conversation was modified significantly:
- ignore non response calls => process only the complete information
- distinguish between UDP, TCP and RTSP interlaced media
- supports ED137 recording with RTP/UDP or RTP/TCP

It was tested on many samples from bugzilla and from my library.
Tests noted in bug 13257

Bug: 13257
Change-Id: I054505bcb9334c3abfff6d61c18c9cb6d2a6d56e
Reviewed-on: https://code.wireshark.org/review/19341
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-22 05:34:18 +00:00
Pascal Quantin 32a31c5a9c GTK: fix Export Objects sub menu warning
Change-Id: I513fd643a8c4849462ee6c4b296d86d04517b3db
Reviewed-on: https://code.wireshark.org/review/19378
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-12-21 22:25:59 +00:00
Pascal Quantin 5a3d31b377 NAS EPS: upgrade dissector to v13.8.0
Change-Id: Ifad1fbd22984ad777278c7cc90622b205405cf1f
Reviewed-on: https://code.wireshark.org/review/19377
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-12-21 22:06:22 +00:00
AndersBroman 41951f98fb [rpm-build] Add an option to exclude extcap.
Change-Id: Ibe16ad31986818fcd6e1bfbcfdd38ecc7663dd39
Reviewed-on: https://code.wireshark.org/review/19360
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2016-12-21 21:48:56 +00:00
D. Ulis d70d32edb9 CIP: More attribute updates
1. CIP Safety: SERCOS Safety Network Number attribute should be 6 bytes. Don't just use all remaining bytes
2. Remove cip_byte_array type. The last remaining usage was #1 above and it really shouldn't be used in the future. Any attribute that would eat up all remaining bytes would have issues with Get Attribute List responses and Set Attribute List requests.
3. Optional Attribute List: Display the attribute name if known.
4. Port: Display Port Number name
5. Port: Associated Communication Objects attribute

Change-Id: I94d99bb1f07aa4b8c44949b2ffb5d75e72483459
Reviewed-on: https://code.wireshark.org/review/19374
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-12-21 20:15:11 +00:00
Chuck Lever 5b1b136a29 packet-rpcrdma: Fix Reply chunk selection size
When a Reply chunk is not present, selecting the "Reply chunk" in
the protocol tree should also select the four bytes of zeroes in
the header. This should work the same way as for the Read list and
Write list.

Change-Id: I0a9b7f927cad21e39189cfc1f2b619537ba26a30
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-on: https://code.wireshark.org/review/19376
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-21 19:21:15 +00:00
Alexis La Goutte a5f1afe2b7 decoders(transum): fix redundant redeclaration of 'add_detected_tcp_svc’ [-Wredundant-decls]
Change-Id: I70ccf182160086a4c04467eec214857a461a2869
Reviewed-on: https://code.wireshark.org/review/19373
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>
2016-12-21 15:57:46 +00:00
Alexis La Goutte c7a46477d3 transum: fix no previous prototype for ‘proto_register_transum’ [-Wmissing-prototypes]
the last one

Change-Id: I8b279d11b61645a19b0b356d52cf66eed0180700
Reviewed-on: https://code.wireshark.org/review/19372
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-21 15:57:16 +00:00
Stig Bjørlykke fcae13f0f6 Lua: Fix some typos.
Change-Id: I4d1cf878245b03665207a500fb7593be1435c3d3
Reviewed-on: https://code.wireshark.org/review/19371
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-21 13:31:51 +00:00
chinarulezzz 031db50c64 packet-tns.c: add Version and Services parsing for SNS messages.
Tested with pcaps from SampleCaptures wiki.

Change-Id: I13656ec484f276024160c8994a6750704058b2db
Reviewed-on: https://code.wireshark.org/review/19367
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>
2016-12-21 12:07:38 +00:00
Alexis La Goutte 56cf6998bb transum: fix no previous prototype for '...’ [-Wmissing-prototypes]
Part 2...

Change-Id: Id219bd2b04de2003b5bfa4a33893d0310856275d
Reviewed-on: https://code.wireshark.org/review/19368
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-21 11:37:42 +00:00
Pascal Quantin 2ff7f36d70 gsm_abis_om2000: restore offset increment removed by g1643e37
Change-Id: I34666a74f8769c63ecc982bd034b2563ba0298ff
Reviewed-on: https://code.wireshark.org/review/19370
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-12-21 11:05:52 +00:00
Alexis La Goutte 8cc9fd68e1 gsmtap_log: fix no previous prototype for function 'proto_register_/reg_handoff_gsmtap_log' [-Wmissing-prototypes]
Change-Id: I5fbd79f056cff330dafbe57ea350768acd820b65
Reviewed-on: https://code.wireshark.org/review/19369
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-21 10:42:29 +00:00
Peter Wu a8b68205a4 packet: duplicate short_name to fix UAF in wslua
The "short_name" parameter of heur_dissector_add is defined as const
(and was assumed to be a string literal). This was no longer the case
though since a change in Lua where "short_name" is a dynamically
allocated string.

This "simple" fix clones the memory for internal use to avoid a
heap-use-after-free when heur_dissector_delete tries to access
"short_name".

An alternative option is to make Proto_register_heuristic track the
memory, but since there are multiple possible heuristics lists for a
protocol, the Proto (struct _wslua_field_t) structure is not
appropriate. A possible working alternative is to store the string into
lua_heur_dissectors_table_ref (replacing the value (function) by a tuple
{function,short_name}).

Change-Id: I6c6b393f4d304dd847e864da6ad17b54c8cd80e2
Fixes: v2.3.0rc0-1474-g7f2a838922 ("lua: Allow proto:register_heuristic to be used on multiple list names")
Reviewed-on: https://code.wireshark.org/review/19365
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Franklin Mathieu <snaipe@diacritic.io>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-21 09:58:03 +00:00
Etienne Dechamps 92cd2c3ccb X-Rite i1 Display Pro USB protocol dissector.
This commit introduces a new dissector aimed at decoding the USB
protocol used by X-Rite i1 Display Pro (and derivatives) colorimeter. It
is based on reverse engineering work by Graeme Gill from the ArgyllCMS
project.

Change-Id: Icdfd0c3f75499d0df4360c6eb6856078de30ba56
Reviewed-on: https://code.wireshark.org/review/18901
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-12-20 23:51:30 +00:00
Michael Mann 4c50e4b5c4 Improve Infiniband heuristic subdissection.
Add preference in Infiniband dissector to distinguish between
heuristic and non-heuristic dissection (that uses Decode As).
Remove all of the preferences in the Infiniband subdissectors that
tried to put in "manual" heuristics and direct users to just use
Decode As.  Most subdissectors still kept some basic heuristics in
their heuristic functions, but now also register with the Infiniband
dissector table for "manually" forcing dissection with Decode As.

Ping-Bug: 13259
Change-Id: I20d56eee38887664b439e52ec5f5b8f962c45ef1
Reviewed-on: https://code.wireshark.org/review/19362
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-12-20 22:15:56 +00:00
Ethan Young caadaaf623 Make EAPOL packet types into a dissector table.
This decouples EAPOL from the few dissectors it needs to call based
on packet type and moves registration to the dissectors themselves.

Change-Id: Ia8412fe33370f4aeece52c2c80cda7f140a950cf
Reviewed-on: https://code.wireshark.org/review/19328
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-12-20 19:27:38 +00:00
Michael Mann b7ee557d88 Add HomePNA dissector
Ping-Bug: 12759
Change-Id: Ic4d47155168978541fb8c3670fcabaf3c35f8aad
Reviewed-on: https://code.wireshark.org/review/19187
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-12-20 19:25:21 +00:00
Alexis La Goutte 56729299bd ICMP: fix typo
Change-Id: Iffa10a3a14ec2ff32e51d92a1936d7e110a76bd4
Reviewed-on: https://code.wireshark.org/review/19364
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-20 19:20:29 +00:00
Alexis La Goutte c01d8b7da1 ICMP: fix indent (use always tab)
Change-Id: I939bf83ef6f6385dbad642aeef38673862c04bf0
Reviewed-on: https://code.wireshark.org/review/19363
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-20 19:19:52 +00:00
Your Name 98d350aedd Cast larger types to time_t
Resolves truncation warnings on the x86 clang build

Change-Id: I14ebbe39b8235bd1b909c488c0402b77deb6dde1
Reviewed-on: https://code.wireshark.org/review/19354
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-12-20 19:17:51 +00:00
Gerald Combs 795f4eb106 Qt+Win32: Make software updates more friendly.
Add WinSparkle can_shutdown and shutdown_request callbacks which are
called prior to running the installer. Reject updates when we have
unsaved information. Add notes about possible improvements.

Ping-Bug: 9687
Ping-Bug: 12989
Change-Id: Ia126244b311417aa3105ea8136f186adc2745445
Reviewed-on: https://code.wireshark.org/review/19244
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-20 14:18:14 +00:00
Jiri Novak 0de990e022 packet-rtp.c: Fixed problem - when ED137 header was decoded with tshark, no ED137 headers were shown.
Change-Id: Ic072212497ff084778f74d19be294a5b8ff8cbd5
Reviewed-on: https://code.wireshark.org/review/19359
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-20 14:17:23 +00:00
Stig Bjørlykke e9b4153f29 Lua: Add string types and byte seperators support.
Add handling of STR_ASCII and STR_UNICODE as base types for string
and stringz.  Add handling of SEP_DOT, SEP_DASH, SEP_COLON and
SEP_SPACE for bytes and uint_bytes.  Add SEP_NONE for completeness.

Change-Id: Ida46c215fee7ec7132ec91ab5dd6cb3de4628920
Reviewed-on: https://code.wireshark.org/review/19337
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-12-20 13:32:15 +00:00
Peter Wu d5fdbef7f4 cmake,wslua,wsutil: load files from run/ instead of source tree
Fixes Lua on macOS, tested with an out-of-tree build:

    WS_BIN_PATH=$PWD/run ../wireshark/test/test.sh -s wslua

Previously programs that were ran from the build directory would load
data files (radius/, diameter/, init.lua) from the source directory.
Then in the case of Lua, files were loaded from the program directory
($BUILDDIR/run/init.lua on Linux) or source directory
(sSOURCEDIR/epan/wslua/console.lua).

On macOS, this does not work for Lua since files are installed into
$BUILDDIR/run/Wireshark.app/Contents/Resources/share/wireshark/init.lua
instead. Since CMake always copies data files (radius, console.lua,
etc.) into the build directory, make get_datafile_dir() return this
"run" directory instead.

Change-Id: If97d2f5686271caf9ad4d4e4fc58e902dc592a98
Reviewed-on: https://code.wireshark.org/review/19330
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-20 13:16:57 +00:00
Stig Bjørlykke bd0fa39c7b Lua: Remove an obsolete comment.
Change-Id: I6a946eb44f4a574d6d9add3604b2dac924c33a9f
Reviewed-on: https://code.wireshark.org/review/19361
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-12-20 12:33:42 +00:00
Dario Lombardo 24ecc1cf27 Gtk: don't use GTimeZone/GDateTime
Use struct tm instead.

Change-Id: I678797b93062305849875b33867faa52379c3dcb
Reviewed-on: https://code.wireshark.org/review/19356
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-20 12:24:34 +00:00
Stig Bjørlykke d4eeeaf6d4 Lua: Add unit names support.
Add support for using unit names in ProtoField integer types by
using base.UNIT_STRING.

Add unit name table argument in ProtoField.float() and
ProtoField.double() (and made backward compatibility).

The use of base.UNIT_STRING is not really the best API for adding
unit names in Lua, but is the simples solution without adding new
arguments to ProtoField.

Change-Id: Ib5d064480cffd970a41db1764440642f6c593bb2
Reviewed-on: https://code.wireshark.org/review/19313
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-12-20 10:36:31 +00:00
Guy Harris d9cc2b5226 Update comments and messages for the new name for Apple's OS for Macs.
Change-Id: I96be861220f6052cb1bc61f5f4e74e76821ff565
Reviewed-on: https://code.wireshark.org/review/19358
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-20 08:45:51 +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
Stig Bjørlykke 87a9a2989b btle: Add a convenience btle.length field
Add a convenience btle.length field for easier filtering of BTLE
packets without data and with specific length ranges.

Change-Id: If56eac9c86ccf40741a6ceb50d13a1733132f448
Reviewed-on: https://code.wireshark.org/review/19348
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-12-20 07:48:40 +00:00
Guy Harris 1656261b95 Use -bbigtoc for libwireshark on AIX (if we're using GCC or Clang).
This will have to be done differently with xlc if it's necessary.

While we're at it, fix the spelling of "Cygwin" (no InterCaps).

Bug: 13262
Change-Id: If3084cfb58f4abd9048afafecdd24c13645c2776
Reviewed-on: https://code.wireshark.org/review/19355
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-20 05:30:22 +00:00
Guy Harris 23d80b0012 Don't use PCAP_ERROR if it's not known to be defined.
The introduction of pcap_list_datalinks() predates the introduction of
PCAP_ERROR, so the presence of pcap_list_datalinks() doesn't guarantee
that PCAP_ERROR is defined.  Change the use of PCAP_ERROR when checking
the result of pcap_list_datalinks() to just check for -1.

Change-Id: Id8229b7aebd02eaf3701983f9343503397af4fb3
Reviewed-on: https://code.wireshark.org/review/19351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-19 18:55:59 +00:00
Stig Bjørlykke d7ce60bb08 Lua: Include all BASE_PT_* to base table.
Also added a note above field_display_e enum to indicate that this
values are parsed in make-init-lua.pl to build init.lua.

Change-Id: Ibd125684f9a68e1b8116fae0ccbc72147825d75d
Reviewed-on: https://code.wireshark.org/review/19336
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-12-19 17:53:11 +00:00