aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
AgeCommit message (Collapse)AuthorFilesLines
2016-06-23Fix "disable this protocol by default".Guy Harris1-0/+4
Allow a dissector to mark its protocol as "disabled by default", which means that the "enable all protocols" routine won't enable it. This is necessary in order to allow the disabling of protocols not to be unintentionally changed due to profile changes; see bug 9826. Change-Id: I3947f794c21350b70a8de06899cfc7715b77f90f Ping-Bug: 9826 Reviewed-on: https://code.wireshark.org/review/16109 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-15Change how dissectors do late-field-registration to avoid a double-registrationJeff Morriss1-1/+2
assertion. If a dissector forces registration of fields during dissection it needs to do so in a way that clears the prefix registration. Otherwise epan will call the registration routine a 2nd time (which will cause us to assert out) if a user types a display filter (with the dissector's prefix) that doesn't exist. Update the proto_register_prefix() comments to reflect this. Change-Id: I3ce29243395fb55192bb5dfd950baa88410ac136 Reviewed-on: https://code.wireshark.org/review/15881 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-06-14proto(.h): fix '@return' command used in a comment that is attached to a ↵Alexis La Goutte1-2/+1
function returning void [-Wdocumentation] Change-Id: Ie0e502adcc8eb00f65ffa6c018d5b9d79655ddb7 Reviewed-on: https://code.wireshark.org/review/15907 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: 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>
2016-06-13Add proto_tree_add_bitmask_list_value.Michael Mann1-0/+18
Ran across enough situations that proto_tree_add_bitmask_list couldn't solve that it seemed necessary. Change-Id: I6a540ac6efca76cae7c4571a84bb400538652784 Reviewed-on: https://code.wireshark.org/review/15880 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-06-05Clean up white space.Guy Harris1-17/+17
Change-Id: I9b1310a153f6a9831a9040c17a5fcc2270a9dc17 Reviewed-on: https://code.wireshark.org/review/15740 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-31Remove proto_item_append_string.Michael Mann1-20/+0
It requires some "extra work" to get it to work properly. Despite documenting it, some previous use cases didn't do the extra work. Let's just see how we get by without it. Change-Id: I31dba1d5038d793085f6c9e4b4a6eda574e86872 Reviewed-on: https://code.wireshark.org/review/15610 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-05-26Update the comments/warnings about using proto_tree_append_string().Jeff Morriss1-5/+5
packet-wsp.c hasn't used proto_tree_append_string() since Ic5467289aae7d54e78c1fd65f93358387d6139aa. Use packet-frame as the example instead. Change-Id: I69fb10679ec1685a61aac182414e596b345153fd Reviewed-on: https://code.wireshark.org/review/15563 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-10rawshark: Get "field string values" from existing functionality.Michael Mann1-0/+4
rawshark shouldn't be converting FT_ and BASE_ values into strings on its own, there's a function for that. Change-Id: Ib4ce1651ee130a03644b5de3ab471333444e19a9 Reviewed-on: https://code.wireshark.org/review/15341 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-08Handle the encoding when displaying the string table.Guy Harris1-8/+43
Don't just treate the strings as piles of ASCII characters. Add a proto_tree_add_item_ret_string_and_length() routine to help do this. Clean up some of the documentation of the proto_tree_add_item_ret routines while we're at it. Change-Id: Ib4c52bd8a8331eac97312583326f5be9175889d9 Reviewed-on: https://code.wireshark.org/review/15291 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-08Use a single WS_NORETURN macroPeter Wu1-1/+1
Having to define two macros for marking a function as never returning seems a bit redundant. Merge the MSVC and GCC-like attributes into a single WS_NORETURN. Tested with Clang 3.7.1, GCC 4.4.7 and even GCC 4.1.2 using this small program (-Wall -Wextra, the first two generate warnings for uninitialized variables, the last one compiles without warnings): #include <stdlib.h> __attribute__((noreturn)) void foo() { exit(1); } __attribute__((noreturn)) void bar(); void bar() { exit(1); } int main() { int j, i; if (i) { bar(); return j; } foo(); return j; } Change-Id: I7d19c15e61b8f8fa4936864407199c4109f8cc82 Reviewed-on: https://code.wireshark.org/review/14822 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-03-31Ensure our fields are registered before starting dissection--even when !tree.Jeff Morriss1-0/+3
(The check to ensure the delayed field registration had been done was still wrapped inside an if(tree) but a bunch of proto_add_*()'s had been pulled out from under if(tree)'s thus causing some hf's to be used before registered.) Also simplify the code to ensure the fields are registered since we're doing it potentially many times per frame: do an integer comparison rather than looking up an hf by name. Add a note to the docs for proto_register_prefix() to make it clear that the initializer routine may not be called before the dissector is asked to dissect something. Change-Id: I5dc1154638a290c3a94149184d56570c3abb836a Reviewed-on: https://code.wireshark.org/review/14711 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-03Adds calculation of preamble length and frame duration.Simon Barber1-0/+2
Change-Id: Ie7077b675a242a60ee859098a504707cc61345db Reviewed-on: https://code.wireshark.org/review/13090 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-02Add proto_tree_add_item_ret_string() routine.Guy Harris1-3/+34
It adds string-type fields to the protocol tree and returns the value of the string. Add the new bitmask-adding routines to the Debian symbol list while we're at it. Change-Id: Idaeec44c9cd373588cadce85010f3eaf1f3febb5 Reviewed-on: https://code.wireshark.org/review/13657 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-01Add heuristic dissectors for the variable part of COTP CR and CC PDUs.Guy Harris1-13/+75
Add tables for heuristic dissectors, and add dissectors for the stuff Microsoft puts there for RDP; they're violating the COTP spec, but I guess they're stuck because they're using TP0, which doesn't support user data. While we're at it, add variants of proto_tree_add_bitmask() and proto_tree_add_bitmask_flags() that return the bitmask, for use by callers. A side-effect of the change is that the proto_tree_add_bitmask routines no longer treat the encoding as a Boolean, so we have to pass ENC_LITTLE_ENDIAN or ENC_BIG_ENDIAN, not just some non-zero or zero value. Do so. Rename ositp_decode_CC() to ositp_decode_CR_CC(), to note that it decodes both CR and CC PDUs. Bug: 2626 Change-Id: If5fa2a6dfecd9eb99c1cb8104f2ebceccf1e57c2 Reviewed-on: https://code.wireshark.org/review/13648 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Set width of hex output according to bitmaskKevin Bracey1-6/+0
Output from BASE_HEX et al has always been zero-padded to according to the field type - 8 digits for FT_UINT32, etc. When the field has a bitmask, this is definitely not appropriate - the field type is used to indicate the size of the bitfield container, and tells us nothing about the size of this field. Instead, determine the actual size of the field by inspecting the bitmask, and output the corresponding number of hex digits. Change-Id: I10ec4e93e1e40e8b1354d5368cc8945cf671a617 Reviewed-on: https://code.wireshark.org/review/13225 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-12proto.h comment spelling fix: sentinal->sentinelKevin Bracey1-1/+1
Change-Id: I72f09eda89adc231a6c97d3abde9ca6cebe4b24d Reviewed-on: https://code.wireshark.org/review/13234 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-09Add routines to add an item and return the item's real length.Guy Harris1-1/+25
proto_item_get_len() is *not* guaranteed to return a correct value. Even if there's a non-null tree item, it might be pointing to a "faked" item; it really shouldn't be used. So add proto_tree_add_item_ret_length() and proto_tree_add_item_new_ret_length(), which calculate the real length themselves and return it through a pointer. Fix as many places as we straightforwardly can to use them rather than to use proto_item_get_len(). (There's a Lua API for proto_item_get_len(), so we keep it around, but we should add Lua APIs for the new routines, and deprecate the old API.) Fix ptvcursor_add() to do the same thing that proto_tree_add_item_ret_length() and proto_tree_add_item_new_ret_length() do. Split the TRY_TO_FAKE_THIS_ITEM macros into a macro to check for the tree being null and to try to fake the item. We don't always use the former macro, as we might need to do more than just return NULL if the incoming tree is null (for example, calculating the item's real length and using it...). new_field_info() never returns NULL; remove checks for it. The check for a null tree is done before the calls to new_field_info(). Change-Id: I002a218d1f810c73e0de837e0ac6ebcde21bacec Reviewed-on: https://code.wireshark.org/review/13139 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-04Don't walk the entire protocol tree to extract the value of one field.Guy Harris1-1/+1
Instead, prime the epan_dissect_t's tree to look for rtp.ssrc, and extract that value with proto_get_finfo_ptr_array(). Also, have the filter used to check whether the packet is a candidate for RTP analysis to check for RTPv2 (and add a check for IPv4 or IPv6 back to the Qt version), and get rid of an unnecessary extra level of indirection for that string. In the Qt version, if findStreams() set the error string, don't overwrite it with a "No streams found." indication, and fix error handling for the "filter didn't compile" case. Change-Id: I09d0ea37ccd4806d99e3b6394f2a8a376e974705 Reviewed-on: https://code.wireshark.org/review/13045 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-04Remove extraneous stuff from a comment.Guy Harris1-1/+0
(Probably inserted by a script.) Change-Id: Ibf4e4d84c0c036841971df8dad54a916502d6909 Reviewed-on: https://code.wireshark.org/review/13036 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29Add support for IEEE-11073 FLOATsMichal Labedzki1-0/+3
Add support for IEEE-11073 32-bit FLOAT and 16 bit SFLOAT field types. Use them in Bluetooth ATT dissector. Change-Id: Ife0f3843da84a9af23483b0a0d9b69cd2f511d08 Reviewed-on: https://code.wireshark.org/review/12680 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-11epan: Don't export deregister functionsStig Bjørlykke1-1/+1
Most of the deregister functions are used internally from Lua while reloading plugins. Don't export them for others to use. Change-Id: I919dbfa807f696c38d409ca7206104a0fba1ae65 Reviewed-on: https://code.wireshark.org/review/12508 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-30Add BASE_ALLOW_ZERO for byte arrays that are validly zero sized.Michael Mann1-0/+1
<MISSING> implies that the field should be there and isn't. Allow dissectors to specify when a zero-sized array for a field is perfectly valid. Ping-Bug: 11803 Change-Id: I3fd60e3c6f832c6b4a3a8837ebc52c3e74e795ae Reviewed-on: https://code.wireshark.org/review/12271 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-26Add BMT_NO_FLAGS for proto_tree_add_bitmask_XXX_with_flags.Michael Mann1-0/+1
This prevents some false positives for fix-encoding_args.pl which doesn't like constant values (like 0) passed as the last argument to any proto_tree_add_xxx call. Change-Id: Iab7b09b425bf0d48126533daa0e65490bd7b8890 Reviewed-on: https://code.wireshark.org/review/12167 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-11-21Lua: Validate Proto() argumentsStig Bjørlykke1-0/+5
Check if description (protocol name) and short_name are used before registering the protocol. This because proto_register_protocol() makes sure there's not already a protocol with any of the names registered and duplicates will be reported with a g_error() which terminates the Wireshark unexpectedly. Also check if short_name contains valid characters. Give appropriate error messages. Bug: 11739 Change-Id: Ib9776a2a3406ae5278ce744defd61864ebed0282 Reviewed-on: https://code.wireshark.org/review/11995 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-02RTPS: added new encoding to proto.c and used it in the rtps dissectorJuanjo Martin1-4/+4
RTPS uses NTP encoding with a BASETIME equal to 0. Also, changed "magic" by "Magic" Change-Id: I2512176f2018396edaa6b2a1478facd26118cb13 Reviewed-on: https://code.wireshark.org/review/11184 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-20LTE dialogs: tidy up some loose endsMartin Mathieson1-1/+5
Change-Id: I18f099311f7660c91cffdf21bbacdb88b7c0fd7e Reviewed-on: https://code.wireshark.org/review/11182 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-10-15Remove ability to make dissectors "private"Michael Mann1-12/+0
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-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-3/+3
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 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: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-12Add BASE_PT_ types to proto_registrar_dump_fields()João Valverde1-0/+2
Change-Id: Ic6b3d71c3c9a14688b55d98f402d359f69524394 Reviewed-on: https://code.wireshark.org/review/10939 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> 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-10-06Remove an extra commaPascal Quantin1-1/+1
Change-Id: I14e89d9db53166b43ef6bee901ba0fdc545657b1 Reviewed-on: https://code.wireshark.org/review/10831 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-05Add BASE_PT_ field display typesJoão Valverde1-13/+20
Avoid displaying duplicate port numbers with transport name resolution disabled and make some dissector code simpler. Introduces port_with_resolution_to_str_buf() function and amends UDP/TCP/DCCP/SCTP to use the new field display type. Change-Id: Ifb97810b9c669ccbb1a310a2c0ffd6e2b63af210 Reviewed-on: https://code.wireshark.org/review/10625 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-01Treat IPv4 subnet masks as distinct from addressesJeffrey Smith1-1/+5
While IPv4 subnet masks are obviously related and similar to IPv4 addresses, they are distinct enough that they need to be treated seperately in some aspects. For instance, there is no value in attempting to resolve a subnet mask. This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4 (and possible name resolution) where appropriate. Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7 Reviewed-on: https://code.wireshark.org/review/10438 Petri-Dish: Michael Mann <mmann78@netscape.net> 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>
2015-09-23Add a test to verify we pre-allocated enough hf entries.Jeff Morriss1-2/+3
This way we'll know as soon as we drop below the pre-allocated limit. As suggested by Graham on https://code.wireshark.org/review/10601 Change-Id: Ieeb14bdcf991d7a67c30787c97ca24ebb35d1763 Reviewed-on: https://code.wireshark.org/review/10627 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-23Add a "fieldcount" report to tshark -G to let us easily see how many fieldsJeff Morriss1-0/+3
are registered. Change-Id: I06f10d96916640cb9a782cae87898a5dd6c9c6e3 Reviewed-on: https://code.wireshark.org/review/10601 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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>
2015-09-21Remove proto_tree_add_text API.Michael Mann1-10/+6
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-07Add a new expert info type for decryption problems.Guy Harris1-0/+2
This is what should be used if, for some reason, decryption can't be performed. (And if there's a known reason why decryption can't be performed, it should be used, so the user knows why their 802.11/SSL/whatever traffic isn't decrypted, and either doesn't have to ask why or, at least, can give more details when they do ask why.) (Yes, I plan to use this for the 802.11 decryption code. Work in progress.) Change-Id: I812e61c2a4613d2e85f9ced1f5ed6ae91ac5f7ae Reviewed-on: https://code.wireshark.org/review/10421 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-11Added Reload Lua plugins.Stig Bjørlykke1-3/+9
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-07-23Add Enabled Protocols dialog for QtMichael Mann1-0/+15
This dialog combines the "protocols" and heuristic dissectors (from GTK) into a single tree view where heuristic dissectors are children of their protocol. Change-Id: I107656afd079c1d1c8a98161b736e4b4ad84f813 Reviewed-on: https://code.wireshark.org/review/9739 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>
2015-07-16Add the RTP Stream Analysis dialog.Gerald Combs1-1/+2
Combine the GTK+ RTP Stream Analysis and RTP Graph Analysis dialogs into one. Yell at the user less. Disable the Analyze RTP Stream menu item if we don't have an RTP stream selected. There are a *lot* of moving parts in this dialog. I've tested with the few RTP captures I have but it's by no means complete. "To do" items are listed at the top of rtp_analysis.cpp. Change-Id: Id503977f069bebc46cc68bc749f0c9cbf4d37bf6 Reviewed-on: https://code.wireshark.org/review/9650 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-05-24proto.h: fix clang++ 3.6 warningLuke Mewburn1-4/+4
Add spaces around literals to avoid warnings when compiling ui/qt with clang++ 3.6 -Wreserved-user-defined-literal (on Mac OS X). Change-Id: Ia2703dd8c914e8ffb299c4a6c44bba3aa674acb8 Reviewed-on: https://code.wireshark.org/review/8607 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-04-29- Mark some DCE/RPC functions as public do allow calls from pluginsMicha Reiser1-1/+1
- DCOM: * Mark some DCOM functions as public do allow calls from plugins * Add Support for Additional Variant Types Money, I8, UI8 * Fix an uint32 overflow when dissecting nwstringz0 where the length is 0 * Use WS_DLL_PUBLIC instead of WS_DLL_PUBLIC_DEF Change-Id: I02861a09203c6b42326f5a7b7e652e0f7c26d369 Reviewed-on: https://code.wireshark.org/review/8222 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-04-29proto.h: fix api referenceAlexis La Goutte1-1/+4
argument 'expression' of command @param is not found in the argument list of __DISSECTOR_ASSERT_STRINGIFY(s) The following parameters of __DISSECTOR_ASSERT_STRINGIFY(s) are not documented: parameter 's' The following parameters of __DISSECTOR_ASSERT_CMPINT(a, op, b, type, fmt) are not documented: parameter 'type', fmt The following parameters of proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int len, const int **fields, const guint encoding) are not documented: parameter 'len' Change-Id: I6adc34e66f45cdba63c34e87db762b39a281d127 Reviewed-on: https://code.wireshark.org/review/8230 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-22Add VALS_EXT_PTR to decorate pointers to value_string_ext's in hfinfo.Jeff Morriss1-0/+3
This allows checkAPIs to continue checking the 'convert' field for correctness when dissectors use value_string_ext_new() to build their value_string_ext's (without resorting to tricks like getting the address of the dereferenced pointer). This will be used to resolve the checkAPIs failure in patch set 3 of Ia5c96b1f6f1fe3a9521b3d70142889e3881fae5e . Change-Id: I700d86b9076f077706d34000f5a6aa5c96351f69 Reviewed-on: https://code.wireshark.org/review/8162 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-18proto(.h): fix '@return' command used in a comment that is attached to a ↵Alexis La Goutte1-1/+1
function returning void [-Wdocumentation] Change-Id: Ice88ddf2d35293f23be2d5a61a6ae77ed540f886 Reviewed-on: https://code.wireshark.org/review/8107 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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>
2015-04-13Add more "bitmask grouping" APIs.Michael Mann1-0/+70
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-03-21Proto.h: fix parameter 'err' not found in the function declaration ↵Alexis La Goutte1-1/+0
[-Wdocumentation] Change-Id: Ibca63a9119b9c45e6a24fe3dc14dc7ed86c3576a Reviewed-on: https://code.wireshark.org/review/7774 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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>
2015-03-19Implement proto_tree_add_item_ret_int() and proto_tree_add_item_ret_uint() whichAndersBroman1-0/+37
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-10Change a lot of http:// URLs to https://.Gerald Combs1-1/+1
Most of our sites are now HTTPS-only. Update URLs accordingly. Update other URLs while we're at it. Remove or comment out dead links. Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33 Reviewed-on: https://code.wireshark.org/review/7621 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-03-09Proto.c: fix no previous prototype for ... [-Wmissing-prototypes]Alexis La Goutte1-0/+47
proto.c:8733:1: warning: no previous prototype for 'proto_tree_add_uint64_bits_format_value' [-Wmissing-prototypes] proto.c:8812:1: warning: no previous prototype for 'proto_tree_add_int64_bits_format_value' [-Wmissing-prototypes] proto.c:8861:1: warning: no previous prototype for 'proto_tree_add_boolean_bits_format_value64' [-Wmissing-prototypes] Change-Id: Ic40ca6f32739b415a423fc978e8677d669a95867 Reviewed-on: https://code.wireshark.org/review/7509 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-05Qt: Add extra related packet indicator types.Gerald Combs1-0/+3
Add the ability to set frame number types: none, request, or response. Use the types to draw different related packet indicators in the packet list. Track the conversation in PacketListRecord. Use it to draw dashed lines for unrelated frames. Set frame number types for DNS and ICMP. Instead of drawing a transparent QImage, alpha blend our foreground color and draw directly in our painter. Blend more toward the foreground color. Add FRAMENUM_TYPE to checkAPIs. Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214 Reviewed-on: https://code.wireshark.org/review/7436 Reviewed-by: Gerald Combs <gerald@wireshark.org>