aboutsummaryrefslogtreecommitdiffstats
path: root/tools/wireshark_gen.py
AgeCommit message (Collapse)AuthorFilesLines
2015-12-07Spelling fixes for errors found by lintianBalint Reczey1-1/+1
Change-Id: I889283902875193f4d3f3fd59788f59f8d9bcc20 Reviewed-on: https://code.wireshark.org/review/11945 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-09-28idl2wrs: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangMichael Mann1-14/+33
It looks like "items" could have contributed to fields/data being at an incorrect level off of a tree. Change-Id: I93616ef8b6b364c578f989882045dee42cb6d3c3 Reviewed-on: https://code.wireshark.org/review/8558 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: 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-05-07Need to generate hf_ variable for aliases in structs.Michael Mann1-1/+2
Change-Id: I6bd995d42cf54aaf2ad90d0322056c7ff0830ea9 Ping-Bug: 11156 Reviewed-on: https://code.wireshark.org/review/8324 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-05-07Remove proto_tree_add_text from idl2wrs generation.Michael Mann1-13/+27
Change-Id: Iab9df3e68d2a3878c3081c6352c45f7c329b983e Reviewed-on: https://code.wireshark.org/review/8323 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-06Fix the need to manually adjust packet-gias.c (take 2)Michael Mann1-10/+61
Need to have packet-gias.c in the DIRTY_CORBA_IDL_DISSECTOR_SRC grouping to work around the warnings still generated. Change-Id: I08ea1f7d90577cc112b85e7fc00171827f58d6d2 Reviewed-on: https://code.wireshark.org/review/8266 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-01Revert "Fix the need to manually adjust packet-gias.c"Alexis La Goutte1-60/+9
This reverts commit 3ca9318d8215738b8d4edcde0598226cfc6cf031. Mac OS X buildbot are not happy packet-gias.c:356: warning: 'hf_UCO_InvalidInputParameter_details' defined but not used packet-gias.c:359: warning: 'hf_UCO_ProcessingFault_details' defined but not used packet-gias.c:360: warning: 'hf_UCO_SystemFault_details' defined but not used packet-gias.c:5275: warning: 'decode_UCO_Ratio_st' defined but not used packet-gias.c:5303: warning: 'decode_UCO_DirectAccessLocation_st' defined but not used packet-gias.c:5588: warning: 'decode_UCO_Coordinate3d_st' defined but not used packet-gias.c:5612: warning: 'decode_UCO_Circle_st' defined but not used packet-gias.c:5625: warning: 'decode_UCO_Ellipse_st' defined but not used packet-gias.c:5656: warning: 'decode_UCO_SimpleGSImage_st' defined but not used packet-gias.c:5671: warning: 'decode_UCO_SimpleCImage_st' defined but not used packet-gias.c:5694: warning: 'decode_UCO_CompressedImage_st' defined but not used packet-gias.c:5836: warning: 'decode_GIAS_ImageSpec_st' defined but not used Change-Id: Iee076c00eb4e48571a99f6b854b7e3e52983c2f8 Reviewed-on: https://code.wireshark.org/review/8265 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-01Fix the need to manually adjust packet-gias.cMichael Mann1-9/+60
Change-Id: I11beada78d2f2b4359d3638cdbcb6f43623fd10c Reviewed-on: https://code.wireshark.org/review/8262 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>
2015-04-23idl2wrs: don't use -1 for the protocol-item length.Jeff Morriss1-1/+1
It doesn't work any more for empty (length==0) PDUs. Similar to bug 10646/Ifb96768969a43c59367b73e7bb940ceeb02cf6b0 (for RPC). Untested as I'm not set up to build IDL dissectors now. Bug: 11134 Change-Id: I77aacc2590acbacbe02edb1768e754f92f87bc23 Reviewed-on: https://code.wireshark.org/review/8163 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-25Cleanup "excess" from trying to support sequence of "native types". Last ↵Michael Mann1-40/+38
installment of bug 9532. Cleaned up wireshark_gen.py so that it no longer generates duplicate fields and greatly minimized the number of useless hf_ variables generated. Change-Id: I26b2ddb5b65fcde99787cc2771348aa1b37f919f Reviewed-on: https://code.wireshark.org/review/1329 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Continuation of bug 9532.Michael Mann1-0/+14
Ie4d1edfd67a8e6f02834573f29f07baf79058534 created a several duplicate hf_ registrations. That led to the exposure of some other potential problems with generating sequences. Still not quite complete, but want to pacify the buildbots, so there is a small amount of manual editing to comment out a few duplicated hfs in packet-parlay.c. Change-Id: I0ff8a9795e213ab966db8d6333b9477bad06250b Reviewed-on: https://code.wireshark.org/review/1302 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-23Bugfix generating a sequence of "native" types. Bug 9532.Michael Mann1-3/+66
Previously a sequence of "native" types (int, float, etc) generated a proto_tree_add_uint (for the loop over the sequence) and a proto_tree_add_XXX (for the "native" type), but only 1 hf variable was created for the "loop" field, so DISSECTOR_ASSERT_NOT_REACHED would be generated if "native" type != uint. Now a separate hf_ variable is generated for the "loop" and "native" type. Also update existing IDL dissectors with new generator logic. Change-Id: Ie4d1edfd67a8e6f02834573f29f07baf79058534 Reviewed-on: https://code.wireshark.org/review/1274 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-23Fix generator to remove Dead Store (Dead assignement/Dead increment) warning ↵Michael Mann1-2/+13
found by Clang. (not sure why, but regeneration also "moved" some hf_ variables from previous version) Change-Id: I197eacbb3f892dbdca6e6bc354fc88240c1bfb34 Reviewed-on: https://code.wireshark.org/review/1291 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-14Remove $Id$ and other Subversion leftovers from the tools.Jeff Morriss1-4/+0
There are a few things in here which could still use attention. Don't regenerate anything now. Change-Id: I283c224d3523212144707fca3d6265916cb11792 Reviewed-on: https://code.wireshark.org/review/205 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-10Fix warnings in packet-parlay.cAlexis La Goutte1-1/+1
packet-parlay.c:53643:9: warning: passing argument 2 of 'get_CDR_wchar' from incompatible pointer type [enabled by default] packet-parlay.c:53667:9: warning: passing argument 2 of 'get_CDR_wstring' from incompatible pointer type [enabled by default] Change-Id: I027809139e74b563e759f28e2e141951166e53d0 Reviewed-on: https://code.wireshark.org/review/170 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Anders Broman <a.broman58@gmail.com>
2013-12-04From Anders request Add prototype for corba/idl dissectorAlexis La Goutte1-0/+17
svn path=/trunk/; revision=53778
2013-12-03Add modelines info to idl generate fileAlexis La Goutte1-2/+36
svn path=/trunk/; revision=53754
2013-12-03Fix indent for generated file (Use 4 space)Alexis La Goutte1-39/+39
svn path=/trunk/; revision=53753
2013-12-03Fix generator don't generate trailing whitespaceAlexis La Goutte1-4/+6
svn path=/trunk/; revision=53752
2013-12-03Add #pragma to idl generator...Alexis La Goutte1-1/+5
svn path=/trunk/; revision=53746
2013-12-01Use 4-space (PEP 8) indentation. Add modelines.Gerald Combs1-16/+27
svn path=/trunk/; revision=53685
2013-09-08expert_add_info_format_text -> expert_add_info_textMichael Mann1-4/+4
svn path=/trunk/; revision=51849
2013-07-03WS_DLL_PUBLIC is now always WS_DLL_PUBLIC_NOEXTERN with "extern" added;Guy Harris1-2/+2
just define WS_DLL_PUBLIC_NOEXTERN inside the ifdefs, and define WS_DLL_PUBLIC as WS_DLL_PUBLIC_NOEXTERN followed by "extern". Then rename WS_DLL_PUBLIC_NOEXTERN to WS_DLL_PUBLIC_DEF, to clarify that it's what should be used for definitions; at least on Windows, you *have* to use it when declaring arrays without a size, and, whilst you might be able to use WS_DLL_PUBLIC for definitions of functions and perhaps data definitions other than no-size arrays, it might be clearer to rename WS_DLL_PUBLIC to WS_DLL_PUBLIC_DECL and use it only for declarations. svn path=/trunk/; revision=50334
2013-05-24Use new expert info API in idl dissectors. These generated about 50% of the ↵Michael Mann1-11/+41
add_expert_info_format() calls. svn path=/trunk/; revision=49561
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-2/+6
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-01-22Fix for CID 761911-761984 and CID 761985-761994.Jaap Keuter1-0/+2
Try to convince Coverity that the passed in item pointer is appreciated, but not used. This time see if it pleases the Windows compiler too. svn path=/trunk/; revision=47217
2013-01-22Revert 47201 it does not compile on Windows.Anders Broman1-4/+1
svn path=/trunk/; revision=47208
2013-01-21Fix for CID 761911-761984 and CID 761985-761994.Jaap Keuter1-1/+4
Try to convince Coverity that the passed in item pointer is appreciated, but not used. svn path=/trunk/; revision=47201
2013-01-18Try and see if we can suppress about half of the Coverity issues.Jaap Keuter1-0/+2
svn path=/trunk/; revision=47157
2012-12-26Change wireshark_gen.py to make the operation argument to routines aGuy Harris1-11/+11
"const char *", as it is now expected to be. Regenerate the dissectors. Update the URL for OmniOrb. In README.parlay, use idl2wrs in the sample command. svn path=/trunk/; revision=46765
2012-11-13Use proto_tree_add_<signed integer> functions for signed giop datatypesMichael Mann1-4/+4
svn path=/trunk/; revision=46021
2012-11-05Add a few more expert_add_info_format calls to giop dissector which requires ↵Michael Mann1-170/+94
packet_info* structure and proto_item* to be filtered down through the generated functions. Also removed some excessive whitespace. svn path=/trunk/; revision=45911
2012-10-11Make idl2wrs dissectors filterable - Part 1Michael Mann1-198/+622
Updated wireshark_gen.py to generate hf_ variables for all of the IDL "types". The "simple" types use proto_tree_add_* (not text), while the "complex" types use the GIOP dissector API. checkhf.pl generates some warnings because (some of) the hf_ variables are being generated for the "complex" types, but are not being used. That will be done in Part 2. expert_add_info_format now linked to a real item instead of being attached to a duplicative proto_tree_add_text(). This cleaned up literally thousands of unnecessary proto_tree_add_text()s svn path=/trunk/; revision=45472
2012-09-19We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=44997
2012-09-05Replace process_RequestOperation macro by a real function to speedup ↵Pascal Quantin1-6/+14
compilation time svn path=/trunk/; revision=44779
2012-08-14Bug 3725 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3725)Michael Mann1-9/+0
Have giop dissector use more ephemeral memory. Update idl2wrs dissector generator accordingly. svn path=/trunk/; revision=44498
2012-08-08From Michael Mann on -dev:Jeff Morriss1-1/+1
The idl2wrs generated dissectors don't follow the convention of using the filter name registered with the protocol as the start of any display filter name. This patch fixes that. svn path=/trunk/; revision=44325
2012-08-08Use expert infos instead of g_warning when something unexpected is found.Jeff Morriss1-11/+25
svn path=/trunk/; revision=44324
2012-07-08Add a function to packet-giop.c that does what the code that Jeff Morriss1-10/+1
template_get_CDR_string (in wireshark_gen.py) did. This eliminates another whole pile of function-local variables in packet-parlay.c. Unfortunately it doesn't seem to speed up compilation (or eliminate the variable tracking size limit problem). But it does eliminate a lot of lines of code... svn path=/trunk/; revision=43610
2012-07-08Eliminate a lot of function-local variables by not storing the result ofJeff Morriss1-161/+55
(several of the) get_CDR_*() functions: instead call the function directly in the proto_tree_add_text() calls. Eliminate a lot of global variables that are only later used in (a single) strcmp(). All the GIOP dissectors are built-in now; don't include the (#if'd out) plugin registration code in the generated dissector. Try to clean up the formatting of the generated code a bit. Regenerate the IDL dissectors; as noted in r39932, this seems to involve a lot of function re-ordering in packet-parlay.c (making the delta bigger). These changes decrease the time to compile packet-parlay.c by, on my system, about half. But it still complains: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without and it still takes "too long." svn path=/trunk/; revision=43609
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-31Remove redundant code from the template.Anders Broman1-5/+1
svn path=/trunk/; revision=42941
2012-05-30Modify IDL generated plugin interface (untested)Anders Broman1-2/+2
svn path=/trunk/; revision=42925
2011-11-29From c.David via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6527Alexis La Goutte1-4/+11
corba dissector generator improvement Patch 2 : create a defaulf field hf_operationrequest which provides the requested operation on both the resquest and the reply messages. From me : Regenerate GIOP Plugins svn path=/trunk/; revision=40038
2011-11-29From c.David via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6527Alexis La Goutte1-2/+2
corba dissector generator improvement Patch 1 : field names is used in dissection instead of "enum value" which is not clear From me : Regenerate GIOP Plugins svn path=/trunk/; revision=40037
2011-11-18Fix major (> 100) Dead Store (Dead assignement/Dead increment) Warning found ↵Alexis La Goutte1-79/+18
by Clang in IDL "generator" of GIOP Plugins svn path=/trunk/; revision=39933
2011-11-18Some modification in generated GIOP dissector plugins in not include in ↵Alexis La Goutte1-4/+5
"generator" (wireshark_gen.py) * Remove some uneeded #includes (Revision 32419) * Don't guard col_set_str (COL_PROTOCOL) with col_check (Revision 29340) * Add missing #pragma warning disable, now using _MSC_VER (Revision 21222, 21227, 21240) svn path=/trunk/; revision=39931
2010-05-24Refer to the endianness arguments as "encoding" rather thanGuy Harris1-1/+1
"representation" - we already use "representation" to refer to the text representation of fields. Change some routines with an endianness argument to make it a representation argument instead; svn path=/trunk/; revision=32929
2010-05-13Create a new REP_NA value for fields where there are no representationsGuy Harris1-1/+1
from which to choose; use that for protocol fields in some protocols (modify the CORBA generator to use it, and manually update the generated CORBA dissectors accordingly). svn path=/trunk/; revision=32777
2010-04-05Get rid of a bunch of check_col().Anders Broman1-1/+0
svn path=/trunk/; revision=32388
2010-03-25Set svn:executable property for some .py and .pl filesBill Meier1-0/+0
svn path=/trunk/; revision=32287