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:
parent
5e4379f5b5
commit
f399d135e0
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireshark - Network traffic analyzer
|
* Wireshark - Network traffic analyzer
|
||||||
* By Gerald Combs
|
* By Gerald Combs <gerald@wireshark.org>
|
||||||
* Copyright 1999 - 2012 Gerald Combs
|
* Copyright 1998 Gerald Combs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -20,10 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/proto.h>
|
#include <epan/proto.h>
|
||||||
#include <epan/dissectors/packet-giop.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:
|
* Local Variables:
|
||||||
* c-basic-offset: 4
|
* c-basic-offset: 4
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireshark - Network traffic analyzer
|
* Wireshark - Network traffic analyzer
|
||||||
* By Gerald Combs
|
* By Gerald Combs <gerald@wireshark.org>
|
||||||
* Copyright 1999 - 2012 Gerald Combs
|
* Copyright 1998 Gerald Combs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -20,10 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/proto.h>
|
#include <epan/proto.h>
|
||||||
#include <epan/dissectors/packet-giop.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:
|
* Local Variables:
|
||||||
* c-basic-offset: 4
|
* c-basic-offset: 4
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireshark - Network traffic analyzer
|
* Wireshark - Network traffic analyzer
|
||||||
* By Gerald Combs
|
* By Gerald Combs <gerald@wireshark.org>
|
||||||
* Copyright 1999 - 2012 Gerald Combs
|
* Copyright 1998 Gerald Combs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -20,10 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/proto.h>
|
#include <epan/proto.h>
|
||||||
#include <epan/dissectors/packet-giop.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:
|
* Local Variables:
|
||||||
* c-basic-offset: 4
|
* c-basic-offset: 4
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireshark - Network traffic analyzer
|
* Wireshark - Network traffic analyzer
|
||||||
* By Gerald Combs
|
* By Gerald Combs <gerald@wireshark.org>
|
||||||
* Copyright 1999 - 2012 Gerald Combs
|
* Copyright 1998 Gerald Combs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -20,10 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/proto.h>
|
#include <epan/proto.h>
|
||||||
#include <epan/dissectors/packet-giop.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:
|
* Local Variables:
|
||||||
* c-basic-offset: 4
|
* c-basic-offset: 4
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireshark - Network traffic analyzer
|
* Wireshark - Network traffic analyzer
|
||||||
* By Gerald Combs
|
* By Gerald Combs <gerald@wireshark.org>
|
||||||
* Copyright 1999 - 2012 Gerald Combs
|
* Copyright 1998 Gerald Combs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -20,10 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/proto.h>
|
#include <epan/proto.h>
|
||||||
#include <epan/dissectors/packet-giop.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:
|
* Local Variables:
|
||||||
* c-basic-offset: 4
|
* c-basic-offset: 4
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
# Description:
|
# Description:
|
||||||
#
|
#
|
||||||
# Omniidl Back-end which parses an IDL data structure provided by the frontend
|
# 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
|
# and generates packet-idl-xxx.[ch] for compiling as a dissector in Wireshark.
|
||||||
# Wireshark IP protocol anlayser.
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Strategy.
|
# Strategy.
|
||||||
|
@ -32,7 +31,7 @@
|
||||||
# "Struct" and "Union" nodes. Then store these nodes in lists.
|
# "Struct" and "Union" nodes. Then store these nodes in lists.
|
||||||
#
|
#
|
||||||
# Pass these lists (via an object ref) to the src code
|
# 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
|
# 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
|
ev.visitAST(tree) # go find some operations
|
||||||
|
|
||||||
# Grab name of main IDL file being compiled.
|
# Grab name of main IDL file being compiled.
|
||||||
#
|
#
|
||||||
# Assumption: Name is of the form abcdefg.xyz (eg: CosNaming.idl)
|
# Assumption: Name is of the form abcdefg.xyz (eg: CosNaming.idl)
|
||||||
|
|
||||||
fname = path.basename(tree.file()) # grab basename only, dont care about path
|
fname = path.basename(tree.file()) # grab basename only, dont care about path
|
||||||
|
|
|
@ -16,27 +16,14 @@
|
||||||
# Omniidl is part of the OmniOrb distribution, and is available at
|
# Omniidl is part of the OmniOrb distribution, and is available at
|
||||||
# http://omniorb.sourceforge.net
|
# http://omniorb.sourceforge.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
# Description:
|
# Description:
|
||||||
#
|
#
|
||||||
# Omniidl Back-end which parses an IDL list of "Operation" nodes
|
# Omniidl Back-end which parses an IDL list of "Operation" nodes
|
||||||
# passed from wireshark_be2.py and generates "C" code for compiling
|
# 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 ...)
|
# Strategy (sneaky but ...)
|
||||||
|
@ -2197,8 +2184,8 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) {
|
||||||
template_wireshark_copyright = """\
|
template_wireshark_copyright = """\
|
||||||
/*
|
/*
|
||||||
* Wireshark - Network traffic analyzer
|
* Wireshark - Network traffic analyzer
|
||||||
* By Gerald Combs
|
* By Gerald Combs <gerald@@wireshark.org>
|
||||||
* Copyright 1999 - 2012 Gerald Combs
|
* Copyright 1998 Gerald Combs
|
||||||
*/
|
*/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -2210,7 +2197,7 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) {
|
||||||
|
|
||||||
template_Modelines = """\
|
template_Modelines = """\
|
||||||
/*
|
/*
|
||||||
* Editor modelines
|
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
||||||
*
|
*
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* c-basic-offset: 4
|
* c-basic-offset: 4
|
||||||
|
@ -2226,10 +2213,7 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) {
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/proto.h>
|
#include <epan/proto.h>
|
||||||
#include <epan/dissectors/packet-giop.h>
|
#include <epan/dissectors/packet-giop.h>
|
||||||
|
|
Loading…
Reference in New Issue