summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/browse.idl
blob: b957e0dc62b602a24b7fece3ef1a47a98c844d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#include "idl_types.h"

/*
   IDL structures for Browse service over mailslot operations
*/

[ uuid("1-2-3-4"),
  depends(security)
] interface browse
{
	const string browse_mailslot = "\\MAILSLOT\\BROWSE";

	typedef enum { 
		HostAnnouncement 		= 1,
		AnnouncementRequest 		= 2,
		Election			= 8,
		GetBackupListReq		= 9,
		GetBackupListResp		= 10,
		BecomeBackup			= 11,
		DomainAnnouncment		= 12,
		MasterAnnouncement		= 13,
		ResetBrowserState		= 14,
		LocalMasterAnnouncement		= 15
	} brow_opcodes;

	typedef bitmap {
		SV_TYPE_WORKSTATION		= 0x00000001,
		SV_TYPE_SERVER			= 0x00000002,
		SV_TYPE_SQLSERVER		= 0x00000004,
		SV_TYPE_DOMAIN_CTRL		= 0x00000008,
		SV_TYPE_DOMAIN_BAKCTRL		= 0x00000010,
		SV_TYPE_TIME_SOURCE		= 0x00000020,
		SV_TYPE_AFP			= 0x00000040,
		SV_TYPE_NOVELL			= 0x00000080,
		SV_TYPE_DOMAIN_MEMBER		= 0x00000100,
		SV_TYPE_PRINTQ_SERVER		= 0x00000200,
		SV_TYPE_DIALIN_SERVER		= 0x00000400,
		SV_TYPE_XENIX_SERVER		= 0x00000800,
		SV_TYPE_NT			= 0x00001000,
		SV_TYPE_POTENTIAL_BROWSER	= 0x00010000,
		SV_TYPE_BACKUP_BROWSER		= 0x00020000,
		SV_TYPE_MASTER_BROWSER		= 0x00040000,
		SV_TYPE_DOMAIN_MASTER		= 0x00080000,
		SV_TYPE_LOCAL_LIST_ONLY		= 0x40000000,
		SV_TYPE_DOMAIN_ENUM		= 0x80000000
	} brow_server_type;

	typedef struct {
		uint8 update_count;
		uint32 ttl;
		char name[16];
		uint8 os_major;
		uint8 os_minor;
		uint32 server_type;
		astring comment;
	} host_announcement;

	typedef struct {
		uint8 unknown;
		astring ResponseComputerName; 
	} request_announcement;

	typedef struct {
		uint8 count;
		uint32 token;
	} backup_list_request;

	typedef struct {
		uint8 count;
		uint32 token;
		astring BackupServerList[count]; 
	} backup_list_response;

	typedef struct {
		astring BrowserToPromote;
	} become_backup;

	typedef struct {
		uint8 version;
		uint32 criteria;
		uint32 time_up; /* In milliseconds */
		uint32 reserved; /* Must be zero */
		astring ServerName; 
	} election_request;

	typedef struct {
		uint8 options;
	} reset_state;

	typedef struct {
		astring MasterBrowserServerName; 
	} master_announcement;

	typedef [nodiscriminant] union {
		[case(HostAnnouncement)] host_announcement host_annoucement;
		[case(AnnouncementRequest)] request_announcement announcement_request;
		[case(Election)] election_request election_request;
		[case(GetBackupListReq)] backup_list_request backup_list_request;
		[case(GetBackupListResp)] backup_list_response backup_list_response;
		[case(BecomeBackup)] become_backup become_backup;
		[case(DomainAnnouncement)] master_announcement domain_announcement;
		[case(MasterAnnouncement)] master_announcement master_announcement;
		[case(ResetBrowserState)] reset_state reset_browser_state;
		[case(LocalMasterAnnouncement)] master_announcement local_master_announcement;
	} browse_payload;

	typedef [public] struct {
		browse_opcode opcode;
		browse_payload payload;	
	} browse_packet;
}