Commit Graph

101 Commits

Author SHA1 Message Date
Michal Labedzki a90100631e Bluetooth: Add ability to add custom UUID description
Some vendors use UUID128 as own services/attributes.
Sometimes they use UUID16 for it too. Support both cases.

Change-Id: I001692b94fcc2f86eafa81012790e9134b0f2a36
Reviewed-on: https://code.wireshark.org/review/11976
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-11-20 16:00:15 +00:00
Guy Harris 905314f259 Additional 2.1 symbols.
Change-Id: Icf5d218e3e0a3336c80e04ed51a1ef5262cc9f28
Reviewed-on: https://code.wireshark.org/review/11711
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-11 00:06:46 +00:00
Guy Harris 67a6342da5 New 2.0 symbols.
Change-Id: Ie85ac43891c5587b0998e26da683ef275b631657
Reviewed-on: https://code.wireshark.org/review/11706
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-10 21:54:05 +00:00
João Valverde 24bfb7e35d column-utils: Refactor col_append_port() to col_append_ports()
Having a single function call to format source-destination port column info serves the
current (and presently only) use case better by having a single place to manage the
display format.

This commit does not introduce any actual formatting changes.

Change-Id: I1d479d0fd5690d12afb47e538057fdc2dd369ca2
Reviewed-on: https://code.wireshark.org/review/11539
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-07 21:15:11 +00:00
Michael Mann 3aefd3b5b2 Create real dissector tables for SSL and DTLS to use.
Since ssl_dissector_[add|delete] only take TCP dissectors, remove the parameter and just use it within the "internal" ssl_association_add call.

Change-Id: I0fdf941389934c20cbacf910250e17520614e706
Reviewed-on: https://code.wireshark.org/review/11591
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-07 14:11:01 +00:00
Michael Mann e0e574d167 Refactor DCE/RPC dissection to include a real dissector table.
This is hopefully just the first step in getting DCE/RPC dissection to use "standard" APIs instead of homegrown ones.
For starters, it allows Decode As functionality to be less hacky (although incomplete in Qt)

Change-Id: Ia0923a3d8d514ab7acce32e26ee7e08f6e24feca
Reviewed-on: https://code.wireshark.org/review/11468
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:43:35 +00:00
Guy Harris 029d117772 Use "2.0.0" for symbols that are in 2.0.
Change-Id: Ie8c6206f0761310a6bb101d10b981b9f917116b2
Reviewed-on: https://code.wireshark.org/review/11389
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-29 05:12:23 +00:00
Guy Harris caeade66b6 Update symbol list.
Change-Id: Id3c275c2c3e15bb54f8b30423c990ca78fc94d32
Reviewed-on: https://code.wireshark.org/review/11387
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-29 05:04:55 +00:00
Michael Mann 616dbd78d6 Replace all "dissector filter" registrations with "dissector color filter" registration.
In the GTK, there was "colorize" (via context menu using color_dissector_filter.{c,h}) or "not colorize" (via main menu using dissector_filters.{c,h}).  In Qt, you have the option to colorize (via context menu using color_dissector_filter.{c,h}) or not colorize (via main menu using color_dissector_filter.{c,h}).

Combine all into "colorize" and convert GTK to use color_dissector_filter.{c,h} in the "not colorize" main menu like Qt.

Change-Id: Ib3ca1c822f5f66ab5b812632d808f7905b328483
Reviewed-on: https://code.wireshark.org/review/11263
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-27 11:41:35 +00:00
Michael Mann 26eec29b44 Remove ability to make dissectors "private"
Change-Id: If5897e8137f729503edf2cafb49b2ebeab4716ad
Reviewed-on: https://code.wireshark.org/review/10997
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>
2015-10-15 21:17:27 +00:00
Peter Wu a7ab4af2ab airpdcap: add free_key_string function, fix memleaks
Do not leak the key and SSID. Note that there are still some leaks in
the GTK UI related to get_wireshark_keys(), but I did not track them
down.

Caught by LeakSanitizer.

Change-Id: I639166e6ea457605d6ae0ebd58e56d7594a7b7db
Reviewed-on: https://code.wireshark.org/review/10860
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-09 14:35:41 +00:00
Michael Mann e2735ecfdd Remove proto_tree_add_text API.
Its time has finally come.

Technically I just renamed it to proto_tree_add_text_internal and removed the WS_DLL_PUBLIC (so it shouldn't link outside of epan).  It's still (legitimately) used by expert.c otherwise I would have made it static within proto.c (and the rename wouldn't have been necessary).

Change-Id: I9bdf888d5e92bc7b70a3f5461b9297a66d994b80
Reviewed-on: https://code.wireshark.org/review/10594
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-09-21 14:11:43 +00:00
Michael Mann 648cf995b1 Make other_decode_bitfield_value private to proto.c.
This is further encouragement to not try to manually create a bitstring while formatting a field.

Change-Id: I4efbeb39a210cf1fd26203cd8560859276b333b0
Reviewed-on: https://code.wireshark.org/review/10494
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-13 00:15:35 +00:00
Michael Mann bcba9ba0d3 Add API to expose "expert info" summary.
This is intended for use in expert_add_info_format or proto_tree_add_expert_format to get the "base" string to then append additional information, but I'm sure other uses can be found.
Similar to some of the proto_get_xxx APIs, but still only "create as needed".

Change-Id: Ib76e6ed557c2ae41e0a40957a9efa4bf485909da
Reviewed-on: https://code.wireshark.org/review/10420
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>
2015-09-08 04:45:19 +00:00
Gerald Combs ee80be6dac Add the display filter macros dialog.
Add some missing functionality to UatDialog.

Remove what appears to be unused dfilter macro code.

Change-Id: I8a8d6358523f24d5ddfe953d7741fe9af25d98eb
Reviewed-on: https://code.wireshark.org/review/10187
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-22 01:51:04 +00:00
Michael Mann c05df9932c Add udp_dissect_pdus.
It works similar to tcp_dissect_pdus, but only works on a single packet.  Intended for protocols that go over TCP and UDP so that they can have a common dissection function.
Will of course, also work on UDP-only protocols with a fixed length header and size.

Used DNP3 as a guinea pig since "multiple PDU support" over UDP was just added.

Change-Id: Ib7af8eaf7102c96b4f8b5c1b891ae2d8f0886f9d
Reviewed-on: https://code.wireshark.org/review/10083
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 12:50:29 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Gerald Combs ff24ecceb9 Fixup stat_tap table freeing.
As it turns out we *do* need to free table elements. We also need to
free the tables themselves and clear the table array. Do so.

Change-Id: Ic1c81388eac8f47f74caea0169c79685a83aaff9
Reviewed-on: https://code.wireshark.org/review/9901
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 21:22:13 +00:00
Hadriel Kaplan 190e313e9d DNS: move DNS name resolution pref to Name Resolution prefs
Move the boolean flag for using captured DNS packet info for name resolution
to the Name Resolution preferences settings, as it was rather surprising to
disable Name Resolution preferences and still have names being resolved. Also
disble them all if the '-n' command line switch is used, and re-enable it for
a 'd' character in the '-N' option.

Bug: 10337
Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917
Reviewed-on: https://code.wireshark.org/review/9786
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-25 17:05:01 +00:00
Guy Harris bd62adb52d Update symbols.
Change-Id: I92fc9ff73278656c717434c23560127c9c59eb06
Reviewed-on: https://code.wireshark.org/review/9742
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-21 20:43:10 +00:00
Pascal Quantin 79774329d7 Simply code for export of PDUs coming from heuristic dissectors
Let's use the newly introduced find_heur_dissector_by_unique_short_name() function

Change-Id: I5781b9b2f1ab679da07e97755b71840b4b3a9361
Reviewed-on: https://code.wireshark.org/review/9645
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>
2015-07-15 18:30:57 +00:00
Michael Mann cdeae7e72b Add a "heuristic dissectors" tab to the Enable Protocols dialog.
This allows for a global place to enable/disable all heuristic dissectors.  This removes the need for individual dissector preferences, but those will be removed at a later date.  The more important part is the epan code to save/restore the enabled state of the heuristic dissector.  The GTK dialog was more for quickly testing the feature (there was already some GTK code in place that started the heuristic dialog tab)

Change-Id: Ie10687505c27a4456c49d5c4c69a5fc5f6394275
Ping-Bug:11152
Reviewed-on: https://code.wireshark.org/review/9508
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-14 11:28:55 +00:00
Peter Wu d52837d10d packet: add cleanup routines support
Currently reassembly tables are not freed on shutdown. This makes
memleak debugging more difficult due to noise. Support cleanup
routines that can do smarter things.

After this change, "init" routines are not called anymore when
closing files. Further changes should split init routines to
cleanup routines as needed.

Change-Id: Ib0b2cef6dd9c16905259063ac2c2fdfb7e066be6
Reviewed-on: https://code.wireshark.org/review/9135
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:10:22 +00:00
Michael Mann dcd7368474 Update Debian symbols for recent packet API additions.
Change-Id: Ib6e5a48fa0b0802c920e68d3dc7d62362818d36b
Reviewed-on: https://code.wireshark.org/review/9465
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02 11:34:03 +00:00
AndersBroman 8b7f5f7f07 Update libwireshark0.symbols
Change-Id: I04cdba9633d3fc131ecd9dc218bc6dd458378a35
Reviewed-on: https://code.wireshark.org/review/9464
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02 11:20:31 +00:00
Gerald Combs ece4b01f21 Add the wireless toolbar.
Add the wireless toolbar to the Qt UI.

Start adding AirPcap support to ui/80211_utils. Add FCS validation
routines to ws80211_utils.

Move a bunch of AirPcap routines that require epan from caputils to
ui/gtk. They were required for driver key management, which we'll
leave to the AirPcap Control Panel in the Qt UI.

Move frequency-utils to wsutil.

Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1
Reviewed-on: https://code.wireshark.org/review/8910
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 03:45:54 +00:00
Michal Labedzki 7102a06811 Qt/Bluetooth: Add Devices dialogue
Please found it under Bluetooth menu. It shows all devices found
in logs, not only connected, all that its address can be found in
logs. Show if device is local (in most cases: capturing on it side)
and manufacturer and LMP version what should answer the question what
version of Bluetooth is used by Bluetooth device chip.
Also firmware version.

Change-Id: I32e3b7100cdebcaa850b6541de0ab89dff41c0e1
Reviewed-on: https://code.wireshark.org/review/8901
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-15 05:40:25 +00:00
Michael Mann 6ab6136a94 Add more "bitmask grouping" APIs.
Add proto_tree_add_bitmask_value, proto_tree_add_bitmask_value_with_flags and proto_tree_add_bitmask_list to aid in the removal of proto_tree_add_boolean "groupings" as well as "groups" of fields that use proto_tree_add_item with the same offset/len.

This may be able to be optimized later, but the first step will be converting dissectors to use it.  A sample conversion of each API is also included.

Change-Id: I53febc7450ad632482f82615a7fa62174f8472c9
Reviewed-on: https://code.wireshark.org/review/8038
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>
2015-04-13 13:46:11 +00:00
Pascal Quantin c474bb8691 Update libwireshark0.symbols file
Change-Id: Ib79e9eabd44d3eb444be7a33d30d5a1f9839d548
Reviewed-on: https://code.wireshark.org/review/7794
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-22 18:52:33 +00:00
Michael Mann e7fd1bfdf7 Reduce epan dependence on dissectors by having print module "cache" the protocol and field ids that it needs.
Change-Id: I4ec48067e9ca2cbe88e1cf2e6c9dc1e382379221
Reviewed-on: https://code.wireshark.org/review/7767
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>
2015-03-20 05:30:52 +00:00
AndersBroman b307ffe0f9 Implement proto_tree_add_item_ret_int() and proto_tree_add_item_ret_uint() which
works as proto_tree_add_item(), but also returns the value of (u)ints
of 8,16,24 and 32 bits length in a 32 bit variable. It's based on Hadriels
previous work.

Change-Id: If3b4b8588b63251f1ee9b954a202acde7c02ce86
Reviewed-on: https://code.wireshark.org/review/7230
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>
2015-03-19 16:06:18 +00:00
Michael Mann baa83912e3 Eliminate decode_bitfield_value from "public" use.
This "encourages" (forces) dissectors to use the bitmask field of the header_field_info structure to get "bitmask formatting" of a field.

other_decode_bitfield_value should be treated the same (eventually eliminated), but there are still replacements to be made in the dissectors.

Change-Id: I8a0d829c3fef2d5e5a588667a259e231bca559e6
Reviewed-on: https://code.wireshark.org/review/7736
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>
2015-03-19 04:33:26 +00:00
Peter Wu 410b40d371 Export CLIENT_RANDOM with Export SSL Session Keys
This allows for exporting the SSL session keys for captures which were
decrypted using a RSA certificate, but where the server does not support
session resumption.

To avoid frequent reallocations, the expected length is used as initial
string size.

Tested against a nginx server with ssl_session_cache off.

Note that all keys loaded via ssl.keylog_file are exported, not just the
displayed ones!

Change-Id: Ie3a93d3692885502f46442953fa53303d16672d7
Reviewed-on: https://code.wireshark.org/review/7175
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:27:10 +00:00
Guy Harris c3870d7789 There's no proto_tree_add_bytes_with_bytes() routine.
Change-Id: If2e3dc7bfdd65ee7df725e7acc291fd6e4aa3e40
Reviewed-on: https://code.wireshark.org/review/7550
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-05 22:11:06 +00:00
Michael Mann 1a54112c1d Add tvb_get_ether_name
This is mostly to reduce tvb_get_ptr calls that were used to pass into get_ether_name.

Some optimizations were made to packet-ieee80211.c in the process of conversion.

Change-Id: I81d3c65d4c09a15237fc287c2e989eb6e6936b1f
Reviewed-on: https://code.wireshark.org/review/7492
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-03 07:19:42 +00:00
Michael Mann 43fd878c4e Add "seed" capabilities to crc16_x25_ccitt (now crc16_x25_ccitt_seed) so we can remove CRC algorithm calculation in packet-assa_r3.c.
Change-Id: I3143800f6ff922a309f5506d9acbc2c4293363b7
Reviewed-on: https://code.wireshark.org/review/7490
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-03 05:12:10 +00:00
Michael Mann 8d5da72ff9 Add tvb_address_with_resolution_to_str.
Convert dissectors to using the API where appropriate.

Change-Id: I059582f73a75635d4a0338d02d4c4b212162480b
Reviewed-on: https://code.wireshark.org/review/7296
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-22 02:53:48 +00:00
Guy Harris ddafa7e381 Update Debian symbols list.
Change-Id: Iaf5d8022f2005ac32133896c74f45246a2310684
Reviewed-on: https://code.wireshark.org/review/7303
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 22:54:07 +00:00
Guy Harris f868da29d8 Update Debian symbols file.
Change-Id: Ide84741afffbd7c8c6dac44cf456291e2609af9d
Reviewed-on: https://code.wireshark.org/review/7298
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 19:43:48 +00:00
Gerald Combs ead79e6aa1 Clear the filter expression list in prefs.c.
Move filter_expression_nuke from ui/gtk to epan and rename it to
filter_expression_free. Call it in prefs_reset along with the other
preference reset routines.

This keeps the Qt filter toolbar from filling up with duplicate
expressions when the profile changes.

Change-Id: I9fae9a7b48944079ea342a126979d9e79af0d22b
Reviewed-on: https://code.wireshark.org/review/7281
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 23:16:54 +00:00
Michael Mann 8d16ac46d5 Add name resolution support to address type.
Add address_with_resolution_to_str API that returns address string + name resolution in the format %s (%s), first string is resolved name (if available) and second string is raw address string.

Convert AT_FCWWN to using proper name resolution format

First use of address_with_resolution_to_str with field types in proto.c

Change-Id: I2ae77c29a4ffc30bb919fbec00f06629830898c2
Reviewed-on: https://code.wireshark.org/review/7196
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-19 13:09:41 +00:00
Michael Mann b2c81bb9e8 Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to worry about the wmem_allocator.

Change-Id: If976fe7b0c3f9cd053225096c2ac05418f061af6
Reviewed-on: https://code.wireshark.org/review/7081
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-16 12:47:02 +00:00
Peter Wu 4f3646fe62 Fix handling of invalid UAT items
If the UAT file failed a field check, then the user_data pointer may be
empty. As a result uat_save() triggers an invalid write.

(Discovered while working with a dfilter_macros file having duplicate
names for bug 10957, caught by ASAN.)

The second issue fixed in this patch is that the validity of an item is
only calculated when a new record is added. So even if the user edits
the UAT and makes the entry valid, it would not be saved. This is solved
by adding a new uat_update_record() function which got wires up into GTK
and Qt.

Some open-coded g_array_index and UAT[_USER]_INDEX_PTR are also
converted.

Even after this patch, Qt has some issues with UAT handling. In
particular, it saves new, but empty/invalid, items. It also it does not
check individual fields when saving all fields (unlike Gtk). This patch
focused on getting Gtk fixed first so ignores those existing issues.

Change-Id: Ia35cfe9d2b793c65144ae7e29a1ed706b6668d99
Reviewed-on: https://code.wireshark.org/review/7120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-15 23:52:24 +00:00
Michael Mann 91b5042ece "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: Ic7dee275ba0a2bd4e19c06702a867417c5624c27
Reviewed-on: https://code.wireshark.org/review/7080
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14 15:56:21 +00:00
Michal Labedzki 707522396c Little tuning of proto_tree_add_bytes_with_length
Change name from proto_tree_add_new_bytes to
proto_tree_add_bytes_with_length and other tweaks
pointed by Peter Wu.

Change-Id: I6058c28a74a154e2882e4eb04558bedcede6f508
Reviewed-on: https://code.wireshark.org/review/7039
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-12 09:22:55 +00:00
Anders Broman 4359cb8478 Revert ""Hide" hashether_t structure."
This reverts commit 297ef07b9b.

Change-Id: Id47f5fd221b631c95ca71e3f9315f5263bab22de
Reviewed-on: https://code.wireshark.org/review/7077
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:30 +00:00
Anders Broman 53228c4bd8 Revert "Make get_manuf_name return a const string."
This reverts commit 797ea88aef.

Change-Id: I9bc2cef0051d88c6374c6f1868b0250cba3edbd4
Reviewed-on: https://code.wireshark.org/review/7076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:05 +00:00
Michael Mann 797ea88aef Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to work about the wmem_allocator.

Change-Id: I80f465ae0845290255a659ab63310ac3cc35506e
Reviewed-on: https://code.wireshark.org/review/7075
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>
2015-02-12 07:36:20 +00:00
Michael Mann 297ef07b9b "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: I6d70b9bacbc0fa1898150f59c0c69779a6cd5d51
Reviewed-on: https://code.wireshark.org/review/7074
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 07:31:05 +00:00
AndersBroman a822d85e04 Try to fix the debian symbols
Change-Id: I234f42e5488d2044d0c68f499814fe9a51b220dd
Reviewed-on: https://code.wireshark.org/review/7064
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-11 11:30:09 +00:00