aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rpc.c
diff options
context:
space:
mode:
authorgirlich <girlich@f5534014-38df-0310-8fa8-9805f1628bb7>2000-03-09 12:09:53 +0000
committergirlich <girlich@f5534014-38df-0310-8fa8-9805f1628bb7>2000-03-09 12:09:53 +0000
commita479e26c54103a91fc31bd4ec9a5718e6ecbf49a (patch)
treef67ffe13b0d0eab34f9fce1a5f50f2a32800c474 /packet-rpc.c
parentac6bb8f33fb40f06b10171365112abfb44c75792 (diff)
New generic function dissect_rpc_list() for variable length RPC lists.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1705 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-rpc.c')
-rw-r--r--packet-rpc.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/packet-rpc.c b/packet-rpc.c
index 24aaa3c8e3..e1c72fceb1 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.26 2000/01/22 05:49:06 guy Exp $
+ * $Id: packet-rpc.c,v 1.27 2000/03/09 12:09:53 girlich Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -119,6 +119,7 @@ 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 int hf_rpc_value_follows = -1;
static gint ett_rpc = -1;
static gint ett_rpc_string = -1;
@@ -591,6 +592,30 @@ dissect_rpc_data(const u_char *pd, int offset, frame_data *fd,
}
+int
+dissect_rpc_list(const u_char *pd, int offset, frame_data *fd,
+ proto_tree *tree, dissect_function_t *rpc_list_dissector)
+{
+ guint32 value_follows;
+
+ while (1) {
+ if (!BYTES_ARE_IN_FRAME(offset,4)) break;
+ value_follows = EXTRACT_UINT(pd, offset+0);
+ proto_tree_add_item(tree,hf_rpc_value_follows,
+ offset+0, 4, value_follows);
+ offset += 4;
+ if (value_follows == 1) {
+ offset = rpc_list_dissector(pd, offset, fd, tree);
+ }
+ else {
+ break;
+ }
+ }
+
+ return offset;
+}
+
+
void
dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
@@ -1303,7 +1328,10 @@ proto_register_rpc(void)
NULL, 0, "Duplicate Call" }},
{ &hf_rpc_reply_dup, {
"Duplicate Reply", "rpc.reply.dup", FT_UINT32, BASE_DEC,
- NULL, 0, "Duplicate Reply" }}
+ NULL, 0, "Duplicate Reply" }},
+ { &hf_rpc_value_follows, {
+ "Value Follows", "rpc.value_follows", FT_BOOLEAN, BASE_NONE,
+ &yesno, 0, "Value Follows" }}
};
static gint *ett[] = {
&ett_rpc,