diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-09-03 07:11:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-09-03 07:11:13 +0000 |
commit | 28c86073ec5d8cbbcc570e8cc2295482d6b06d5e (patch) | |
tree | 61a2aeeff6a135eb9f232280cb521f7c77244e05 | |
parent | 50a0e0a8345b3cf424ffab7d8330e7d8c4519db1 (diff) |
Use "rpc_item", rather than "rpc_tree", as the argument to
"proto_item_append_text()" (they have the same value, and the same
underlying type, but it's cleaner).
Even if there already is a conversation when we're dissecting a call,
make the conversation dissector for the conversation the RPC dissector -
the conversation might've been created by the TCP dissector, or by us in
order to do fragment reassembly.
svn path=/trunk/; revision=8354
-rw-r--r-- | packet-rpc.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/packet-rpc.c b/packet-rpc.c index 6928c77067..219923ae29 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.136 2003/08/25 10:17:38 sahlberg Exp $ + * $Id: packet-rpc.c,v 1.137 2003/09/03 07:11:13 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1818,7 +1818,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (rpc_tree) { proto_tree_add_uint(rpc_tree, hf_rpc_msgtype, tvb, offset+4, 4, msg_type); - proto_item_append_text(rpc_tree, ", Type:%s XID:0x%08x", msg_type_name, xid); + proto_item_append_text(rpc_item, ", Type:%s XID:0x%08x", msg_type_name, xid); } offset += 8; @@ -1991,14 +1991,13 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, &null_address, pinfo->ptype, pinfo->srcport, pinfo->destport, 0); } - - /* Make the dissector for this conversation the non-heuristic - RPC dissector. */ - conversation_set_dissector(conversation, - (pinfo->ptype == PT_TCP) ? rpc_tcp_handle : rpc_handle); - } + /* Make the dissector for this conversation the non-heuristic + RPC dissector. */ + conversation_set_dissector(conversation, + (pinfo->ptype == PT_TCP) ? rpc_tcp_handle : rpc_handle); + /* prepare the key data */ rpc_call_key.xid = xid; rpc_call_key.conversation = conversation; @@ -2772,6 +2771,16 @@ dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo, * more data, as that's too likely to cause * us to misidentify this as valid. * + * XXX - this means that we won't + * recognize the first fragment of a + * multi-fragment RPC operation unless + * we've already identified this + * conversation as being an RPC + * conversation (and thus aren't running + * heuristically) - that would be a problem + * if, for example, the first segment were + * the beginning of a large NFS WRITE. + * * If this isn't a heuristic dissector, * we've already identified this conversation * as containing data for this protocol, as we |