Move SMB2 constants to a separate file
[Samba/fernandojvsilva.git] / librpc / gen_ndr / dcerpc.h
blob78834f6d28edc4fa465c7c3584118852c2cdfb31
1 /* header auto-generated by pidl */
3 #include <stdint.h>
5 #include "libcli/util/ntstatus.h"
7 #include "librpc/gen_ndr/misc.h"
8 #ifndef _HEADER_dcerpc
9 #define _HEADER_dcerpc
11 #define DCERPC_REQUEST_LENGTH ( 24 )
12 #define DCERPC_BIND_REASON_ASYNTAX ( 1 )
13 #define DCERPC_BIND_PROVIDER_REJECT ( 2 )
14 #define DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED ( 4 )
15 #define DCERPC_BIND_REASON_INVALID_AUTH_TYPE ( 8 )
16 #define DCERPC_RESPONSE_LENGTH ( 24 )
17 #define DCERPC_FAULT_OP_RNG_ERROR ( 0x1c010002 )
18 #define DCERPC_FAULT_UNK_IF ( 0x1c010003 )
19 #define DCERPC_FAULT_NDR ( 0x000006f7 )
20 #define DCERPC_FAULT_INVALID_TAG ( 0x1c000006 )
21 #define DCERPC_FAULT_CONTEXT_MISMATCH ( 0x1c00001a )
22 #define DCERPC_FAULT_OTHER ( 0x00000001 )
23 #define DCERPC_FAULT_ACCESS_DENIED ( 0x00000005 )
24 #define DCERPC_FAULT_CANT_PERFORM ( 0x000006d8 )
25 #define DCERPC_FAULT_TODO ( 0x00000042 )
26 #define DCERPC_AUTH_LEVEL_DEFAULT ( DCERPC_AUTH_LEVEL_CONNECT )
27 #define DCERPC_AUTH_TRAILER_LENGTH ( 8 )
28 #define DCERPC_PFC_FLAG_FIRST ( 0x01 )
29 #define DCERPC_PFC_FLAG_LAST ( 0x02 )
30 #define DCERPC_PFC_FLAG_PENDING_CANCEL ( 0x04 )
31 #define DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN ( DCERPC_PFC_FLAG_PENDING_CANCEL )
32 #define DCERPC_PFC_FLAG_CONC_MPX ( 0x10 )
33 #define DCERPC_PFC_FLAG_DID_NOT_EXECUTE ( 0x20 )
34 #define DCERPC_PFC_FLAG_MAYBE ( 0x40 )
35 #define DCERPC_PFC_FLAG_OBJECT_UUID ( 0x80 )
36 #define DCERPC_PFC_OFFSET ( 3 )
37 #define DCERPC_DREP_OFFSET ( 4 )
38 #define DCERPC_FRAG_LEN_OFFSET ( 8 )
39 #define DCERPC_AUTH_LEN_OFFSET ( 10 )
40 #define DCERPC_DREP_LE ( 0x10 )
41 struct dcerpc_ctx_list {
42 uint16_t context_id;
43 uint8_t num_transfer_syntaxes;
44 struct ndr_syntax_id abstract_syntax;
45 struct ndr_syntax_id *transfer_syntaxes;
48 struct dcerpc_bind {
49 uint16_t max_xmit_frag;
50 uint16_t max_recv_frag;
51 uint32_t assoc_group_id;
52 uint8_t num_contexts;
53 struct dcerpc_ctx_list *ctx_list;
54 DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
55 DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
58 struct dcerpc_empty {
59 char _empty_;
62 union dcerpc_object {
63 struct dcerpc_empty empty;/* [default] */
64 struct GUID object;/* [case(LIBNDR_FLAG_OBJECT_PRESENT)] */
65 }/* [nodiscriminant] */;
67 struct dcerpc_request {
68 uint32_t alloc_hint;
69 uint16_t context_id;
70 uint16_t opnum;
71 union dcerpc_object object;/* [switch_is(ndr->flags&LIBNDR_FLAG_OBJECT_PRESENT)] */
72 DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN8)] */
73 DATA_BLOB stub_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
76 struct dcerpc_ack_ctx {
77 uint16_t result;
78 uint16_t reason;
79 struct ndr_syntax_id syntax;
82 struct dcerpc_bind_ack {
83 uint16_t max_xmit_frag;
84 uint16_t max_recv_frag;
85 uint32_t assoc_group_id;
86 uint16_t secondary_address_size;/* [value(strlen(secondary_address)+1)] */
87 const char *secondary_address;/* [charset(DOS)] */
88 DATA_BLOB _pad1;/* [flag(LIBNDR_FLAG_ALIGN4)] */
89 uint8_t num_results;
90 struct dcerpc_ack_ctx *ctx_list;
91 DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
94 struct dcerpc_bind_nak_versions {
95 uint32_t num_versions;
96 uint32_t *versions;
99 union dcerpc_bind_nak_versions_ctr {
100 struct dcerpc_bind_nak_versions v;/* [case(DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED)] */
101 }/* [nodiscriminant] */;
103 struct dcerpc_bind_nak {
104 uint16_t reject_reason;
105 union dcerpc_bind_nak_versions_ctr versions;/* [switch_is(reject_reason)] */
108 struct dcerpc_response {
109 uint32_t alloc_hint;
110 uint16_t context_id;
111 uint8_t cancel_count;
112 DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN8)] */
113 DATA_BLOB stub_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
116 struct dcerpc_fault {
117 uint32_t alloc_hint;
118 uint16_t context_id;
119 uint8_t cancel_count;
120 uint32_t status;
121 DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_REMAINING)] */
124 enum dcerpc_AuthType
125 #ifndef USE_UINT_ENUMS
127 DCERPC_AUTH_TYPE_NONE=0,
128 DCERPC_AUTH_TYPE_KRB5_1=1,
129 DCERPC_AUTH_TYPE_SPNEGO=9,
130 DCERPC_AUTH_TYPE_NTLMSSP=10,
131 DCERPC_AUTH_TYPE_KRB5=16,
132 DCERPC_AUTH_TYPE_DPA=17,
133 DCERPC_AUTH_TYPE_MSN=18,
134 DCERPC_AUTH_TYPE_DIGEST=21,
135 DCERPC_AUTH_TYPE_SCHANNEL=68,
136 DCERPC_AUTH_TYPE_MSMQ=100
138 #else
139 { __donnot_use_enum_dcerpc_AuthType=0x7FFFFFFF}
140 #define DCERPC_AUTH_TYPE_NONE ( 0 )
141 #define DCERPC_AUTH_TYPE_KRB5_1 ( 1 )
142 #define DCERPC_AUTH_TYPE_SPNEGO ( 9 )
143 #define DCERPC_AUTH_TYPE_NTLMSSP ( 10 )
144 #define DCERPC_AUTH_TYPE_KRB5 ( 16 )
145 #define DCERPC_AUTH_TYPE_DPA ( 17 )
146 #define DCERPC_AUTH_TYPE_MSN ( 18 )
147 #define DCERPC_AUTH_TYPE_DIGEST ( 21 )
148 #define DCERPC_AUTH_TYPE_SCHANNEL ( 68 )
149 #define DCERPC_AUTH_TYPE_MSMQ ( 100 )
150 #endif
153 enum dcerpc_AuthLevel
154 #ifndef USE_UINT_ENUMS
156 DCERPC_AUTH_LEVEL_NONE=1,
157 DCERPC_AUTH_LEVEL_CONNECT=2,
158 DCERPC_AUTH_LEVEL_CALL=3,
159 DCERPC_AUTH_LEVEL_PACKET=4,
160 DCERPC_AUTH_LEVEL_INTEGRITY=5,
161 DCERPC_AUTH_LEVEL_PRIVACY=6
163 #else
164 { __donnot_use_enum_dcerpc_AuthLevel=0x7FFFFFFF}
165 #define DCERPC_AUTH_LEVEL_NONE ( 1 )
166 #define DCERPC_AUTH_LEVEL_CONNECT ( 2 )
167 #define DCERPC_AUTH_LEVEL_CALL ( 3 )
168 #define DCERPC_AUTH_LEVEL_PACKET ( 4 )
169 #define DCERPC_AUTH_LEVEL_INTEGRITY ( 5 )
170 #define DCERPC_AUTH_LEVEL_PRIVACY ( 6 )
171 #endif
174 struct dcerpc_auth {
175 enum dcerpc_AuthType auth_type;
176 enum dcerpc_AuthLevel auth_level;
177 uint8_t auth_pad_length;
178 uint8_t auth_reserved;
179 uint32_t auth_context_id;
180 DATA_BLOB credentials;/* [flag(LIBNDR_FLAG_REMAINING)] */
181 }/* [public] */;
183 struct dcerpc_auth3 {
184 uint32_t _pad;
185 DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
186 }/* [public] */;
188 struct dcerpc_orphaned {
189 uint32_t _pad;
190 DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
191 }/* [public] */;
193 struct dcerpc_co_cancel {
194 uint32_t _pad;
195 DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
196 }/* [public] */;
198 struct dcerpc_cl_cancel {
199 uint32_t version;
200 uint32_t id;
201 }/* [public] */;
203 struct dcerpc_cancel_ack {
204 uint32_t version;
205 uint32_t id;
206 uint32_t server_is_accepting;
207 }/* [public] */;
209 struct dcerpc_fack {
210 uint32_t version;
211 uint8_t _pad1;
212 uint16_t window_size;
213 uint32_t max_tdsu;
214 uint32_t max_frag_size;
215 uint16_t serial_no;
216 uint16_t selack_size;
217 uint32_t *selack;
218 }/* [public] */;
220 struct dcerpc_ack {
221 char _empty_;
222 }/* [public] */;
224 struct dcerpc_ping {
225 char _empty_;
226 }/* [public] */;
228 struct dcerpc_shutdown {
229 char _empty_;
230 }/* [public] */;
232 struct dcerpc_working {
233 char _empty_;
234 }/* [public] */;
236 enum dcerpc_pkt_type
237 #ifndef USE_UINT_ENUMS
239 DCERPC_PKT_REQUEST=0,
240 DCERPC_PKT_PING=1,
241 DCERPC_PKT_RESPONSE=2,
242 DCERPC_PKT_FAULT=3,
243 DCERPC_PKT_WORKING=4,
244 DCERPC_PKT_NOCALL=5,
245 DCERPC_PKT_REJECT=6,
246 DCERPC_PKT_ACK=7,
247 DCERPC_PKT_CL_CANCEL=8,
248 DCERPC_PKT_FACK=9,
249 DCERPC_PKT_CANCEL_ACK=10,
250 DCERPC_PKT_BIND=11,
251 DCERPC_PKT_BIND_ACK=12,
252 DCERPC_PKT_BIND_NAK=13,
253 DCERPC_PKT_ALTER=14,
254 DCERPC_PKT_ALTER_RESP=15,
255 DCERPC_PKT_AUTH3=16,
256 DCERPC_PKT_SHUTDOWN=17,
257 DCERPC_PKT_CO_CANCEL=18,
258 DCERPC_PKT_ORPHANED=19
260 #else
261 { __donnot_use_enum_dcerpc_pkt_type=0x7FFFFFFF}
262 #define DCERPC_PKT_REQUEST ( 0 )
263 #define DCERPC_PKT_PING ( 1 )
264 #define DCERPC_PKT_RESPONSE ( 2 )
265 #define DCERPC_PKT_FAULT ( 3 )
266 #define DCERPC_PKT_WORKING ( 4 )
267 #define DCERPC_PKT_NOCALL ( 5 )
268 #define DCERPC_PKT_REJECT ( 6 )
269 #define DCERPC_PKT_ACK ( 7 )
270 #define DCERPC_PKT_CL_CANCEL ( 8 )
271 #define DCERPC_PKT_FACK ( 9 )
272 #define DCERPC_PKT_CANCEL_ACK ( 10 )
273 #define DCERPC_PKT_BIND ( 11 )
274 #define DCERPC_PKT_BIND_ACK ( 12 )
275 #define DCERPC_PKT_BIND_NAK ( 13 )
276 #define DCERPC_PKT_ALTER ( 14 )
277 #define DCERPC_PKT_ALTER_RESP ( 15 )
278 #define DCERPC_PKT_AUTH3 ( 16 )
279 #define DCERPC_PKT_SHUTDOWN ( 17 )
280 #define DCERPC_PKT_CO_CANCEL ( 18 )
281 #define DCERPC_PKT_ORPHANED ( 19 )
282 #endif
285 union dcerpc_payload {
286 struct dcerpc_request request;/* [case(DCERPC_PKT_REQUEST)] */
287 struct dcerpc_ping ping;/* [case(DCERPC_PKT_PING)] */
288 struct dcerpc_response response;/* [case(DCERPC_PKT_RESPONSE)] */
289 struct dcerpc_fault fault;/* [case(DCERPC_PKT_FAULT)] */
290 struct dcerpc_working working;/* [case(DCERPC_PKT_WORKING)] */
291 struct dcerpc_fack nocall;/* [case(DCERPC_PKT_NOCALL)] */
292 struct dcerpc_fault reject;/* [case(DCERPC_PKT_REJECT)] */
293 struct dcerpc_ack ack;/* [case(DCERPC_PKT_ACK)] */
294 struct dcerpc_cl_cancel cl_cancel;/* [case(DCERPC_PKT_CL_CANCEL)] */
295 struct dcerpc_fack fack;/* [case(DCERPC_PKT_FACK)] */
296 struct dcerpc_cancel_ack cancel_ack;/* [case(DCERPC_PKT_CANCEL_ACK)] */
297 struct dcerpc_bind bind;/* [case(DCERPC_PKT_BIND)] */
298 struct dcerpc_bind_ack bind_ack;/* [case(DCERPC_PKT_BIND_ACK)] */
299 struct dcerpc_bind_nak bind_nak;/* [case(DCERPC_PKT_BIND_NAK)] */
300 struct dcerpc_bind alter;/* [case(DCERPC_PKT_ALTER)] */
301 struct dcerpc_bind_ack alter_resp;/* [case(DCERPC_PKT_ALTER_RESP)] */
302 struct dcerpc_shutdown shutdown;/* [case(DCERPC_PKT_SHUTDOWN)] */
303 struct dcerpc_co_cancel co_cancel;/* [case(DCERPC_PKT_CO_CANCEL)] */
304 struct dcerpc_orphaned orphaned;/* [case(DCERPC_PKT_ORPHANED)] */
305 struct dcerpc_auth3 auth3;/* [case(DCERPC_PKT_AUTH3)] */
306 }/* [nodiscriminant] */;
308 struct ncacn_packet {
309 uint8_t rpc_vers;
310 uint8_t rpc_vers_minor;
311 enum dcerpc_pkt_type ptype;
312 uint8_t pfc_flags;
313 uint8_t drep[4];
314 uint16_t frag_length;
315 uint16_t auth_length;
316 uint32_t call_id;
317 union dcerpc_payload u;/* [switch_is(ptype)] */
318 }/* [public] */;
320 struct ncadg_packet {
321 uint8_t rpc_vers;
322 uint8_t ptype;
323 uint8_t pfc_flags;
324 uint8_t ncadg_flags;
325 uint8_t drep[3];
326 uint8_t serial_high;
327 struct GUID object;
328 struct GUID iface;
329 struct GUID activity;
330 uint32_t server_boot;
331 uint32_t iface_version;
332 uint32_t seq_num;
333 uint16_t opnum;
334 uint16_t ihint;
335 uint16_t ahint;
336 uint16_t len;
337 uint16_t fragnum;
338 uint8_t auth_proto;
339 uint8_t serial_low;
340 union dcerpc_payload u;/* [switch_is(ptype)] */
341 }/* [public] */;
343 #endif /* _HEADER_dcerpc */