Fix "display_unicode_string()" to get the length of the Unicode string,
[obnox/wireshark/wip.git] / packet-dcerpc.h
index 481897790fdfd44b2e4287a0dd4d4e9f15b4221b..5bff1fae325b94b2d91afcd7c4842bac80417148 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-dcerpc.h
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  *
- * $Id: packet-dcerpc.h,v 1.8 2002/01/23 05:37:38 guy Exp $
+ * $Id: packet-dcerpc.h,v 1.16 2002/05/23 12:23:29 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -107,6 +107,9 @@ int dissect_dcerpc_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
 int dissect_dcerpc_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
                            proto_tree *tree, char *drep, 
                            int hfindex, guint32 *pdata);
+int dissect_dcerpc_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                           proto_tree *tree, char *drep, 
+                           int hfindex, unsigned char *pdata);
 
 
 /*
@@ -121,6 +124,9 @@ int dissect_ndr_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
 int dissect_ndr_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
                         proto_tree *tree, char *drep, 
                         int hfindex, guint32 *pdata);
+int dissect_ndr_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                        proto_tree *tree, char *drep, 
+                        int hfindex, unsigned char *pdata);
 int dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo,
                         proto_tree *tree, char *drep, 
                         int hfindex, e_uuid_t *pdata);
@@ -131,6 +137,26 @@ int dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo,
 
 typedef int (dcerpc_dissect_fnct_t)(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *drep);
 
+#define NDR_POINTER_REF                1
+#define NDR_POINTER_UNIQUE     2
+#define NDR_POINTER_PTR                3
+       
+int dissect_ndr_pointer (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                        proto_tree *tree, char *drep, 
+                        dcerpc_dissect_fnct_t *fnct, int type, char *text, int hf_index, int levels);
+
+/* dissect a NDR unidimensional conformant array */
+int dissect_ndr_ucarray(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                        proto_tree *tree, char *drep, 
+                        dcerpc_dissect_fnct_t *fnct);
+
+/* dissect a NDR unidimensional conformant and varying array */
+int dissect_ndr_ucvarray(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                        proto_tree *tree, char *drep, 
+                        dcerpc_dissect_fnct_t *fnct);
+
+
+
 typedef struct _dcerpc_sub_dissector {
     guint16 num;
     gchar   *name;
@@ -162,8 +188,9 @@ typedef struct _dcerpc_call_value {
     e_uuid_t uuid;
     guint16 ver;
     guint16 opnum;
-    gint32 req_frame;
-    gint32 rep_frame;
+    guint32 req_frame;
+    guint32 rep_frame;
+    guint32 max_ptr;
     void *private_data;
 } dcerpc_call_value;
 
@@ -171,7 +198,19 @@ typedef struct _dcerpc_info {
        conversation_t *conv;   /* Which TCP stream we are in */
        guint32 call_id;        /* Context id for this call */
        guint16 smb_fid;        /* FID for DCERPC over SMB */
+       gboolean request;
+       gboolean conformant_run;
+       gint32 conformant_eaten; /* how many bytes did the conformant run eat?*/
+       guint32 array_max_count;        /* max_count for conformant arrays */
+       guint32 array_max_count_offset; 
+       guint32 array_offset;
+       guint32 array_offset_offset;
+       guint32 array_actual_count;     
+       guint32 array_actual_count_offset;      
+       int hf_index;
+       int levels;                    /* number of levels upwards in the tree to append text*/
        dcerpc_call_value *call_data;
+       void *private_data;
 } dcerpc_info;
 
 #endif /* packet-dcerpc.h */