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>
This commit is contained in:
Jaap Keuter 2020-04-28 20:39:32 +02:00 committed by Anders Broman
parent 5e4379f5b5
commit f399d135e0
7 changed files with 23 additions and 55 deletions

View File

@ -9,8 +9,8 @@
/*
* Wireshark - Network traffic analyzer
* By Gerald Combs
* Copyright 1999 - 2012 Gerald Combs
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*/
/*
@ -20,10 +20,7 @@
#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>
@ -509,7 +506,7 @@ void proto_reg_handoff_giop_coseventcomm(void)
}
/*
* Editor modelines
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local Variables:
* c-basic-offset: 4

View File

@ -9,8 +9,8 @@
/*
* Wireshark - Network traffic analyzer
* By Gerald Combs
* Copyright 1999 - 2012 Gerald Combs
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*/
/*
@ -20,10 +20,7 @@
#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>
@ -1065,7 +1062,7 @@ void proto_reg_handoff_giop_cosnaming(void)
}
/*
* Editor modelines
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local Variables:
* c-basic-offset: 4

View File

@ -9,8 +9,8 @@
/*
* Wireshark - Network traffic analyzer
* By Gerald Combs
* Copyright 1999 - 2012 Gerald Combs
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*/
/*
@ -20,10 +20,7 @@
#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>
@ -7904,7 +7901,7 @@ void proto_reg_handoff_giop_gias(void)
}
/*
* Editor modelines
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local Variables:
* c-basic-offset: 4

View File

@ -9,8 +9,8 @@
/*
* Wireshark - Network traffic analyzer
* By Gerald Combs
* Copyright 1999 - 2012 Gerald Combs
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*/
/*
@ -20,10 +20,7 @@
#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>
@ -65659,7 +65656,7 @@ void proto_reg_handoff_giop_parlay(void)
}
/*
* Editor modelines
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local Variables:
* c-basic-offset: 4

View File

@ -9,8 +9,8 @@
/*
* Wireshark - Network traffic analyzer
* By Gerald Combs
* Copyright 1999 - 2012 Gerald Combs
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*/
/*
@ -20,10 +20,7 @@
#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>
@ -5291,7 +5288,7 @@ void proto_reg_handoff_giop_tango(void)
}
/*
* Editor modelines
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local Variables:
* c-basic-offset: 4

View File

@ -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

View File

@ -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>