diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2002-09-03 08:39:16 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2002-09-03 08:39:16 +0000 |
commit | 957f38e57c1266f9ca226bd41bec145dcff92931 (patch) | |
tree | c15503046faea3e864eacee8dbd987bcd21f284f /packet-dcerpc-ndr.c | |
parent | 46ac8aa4bd52836cae9ab0d5130c4f1e2ddbde83 (diff) |
From Ulf Lamping, support for ieee float and double types in the dcerpc
dissectors.
svn path=/trunk/; revision=6170
Diffstat (limited to 'packet-dcerpc-ndr.c')
-rw-r--r-- | packet-dcerpc-ndr.c | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/packet-dcerpc-ndr.c b/packet-dcerpc-ndr.c index dcd91051fa..80bb38031f 100644 --- a/packet-dcerpc-ndr.c +++ b/packet-dcerpc-ndr.c @@ -2,7 +2,7 @@ * Routines for DCERPC NDR dissection * Copyright 2001, Todd Sabin <tas@webspan.net> * - * $Id: packet-dcerpc-ndr.c,v 1.8 2002/08/28 21:00:09 jmayer Exp $ + * $Id: packet-dcerpc-ndr.c,v 1.9 2002/09/03 08:39:16 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -121,6 +121,51 @@ dissect_ndr_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo, tree, drep, hfindex, pdata); } + +int +dissect_ndr_float(tvbuff_t *tvb, gint offset, packet_info *pinfo, + proto_tree *tree, char *drep, + int hfindex, gfloat *pdata) +{ + dcerpc_info *di; + + + di=pinfo->private_data; + if(di->conformant_run){ + /* just a run to handle conformant arrays, no scalars to dissect */ + return offset; + } + + if (offset % 4) { + offset += 4 - (offset % 4); + } + return dissect_dcerpc_float(tvb, offset, pinfo, + tree, drep, hfindex, pdata); +} + + +int +dissect_ndr_double(tvbuff_t *tvb, gint offset, packet_info *pinfo, + proto_tree *tree, char *drep, + int hfindex, gdouble *pdata) +{ + dcerpc_info *di; + + + di=pinfo->private_data; + if(di->conformant_run){ + /* just a run to handle conformant arrays, no scalars to dissect */ + return offset; + } + + if (offset % 8) { + offset += 8 - (offset % 8); + } + return dissect_dcerpc_double(tvb, offset, pinfo, + tree, drep, hfindex, pdata); +} + + int dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, char *drep, |