Added tap functionality to UDP
[obnox/wireshark/wip.git] / packet-dcerpc-nt.h
index e4fd80e4c07f4ea7502b937fdf24b5ffa86a737f..587df61184f8e61c6833070969cb69f2f0d3a1bb 100644 (file)
@@ -1,8 +1,8 @@
 /* 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 \
@@ -48,21 +44,27 @@ char *fake_unicode(tvbuff_t *tvb, int offset, int len);
        }
 
 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);
@@ -169,16 +171,24 @@ int dissect_ndr_uint16s(tvbuff_t *tvb, gint offset, packet_info *pinfo,
                        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 */