diff options
author | Uwe Girlich <Uwe.Girlich@philosys.de> | 1999-12-14 11:43:59 +0000 |
---|---|---|
committer | Uwe Girlich <Uwe.Girlich@philosys.de> | 1999-12-14 11:43:59 +0000 |
commit | aa0c302ab25f72ea04764b10ac317b371f4c9d0b (patch) | |
tree | 87f1eb838befc5f0a77cd0f453c5f5436796852d /packet-rpc.c | |
parent | 6b71ec439558d36e35b8236e57d60f75e27597af (diff) | |
download | wireshark-aa0c302ab25f72ea04764b10ac317b371f4c9d0b.tar.gz wireshark-aa0c302ab25f72ea04764b10ac317b371f4c9d0b.tar.bz2 wireshark-aa0c302ab25f72ea04764b10ac317b371f4c9d0b.zip |
New function dissect_rpc_bool() for generic boolean value parsing.
Duplicate transactions can be found with the filter rpc.dup or more specific
rpc.call.dup and rpc.reply.dup.
svn path=/trunk/; revision=1328
Diffstat (limited to 'packet-rpc.c')
-rw-r--r-- | packet-rpc.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/packet-rpc.c b/packet-rpc.c index 9e318bd10f..80b2495afe 100644 --- a/packet-rpc.c +++ b/packet-rpc.c @@ -2,7 +2,7 @@ * Routines for rpc dissection * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de> * - * $Id: packet-rpc.c,v 1.23 1999/12/13 21:04:50 gram Exp $ + * $Id: packet-rpc.c,v 1.24 1999/12/14 11:43:59 girlich Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -116,6 +116,9 @@ static int hf_rpc_state_accept = -1; static int hf_rpc_state_reply = -1; static int hf_rpc_state_reject = -1; static int hf_rpc_state_auth = -1; +static int hf_rpc_dup = -1; +static int hf_rpc_call_dup = -1; +static int hf_rpc_reply_dup = -1; static gint ett_rpc = -1; static gint ett_rpc_string = -1; @@ -342,6 +345,22 @@ rpc_roundup(unsigned int a) int +dissect_rpc_bool(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, +int hfindex) +{ + guint32 value; + + if (!BYTES_ARE_IN_FRAME(offset,4)) return offset; + value = EXTRACT_UINT(pd, offset+0); + if (tree) + proto_tree_add_item(tree, hfindex, offset, 4, value); + offset += 4; + + return offset; +} + + +int dissect_rpc_uint32(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, char* name, char* type) { @@ -963,6 +982,12 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree) /* duplicate request */ if (check_col(fd, COL_INFO)) { col_append_fstr(fd, COL_INFO, " dup XID 0x%x", xid); + if (rpc_tree) { + proto_tree_add_item_hidden(rpc_tree, + hf_rpc_dup, 0,0, xid); + proto_tree_add_item_hidden(rpc_tree, + hf_rpc_call_dup, 0,0, xid); + } } } else { @@ -1050,6 +1075,12 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (rpc_call->replies>1) { if (check_col(fd, COL_INFO)) { col_append_fstr(fd, COL_INFO, " dup XID 0x%x", xid); + if (rpc_tree) { + proto_tree_add_item_hidden(rpc_tree, + hf_rpc_dup, 0,0, xid); + proto_tree_add_item_hidden(rpc_tree, + hf_rpc_reply_dup, 0,0, xid); + } } } @@ -1253,6 +1284,15 @@ proto_register_rpc(void) { &hf_rpc_auth_machinename, { "Machine Name", "rpc.auth.machinename", FT_STRING, BASE_DEC, NULL, 0, "Machine Name" }}, + { &hf_rpc_dup, { + "Duplicate Transaction", "rpc.dup", FT_UINT32, BASE_DEC, + NULL, 0, "Duplicate Transaction" }}, + { &hf_rpc_call_dup, { + "Duplicate Call", "rpc.call.dup", FT_UINT32, BASE_DEC, + NULL, 0, "Duplicate Call" }}, + { &hf_rpc_reply_dup, { + "Duplicate Reply", "rpc.reply.dup", FT_UINT32, BASE_DEC, + NULL, 0, "Duplicate Reply" }} }; static gint *ett[] = { &ett_rpc, |