diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-07-27 17:11:44 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-07-27 17:11:44 +0000 |
commit | eb633dffce3eec8f1d8c9afb0a69a39033b8b9f5 (patch) | |
tree | ab8bb826873f79b6ab83916c25a0520d50e805b6 /packet-giop.c | |
parent | 672efa58e2ff2df571e2f74ddbdd11df68d87c07 (diff) | |
download | wireshark-eb633dffce3eec8f1d8c9afb0a69a39033b8b9f5.tar.gz wireshark-eb633dffce3eec8f1d8c9afb0a69a39033b8b9f5.tar.bz2 wireshark-eb633dffce3eec8f1d8c9afb0a69a39033b8b9f5.zip |
For packets with GIOP versions that are not supported by the dissector,
identify the packet as GIOP, but let the user know that the version is
not supported.
svn path=/trunk/; revision=2170
Diffstat (limited to 'packet-giop.c')
-rw-r--r-- | packet-giop.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/packet-giop.c b/packet-giop.c index d593917da2..abf9d284d7 100644 --- a/packet-giop.c +++ b/packet-giop.c @@ -3,7 +3,7 @@ * * Laurent Deniel <deniel@worldnet.fr> * - * $Id: packet-giop.c,v 1.14 2000/05/31 05:07:04 guy Exp $ + * $Id: packet-giop.c,v 1.15 2000/07/27 17:11:44 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -233,13 +233,30 @@ dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) return FALSE; } + if (check_col(fd, COL_PROTOCOL)) { + col_add_str(fd, COL_PROTOCOL, "GIOP"); + } + + if (header.GIOP_version.major != GIOP_MAJOR || ((minor_version = header.GIOP_version.minor) > GIOP_MINOR)) { /* Bad version number; should we note that and dissect the rest as data, or should we return FALSE on the theory that it might have been some other packet that happened to begin with "GIOP"? */ - dissect_data(pd, offset, fd, tree); + if (check_col(fd, COL_INFO)) { + col_add_fstr(fd, COL_INFO, "Version %d.%d", + header.GIOP_version.major, header.GIOP_version.minor); + } + if (tree) { + ti = proto_tree_add_item(tree, proto_giop, NullTVB, offset, + GIOP_HEADER_SIZE, FALSE); + clnp_tree = proto_item_add_subtree(ti, ett_giop); + proto_tree_add_text(clnp_tree, NullTVB, offset, GIOP_HEADER_SIZE, + "Version %d.%d not supported", + header.GIOP_version.major, header.GIOP_version.minor); + } + dissect_data(pd, offset + GIOP_HEADER_SIZE, fd, tree); return TRUE; } @@ -265,10 +282,6 @@ dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) else message_size = pletohl(&header.message_size); - if (check_col(fd, COL_PROTOCOL)) { - col_add_str(fd, COL_PROTOCOL, "GIOP"); - } - if (tree) { ti = proto_tree_add_item(tree, proto_giop, NullTVB, offset, GIOP_HEADER_SIZE + message_size, FALSE); |