From Anand V. Narwani:
[obnox/wireshark/wip.git] / packet-dcerpc-nt.h
index 7e440282b489847768c9e36cd22915e2b78e3e64..09432e4b6c8482b62189fe6d66a631dcf3890164 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC over SMB packet disassembly
  * Copyright 2001, Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-nt.h,v 1.23 2002/05/09 02:44:22 tpot Exp $
+ * $Id: packet-dcerpc-nt.h,v 1.27 2002/06/28 01:23:26 tpot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -65,9 +65,6 @@ char *fake_unicode(tvbuff_t *tvb, int offset, int len);
 int prs_UNISTR2(tvbuff_t *tvb, int offset, packet_info *pinfo,
                proto_tree *tree, int flags, char **data, char *name);
 
-int prs_policy_hnd(tvbuff_t *tvb, int offset, packet_info *pinfo, 
-                  proto_tree *tree, const guint8 **data);
-
 /* Routines for handling deferral of referants in NDR */
 
 #define PARSE_SCALARS 1
@@ -80,7 +77,15 @@ guint32 prs_pop_ptr(GList **ptr_list, char *name);
 
 
 
-#define ALIGN_TO_4_BYTES       {if(offset&0x03)offset=(offset&0xfffffffc)+4;}
+#define ALIGN_TO_4_BYTES \
+       { dcerpc_info *xzdi; \
+         xzdi=pinfo->private_data; \
+         if(!xzdi->conformant_run) { \
+               if(offset&0x03) { \
+                       offset=(offset&0xfffffffc)+4; \
+               } \
+         } \
+       }
 
 int
 dissect_ndr_nt_UNICODE_STRING_str(tvbuff_t *tvb, int offset, 
@@ -135,12 +140,22 @@ dissect_ndr_nt_SID_AND_ATTRIBUTES(tvbuff_t *tvb, int offset,
  * Policy handle hashing
  */
 
+/* Store open and close packet numbers for a policy handle */
+
+void 
+dcerpc_smb_store_pol_pkts(e_ctx_hnd *policy_hnd, guint32 open_frame, 
+                         guint32 close_frame);
+
+/* Store a name with a policy handle */
+
+void 
+dcerpc_smb_store_pol_name(e_ctx_hnd *policy_hnd, char *name);
+
+/* Fetch details stored with a policy handle */
+
 gboolean 
-dcerpc_smb_fetch_pol(const guint8 *policy_hnd, char **name, 
+dcerpc_smb_fetch_pol(e_ctx_hnd *policy_hnd, char **name, 
                     guint32 *open_frame, guint32 *close_frame);
-void 
-dcerpc_smb_store_pol(const guint8 *policy_hnd, char *name,
-                    guint32 open_frame, guint32 close_frame);
 
 /* Check for unparsed data at the end of a frame */
 
@@ -163,7 +178,7 @@ dissect_doserror(tvbuff_t *tvb, gint offset, packet_info *pinfo,
 int
 dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
                      proto_tree *tree, char *drep, int hfindex, 
-                     e_ctx_hnd *pdata);
+                     e_ctx_hnd *pdata, gboolean is_open, gboolean is_close);
 
 int
 dissect_nt_GUID(tvbuff_t *tvb, int offset,
@@ -186,4 +201,12 @@ int dissect_ndr_uint8s(tvbuff_t *tvb, gint offset, packet_info *pinfo,
                        proto_tree *tree, char *drep, 
                        int hfindex, int length, guint8 **pdata);
 
+int dissect_dcerpc_uint16s(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                          proto_tree *tree, char *drep, 
+                          int hfindex, int length, guint16 **pdata);
+
+int dissect_ndr_uint16s(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+                       proto_tree *tree, char *drep, 
+                       int hfindex, int length, guint16 **pdata);
+
 #endif /* packet-dcerpc-nt.h */