aboutsummaryrefslogtreecommitdiffstats
path: root/epan/diam_dict.l
AgeCommit message (Collapse)AuthorFilesLines
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-13/+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-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-05-08Allow empty-element Diameter Applications and use that format.Jeff Morriss1-0/+3
This also fixes a couple of applications that weren't properly terminated (as a result of some of my recent changes). Change-Id: I9662017a81c63aceeb950d3b29cb17dde16d4f0c Reviewed-on: https://code.wireshark.org/review/8335 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-21Allow the definition of AVPs within vendor IDs.Jeff Morriss1-9/+16
This allows for a more natural organization of AVP definitions: they can now be grouped by application (including the base application) or vendor ID. This means we can stop using the "workaround" (for those vendors who define AVPs but don't have their own application ID) of finding some random application ID to put in a vendor-specific xml file just to satisfy the parser. Rework a couple of Vendor-specific xml files as an example. Note: this does mean that vendor IDs can no longer be defined inside of the base or other application. If that's a problem the parser could be made (through some duplication of code) to understand the old format too. Change-Id: I5119f0dc7f8e3bbf59e2207046a8bb0f42ab0ca1 Reviewed-on: https://code.wireshark.org/review/8141 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-06(Trivial) Reformat some.Jeff Morriss1-10/+30
Change-Id: I1bed28c33d1942b9d8ee8ef341d7017d2df21f37 Reviewed-on: https://code.wireshark.org/review/6977 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-03Fix nameless application in NokiaSolutionsAndNetworks.xml (fromJeff Morriss1-2/+2
I4cd9bd7f7219e4d9ff1bb8a71fab32439a8a9a35). (The nameless application was causing known applications to be reported as unknown.) Add code to the Diameter dissector to report such problems at startup (similar code exists for other entities). Tweak the parser debug slightly. Change-Id: I6b28cda8660e6eb96648c7b3697d7fd85151ac96 Reviewed-on: https://code.wireshark.org/review/6927 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>
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>
2014-06-19Removed SVN Id from epan dir.Dario Lombardo1-2/+0
Change-Id: I487a3451344796447f0d5621b993cc89c29e93b5 Reviewed-on: https://code.wireshark.org/review/2383 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2013-12-14More shorten-64-to-32 warnings.Gerald Combs1-6/+6
svn path=/trunk/; revision=54106
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-03-16[-Wmissing-prototypes]Anders Broman1-12/+12
Use explicit casts. svn path=/trunk/; revision=48338
2013-02-10Add %option noinput to a bunch of Flex files, as we aren't using theGuy Harris1-0/+10
input() 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. Squelch a casting-const-away warning. svn path=/trunk/; revision=47613
2013-02-08Constify the return value of append_to_buffer(), to squelch someGuy Harris1-2/+2
warnings. svn path=/trunk/; revision=47559
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-10-10In the include processing code, if ddict_open() fails, bail outGuy Harris1-3/+8
*regardless* of whether errno is non-zero, so we at least report the failure. In the standalone test program built if TEST_DIAM_DICT_STANDALONE is defined, check for ddict_scan() failing. Part of fix for bug 7824. svn path=/trunk/; revision=45452
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=45016
2011-06-28Replace all strerror() with g_strerror().Stig Bjørlykke1-1/+1
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. svn path=/trunk/; revision=37812
2011-05-06Huzaifa Sidhpurwala of Red Hat Security Response Team discovered that weGerald Combs1-4/+2
could dereferene a NULL pointer if we had a corrupted Diameter dictionary. Additionally, it was possible to push an invalid input buffer onto the include stack. svn path=/trunk/; revision=37011
2010-05-13From Tamas Regos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4760 :Jeff Morriss1-3/+3
Harmless typo bug in diam_dict.l applictation_start <-> application_start svn path=/trunk/; revision=32783
2009-10-29From Eric Sesterhenn via bug 4175:Stig Bjørlykke1-1/+1
Use g_strdup to allocate filename. svn path=/trunk/; revision=30755
2009-04-08Just use g_strdup_printf() to construct a pathname - and useGuy Harris1-9/+2
G_DIR_SEPARATOR_S as the pathname component separator. svn path=/trunk/; revision=28013
2009-04-08Disable warnings-as-errors for Flex-generated output. Add a couple of gsizeGerald Combs1-1/+1
casts. svn path=/trunk/; revision=28002
2009-02-07#include <epan/emem.h> not req'd ...Bill Meier1-1/+0
svn path=/trunk/; revision=27391
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-10/+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-10-16Change more fopen() to eth_fopen() to finish fixing bug 1827:Jeff Morriss1-79/+80
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1827 Update README.developer to tell developers not to use fopen() and friends directly. svn path=/trunk/; revision=23206
2007-08-04Add a script as a front-end for Flex, to work around various problems,Guy Harris1-0/+1
such as the fact that Flex strips all but the last component of the "-o" argument, and that it doesn't generate a header file to declare routines the generated lexical analyzer defines. Use that script when building lexical analyzers, and, for each lexical analyzer, include the generated header file in the generated analyzer. svn path=/trunk/; revision=22446
2007-07-30Add comments to various %option items to explain what they're doing. Guy Harris1-4/+28
Move the %options to the beginning if they weren't already there, and put them in the same order in all files. Add "prefix=" options to .l files that don't already have them, so we don't have to pass a "-P" option. Add "never-interactive" and "noyywrap" options to our lexical analyzers, to remove extra isatty() checks and to eliminate the need for yywrap() from the Flex library. Get rid of %option nostdinit - that's the default. Add .l.c: rules to Makefile.am files, replacing the rules for specific .l files. Have those rules all check that $(LEX) is set. Update the address for the FSF. svn path=/trunk/; revision=22424
2007-07-20- <?avp-proto and <?type-proto to instruct about which dissector to use for ↵Luis Ontanon1-19/+48
a given type or avp - dissect timestamps - add all the avps that were commented out in the dictionary svn path=/trunk/; revision=22360
2007-07-18Initialise description field to avoid crash when dumping dictionary.Martin Mathieson1-0/+1
svn path=/trunk/; revision=22351
2007-07-18Make debugging static.Michael Tüxen1-1/+1
svn path=/trunk/; revision=22347
2007-07-17Add Address decoding, two debug environment variables ↵Luis Ontanon1-9/+21
(WIRESHARK_DEBUG_DIAM_DICT_PARSER and WIRESHARK_DUMP_DIAM_DICT) and fix some issues pointed out by Martin svn path=/trunk/; revision=22345
2007-07-17If we can't find dictionary.xml, fail instead of trying to read fromGerald Combs1-0/+5
stdin (which makes distcheck unhappy). Fixup whitespace. svn path=/trunk/; revision=22338
2007-07-16Glibize diam_dict.l (should fix windows config)Luis Ontanon1-23/+24
svn path=/trunk/; revision=22323
2007-07-16Rewrite of the diameter dissector to use the dictionary for creating hfids, ↵Luis Ontanon1-0/+759
drop libxml dependency. The work is still incomplete (anything but strings and numbers appears as bytes) but I want others to start testing it. TODO: builders and decoders for: - (ntp) timestamps - addresses - diameteruris - diameteridentities - ipfilterrules - qosfilterrules - mipregistrationrequests svn path=/trunk/; revision=22318