aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dcerpc-spoolss.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-02-07 08:56:12 +0000
committerGuy Harris <guy@alum.mit.edu>2003-02-07 08:56:12 +0000
commit579d05d1f3155a4193150ef7f5426e067c84ca9c (patch)
tree8dd469ee14d41ae2f3e23eb0fd2e238902d2b5a3 /packet-dcerpc-spoolss.c
parent09052b88d2c506d1518fc7cdb58e715809e749b5 (diff)
Fix a typo in the multiple-include protection in "packet-dcerpc-nt.h".
Rename "dissect_ndr_element_array()" to "dissect_ndr_character_array()", move it out of "packet-dcerpc-nt.c" to "packet-dcerpc.c", and have it use the standard DCE RPC array max count/offset/count fields rather than their own private versions of those fields. Give it an option to create a subtree, and an argument to specify the field to use for the actual data buffer, and export it. Move the routines for handling arrays of "char" and "wchar" as strings out of "packet-dcerpc-nt.c" to "packet-dcerpc.c". Add a routine to handle an array of "char" as an opaque blob of bytes. Use "dissect_ndr_character_array()" to dissect character strings in MAPI (the strings in question are ASCII, not Unicode), and use the routine to handle an array of "char" as an opaque blob of bytes to dissect encrypted data (again, it's bytes, not 16-bit quantities). Show them as encrypted data, not unknown data. Use "dissect_ndr_character_array()" to dissect a form name in "dissect_form_name()" in the SPOOLSS dissector. svn path=/trunk/; revision=7091
Diffstat (limited to 'packet-dcerpc-spoolss.c')
-rw-r--r--packet-dcerpc-spoolss.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/packet-dcerpc-spoolss.c b/packet-dcerpc-spoolss.c
index 2f1fac2120..d5d934e96b 100644
--- a/packet-dcerpc-spoolss.c
+++ b/packet-dcerpc-spoolss.c
@@ -2,7 +2,7 @@
* Routines for SMB \PIPE\spoolss packet disassembly
* Copyright 2001-2003, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc-spoolss.c,v 1.82 2003/02/07 06:04:28 tpot Exp $
+ * $Id: packet-dcerpc-spoolss.c,v 1.83 2003/02/07 08:56:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -4206,25 +4206,9 @@ static int dissect_FORM_CTR(tvbuff_t *tvb, int offset,
static int dissect_form_name(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, char *drep)
{
- extern int hf_nt_str_len;
- extern int hf_nt_str_off;
- extern int hf_nt_str_max_len;
- guint32 len;
-
- offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
- hf_nt_str_max_len, NULL);
-
- offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
- hf_nt_str_off, NULL);
-
- offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
- hf_nt_str_len, &len);
-
- offset = dissect_ndr_uint16s(
- tvb, offset, pinfo, tree, drep,
- hf_spoolss_form_name, len);
-
- return offset;
+ return dissect_ndr_character_array(tvb, offset, pinfo, tree, drep,
+ sizeof(guint16),
+ hf_spoolss_form_name, TRUE);
}