/* the ndr parser for nbt_name is separately defined in
nbtname.c (along with the parsers for nbt_string) */
- typedef [nopull,nopush] struct {
+ typedef [public,nopull,nopush] struct {
string name;
string scope;
nbt_name_type type;
} nbt_status_name;
typedef struct {
- [value(r->num_names * 18 + 47)] uint16 length;
+ [value(num_names * 18 + 47)] uint16 length;
uint8 num_names;
nbt_status_name names[num_names];
nbt_statistics statistics;
uint16 opcode;
uint16 priority;
uint16 class;
- [value(strlen(r->mailslot_name)+1+r->data.length)]
+ [value(strlen(mailslot_name)+1+r->data.length)]
uint16 byte_count;
astring mailslot_name;
[flag(NDR_REMAINING)] DATA_BLOB data;
[switch_is(smb_command)] smb_body body;
} dgram_smb_packet;
- typedef [v1_enum] enum {
- DGRAM_SMB = 0xff534d42 /* 0xffSMB */
- } dgram_body_type;
+ const uint32 DGRAM_SMB = 0xff534d42; /* 0xffSMB */
typedef [nodiscriminant] union {
[case(DGRAM_SMB)] dgram_smb_packet smb;
uint16 offset;
nbt_name source_name;
nbt_name dest_name;
- dgram_body_type dgram_body_type;
+ uint32 dgram_body_type;
[switch_is(dgram_body_type)] dgram_message_body body;
} dgram_message;
/*******************************************/
/* \MAILSLOT\NET\NETLOGON mailslot requests */
typedef enum {
- NETLOGON_QUERY_FOR_PDC = 0x7,
- NETLOGON_ANNOUNCE_UAS = 0xa,
- NETLOGON_RESPONSE_FROM_PDC = 0xc,
- NETLOGON_QUERY_FOR_PDC2 = 0x12,
- NETLOGON_RESPONSE_FROM_PDC2 = 0x17
+ NETLOGON_QUERY_FOR_PDC = 0x7,
+ NETLOGON_ANNOUNCE_UAS = 0xa,
+ NETLOGON_RESPONSE_FROM_PDC = 0xc,
+ NETLOGON_QUERY_FOR_PDC2 = 0x12,
+ NETLOGON_RESPONSE_FROM_PDC2 = 0x17,
+ NETLOGON_RESPONSE_FROM_PDC_USER = 0x19
} nbt_netlogon_command;
/* query for pdc request */
uint16 lm20_token;
} nbt_netlogon_response_from_pdc;
+ typedef [bitmap32bit] bitmap {
+ NBT_SERVER_PDC = 0x00000001,
+ NBT_SERVER_GC = 0x00000004,
+ NBT_SERVER_LDAP = 0x00000008,
+ NBT_SERVER_DS = 0x00000010,
+ NBT_SERVER_KDC = 0x00000020,
+ NBT_SERVER_TIMESERV = 0x00000040,
+ NBT_SERVER_CLOSEST = 0x00000080,
+ NBT_SERVER_WRITABLE = 0x00000100,
+ NBT_SERVER_GOOD_TIMESERV = 0x00000200
+ } nbt_server_type;
+
/* response from pdc - type2 */
typedef struct {
[flag(NDR_ALIGN4)] DATA_BLOB _pad;
- uint32 server_type;
+ nbt_server_type server_type;
GUID domain_uuid;
nbt_string forest;
nbt_string dns_domain;
nbt_string pdc_dns_name;
- astring domain;
+ nbt_string domain;
nbt_string pdc_name;
nbt_string user_name;
nbt_string site_name;
nstring unicode_domain;
uint32 db_count;
nbt_db_change dbchange[db_count];
- [value(ndr_size_dom_sid(&r->sid))] uint32 sid_size;
+ [value(ndr_size_dom_sid(&sid))] uint32 sid_size;
[flag(NDR_ALIGN4)] DATA_BLOB _pad2;
dom_sid sid;
uint32 nt_version;
[case(NETLOGON_ANNOUNCE_UAS)] nbt_netlogon_announce_uas uas;
[case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response;
[case(NETLOGON_RESPONSE_FROM_PDC2)] nbt_netlogon_response_from_pdc2 response2;
+ [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2;
} nbt_netlogon_request;
typedef [flag(NDR_NOALIGN),public] struct {
[switch_is(command)] nbt_netlogon_request req;
} nbt_netlogon_packet;
+ /*******************************************/
+ /* CLDAP netlogon response */
+
+ /* note that these structures are very similar to, but not
+ quite identical to, the netlogon structures above */
+
+ typedef struct {
+ [value(21)] uint16 type;
+ nstring pdc_name;
+ nstring user_name;
+ nstring domain_name;
+ [value(1)] uint32 nt_version;
+ uint16 lmnt_token;
+ uint16 lm20_token;
+ } nbt_cldap_netlogon_1;
+
+ typedef struct {
+ [value(21)] uint16 type;
+ nstring pdc_name;
+ nstring user_name;
+ nstring domain_name;
+ GUID domain_uuid;
+ GUID unknown_uuid;
+ nbt_string forest;
+ nbt_string dns_domain;
+ nbt_string pdc_dns_name;
+ ipv4address pdc_ip;
+ nbt_server_type server_type;
+ [value(3)] uint32 nt_version;
+ uint16 lmnt_token;
+ uint16 lm20_token;
+ } nbt_cldap_netlogon_3;
+
+ typedef struct {
+ [value(25)] uint32 type;
+ nbt_server_type server_type;
+ GUID domain_uuid;
+ nbt_string forest;
+ nbt_string dns_domain;
+ nbt_string pdc_dns_name;
+ nbt_string domain;
+ nbt_string pdc_name;
+ nbt_string user_name;
+ nbt_string site_name;
+ nbt_string site_name2;
+ [value(5)] uint32 nt_version;
+ uint16 lmnt_token;
+ uint16 lm20_token;
+ } nbt_cldap_netlogon_5;
+
+ typedef struct {
+ [value(25)] uint32 type;
+ nbt_server_type server_type;
+ GUID domain_uuid;
+ nbt_string forest;
+ nbt_string dns_domain;
+ nbt_string pdc_dns_name;
+ nbt_string domain;
+ nbt_string pdc_name;
+ nbt_string user_name;
+ nbt_string site_name;
+ nbt_string site_name2;
+ uint8 unknown;
+ uint32 unknown2;
+ [flag(NDR_BIG_ENDIAN)]
+ ipv4address pdc_ip;
+ uint32 unknown3[2];
+ [value(13)] uint32 nt_version;
+ uint16 lmnt_token;
+ uint16 lm20_token;
+ } nbt_cldap_netlogon_13;
+
+ typedef [flag(NDR_NOALIGN),public,nodiscriminant] union {
+ [case(0)] nbt_cldap_netlogon_1 logon1;
+ [case(1)] nbt_cldap_netlogon_1 logon1;
+ [case(2)] nbt_cldap_netlogon_3 logon3;
+ [case(3)] nbt_cldap_netlogon_3 logon3;
+ [case(4)] nbt_cldap_netlogon_5 logon5;
+ [case(5)] nbt_cldap_netlogon_5 logon5;
+ [case(6)] nbt_cldap_netlogon_5 logon5;
+ [case(7)] nbt_cldap_netlogon_5 logon5;
+ [default] nbt_cldap_netlogon_13 logon13;
+ } nbt_cldap_netlogon;
+
/*******************************************/
/* \MAILSLOT\NET\NTLOGON mailslot requests */
typedef enum {
nstring user_name;
astring mailslot_name;
uint32 acct_control;
- [value(ndr_size_dom_sid(&r->sid))] uint32 sid_size;
+ [value(ndr_size_dom_sid(&sid))] uint32 sid_size;
[flag(NDR_ALIGN4)] DATA_BLOB _pad;
dom_sid sid;
uint32 nt_version;
nbt_ntlogon_command command;
[switch_is(command)] nbt_ntlogon_request req;
} nbt_ntlogon_packet;
+
+ /*******************************************/
+ /* \MAILSLOT\BROWSE mailslot requests */
+
+ typedef enum {
+ HostAnnouncement = 1,
+ AnnouncementRequest = 2,
+ Election = 8,
+ GetBackupListReq = 9,
+ GetBackupListResp = 10,
+ BecomeBackup = 11,
+ DomainAnnouncement = 12,
+ MasterAnnouncement = 13,
+ ResetBrowserState = 14,
+ LocalMasterAnnouncement = 15
+ } nbt_browse_opcode;
+
+ typedef struct {
+ uint8 update_count;
+ uint32 ttl;
+ uint8 name[16];
+ uint8 os_major;
+ uint8 os_minor;
+ uint32 server_type;
+ astring comment;
+ } nbt_browse_host_announcement;
+
+ typedef struct {
+ uint8 unknown;
+ astring ResponseComputerName;
+ } nbt_browse_request_announcement;
+
+ typedef struct {
+ uint8 count;
+ uint32 token;
+ } nbt_browse_backup_list_request;
+
+ typedef struct {
+ uint8 count;
+ uint32 token;
+ nbt_name BackupServerList[count];
+ } nbt_browse_backup_list_response;
+
+ typedef struct {
+ astring BrowserToPromote;
+ } nbt_browse_become_backup;
+
+ typedef struct {
+ uint8 version;
+ uint32 criteria;
+ uint32 time_up; /* In milliseconds */
+ uint32 reserved; /* Must be zero */
+ astring ServerName;
+ } nbt_browse_election_request;
+
+ typedef struct {
+ uint8 options;
+ } nbt_browse_reset_state;
+
+ typedef struct {
+ astring MasterBrowserServerName;
+ } nbt_browse_master_announcement;
+
+ typedef [nodiscriminant] union {
+ [case(HostAnnouncement)] nbt_browse_host_announcement host_annoucement;
+ [case(AnnouncementRequest)] nbt_browse_request_announcement announcement_request;
+ [case(Election)] nbt_browse_election_request election_request;
+ [case(GetBackupListReq)] nbt_browse_backup_list_request backup_list_request;
+ [case(GetBackupListResp)] nbt_browse_backup_list_response backup_list_response;
+ [case(BecomeBackup)] nbt_browse_become_backup become_backup;
+ [case(DomainAnnouncement)] nbt_browse_master_announcement domain_announcement;
+ [case(MasterAnnouncement)] nbt_browse_master_announcement master_announcement;
+ [case(ResetBrowserState)] nbt_browse_reset_state reset_browser_state;
+ [case(LocalMasterAnnouncement)] nbt_browse_master_announcement local_master_announcement;
+ } nbt_browse_payload;
+
+ typedef [public,flag(NDR_NOALIGN)] struct {
+ nbt_browse_opcode opcode;
+ nbt_browse_payload payload;
+ } nbt_browse_packet;
}