*
* $Id$
*
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
#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.
*/
#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; \
}
#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; \
}
#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; \
} \
}
+#define ALIGN_TO_5_BYTES ALIGN_TO_4_OR_8_BYTES
+
+#define ALIGN_TO_4_OR_8_BYTES \
+ { dcerpc_info *xzdi2; \
+ xzdi2=(dcerpc_info *)pinfo->private_data; \
+ if (xzdi2->call_data->flags & DCERPC_IS_NDR64) { \
+ ALIGN_TO_8_BYTES; \
+ } else { \
+ ALIGN_TO_4_BYTES; \
+ } \
+ }
+
+#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,
packet_info *pinfo, proto_tree *tree,
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,
/* Store a name with a policy handle */
void
-dcerpc_smb_store_pol_name(e_ctx_hnd *policy_hnd, packet_info *pinfo,
- char *name);
+dcerpc_store_polhnd_name(e_ctx_hnd *policy_hnd, packet_info *pinfo,
+ const char *name);
/* Fetch details stored with a policy handle */
gboolean
-dcerpc_smb_fetch_pol(e_ctx_hnd *policy_hnd, char **name,
+dcerpc_fetch_polhnd_data(e_ctx_hnd *policy_hnd, char **name, guint32 *type,
guint32 *open_frame, guint32 *close_frame,
guint32 cur_frame);
e_ctx_hnd *pdata, proto_item **pitem,
gboolean is_open, gboolean is_close);
+int
+PIDL_dissect_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+ proto_tree *tree, guint8 *drep, int hfindex,
+ guint32 param);
+
+int
+dissect_nt_guid_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
+ proto_tree *tree, guint8 *drep, int hfindex,
+ e_ctx_hnd *pdata, proto_item **pitem,
+ gboolean is_open, gboolean is_close);
+
int
dissect_nt_LUID(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
int dissect_ndr_str_pointer_item(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *tree,
- guint8 *drep, int type, char *text,
+ guint8 *drep, int type, const char *text,
int hf_index, int levels);
/*
/* 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 */
+#define CB_STR_SAVE 0x20000000 /* Save string to dcv->private_data */
+#define CB_STR_COL_INFO 0x10000000 /* Append string to COL_INFO */
void cb_wstr_postprocess(packet_info *pinfo, proto_tree *tree _U_,
proto_item *item, tvbuff_t *tvb,
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 */