summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2011-11-29 19:36:53 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2011-11-29 19:36:53 +0000
commit022a45e0d92f36e493016211e6705aa782d07bb2 (patch)
tree298e17cae0ea761fbda6b2d1c557fb48b98e162d /tools
parent557a841313ad254113984cdc58466ab668bfb9eb (diff)
downloadwireshark-022a45e0d92f36e493016211e6705aa782d07bb2.tar.gz
From c.David via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6527
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/wireshark_gen.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/wireshark_gen.py b/tools/wireshark_gen.py
index c3844aed63..e5ed281aac 100755
--- a/tools/wireshark_gen.py
+++ b/tools/wireshark_gen.py
@@ -1720,13 +1720,13 @@ void proto_register_giop_@dissector_name@(void) {
/* setup list of header fields */
-#if 0
static hf_register_info hf[] = {
+ /* field that indicates the currently ongoing request/reply exchange */
+ {&hf_operationrequest, {"Request_Operation","@protocol_name@.Request_Operation",FT_STRING,BASE_NONE,NULL,0x0,NULL,HFILL}},
/* no fields yet */
};
-#endif
/* setup protocol subtree array */
@@ -1738,9 +1738,8 @@ void proto_register_giop_@dissector_name@(void) {
proto_@dissector_name@ = proto_register_protocol(\"@description@\" , \"@protocol_name@\", \"giop-@dissector_name@\" );
-#if 0
proto_register_field_array(proto_@dissector_name@, hf, array_length(hf));
-#endif
+
proto_register_subtree_array(ett,array_length(ett));
}
@@ -1752,6 +1751,7 @@ void proto_register_giop_@dissector_name@(void) {
template_op_delegate_code = """\
if (strcmp(operation, @sname@_op) == 0
&& (!idlname || strcmp(idlname, \"@interface@\") == 0)) {
+ process_RequestOperation(); /* fill-up Request_Operation field & info column */
tree = start_dissecting(tvb, pinfo, ptree, offset);
decode_@sname@(tvb, pinfo, tree, offset, header, operation, stream_is_big_endian);
return TRUE;
@@ -2054,6 +2054,8 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) {
* Copyright 1999 - 2006 Gerald Combs
*/
+static int hf_operationrequest = -1;/* Request_Operation field */
+
"""
@@ -2145,6 +2147,11 @@ static gboolean dissect_@dissname@(tvbuff_t *tvb, packet_info *pinfo, proto_tree
gboolean stream_is_big_endian; /* big endianess */
proto_tree *tree _U_;
+#define process_RequestOperation(){ \\
+ proto_item *pi; \\
+ if(header->message_type == Reply){ col_append_fstr(pinfo->cinfo, COL_INFO, " op = %s",operation); }; /* fill-up info column */ \\
+ pi=proto_tree_add_string_format_value(ptree,hf_operationrequest,tvb,0,0,operation," %s",operation);PROTO_ITEM_SET_GENERATED(pi); /* fill-up the field */ \\
+ };
stream_is_big_endian = is_big_endian(header); /* get endianess */