aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate
AgeCommit message (Collapse)AuthorFilesLines
2017-07-03mate_grammar(lemon): fix this statement may fall through ↵Alexis La Goutte1-1/+2
[-Werror=implicit-fallthrough] found by gcc7 Change-Id: Id26c1c0d1678613a90ff7707265ec062cd30cf83 Reviewed-on: https://code.wireshark.org/review/22501 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>
2017-05-10Define YYMALLOCARGTYPE appropriately.Guy Harris1-2/+3
Define it, so the generated parser knows what argument type the function passed to MateParserAlloc() takes. Use it when declaring MateParserAlloc(). Change-Id: Ice18fd6b5fdbdb31f527e5d6eb06e78594d4565b Reviewed-on: https://code.wireshark.org/review/21588 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-10Clean up MateParser routine declarations.Guy Harris2-9/+6
Remove the declarations from mate_parser.l, and have mate_parser.h include mate.h at the beginning of the file, instead. Move the #if'ed version of the declaration of MateParserAlloc() to mate.h. Change-Id: I03ffdd5f093b179ffc0cb0e43eac093f7e4af65c Reviewed-on: https://code.wireshark.org/review/21587 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09mate (grammar): fix no previous prototype for function ↵Alexis La Goutte1-0/+6
'MateParser/Alloc/Free' [-Wmissing-prototypes] Change-Id: I87ff11b7c04cb3b6963d4c8c16df2c3d60a0aec8 Reviewed-on: https://code.wireshark.org/review/21574 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>
2017-04-18mate: avoid redefining NDEBUGPascal Quantin1-0/+2
When building RelWithDebInfo target with MSVC, NDEBUG is automatically defined. Avoid redefining the macro by checking if it already exists. Change-Id: I1720f47cce0df210c2b2dff3b20c218dc2ae7b02 Reviewed-on: https://code.wireshark.org/review/21200 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Qt: Provide both file save and open preferencesAhmad Fatoum1-1/+1
This is a breaking change. prefs_register_filename_preference hasn't been differentiating between files to be saved and ones to be opened. On GTK, a neutral dialog is used, so no problems there. On Qt, a save dialog has been always used, even in dissectors that were reading configuration files without modification. prefs_register_filename_preference now takes an argument to indicate whether UI could be a save dialog with a warning on overwriting a file, or whether it's a general purpose open file dialog. Qt now does this. Previously no warning was shown on overwriting a file, so it may be used for opening files too without irritating the user. This has been changed, as non-destructive reads should now use the open dialog. Dissectors were changed accordingly. Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018 Reviewed-on: https://code.wireshark.org/review/21086 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-17Remove unnecessary tap.Guy Harris4-57/+7
The tap was just a trick to get fields and protocols registered as being of interest. Now that we have mechanisms by which postdissectors can explicitly register fields and protocols as being of interest, and are using that, the trick is no longer needed. Change-Id: Ib2620ff32c41ffa050203c1d4481c63535fb3f4b Reviewed-on: https://code.wireshark.org/review/21156 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Rename some routines and structure members.Guy Harris1-1/+1
They deal with sets of hfids, which can belong to protocols as well as fields (I guess you could argue that a protocol is a field, but...). Change-Id: Ibd103cfa26427ead4ef54be89f1251908004cfae Reviewed-on: https://code.wireshark.org/review/21154 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Include protocols in the list of wanted hfids.Guy Harris4-6/+11
That's currently required to get the fields we want. Bug: 12161 Change-Id: Ic1066334358c58fa915ef886b2658902393172c7 Reviewed-on: https://code.wireshark.org/review/21153 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Consistently call mate_config pointers "mc".Guy Harris3-128/+128
Some routines had "matecfg", some had "mc"; be a bit more consistent. Change-Id: I3406488315483fb281ebc3fb8a23e9e1b2104a14 Reviewed-on: https://code.wireshark.org/review/21152 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Make the current MATE config pointer static only to packet-mate.c.Guy Harris5-63/+73
Pass it as an argument to everything else, so only packet-mate.c has the notion of there being *a* configuration, and everything else takes the configuration as an argument. Change-Id: Ia92c1539586d3e71580fd822cf07bd3d79a6f093 Reviewed-on: https://code.wireshark.org/review/21151 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-16No need for this to be a global variable.Guy Harris1-7/+6
Make it local to mate_tree(), and pass it to mate_pdu_tree(). Change-Id: I489683614b4d65aec3ddd94ce2c9077180e769ca Reviewed-on: https://code.wireshark.org/review/21149 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-16Work around a Lemon bug.Guy Harris1-0/+6
There's a Lemon bug where this grammar produces a parser that fails assertions; to work around it, we disable assert() failures. (A bug report has been sent to sqlite-users about this.) Change-Id: I6812b20fafe318425b37755a15009b0baf2d68a2 Reviewed-on: https://code.wireshark.org/review/21148 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-16Revert "Temporary hack to debug the MATE grammar."Guy Harris1-3/+0
This reverts commit c63c5c8c4262c8f58b12f56bf659383a1b0aa47a. This is probably easier than just abandoning it and trying to remove it from my repository. https://xkcd.com/1597/ Change-Id: Ibba2107cfa9c60c86862b16a4cac31689670e137 Reviewed-on: https://code.wireshark.org/review/21127 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-16Temporary hack to debug the MATE grammar.Guy Harris1-0/+3
Builds on my machines, physical and virtual, crash with an assertion failure in the MATE Lemon grammar when parsing the MATE configuration file in bug 12161 - on Mac OS X Lion with llvm-gcc, Ubuntu 15.10 with GCC, and on macOS Sierra with clang. Builds on the macOS buildbot do *not* fail. So put the result of Lemon in the MATE plugin into the release tarball, so I can compare it with what Lemon generates on my machine. Change-Id: I2d5ecee68535a8b4803de0bd7f02d448ab629083 Reviewed-on: https://code.wireshark.org/review/21126 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-16Get rid of some generated files with "make distclean".Guy Harris1-3/+3
register.c, and the plugin.c for various plugins, are generated by tools that must be available to do a build, and aren't distributed as part of the source tarball. That means "make distclean" should remove them. Do so. Change-Id: I9e37abdafb50234cf1ebb5fb828446e45e605d78 Reviewed-on: https://code.wireshark.org/review/21125 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-14mate: move 3 big structures from stack to heapPascal Quantin1-14/+36
Change-Id: I03bdb1f17c8c8b79cc78e37b14ac4e959f1ed089 Reviewed-on: https://code.wireshark.org/review/21078 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>
2017-04-12Add an API to let a postdissector specify fields whose values it needs.Guy Harris3-1/+22
Currently, this is only used to determine whether a protocol tree needs to be built on the first pass or not - if there are postdissectors that need fields, it does - but eventually we should be able to use it to prime the dissection to deliver those fields in cases where we don't need the *entire* protocol tree (rather than using a hack such as cooking up a fake tap with a fake filter to do that). Update MATE and TRANSUM to use it. Clean up code to check whether we need a protocol tree, and add comments before that code indicating, in each case, what the criteria are. The array of postdissectors includes a length, so we don't need to separately keep track of the number of postdissectors. Clean up indentation while we're at it. Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7 Reviewed-on: https://code.wireshark.org/review/21029 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris1-1/+1
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-26Don't claim packet as MATE if there is no MATE configurationMichael Mann1-1/+6
This prevents MATE from (falsely) being included in the list of protocols for any given frame. Change-Id: I9ffdfb52cf31dfda89b674a41bcc0992e17de5e8 Reviewed-on: https://code.wireshark.org/review/19432 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-02Include config.h at the very beginning of all Flex scanners.Guy Harris1-0/+5
That way, if we #define anything for large file support, that's done before we include any system header files that either depend on that definition or that define it themselves if it's not already defined. Change-Id: I9b07344151103be337899dead44d6960715d6813 Reviewed-on: https://code.wireshark.org/review/19035 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-30cmake: make WERROR_COMMON_FLAGS a normal stringPeter Wu1-7/+18
Instead of checking for the boolean "FALSE", just set an empty string. This avoids the need to check for WERROR_COMMON_FLAGS before using it. The transformation is the same for all files, remove "if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since we have a string here and not a list). Modelines have been added where missing. Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92 Reviewed-on: https://code.wireshark.org/review/17997 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com>
2016-09-23mate: fix Match edge cases, improve documentationPeter Wu3-280/+184
Use strcmp to sort AVPs in an AVPL and for matching instead of comparing pointer addresses. Pointers can only be used for (in)equality, there is no ordering in them. Matching of attributes however requires a better ordering to know whether the operator (condition) or whether the operand (data) can be skipped. Otherwise it is possible that condition (b) randomly fails to match data (a,b). User-visible changes (mainly edge cases): - Loose (a=1, a?) on data (a=0, a=1) would previously fail to return (a=0,a=1) because the a? condition is not tried for data a=0. Now it tries all compatible conditions for a data AVP. - Any Match condition like (a=1, a^1) would previously be treated the same as (a=1) while (a^1, a=1) would still be seen as (a^1, a=1). The first case is now fixed to match (a=1, a^1). (Via a fix in insert_avp to ensure that (a=1) is not considered the same as (a^1).) - Every (a=1, a=2) on data (a=1, b=1) previously failed, but the comment "it will not create a list if there is not a match for every attribute in op" suggests that it should return (a=1). - Every (a=1) on data (a=2) previously succeeded (bug) while it would fail on (a=2, b=1). This is fixed now by checking whether any of the conditions really have matching data for the attribute. Other changes: optimize merge_avpl and new_avpl_*_match to insert in linear time instead of quadratic, rewrite and add comments in an attempt to make it easier to understand. Merge the new_avpl_every_match and new_avpl_exact_match functions and rename it to new_avpl_pairs_match to reflects its actual implemented functionality. Not addressed in this patch is the quasi-randomness of the returned data AVPL. AVPLs are unordered, so the condition Strict (a?) on data (a=1, a=2) could in theory return either (a=1) or (a=2). In practice this returns (a=1) because of alphabetical ordering, but this cannot really be relied on. It gets worse for conditions like Strict (a?, a>1), these are considered undefined behavior (without warnings for now). Ping-Bug: 12184 Change-Id: I0008448ffcb96183f106cb937c4f488e26a82f92 Reviewed-on: https://code.wireshark.org/review/17777 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> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-26Fix some of the checkAPIs.pl warnings for g_warning.Michael Mann2-3/+5
1. Create ws_g_warning for legitimate uses of g_warning 2. Use proto_tree_add_debug_text 3. Comment some out Change-Id: Ida044bf40286b955fdd529c4f9907c8e09b3d7c5 Reviewed-on: https://code.wireshark.org/review/16678 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-30Remove Makefile.common filesJoão Valverde2-69/+41
Now that nmake build system has been removed they are not needed anymore. Change-Id: I88075f955bb4349185859c1af4be22e53de5850f Reviewed-on: https://code.wireshark.org/review/16050 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+3
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-3/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15Remove Nmake build systemPascal Quantin3-170/+0
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann1-2/+2
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-02Add checkAPI calls to CMake.Graham Bloice1-3/+18
This generates a top level target, checkAPI, that is excluded from the ALL build target, so must be run separately. On Windows using a Visual Studio generator, call msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj Change-Id: I44a57c564dcfc75499463b942436f4b920a82478 Reviewed-on: https://code.wireshark.org/review/14873 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-04-28Add a rule to build lemon so any target that depends on it can (re)build it ↵Jeff Morriss1-1/+1
if necessary. See, for example: https://ask.wireshark.org/questions/52045/make-c-plugins-fails-looking-for-target-toolslemonlemonc Also add another lemon dependency for MATE. Change-Id: Ifc62e174fb6dc4247887607ad37a505b36d83134 Reviewed-on: https://code.wireshark.org/review/15143 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2016-04-15Remove empty filesJoão Valverde2-0/+0
Change-Id: I9b5b78ca26dd1190e43d2e7e953f4fb119921103 Reviewed-on: https://code.wireshark.org/review/14927 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-04-03Make the Flex scanners and YACC parser in libraries reentrant.Guy Harris2-111/+167
master-branch libpcap now generates a reentrant Flex scanner and Bison/Berkeley YACC parser for capture filter expressions, so it requires versions of Flex and Bison/Berkeley YACC that support that. We might as well do the same. For libwiretap, it means we could actually have multiple K12 text or Ascend/Lucent text files open at the same time. For libwireshark, it might not be as useful, as we only read configuration files at startup (which should only happen once, in one thread) or on demand (in which case, if we ever support multiple threads running libwireshark, we'd need a mutex to ensure that only one file reads it), but it's still the right thing to do. We also require a version of Flex that can write out a header file, so we change the runlex script to generate the header file ourselves. This means we require a version of Flex new enough to support --header-file. Clean up some other stuff encountered in the process. Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16 Reviewed-on: https://code.wireshark.org/review/14719 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-03Revert "autotools: Use -Werror with clean plugin code"João Valverde1-20/+13
This reverts commit 31654e5e5c0c44609584140a10eb7d9aa1572673. Change-Id: I27f3465c680daa599b96a7259ca93f96f2a622a5 Reviewed-on: https://code.wireshark.org/review/14324 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-03autotools: Use -Werror with clean plugin codeJoão Valverde1-13/+20
Change-Id: I0bc94702eaf87924467e6129ac22f4755308f8d3 Reviewed-on: https://code.wireshark.org/review/14319 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21autotools: Use pkg-config autoconf macros for GLib/GTKJoão Valverde1-1/+3
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add dependency flags explicitly instead of using WS_CPPFLAGS. Some minor improvements and fixes for missing/unnecessary variables (no impact on our test builds). Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671 Reviewed-on: https://code.wireshark.org/review/14005 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-20autotools: Move common automake code for plugins to an include fileJoão Valverde1-64/+2
Change-Id: Icac1eb17ff78ae5ae54b61820618bf3c5733bd96 Reviewed-on: https://code.wireshark.org/review/14003 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-14Fix format string warnings [-Wformat=]João Valverde1-1/+1
Change-Id: I266c7d422f6ade965b42a4e2e8dc01966f8eb5f8 Reviewed-on: https://code.wireshark.org/review/13932 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-29Try to fix 'make distcheck'João Valverde1-2/+3
Change-Id: I1656ca8e86e506f39ef7f7600bd9d5a21670ad1e Reviewed-on: https://code.wireshark.org/review/13589 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-28MATE: Disable Werror as before g265a41eJoão Valverde1-2/+1
Change-Id: Ia89f40245e5b7eab2dc23ce7b37d5107863bbfdd Reviewed-on: https://code.wireshark.org/review/13583 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-28autotools: Don't use "user variables" to set build flagsJoão Valverde1-10/+5
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris2-5/+5
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-11new_register_dissector -> register_dissector for remaining uses.Michael Mann1-1/+1
Mostly plugins, but also LUA and generated skinny dissector. Change-Id: Ifeb4205442f9a60875266b4e82841ff38b4fdb63 Reviewed-on: https://code.wireshark.org/review/12515 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-05Use noyywrap rather than defining our own yywrap functions.Guy Harris1-11/+5
Tweak lemonflex-tail.inc to fix an issue this reveals. It appears that, at least on the buildbots, the Visual Studio compiler no longer issues warnings for the code generated with %option noyywrap. Change-Id: Id64d56f1ae8a79d0336488a4a50518da1f511497 Reviewed-on: https://code.wireshark.org/review/12433 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-01Removed some remaining svn Id tagsStig Bjørlykke1-2/+0
Change-Id: I7ffbf59099132cde55995bde991d1c6a5dd224b0 Reviewed-on: https://code.wireshark.org/review/12330 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-24Developers Guide updates for plugins with CMakeGraham Bloice1-1/+1
Remove references to nmake, add references to CMake. Change-Id: Iea2d2b2fbdbab131bae823d5d6a5306630a70347 Reviewed-on: https://code.wireshark.org/review/12079 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-23register_dissector -> new_register_dissectorMichael Mann1-5/+6
Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9 Reviewed-on: https://code.wireshark.org/review/12073 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-4/+0
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-06Don't include io.h in Flex scanners - they're not interactive.Guy Harris1-1/+1
We don't have any Flex scanners that support an interactive command-line interface, so none of our scanners are, or need to be, interactive. Mark text2pcap's scanner as not interactive. That means none of our scanners should call isatty(), so they don't have any need to include <io.h> on Windows; remove that include from the Lucent/Ascent text capture scanner. Update a comment to reflect that what matters isn't whether we can read from a terminal or whether we actually do so, what matters is whether they read *interactively* from a terminal (if you want to run text2pcap reading from the standard input and type at it, be my guest). Change-Id: I59979d1fdb37e1913125a400963ff7a3fa6b9bbd Reviewed-on: https://code.wireshark.org/review/11587 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-16CMake: Add /WXGerald Combs1-2/+2
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off, similar to config.nmake. We haven't compiled C++ code with -Wshorten-64-to-32 for quite some time so there's no need to add -Wno-shorten-64-to-32 in ui/qt/CMakeLists.txt. Additionally, squelch ---- C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled with [ _Iter=QList<QString>::iterator , _RanIt=QList<QString>::iterator , _Diff=int , _Pr=bool (__cdecl *)(const QString &,const QString &) ] .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) ---- in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp so that we'll compile successfully. Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357 Reviewed-on: https://code.wireshark.org/review/10533 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>