diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2020-04-28 20:39:32 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2020-05-06 03:49:52 +0000 |
commit | f399d135e0d1bd00d3ff8dc3ee052fe31866e3a2 (patch) | |
tree | 2b35bb2e8d80990fc139435ae3af89269c366f11 /tools | |
parent | 5e4379f5b5fbf40151d58e6aab28b072e39fde17 (diff) |
IDL: Clean up IDL based dissector generation
Clean up the generators and generated dissectors a bit by updating
the header, removing unwanted includes and completing the modelines
block.
Change-Id: I8ff80b05bb598c3fa5a5f91a24d5caba87eb712e
Reviewed-on: https://code.wireshark.org/review/37154
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/wireshark_be.py | 7 | ||||
-rwxr-xr-x | tools/wireshark_gen.py | 26 |
2 files changed, 8 insertions, 25 deletions
diff --git a/tools/wireshark_be.py b/tools/wireshark_be.py index b4445d72db..b5e0a5b464 100755 --- a/tools/wireshark_be.py +++ b/tools/wireshark_be.py @@ -22,8 +22,7 @@ # Description: # # Omniidl Back-end which parses an IDL data structure provided by the frontend -# and generates packet-idl-xxx.[ch] for compiling as a dissector in -# Wireshark IP protocol anlayser. +# and generates packet-idl-xxx.[ch] for compiling as a dissector in Wireshark. # # # Strategy. @@ -32,7 +31,7 @@ # "Struct" and "Union" nodes. Then store these nodes in lists. # # Pass these lists (via an object ref) to the src code -# generator (wireshark_gen) class and let it do the hard work ! +# generator (wireshark_gen) class and let it do the hard work ! # # # Don't forget structs can contain embedded structs etc .. so don't forget @@ -217,7 +216,7 @@ def run(tree, args): ev.visitAST(tree) # go find some operations # Grab name of main IDL file being compiled. - # + # # Assumption: Name is of the form abcdefg.xyz (eg: CosNaming.idl) fname = path.basename(tree.file()) # grab basename only, dont care about path diff --git a/tools/wireshark_gen.py b/tools/wireshark_gen.py index fc8b35681e..2c3870a105 100755 --- a/tools/wireshark_gen.py +++ b/tools/wireshark_gen.py @@ -16,27 +16,14 @@ # Omniidl is part of the OmniOrb distribution, and is available at # http://omniorb.sourceforge.net # -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# SPDX-License-Identifier: GPL-2.0-or-later # Description: # # Omniidl Back-end which parses an IDL list of "Operation" nodes # passed from wireshark_be2.py and generates "C" code for compiling -# as a plugin for the Wireshark IP Protocol Analyser. +# as a dissector for Wireshark. # # # Strategy (sneaky but ...) @@ -2197,8 +2184,8 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { template_wireshark_copyright = """\ /* * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1999 - 2012 Gerald Combs + * By Gerald Combs <gerald@@wireshark.org> + * Copyright 1998 Gerald Combs */ """ @@ -2210,7 +2197,7 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { template_Modelines = """\ /* - * Editor modelines + * Editor modelines - https://www.wireshark.org/tools/modelines.html * * Local Variables: * c-basic-offset: 4 @@ -2226,10 +2213,7 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { #include "config.h" -#include <gmodule.h> - #include <string.h> -#include <glib.h> #include <epan/packet.h> #include <epan/proto.h> #include <epan/dissectors/packet-giop.h> |