diff options
author | Uwe Girlich <Uwe.Girlich@philosys.de> | 2000-03-09 12:09:53 +0000 |
---|---|---|
committer | Uwe Girlich <Uwe.Girlich@philosys.de> | 2000-03-09 12:09:53 +0000 |
commit | 61901f1823e02acafc61234f372fea93f43a6a85 (patch) | |
tree | f67ffe13b0d0eab34f9fce1a5f50f2a32800c474 /packet-rpc.c | |
parent | 9434d6c0089ef983095f4bfb40e71dbab37c395c (diff) | |
download | wireshark-61901f1823e02acafc61234f372fea93f43a6a85.tar.gz wireshark-61901f1823e02acafc61234f372fea93f43a6a85.tar.bz2 wireshark-61901f1823e02acafc61234f372fea93f43a6a85.zip |
New generic function dissect_rpc_list() for variable length RPC lists.
svn path=/trunk/; revision=1705
Diffstat (limited to 'packet-rpc.c')
-rw-r--r-- | packet-rpc.c | 32 |
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, |