1f3ad37d9bf5aa6c544a2592edab46828fd639e2
[amitay/samba.git] / librpc / gen_ndr / nbt.h
1 /* header auto-generated by pidl */
2
3 #include <stdint.h>
4
5 #include "librpc/gen_ndr/misc.h"
6 #include "librpc/gen_ndr/security.h"
7 #include "librpc/gen_ndr/svcctl.h"
8 #include "librpc/gen_ndr/samr.h"
9 #ifndef _HEADER_nbt
10 #define _HEADER_nbt
11
12 #define NBT_NAME_SERVICE_PORT   ( 137 )
13 #define NBT_DGRAM_SERVICE_PORT  ( 138 )
14 #define NBT_MAILSLOT_NETLOGON   ( "\\MAILSLOT\\NET\\NETLOGON" )
15 #define NBT_MAILSLOT_NTLOGON    ( "\\MAILSLOT\\NET\\NTLOGON" )
16 #define NBT_MAILSLOT_GETDC      ( "\\MAILSLOT\\NET\\GETDC" )
17 #define NBT_MAILSLOT_BROWSE     ( "\\MAILSLOT\\BROWSE" )
18 #define DGRAM_SMB       ( 0xff534d42 )
19 /* bitmap nbt_operation */
20 #define NBT_RCODE ( 0x000F )
21 #define NBT_FLAG_BROADCAST ( 0x0010 )
22 #define NBT_FLAG_RECURSION_AVAIL ( 0x0080 )
23 #define NBT_FLAG_RECURSION_DESIRED ( 0x0100 )
24 #define NBT_FLAG_TRUNCATION ( 0x0200 )
25 #define NBT_FLAG_AUTHORITIVE ( 0x0400 )
26 #define NBT_OPCODE ( 0x7800 )
27 #define NBT_FLAG_REPLY ( 0x8000 )
28
29 enum nbt_opcode
30 #ifndef USE_UINT_ENUMS
31  {
32         NBT_OPCODE_QUERY=(0x0<<11),
33         NBT_OPCODE_REGISTER=(0x5<<11),
34         NBT_OPCODE_RELEASE=(0x6<<11),
35         NBT_OPCODE_WACK=(0x7<<11),
36         NBT_OPCODE_REFRESH=(0x8<<11),
37         NBT_OPCODE_REFRESH2=(0x9<<11),
38         NBT_OPCODE_MULTI_HOME_REG=(0xf<<11)
39 }
40 #else
41  { __donnot_use_enum_nbt_opcode=0x7FFFFFFF}
42 #define NBT_OPCODE_QUERY ( (0x0<<11) )
43 #define NBT_OPCODE_REGISTER ( (0x5<<11) )
44 #define NBT_OPCODE_RELEASE ( (0x6<<11) )
45 #define NBT_OPCODE_WACK ( (0x7<<11) )
46 #define NBT_OPCODE_REFRESH ( (0x8<<11) )
47 #define NBT_OPCODE_REFRESH2 ( (0x9<<11) )
48 #define NBT_OPCODE_MULTI_HOME_REG ( (0xf<<11) )
49 #endif
50 ;
51
52 enum nbt_rcode
53 #ifndef USE_UINT_ENUMS
54  {
55         NBT_RCODE_OK=0x0,
56         NBT_RCODE_FMT=0x1,
57         NBT_RCODE_SVR=0x2,
58         NBT_RCODE_NAM=0x3,
59         NBT_RCODE_IMP=0x4,
60         NBT_RCODE_RFS=0x5,
61         NBT_RCODE_ACT=0x6,
62         NBT_RCODE_CFT=0x7
63 }
64 #else
65  { __donnot_use_enum_nbt_rcode=0x7FFFFFFF}
66 #define NBT_RCODE_OK ( 0x0 )
67 #define NBT_RCODE_FMT ( 0x1 )
68 #define NBT_RCODE_SVR ( 0x2 )
69 #define NBT_RCODE_NAM ( 0x3 )
70 #define NBT_RCODE_IMP ( 0x4 )
71 #define NBT_RCODE_RFS ( 0x5 )
72 #define NBT_RCODE_ACT ( 0x6 )
73 #define NBT_RCODE_CFT ( 0x7 )
74 #endif
75 ;
76
77 enum nbt_name_type
78 #ifndef USE_UINT_ENUMS
79  {
80         NBT_NAME_CLIENT=0x00,
81         NBT_NAME_MS=0x01,
82         NBT_NAME_USER=0x03,
83         NBT_NAME_SERVER=0x20,
84         NBT_NAME_PDC=0x1B,
85         NBT_NAME_LOGON=0x1C,
86         NBT_NAME_MASTER=0x1D,
87         NBT_NAME_BROWSER=0x1E
88 }
89 #else
90  { __donnot_use_enum_nbt_name_type=0x7FFFFFFF}
91 #define NBT_NAME_CLIENT ( 0x00 )
92 #define NBT_NAME_MS ( 0x01 )
93 #define NBT_NAME_USER ( 0x03 )
94 #define NBT_NAME_SERVER ( 0x20 )
95 #define NBT_NAME_PDC ( 0x1B )
96 #define NBT_NAME_LOGON ( 0x1C )
97 #define NBT_NAME_MASTER ( 0x1D )
98 #define NBT_NAME_BROWSER ( 0x1E )
99 #endif
100 ;
101
102 struct nbt_name {
103         const char * name;
104         const char * scope;
105         enum nbt_name_type type;
106 }/* [nopull,public,nopush] */;
107
108 enum nbt_qclass
109 #ifndef USE_UINT_ENUMS
110  {
111         NBT_QCLASS_IP=0x01
112 }
113 #else
114  { __donnot_use_enum_nbt_qclass=0x7FFFFFFF}
115 #define NBT_QCLASS_IP ( 0x01 )
116 #endif
117 ;
118
119 enum nbt_qtype
120 #ifndef USE_UINT_ENUMS
121  {
122         NBT_QTYPE_ADDRESS=0x0001,
123         NBT_QTYPE_NAMESERVICE=0x0002,
124         NBT_QTYPE_NULL=0x000A,
125         NBT_QTYPE_NETBIOS=0x0020,
126         NBT_QTYPE_STATUS=0x0021
127 }
128 #else
129  { __donnot_use_enum_nbt_qtype=0x7FFFFFFF}
130 #define NBT_QTYPE_ADDRESS ( 0x0001 )
131 #define NBT_QTYPE_NAMESERVICE ( 0x0002 )
132 #define NBT_QTYPE_NULL ( 0x000A )
133 #define NBT_QTYPE_NETBIOS ( 0x0020 )
134 #define NBT_QTYPE_STATUS ( 0x0021 )
135 #endif
136 ;
137
138 struct nbt_name_question {
139         struct nbt_name name;
140         enum nbt_qtype question_type;
141         enum nbt_qclass question_class;
142 };
143
144 enum nbt_node_type
145 #ifndef USE_UINT_ENUMS
146  {
147         NBT_NODE_B=0x0000,
148         NBT_NODE_P=0x2000,
149         NBT_NODE_M=0x4000,
150         NBT_NODE_H=0x6000
151 }
152 #else
153  { __donnot_use_enum_nbt_node_type=0x7FFFFFFF}
154 #define NBT_NODE_B ( 0x0000 )
155 #define NBT_NODE_P ( 0x2000 )
156 #define NBT_NODE_M ( 0x4000 )
157 #define NBT_NODE_H ( 0x6000 )
158 #endif
159 ;
160
161 /* bitmap nb_flags */
162 #define NBT_NM_PERMANENT ( 0x0200 )
163 #define NBT_NM_ACTIVE ( 0x0400 )
164 #define NBT_NM_CONFLICT ( 0x0800 )
165 #define NBT_NM_DEREGISTER ( 0x1000 )
166 #define NBT_NM_OWNER_TYPE ( 0x6000 )
167 #define NBT_NM_GROUP ( 0x8000 )
168
169 struct nbt_rdata_address {
170         uint16_t nb_flags;
171         const char * ipaddr;
172 };
173
174 struct nbt_rdata_netbios {
175         uint16_t length;
176         struct nbt_rdata_address *addresses;
177 };
178
179 struct nbt_statistics {
180         uint8_t unit_id[6];
181         uint8_t jumpers;
182         uint8_t test_result;
183         uint16_t version_number;
184         uint16_t period_of_statistics;
185         uint16_t number_of_crcs;
186         uint16_t number_alignment_errors;
187         uint16_t number_of_collisions;
188         uint16_t number_send_aborts;
189         uint32_t number_good_sends;
190         uint32_t number_good_receives;
191         uint16_t number_retransmits;
192         uint16_t number_no_resource_conditions;
193         uint16_t number_free_command_blocks;
194         uint16_t total_number_command_blocks;
195         uint16_t max_total_number_command_blocks;
196         uint16_t number_pending_sessions;
197         uint16_t max_number_pending_sessions;
198         uint16_t max_total_sessions_possible;
199         uint16_t session_data_packet_size;
200 };
201
202 struct nbt_status_name {
203         const char *name;/* [charset(DOS)] */
204         enum nbt_name_type type;
205         uint16_t nb_flags;
206 };
207
208 struct nbt_rdata_status {
209         uint16_t length;/* [value(num_names*18+47)] */
210         uint8_t num_names;
211         struct nbt_status_name *names;
212         struct nbt_statistics statistics;
213 };
214
215 struct nbt_rdata_data {
216         uint16_t length;
217         uint8_t *data;
218 };
219
220 union nbt_rdata {
221         struct nbt_rdata_netbios netbios;/* [case(NBT_QTYPE_NETBIOS)] */
222         struct nbt_rdata_status status;/* [case(NBT_QTYPE_STATUS)] */
223         struct nbt_rdata_data data;/* [default] */
224 }/* [nodiscriminant,public] */;
225
226 struct nbt_res_rec {
227         struct nbt_name name;
228         enum nbt_qtype rr_type;
229         enum nbt_qclass rr_class;
230         uint32_t ttl;
231         union nbt_rdata rdata;/* [switch_is(rr_type)] */
232 }/* [nopush,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
233
234 struct nbt_name_packet {
235         uint16_t name_trn_id;
236         uint16_t operation;
237         uint16_t qdcount;
238         uint16_t ancount;
239         uint16_t nscount;
240         uint16_t arcount;
241         struct nbt_name_question *questions;
242         struct nbt_res_rec *answers;
243         struct nbt_res_rec *nsrecs;
244         struct nbt_res_rec *additional;
245         DATA_BLOB padding;/* [flag(LIBNDR_FLAG_REMAINING)] */
246 }/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX)] */;
247
248 enum dgram_msg_type
249 #ifndef USE_UINT_ENUMS
250  {
251         DGRAM_DIRECT_UNIQUE=0x10,
252         DGRAM_DIRECT_GROUP=0x11,
253         DGRAM_BCAST=0x12,
254         DGRAM_ERROR=0x13,
255         DGRAM_QUERY=0x14,
256         DGRAM_QUERY_POSITIVE=0x15,
257         DGRAM_QUERY_NEGATIVE=0x16
258 }
259 #else
260  { __donnot_use_enum_dgram_msg_type=0x7FFFFFFF}
261 #define DGRAM_DIRECT_UNIQUE ( 0x10 )
262 #define DGRAM_DIRECT_GROUP ( 0x11 )
263 #define DGRAM_BCAST ( 0x12 )
264 #define DGRAM_ERROR ( 0x13 )
265 #define DGRAM_QUERY ( 0x14 )
266 #define DGRAM_QUERY_POSITIVE ( 0x15 )
267 #define DGRAM_QUERY_NEGATIVE ( 0x16 )
268 #endif
269 ;
270
271 /* bitmap dgram_flags */
272 #define DGRAM_FLAG_MORE ( 0x01 )
273 #define DGRAM_FLAG_FIRST ( 0x02 )
274 #define DGRAM_FLAG_NODE_TYPE ( 0x0C )
275
276 enum dgram_node_type
277 #ifndef USE_UINT_ENUMS
278  {
279         DGRAM_NODE_B=0x00,
280         DGRAM_NODE_P=0x04,
281         DGRAM_NODE_M=0x08,
282         DGRAM_NODE_NBDD=0x0C
283 }
284 #else
285  { __donnot_use_enum_dgram_node_type=0x7FFFFFFF}
286 #define DGRAM_NODE_B ( 0x00 )
287 #define DGRAM_NODE_P ( 0x04 )
288 #define DGRAM_NODE_M ( 0x08 )
289 #define DGRAM_NODE_NBDD ( 0x0C )
290 #endif
291 ;
292
293 enum smb_command
294 #ifndef USE_UINT_ENUMS
295  {
296         SMB_TRANSACTION=0x25
297 }
298 #else
299  { __donnot_use_enum_smb_command=0x7FFFFFFF}
300 #define SMB_TRANSACTION ( 0x25 )
301 #endif
302 ;
303
304 struct smb_trans_body {
305         uint8_t wct;/* [value(17),range(17,17)] */
306         uint16_t total_param_count;
307         uint16_t total_data_count;
308         uint16_t max_param_count;
309         uint16_t max_data_count;
310         uint8_t max_setup_count;
311         uint8_t pad;
312         uint16_t trans_flags;
313         uint32_t timeout;
314         uint16_t reserved;
315         uint16_t param_count;
316         uint16_t param_offset;
317         uint16_t data_count;
318         uint16_t data_offset;
319         uint8_t setup_count;/* [value(3),range(3,3)] */
320         uint8_t pad2;
321         uint16_t opcode;
322         uint16_t priority;
323         uint16_t _class;
324         uint16_t byte_count;/* [value(strlen(mailslot_name)+1+data.length)] */
325         const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
326         DATA_BLOB data;/* [flag(LIBNDR_FLAG_REMAINING)] */
327 };
328
329 union smb_body {
330         struct smb_trans_body trans;/* [case(SMB_TRANSACTION)] */
331 }/* [nodiscriminant] */;
332
333 struct dgram_smb_packet {
334         enum smb_command smb_command;
335         uint8_t err_class;
336         uint8_t pad;
337         uint16_t err_code;
338         uint8_t flags;
339         uint16_t flags2;
340         uint16_t pid_high;
341         uint8_t signature[8];
342         uint16_t reserved;
343         uint16_t tid;
344         uint16_t pid;
345         uint16_t vuid;
346         uint16_t mid;
347         union smb_body body;/* [switch_is(smb_command)] */
348 }/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX)] */;
349
350 union dgram_message_body {
351         struct dgram_smb_packet smb;/* [case(DGRAM_SMB)] */
352 }/* [nodiscriminant] */;
353
354 struct dgram_message {
355         uint16_t length;
356         uint16_t offset;
357         struct nbt_name source_name;
358         struct nbt_name dest_name;
359         uint32_t dgram_body_type;
360         union dgram_message_body body;/* [switch_is(dgram_body_type)] */
361 };
362
363 enum dgram_err_code
364 #ifndef USE_UINT_ENUMS
365  {
366         DGRAM_ERROR_NAME_NOT_PRESENT=0x82,
367         DGRAM_ERROR_INVALID_SOURCE=0x83,
368         DGRAM_ERROR_INVALID_DEST=0x84
369 }
370 #else
371  { __donnot_use_enum_dgram_err_code=0x7FFFFFFF}
372 #define DGRAM_ERROR_NAME_NOT_PRESENT ( 0x82 )
373 #define DGRAM_ERROR_INVALID_SOURCE ( 0x83 )
374 #define DGRAM_ERROR_INVALID_DEST ( 0x84 )
375 #endif
376 ;
377
378 union dgram_data {
379         struct dgram_message msg;/* [case(DGRAM_DIRECT_UNIQUE)] */
380         enum dgram_err_code error;/* [case(DGRAM_ERROR)] */
381         struct nbt_name dest_name;/* [case(DGRAM_QUERY)] */
382 }/* [nodiscriminant] */;
383
384 struct nbt_dgram_packet {
385         enum dgram_msg_type msg_type;
386         uint8_t flags;
387         uint16_t dgram_id;
388         const char * src_addr;
389         uint16_t src_port;
390         union dgram_data data;/* [switch_is(msg_type)] */
391 }/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX)] */;
392
393 struct nbt_sockaddr {
394         uint32_t sockaddr_family;
395         const char * pdc_ip;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */
396         DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */
397 }/* [gensize,public] */;
398
399 /* bitmap nbt_server_type */
400 #define NBT_SERVER_PDC ( 0x00000001 )
401 #define NBT_SERVER_GC ( 0x00000004 )
402 #define NBT_SERVER_LDAP ( 0x00000008 )
403 #define NBT_SERVER_DS ( 0x00000010 )
404 #define NBT_SERVER_KDC ( 0x00000020 )
405 #define NBT_SERVER_TIMESERV ( 0x00000040 )
406 #define NBT_SERVER_CLOSEST ( 0x00000080 )
407 #define NBT_SERVER_WRITABLE ( 0x00000100 )
408 #define NBT_SERVER_GOOD_TIMESERV ( 0x00000200 )
409 #define NBT_SERVER_NDNC ( 0x00000400 )
410 #define NBT_SERVER_SELECT_SECRET_DOMAIN_6 ( 0x00000800 )
411 #define NBT_SERVER_FULL_SECRET_DOMAIN_6 ( 0x00001000 )
412
413 /* bitmap netlogon_nt_version_flags */
414 #define NETLOGON_NT_VERSION_1 ( 0x00000001 )
415 #define NETLOGON_NT_VERSION_5 ( 0x00000002 )
416 #define NETLOGON_NT_VERSION_5EX ( 0x00000004 )
417 #define NETLOGON_NT_VERSION_5EX_WITH_IP ( 0x00000008 )
418 #define NETLOGON_NT_VERSION_WITH_CLOSEST_SITE ( 0x00000010 )
419 #define NETLOGON_NT_VERSION_AVIOD_NT4EMUL ( 0x01000000 )
420 #define NETLOGON_NT_VERSION_PDC ( 0x10000000 )
421 #define NETLOGON_NT_VERSION_IP ( 0x20000000 )
422 #define NETLOGON_NT_VERSION_LOCAL ( 0x40000000 )
423 #define NETLOGON_NT_VERSION_GC ( 0x80000000 )
424
425 enum netlogon_command
426 #ifndef USE_UINT_ENUMS
427  {
428         LOGON_PRIMARY_QUERY=7,
429         NETLOGON_ANNOUNCE_UAS=10,
430         NETLOGON_RESPONSE_FROM_PDC=12,
431         LOGON_SAM_LOGON_REQUEST=18,
432         LOGON_SAM_LOGON_RESPONSE=19,
433         LOGON_SAM_LOGON_PAUSE_RESPONSE=20,
434         LOGON_SAM_LOGON_USER_UNKNOWN=21,
435         LOGON_SAM_LOGON_RESPONSE_EX=23,
436         LOGON_SAM_LOGON_PAUSE_RESPONSE_EX=24,
437         LOGON_SAM_LOGON_USER_UNKNOWN_EX=25
438 }
439 #else
440  { __donnot_use_enum_netlogon_command=0x7FFFFFFF}
441 #define LOGON_PRIMARY_QUERY ( 7 )
442 #define NETLOGON_ANNOUNCE_UAS ( 10 )
443 #define NETLOGON_RESPONSE_FROM_PDC ( 12 )
444 #define LOGON_SAM_LOGON_REQUEST ( 18 )
445 #define LOGON_SAM_LOGON_RESPONSE ( 19 )
446 #define LOGON_SAM_LOGON_PAUSE_RESPONSE ( 20 )
447 #define LOGON_SAM_LOGON_USER_UNKNOWN ( 21 )
448 #define LOGON_SAM_LOGON_RESPONSE_EX ( 23 )
449 #define LOGON_SAM_LOGON_PAUSE_RESPONSE_EX ( 24 )
450 #define LOGON_SAM_LOGON_USER_UNKNOWN_EX ( 25 )
451 #endif
452 ;
453
454 struct NETLOGON_SAM_LOGON_REQUEST {
455         uint16_t request_count;
456         const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
457         const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
458         const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
459         uint32_t acct_control;
460         uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
461         DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
462         struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */
463         uint32_t nt_version;
464         uint16_t lmnt_token;
465         uint16_t lm20_token;
466 }/* [nopull,nopush] */;
467
468 struct NETLOGON_SAM_LOGON_RESPONSE_NT40 {
469         enum netlogon_command command;
470         const char * server;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
471         const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
472         const char * domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
473         uint32_t nt_version;
474         uint16_t lmnt_token;
475         uint16_t lm20_token;
476 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
477
478 struct NETLOGON_SAM_LOGON_RESPONSE {
479         enum netlogon_command command;
480         const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
481         const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
482         const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
483         struct GUID domain_uuid;
484         struct GUID zero_uuid;
485         const char * forest;
486         const char * dns_domain;
487         const char * pdc_dns_name;
488         const char * pdc_ip;
489         uint32_t server_type;
490         uint32_t nt_version;
491         uint16_t lmnt_token;
492         uint16_t lm20_token;
493 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
494
495 struct NETLOGON_SAM_LOGON_RESPONSE_EX {
496         enum netlogon_command command;
497         uint16_t sbz;
498         uint32_t server_type;
499         struct GUID domain_uuid;
500         const char * forest;
501         const char * dns_domain;
502         const char * pdc_dns_name;
503         const char * domain;
504         const char * pdc_name;
505         const char * user_name;
506         const char * server_site;
507         const char * client_site;
508         uint8_t sockaddr_size;/* [value(ndr_size_nbt_sockaddr(&sockaddr,ndr->iconv_convenience,ndr->flags))] */
509         struct nbt_sockaddr sockaddr;/* [subcontext_size(sockaddr_size),subcontext(0)] */
510         const char * next_closest_site;
511         uint32_t nt_version;
512         uint16_t lmnt_token;
513         uint16_t lm20_token;
514 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
515
516 struct nbt_netlogon_query_for_pdc {
517         const char * computer_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
518         const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
519         DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */
520         const char * unicode_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
521         uint32_t nt_version;
522         uint16_t lmnt_token;
523         uint16_t lm20_token;
524 };
525
526 struct nbt_netlogon_response_from_pdc {
527         enum netlogon_command command;
528         const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
529         DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */
530         const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
531         const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
532         uint32_t nt_version;
533         uint16_t lmnt_token;
534         uint16_t lm20_token;
535 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
536
537 struct nbt_db_change_info {
538         enum netr_SamDatabaseID db_index;
539         uint64_t serial;
540         NTTIME timestamp;
541 };
542
543 struct NETLOGON_DB_CHANGE {
544         uint32_t serial_lo;
545         time_t timestamp;
546         uint32_t pulse;
547         uint32_t random;
548         const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
549         const char * domain;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
550         DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */
551         const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
552         const char * unicode_domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
553         uint32_t db_count;
554         struct nbt_db_change_info *dbchange;
555         uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
556         struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */
557         uint32_t message_format_version;
558         uint32_t message_token;
559 };
560
561 union nbt_netlogon_request {
562         struct NETLOGON_SAM_LOGON_REQUEST logon;/* [case(LOGON_SAM_LOGON_REQUEST)] */
563         struct nbt_netlogon_query_for_pdc pdc;/* [case(LOGON_PRIMARY_QUERY)] */
564         struct NETLOGON_DB_CHANGE uas;/* [case(NETLOGON_ANNOUNCE_UAS)] */
565 }/* [nodiscriminant] */;
566
567 struct nbt_netlogon_packet {
568         enum netlogon_command command;
569         union nbt_netlogon_request req;/* [switch_is(command)] */
570 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
571
572 enum nbt_browse_opcode
573 #ifndef USE_UINT_ENUMS
574  {
575         HostAnnouncement=1,
576         AnnouncementRequest=2,
577         Election=8,
578         GetBackupListReq=9,
579         GetBackupListResp=10,
580         BecomeBackup=11,
581         DomainAnnouncement=12,
582         MasterAnnouncement=13,
583         ResetBrowserState=14,
584         LocalMasterAnnouncement=15
585 }
586 #else
587  { __donnot_use_enum_nbt_browse_opcode=0x7FFFFFFF}
588 #define HostAnnouncement ( 1 )
589 #define AnnouncementRequest ( 2 )
590 #define Election ( 8 )
591 #define GetBackupListReq ( 9 )
592 #define GetBackupListResp ( 10 )
593 #define BecomeBackup ( 11 )
594 #define DomainAnnouncement ( 12 )
595 #define MasterAnnouncement ( 13 )
596 #define ResetBrowserState ( 14 )
597 #define LocalMasterAnnouncement ( 15 )
598 #endif
599 ;
600
601 struct nbt_browse_host_announcement {
602         uint8_t UpdateCount;
603         uint32_t Periodicity;
604         const char *ServerName;/* [charset(DOS)] */
605         uint8_t OSMajor;
606         uint8_t OSMinor;
607         uint32_t ServerType;
608         uint8_t BroMajorVer;
609         uint8_t BroMinorVer;
610         uint16_t Signature;
611         const char * Comment;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
612 };
613
614 struct nbt_browse_announcement_request {
615         uint8_t Unused;
616         const char * ResponseName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
617 };
618
619 struct nbt_browse_election_request {
620         uint8_t Version;
621         uint32_t Criteria;
622         uint32_t UpTime;
623         uint32_t Reserved;
624         const char * ServerName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
625 };
626
627 struct nbt_browse_backup_list_request {
628         uint8_t ReqCount;
629         uint32_t Token;
630 };
631
632 struct nbt_browse_backup_list_response {
633         uint8_t BackupCount;
634         uint32_t Token;
635         struct nbt_name *BackupServerList;
636 };
637
638 struct nbt_browse_become_backup {
639         const char * BrowserName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
640 };
641
642 struct nbt_browse_domain_announcement {
643         uint8_t UpdateCount;
644         uint32_t Periodicity;
645         const char *ServerName;/* [charset(DOS)] */
646         uint8_t OSMajor;
647         uint8_t OSMinor;
648         uint32_t ServerType;
649         uint32_t MysteriousField;
650         const char * Comment;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
651 };
652
653 struct nbt_browse_master_announcement {
654         const char * ServerName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
655 };
656
657 struct nbt_browse_reset_state {
658         uint8_t Command;
659 };
660
661 struct nbt_browse_local_master_announcement {
662         uint8_t UpdateCount;
663         uint32_t Periodicity;
664         const char *ServerName;/* [charset(DOS)] */
665         uint8_t OSMajor;
666         uint8_t OSMinor;
667         uint32_t ServerType;
668         uint8_t BroMajorVer;
669         uint8_t BroMinorVer;
670         uint16_t Signature;
671         const char * Comment;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
672 };
673
674 union nbt_browse_payload {
675         struct nbt_browse_host_announcement host_annoucement;/* [case(HostAnnouncement)] */
676         struct nbt_browse_announcement_request announcement_request;/* [case(AnnouncementRequest)] */
677         struct nbt_browse_election_request election_request;/* [case(Election)] */
678         struct nbt_browse_backup_list_request backup_list_request;/* [case(GetBackupListReq)] */
679         struct nbt_browse_backup_list_response backup_list_response;/* [case(GetBackupListResp)] */
680         struct nbt_browse_become_backup become_backup;/* [case(BecomeBackup)] */
681         struct nbt_browse_domain_announcement domain_announcement;/* [case(DomainAnnouncement)] */
682         struct nbt_browse_master_announcement master_announcement;/* [case(MasterAnnouncement)] */
683         struct nbt_browse_reset_state reset_browser_state;/* [case(ResetBrowserState)] */
684         struct nbt_browse_local_master_announcement local_master_announcement;/* [case(LocalMasterAnnouncement)] */
685 }/* [nodiscriminant] */;
686
687 struct nbt_browse_packet {
688         enum nbt_browse_opcode opcode;
689         union nbt_browse_payload payload;/* [switch_is(opcode)] */
690 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
691
692 #endif /* _HEADER_nbt */