/* packet-dcerpc-nt.h
* Routines for DCERPC over SMB packet disassembly
- * Copyright 2001, Tim Potter <tpot@samba.org>
+ * Copyright 2001-2003 Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc-nt.h,v 1.35 2003/01/24 05:32:53 tpot Exp $
+ * $Id: packet-dcerpc-nt.h,v 1.41 2003/02/08 09:41:44 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
*/
#ifndef __PACKET_DCERPC_NT_H
-#define __PACKET_DCEPRC_NT_H
+#define __PACKET_DCERPC_NT_H
/*
* ett_ value for Unicode strings.
*/
extern gint ett_nt_unicode_string;
-/* Parse some common RPC structures */
-
-char *fake_unicode(tvbuff_t *tvb, int offset, int len);
-
/* Routines for handling deferral of referants in NDR */
#define ALIGN_TO_4_BYTES \
}
int
-dissect_ndr_nt_UNICODE_STRING_str(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree,
- char *drep);
+dissect_ndr_counted_string_cb(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ char *drep, int hf_index,
+ dcerpc_callback_fnct_t *callback,
+ void *callback_args);
+
int
-dissect_ndr_nt_UNICODE_STRING(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *parent_tree,
- char *drep, int hf_index, int levels);
+dissect_ndr_counted_string_ptr(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ char *drep);
+
int
-dissect_ndr_nt_STRING_string (tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree,
- char *drep);
+dissect_ndr_counted_string(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ char *drep, int hf_index, int levels);
+
int
-dissect_ndr_nt_STRING (tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *parent_tree,
- char *drep, int hf_index, int levels);
+dissect_ndr_counted_byte_array(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ char *drep, int hf_index);
+
int
dissect_ndr_nt_acct_ctrl(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *parent_tree, char *drep);
proto_tree *tree, char *drep,
int hfindex, int length);
-/* Dissect an NT access mask */
+int dissect_ndr_str_pointer_item(tvbuff_t *tvb, gint offset,
+ packet_info *pinfo, proto_tree *tree,
+ char *drep, int type, char *text,
+ int hf_index, int levels);
-typedef void (nt_access_mask_fn_t)(tvbuff_t *tvb, gint offset,
- proto_tree *tree, guint32 access);
+/*
+ * Helper routines for dissecting NDR strings
+ */
-int
-dissect_nt_access_mask(tvbuff_t *tvb, gint offset, packet_info *pinfo,
- proto_tree *tree, char *drep, int hfindex,
- nt_access_mask_fn_t *specific_rights_fn);
+/* Number of levels to go up appending string to pointer item */
+#define CB_STR_ITEM_LEVELS(x) ((x) & 0xFFFF)
+#define CB_STR_COL_INFO 0x10000 /* Append string to COL_INFO */
+#define CB_STR_SAVE 0x20000 /* Save string to dcv->private_data */
+void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_,
+ proto_item *item, tvbuff_t *tvb,
+ int start_offset, int end_offset,
+ void *callback_args);
/* Initialise DCERPC over SMB */