diff options
Diffstat (limited to 'packet-giop.c')
-rw-r--r-- | packet-giop.c | 81 |
1 files changed, 40 insertions, 41 deletions
diff --git a/packet-giop.c b/packet-giop.c index 7db6594b2c..376afe8cba 100644 --- a/packet-giop.c +++ b/packet-giop.c @@ -3,7 +3,7 @@ * * Laurent Deniel <deniel@worldnet.fr> * - * $Id: packet-giop.c,v 1.2 1999/03/23 03:14:37 gram Exp $ + * $Id: packet-giop.c,v 1.3 1999/07/07 22:51:43 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -258,27 +258,26 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree } if (tree) { - ti = proto_tree_add_item(tree, offset, + ti = proto_tree_add_text(tree, offset, GIOP_HEADER_SIZE + message_size, "General Inter-ORB Protocol"); - clnp_tree = proto_tree_new(); - proto_item_add_subtree(ti, clnp_tree, ETT_GIOP); - proto_tree_add_item(clnp_tree, offset, 4, + clnp_tree = proto_item_add_subtree(ti, ETT_GIOP); + proto_tree_add_text(clnp_tree, offset, 4, "Magic number: %s", GIOP_MAGIC); - proto_tree_add_item(clnp_tree, offset + 4, 2, + proto_tree_add_text(clnp_tree, offset + 4, 2, "Version: %d.%d", header.GIOP_version.major, header.GIOP_version.minor); switch(minor_version) { case 1 : - proto_tree_add_item(clnp_tree, offset + 6, 1, + proto_tree_add_text(clnp_tree, offset + 6, 1, "Flags: 0x%02x (%s%s)", header.flags, (big_endian) ? "little" : "big", (header.flags & 0x02) ? " fragment" : ""); break; case 0 : - proto_tree_add_item(clnp_tree, offset + 6, 1, + proto_tree_add_text(clnp_tree, offset + 6, 1, "Byte ordering: %s endian", (big_endian) ? "little" : "big"); break; @@ -286,7 +285,7 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree break; } /* minor_version */ - proto_tree_add_item(clnp_tree, offset + 7, 1, + proto_tree_add_text(clnp_tree, offset + 7, 1, "Message type: %s", (header.message_type == Request) ? "Request" : (header.message_type == Reply) ? "Reply" : @@ -297,7 +296,7 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree (header.message_type == MessageError) ? "MessageError" : (header.message_type == Fragment) ? "Fragment" : "?"); - proto_tree_add_item(clnp_tree, offset + 8, 4, + proto_tree_add_text(clnp_tree, offset + 8, 4, "Message size: %d", message_size); } /* tree */ @@ -332,12 +331,12 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree } if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(context_id), + proto_tree_add_text(clnp_tree, offset, sizeof(context_id), "Context id: %d", context_id); - proto_tree_add_item(clnp_tree, offset + sizeof(context_id), + proto_tree_add_text(clnp_tree, offset + sizeof(context_id), sizeof(sequence_length), "Sequence length: %d", sequence_length); - proto_tree_add_item(clnp_tree, + proto_tree_add_text(clnp_tree, offset + sizeof(context_id) + sizeof(sequence_length), sequence_length, @@ -367,13 +366,13 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree request_id = (big_endian)? pntohl(&request_1_1.request_id) : pletohl(&request_1_1.request_id); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(request_id), + proto_tree_add_text(clnp_tree, offset, sizeof(request_id), "Request id: %d", request_id); - proto_tree_add_item(clnp_tree, offset + sizeof(request_id), + proto_tree_add_text(clnp_tree, offset + sizeof(request_id), sizeof(request_1_1.response_expected), "Response expected: %d", response_expected); - proto_tree_add_item(clnp_tree, offset + sizeof(request_id) + + proto_tree_add_text(clnp_tree, offset + sizeof(request_id) + sizeof(request_1_1.response_expected), 3, "Reserved"); @@ -387,9 +386,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree request_id = (big_endian)? pntohl(&request_1_0.request_id) : pletohl(&request_1_0.request_id); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(request_id), + proto_tree_add_text(clnp_tree, offset, sizeof(request_id), "Request id: %d", request_id); - proto_tree_add_item(clnp_tree, offset + sizeof(request_id), + proto_tree_add_text(clnp_tree, offset + sizeof(request_id), sizeof(request_1_0.response_expected), "Response expected: %d", response_expected); @@ -412,9 +411,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree pntohl(&pd[offset]) : pletohl(&pd[offset]); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset, sizeof(sequence_length), "Object key length: %d", sequence_length); - proto_tree_add_item(clnp_tree, offset + sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset + sizeof(sequence_length), sequence_length, "Object key: %s", print_object_key(sequence_length, @@ -435,13 +434,13 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree } if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset, sizeof(sequence_length), "Operation length: %d", sequence_length); - proto_tree_add_item(clnp_tree, offset + sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset + sizeof(sequence_length), sequence_length, "Operation: %s", &pd[offset+sizeof(sequence_length)]); - proto_tree_add_item(clnp_tree, offset + + proto_tree_add_text(clnp_tree, offset + sizeof(sequence_length)+ sequence_length, message_size - END_OF_GIOP_MESSAGE - sizeof(sequence_length) - sequence_length, @@ -466,9 +465,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree pntohl(&reply.reply_status) : pletohl(&reply.reply_status); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(request_id), + proto_tree_add_text(clnp_tree, offset, sizeof(request_id), "Request id: %d", request_id); - proto_tree_add_item(clnp_tree, offset + sizeof(request_id), + proto_tree_add_text(clnp_tree, offset + sizeof(request_id), sizeof(reply_status), "Reply status: %s", reply_status == NO_EXCEPTION ? "no exception" : @@ -504,9 +503,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree } if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset, sizeof(sequence_length), "Exception length: %d", sequence_length); - proto_tree_add_item(clnp_tree, offset + sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset + sizeof(sequence_length), sequence_length, "Exception id: %s", &pd[offset+sizeof(sequence_length)]); @@ -522,9 +521,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree pletohl(&pd[offset+sizeof(minor_code_value)]); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(minor_code_value), + proto_tree_add_text(clnp_tree, offset, sizeof(minor_code_value), "Minor code value: %d", minor_code_value); - proto_tree_add_item(clnp_tree, offset + sizeof(minor_code_value), + proto_tree_add_text(clnp_tree, offset + sizeof(minor_code_value), sizeof(completion_status), "Completion Status: %d", completion_status); @@ -543,9 +542,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree } if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset, sizeof(sequence_length), "Exception length: %d", sequence_length); - proto_tree_add_item(clnp_tree, offset + sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset + sizeof(sequence_length), sequence_length, "Exception id: %s", &pd[offset+sizeof(sequence_length)]); @@ -563,9 +562,9 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree } if (tree && sequence_length) { - proto_tree_add_item(clnp_tree, offset, sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset, sizeof(sequence_length), "Exception member length: %d", sequence_length); - proto_tree_add_item(clnp_tree, offset + sizeof(sequence_length), + proto_tree_add_text(clnp_tree, offset + sizeof(sequence_length), sequence_length, "Exception member: %s", &pd[offset+sizeof(sequence_length)]); @@ -577,7 +576,7 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree else { if (tree) { - proto_tree_add_item(clnp_tree, offset, + proto_tree_add_text(clnp_tree, offset, message_size - END_OF_GIOP_MESSAGE, "Reply body: <not shown>"); } @@ -597,13 +596,13 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree pletohl(&pd[offset+sizeof(request_id)]); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(request_id), + proto_tree_add_text(clnp_tree, offset, sizeof(request_id), "Request id: %d", request_id); - proto_tree_add_item(clnp_tree, offset + sizeof(request_id), + proto_tree_add_text(clnp_tree, offset + sizeof(request_id), sizeof(sequence_length), "Object key length: %d", sequence_length); offset += sizeof(request_id) + sizeof(sequence_length); - proto_tree_add_item(clnp_tree, + proto_tree_add_text(clnp_tree, offset, sequence_length, "Object key: %s", @@ -626,14 +625,14 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree pntohl(&locate_rep.locate_status) : pletohl(&locate_rep.locate_status); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(request_id), + proto_tree_add_text(clnp_tree, offset, sizeof(request_id), "Request id: %d", request_id); - proto_tree_add_item(clnp_tree, offset + sizeof(request_id), + proto_tree_add_text(clnp_tree, offset + sizeof(request_id), sizeof(locate_status), "Locate status: %d", locate_status); offset += sizeof(request_id) + sizeof(locate_status); if (locate_status == OBJECT_FORWARD) { - proto_tree_add_item(clnp_tree, offset, + proto_tree_add_text(clnp_tree, offset, message_size - END_OF_GIOP_MESSAGE, "Locate reply body: <not shown>"); } @@ -655,7 +654,7 @@ void dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree pntohl(&pd[offset]) : pletohl(&pd[offset]); if (tree) { - proto_tree_add_item(clnp_tree, offset, sizeof(request_id), + proto_tree_add_text(clnp_tree, offset, sizeof(request_id), "Request id: %d", request_id); } |