From d82c74d757383e94f745fef6b409b3da44ffb08d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 29 Oct 2001 21:13:13 +0000 Subject: From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integers without requiring compiler support for them, and updates to the Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC dissector to allow ONC RPC subdissectors to use it. svn path=/trunk/; revision=4099 --- packet-rpc.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'packet-rpc.c') diff --git a/packet-rpc.c b/packet-rpc.c index 381691edf5..3ed91188f7 100644 --- a/packet-rpc.c +++ b/packet-rpc.c @@ -2,7 +2,7 @@ * Routines for rpc dissection * Copyright 1999, Uwe Girlich * - * $Id: packet-rpc.c,v 1.73 2001/10/29 20:49:28 guy Exp $ + * $Id: packet-rpc.c,v 1.74 2001/10/29 21:13:08 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -456,19 +456,12 @@ int dissect_rpc_uint64(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int hfindex, int offset) { - guint32 value_low; - guint32 value_high; - - value_high = tvb_get_ntohl(tvb, offset + 0); - value_low = tvb_get_ntohl(tvb, offset + 4); + header_field_info *hfinfo; - if (tree) { - if (value_high) - proto_tree_add_text(tree, tvb, offset, 8, - "%s: 0x%x%08x", proto_registrar_get_name(hfindex), value_high, value_low); - else - proto_tree_add_uint(tree, hfindex, tvb, offset, 8, value_low); - } + hfinfo = proto_registrar_get_nth(hfindex); + g_assert(hfinfo->type == FT_UINT64); + if (tree) + proto_tree_add_item(tree, hfindex, tvb, offset, 8, FALSE); return offset + 8; } -- cgit v1.2.1