1 #ifndef _packet_dcerpc_eparser_h
2 #define _packet_dcerpc_eparser_h
7 #define LIBNDR_FLAG_BIGENDIAN (1<<0)
8 #define LIBNDR_FLAG_NOALIGN (1<<1)
10 #define LIBNDR_FLAG_STR_ASCII (1<<2)
11 #define LIBNDR_FLAG_STR_LEN4 (1<<3)
12 #define LIBNDR_FLAG_STR_SIZE4 (1<<4)
13 #define LIBNDR_FLAG_STR_NOTERM (1<<5)
14 #define LIBNDR_FLAG_STR_NULLTERM (1<<6)
15 #define LIBNDR_FLAG_STR_SIZE2 (1<<7)
16 #define LIBNDR_STRING_FLAGS (0xFC)
18 #define LIBNDR_FLAG_REF_ALLOC (1<<10)
19 #define LIBNDR_FLAG_REMAINING (1<<11)
20 #define LIBNDR_FLAG_ALIGN2 (1<<12)
21 #define LIBNDR_FLAG_ALIGN4 (1<<13)
22 #define LIBNDR_FLAG_ALIGN8 (1<<14)
24 #define LIBNDR_ALIGN_FLAGS (LIBNDR_FLAG_ALIGN2|LIBNDR_FLAG_ALIGN4|LIBNDR_FLAG_ALIGN8)
26 #define LIBNDR_PRINT_ARRAY_HEX (1<<15)
27 #define LIBNDR_PRINT_SET_VALUES (1<<16)
29 /* used to force a section of IDL to be little-endian */
30 #define LIBNDR_FLAG_LITTLE_ENDIAN (1<<17)
32 /* Ethereal version of struct ndr_pull */
39 struct ndr_ofs_list *ofs_list;
43 struct ndr_pull_save {
45 struct ndr_pull_save *next;
48 /* offset lists are used to allow a push/pull function to find the
49 start of an encapsulating structure */
52 struct ndr_ofs_list *next;
56 typedef long long gNTTIME;
57 typedef long long gHYPER_T;
58 typedef guint32 gNTSTATUS;
59 typedef guint32 gWERROR;
67 #include "packet-dcerpc-proto.h"
69 /* Create a ndr_pull structure from data stored in a tvb at a given offset. */
71 struct e_ndr_pull *ndr_pull_init(tvbuff_t *tvb, int offset, packet_info *pinfo,
73 void ndr_pull_free(struct e_ndr_pull *ndr);
74 void ndr_pull_ptr(struct e_ndr_pull *ndr, proto_tree *tree, int hf, guint32 *ptr);
75 void ndr_pull_level(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gint16 *data);
76 void ndr_pull_NTSTATUS(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gNTSTATUS *data);
77 void ndr_pull_WERROR(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gWERROR *data);
78 void ndr_pull_uint8(struct e_ndr_pull *ndr, proto_tree *tree, int hf, guint8 *data);
79 void ndr_pull_uint16(struct e_ndr_pull *ndr, proto_tree *tree, int hf, guint16 *data);
80 void ndr_pull_uint32(struct e_ndr_pull *ndr, proto_tree *tree, int hf, guint32 *data);
81 void ndr_pull_advance(struct e_ndr_pull *ndr, int offset);
82 void ndr_pull_subcontext_flags_fn(struct e_ndr_pull *ndr,
83 proto_tree *tree, size_t sub_size,
84 void (*fn)(struct e_ndr_pull *,
85 proto_tree *tree, int ndr_flags));
86 void ndr_pull_subcontext_header(struct e_ndr_pull *ndr, proto_tree *tree,
87 size_t sub_size, struct e_ndr_pull *ndr2);
88 void ndr_pull_struct_start(struct e_ndr_pull *ndr);
89 void ndr_pull_struct_end(struct e_ndr_pull *ndr);
90 void ndr_pull_align(struct e_ndr_pull *ndr, int size);
91 void ndr_pull_NTTIME(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gNTTIME *data);
92 void ndr_pull_HYPER_T(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gHYPER_T *data);
93 void ndr_pull_int64(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gint64 *data);
94 void ndr_pull_uint64(struct e_ndr_pull *ndr, proto_tree *tree, int hf, guint64 *data);
95 void ndr_pull_DATA_BLOB(struct e_ndr_pull *ndr, proto_tree *tree, int hf, gDATA_BLOB *data);
96 void ndr_pull_string(struct e_ndr_pull *ndr, proto_tree *tree, int ndr_flags);
97 void ndr_pull_dom_sid2(struct e_ndr_pull *ndr, proto_tree *tree, int flags);
99 void ndr_pull_relative(struct e_ndr_pull *ndr, proto_tree *tree,
100 void (*fn)(struct e_ndr_pull *ndr,
101 proto_tree *tree, int ndr_flags));
103 int lsa_dissect_LSA_SECURITY_DESCRIPTOR(tvbuff_t tvb, int offset,
104 packet_info *pinfo, proto_tree *tree,
107 int lsa_dissect_LSA_SECURITY_DESCRIPTOR_data(tvbuff_t tvb, int offset,
108 packet_info *pinfo, proto_tree *tree,
111 int lsa_dissect_POLICY_DNS_DOMAIN_INFO(tvbuff_t tvb, int offset,
112 packet_info *pinfo, proto_tree *tree,
115 void ndr_pull_array_uint8(struct e_ndr_pull *ndr, proto_tree *tree, int hf, int ndr_flags, guint32 n);
116 void ndr_pull_array_uint16(struct e_ndr_pull *ndr, proto_tree *tree, int hf, int ndr_flags, guint32 n);
117 void ndr_pull_array_uint32(struct e_ndr_pull *ndr, proto_tree *tree, int hf, int ndr_flags, guint32 n);
119 void ndr_pull_array(struct e_ndr_pull *ndr, proto_tree *tree, int ndr_flags,
120 guint32 n, void (*fn)(struct e_ndr_pull *ndr,
121 proto_tree *tree, int ndr_flags));
123 proto_tree *get_subtree(proto_tree *tree, char *name, struct e_ndr_pull *ndr,
126 #endif /* _packet_dcerpc_eparser_h */