aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimaxasncp/wimaxasncp_dict.l
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16plugins: Add source tree subfolder for plugin libraryJoão Valverde1-866/+0
This allows some simplification and makes things more consistent, particularly for loading plugins from the build dir. Also fixes the issue reported here: https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d Reviewed-on: https://code.wireshark.org/review/25329 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-13WiMAX ASN CP: Leak less memory.Gerald Combs1-11/+3
Replace some g_new()s, g_strdup()s and GArrays used in prefix registration with their epan_scoped wmem equivalents. This reduces the amount of memory we leak so that we come in below the Valgrind fuzzer's current threshold (102400). Bug: 14106 Change-Id: I7308ac89465316c06773552253dabc876b6c2425 Reviewed-on: https://code.wireshark.org/review/23891 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>
2017-09-19Disable flex-generated [-Wsign-compare] warningsJoão Valverde1-0/+4
Change-Id: Iace0462e6bb50573f3e4603f7a19e4b7ee1f9733 Reviewed-on: https://code.wireshark.org/review/23541 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>
2017-09-05Fix memory leak in wimaxasncpAhmad Fatoum1-2/+2
Remove unnecessary null-check before free as well. Change-Id: Ic54459149b40fd8c8f58c643bbd6cfc81ee8b923 Reviewed-on: https://code.wireshark.org/review/23398 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-2/+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-04-04Don't double-close the input.Guy Harris1-1/+4
Change-Id: I9b345ee28a59596369efac8bdd0a51447d723017 Reviewed-on: https://code.wireshark.org/review/14803 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-03Make the Flex scanners and YACC parser in libraries reentrant.Guy Harris1-174/+273
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-02-14Fix format string warnings [-Wformat=]João Valverde1-3/+3
Change-Id: I266c7d422f6ade965b42a4e2e8dc01966f8eb5f8 Reviewed-on: https://code.wireshark.org/review/13932 Reviewed-by: João Valverde <j@v6e.pt>
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-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-06-15icmp,wimax: Fix undefined shiftPeter Wu1-1/+1
Fixes these warnings reported by Undefined Behavior Sanitizer (UBSan) while running the test suite: icmp: left shift of 55099 by 16 places cannot be represented in type 'int' wimax: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: I72913a901b61033098750da9c8f1617b055999a1 Reviewed-on: https://code.wireshark.org/review/8913 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>
2015-01-18Remove some apparently-unnecessary includes of emem.h.Guy Harris1-1/+0
Change-Id: Id50ce3e707056cca8f30052f05c451ce431b39b5 Reviewed-on: https://code.wireshark.org/review/6632 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13Consistently use the "g_string_free returns a C string pointer" idiom.Guy Harris1-2/+1
g_string_free(str, FALSE) frees the GString container but not the underlying g_malloc()ed string; instead, it returns a pointer to the g_malloc()ed string. Fix those places that didn't already get the string pointer from g_string_free() to do so rather than manually extracting the string themselves. And fix one place that didn't even need to use a string - it was just scanning a C string without even modifying it. Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5 Reviewed-on: https://code.wireshark.org/review/6532 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06Add printf-format annotations, fix garbagePeter Wu1-1/+1
The WRETH dissector showed up some garbage in the column display. Upon further inspection, it turns out that the format string had a trailing percent sign which caused (unsigned)-1 to be returned by g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows up. ASAN could not even catch this error because EP is in charge of this. So, start adding G_GNUC_PRINTF annotations in each header that uses the "fmt" or "format" paramters (grepped + awk). This revealed some other errors. The NCP2222 dissector was missing a format string (not a security vuln though). Many dissectors used val_to_str with a constant (but empty) string, these have been replaced by val_to_str_const. ASN.1 dissectors were regenerated for this. Minor: the mate plugin used "%X" instead of "%p" for a pointer type. The ncp2222 dissector and wimax plugin gained modelines. Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622 Reviewed-on: https://code.wireshark.org/review/2881 Reviewed-by: Evan Huus <eapache@gmail.com>
2013-03-20[-Wmissing-prototypes]Anders Broman1-7/+7
Use explicit casts. svn path=/trunk/; revision=48439
2013-02-10Add %option noinput to some Flex files, as we aren't using the input()Guy Harris1-0/+5
routine and thus don't need to have it generated - and as it produces warnings of a routine defined but not used, we don't want to have it generated. svn path=/trunk/; revision=47616
2012-12-26Fix a bunch of warnings.Guy Harris1-4/+4
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-5/+5
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-11-29Fix several [-Wshadow] warnings.Bill Meier1-9/+9
svn path=/trunk/; revision=46287
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45015
2011-03-31Don't dereference a NULL pointer. Fixes CID 426.Chris Maynard1-1/+1
svn path=/trunk/; revision=36424
2011-02-03Just use g_strdup_printf(), rather than doing it ourselves.Guy Harris1-4/+1
svn path=/trunk/; revision=35780
2010-11-17From David Katz via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5166 :Jeff Morriss1-3/+7
Add a configuration parameter of the NWG version for WiMAX ASN CP dissector. The format and meaning of TLVs, as well as function types and messages changed between the different NWG versions. Added support for the version number of TLVs in the dictionary xml, its parser, and of course in the packet itself. Added support for the version number of function-types and message-types by extending the value_string structure to contain also a "since" version number. Successfully tested with a live capture and capture file, containing WiMAX ASN packets (full Network entry). Also fuzzed 500 passes successfully. The XML doesn't contain all existing NWG versions, only selected ones. This is a little tedious work to go over all TLVs of each version, so I'll add some newer versions later on. can add a short how-to of adding a new version, for others to use, if needed. svn path=/trunk/; revision=34919
2010-04-02Make the test compile.Jaap Keuter1-6/+6
svn path=/trunk/; revision=32359
2010-04-01From sangaran:Anders Broman1-0/+1
8-bit Bit Flag decoder method needed in wimaxasncp plugin dissecto. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4608 svn path=/trunk/; revision=32356
2008-08-05luis.ontanon@gmail.com => luis@ontanon.orgLuis Ontanon1-1/+1
svn path=/trunk/; revision=25937
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-3/+3
libwireshark (and the plugins using those functions) do not depend on wiretap on Windows. While doing that, rename the eth_* functions to ws_*. svn path=/trunk/; revision=25354
2008-04-25 Bug 2493: Fix (Part 2): Bill Meier1-5/+11
To prevent Windows compiler errors when using flex 2.5.35. Fixes "missing unistd.h" and yywrap "mismatched parameter" warnings [Upcoming Part 3: ignore 'signed /unsigned mismatch' errors] svn path=/trunk/; revision=25173
2007-11-24Fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1914 when building ↵Jeff Morriss1-71/+60
out of the source tree by not issuing a complaint if the wimaxasncp dictionary is not found. This is ugly but it's how diameter does it, too, and I am not aware of a better way. svn path=/trunk/; revision=23565
2007-11-16Embedding EAP inside wimaxasncp.Martin Mathieson1-0/+1
svn path=/trunk/; revision=23474
2007-11-09From Stephen Croll.Martin Mathieson1-0/+13
Dynamically register filter fields from TLV definitions. svn path=/trunk/; revision=23414
2007-10-30Change a few g_string_append_printf() (GTK2 only) calls to g_strdup_printf()Stephen Fisher1-7/+11
and g_string_append() to work on GTK 1.2 also. svn path=/trunk/; revision=23311
2007-10-17s/fopen()/eth_fopen()/ in plugins/ (for bug 1827).Jeff Morriss1-1/+3
svn path=/trunk/; revision=23221
2007-10-12Fix wimaxasncp compilation under Windows. Rename a macro that's definedGerald Combs1-3/+3
by the platform SDK, cast an int, and use the top-level Makefile.nmake.inc to build wimaxasncp_dict.{c|obj}. svn path=/trunk/; revision=23165
2007-10-12TLVs now defined in XML (from Stephen Croll).Martin Mathieson1-0/+755
svn path=/trunk/; revision=23156