Don't do fcn calls in arg of g_?to??(); Macro may very well eval args multiple times.
[obnox/wireshark/wip.git] / epan / dissectors / packet-dcerpc-nt.h
index 4c51fc25f9872107466f3780724ebc04651b21d9..9e977070ef6ad4b3521828d887460d1546200a43 100644 (file)
 #ifndef __PACKET_DCERPC_NT_H
 #define __PACKET_DCERPC_NT_H
 
-/*
- * ett_ value for Unicode strings.
- */
-extern gint ett_nt_unicode_string;
-
 /*
  * Platform ID values, used by several dissectors.
  */
@@ -40,7 +35,7 @@ extern const value_string platform_id_vals[];
 
 #define ALIGN_TO_8_BYTES \
        { dcerpc_info *xzdi; \
-         xzdi=pinfo->private_data; \
+         xzdi=(dcerpc_info *)pinfo->private_data; \
          if(!xzdi->conformant_run) { \
                if(offset&0x07) { \
                        offset=(offset&0xfffffff8)+8; \
@@ -49,7 +44,7 @@ extern const value_string platform_id_vals[];
        }
 #define ALIGN_TO_4_BYTES \
        { dcerpc_info *xzdi; \
-         xzdi=pinfo->private_data; \
+         xzdi=(dcerpc_info *)pinfo->private_data; \
          if(!xzdi->conformant_run) { \
                if(offset&0x03) { \
                        offset=(offset&0xfffffffc)+4; \
@@ -58,7 +53,7 @@ extern const value_string platform_id_vals[];
        }
 #define ALIGN_TO_2_BYTES \
        { dcerpc_info *xzdi; \
-         xzdi=pinfo->private_data; \
+         xzdi=(dcerpc_info *)pinfo->private_data; \
          if(!xzdi->conformant_run) { \
                if(offset&0x01) { \
                        offset=(offset&0xfffffffe)+2; \
@@ -70,7 +65,7 @@ extern const value_string platform_id_vals[];
 
 #define ALIGN_TO_4_OR_8_BYTES \
        { dcerpc_info *xzdi2; \
-         xzdi2=pinfo->private_data; \
+         xzdi2=(dcerpc_info *)pinfo->private_data; \
          if (xzdi2->call_data->flags & DCERPC_IS_NDR64) { \
            ALIGN_TO_8_BYTES; \
          } else { \
@@ -78,6 +73,31 @@ extern const value_string platform_id_vals[];
          } \
        }
 
+#define ALIGN_TO_3_BYTES ALIGN_TO_2_OR_4_BYTES
+
+#define ALIGN_TO_2_OR_4_BYTES \
+       { dcerpc_info *xzdi2; \
+         xzdi2=(dcerpc_info *)pinfo->private_data; \
+         if (xzdi2->call_data->flags & DCERPC_IS_NDR64) { \
+           ALIGN_TO_4_BYTES; \
+         } else { \
+           ALIGN_TO_2_BYTES; \
+         } \
+       }
+int
+dissect_ndr_datablob(tvbuff_t *tvb, int offset, packet_info *pinfo,
+                       proto_tree *tree, guint8 *drep, int hf_index,
+                       int use_remaining_space);
+
+int 
+dissect_null_term_string(tvbuff_t *tvb, int offset, packet_info *pinfo,
+                                                       proto_tree *tree, guint8 *drep, int hf_index,
+                                                       int levels);
+
+int 
+dissect_null_term_wstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
+                                                       proto_tree *tree, guint8 *drep, int hf_index,
+                                                       int levels);
 
 int
 dissect_ndr_counted_ascii_string_cb(tvbuff_t *tvb, int offset,
@@ -128,6 +148,11 @@ dissect_nt_GUID(tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
                        guint8 *drep);
 
+int
+dissect_ndr_lsa_String(tvbuff_t *tvb, int offset, packet_info *pinfo,
+                      proto_tree *parent_tree, guint8 *drep,
+                      guint32 param, int hfindex);
+
 int
 dissect_ndr_nt_NTTIME (tvbuff_t *tvb, int offset,
                        packet_info *pinfo, proto_tree *tree,
@@ -265,5 +290,8 @@ void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_,
 
 void dcerpc_smb_init(int proto_dcerpc);
 
+/* Used into packet-dcerpc-netlogon.c*/
+extern int hf_nt_cs_len;
+extern int hf_nt_cs_size;
 
 #endif /* packet-dcerpc-nt.h */