winsif.idl: fix comment about a pidl bug
[ira/wip.git] / source4 / librpc / idl / winsif.idl
1 #include "idl_types.h"
2
3 import "nbt.idl";
4
5 [
6         uuid("45f52c28-7f9f-101a-b52b-08002b2efabe"),
7         version(1.0),
8         helpstring("WINS Administration Interface1"),
9         pointer_default(unique)
10 ] interface winsif
11 {
12         /*****************/
13         /* Function 0x00 */
14         typedef struct {
15                 uint8 type;
16                 uint32 length;
17                 ipv4address addr;
18         } winsif_Address;
19
20         typedef enum {
21                 WINSIF_ACTION_INSERT    = 0x0000,
22                 WINSIF_ACTION_DELETE    = 0x0001,
23                 WINSIF_ACTION_RELEASE   = 0x0002,
24                 WINSIF_ACTION_MODIFY    = 0x0003,
25                 WINSIF_ACTION_QUERY     = 0x0004
26         } winsif_Action;
27
28         typedef enum {
29                 WINSIF_RECORD_UNIQUE_NAME       = 0x0000,
30                 WINSIF_RECORD_GROUP_NAME        = 0x0001,
31                 WINSIF_RECORD_SGROUP_NAME       = 0x0002,
32                 WINSIF_RECORD_MHOMED_NAME       = 0x0003
33         } winsif_RecordType;
34
35         typedef [enum8bit] enum {
36                 WINSIF_NODE_B   = 0x00,
37                 WINSIF_NODE_P   = 0x01,
38                 WINSIF_NODE_H   = 0x03
39         } winsif_NodeType;
40
41         typedef [v1_enum] enum {
42                 WINSIF_RECORD_ACTIVE    = 0x00000000,
43                 WINSIF_RECORD_RELEASED  = 0x00000001,
44                 WINSIF_RECORD_TOMBSTONE = 0x00000002,
45                 WINSIF_RECORD_DELETED   = 0x00000003
46         } winsif_RecordState;
47
48         typedef struct {
49                 winsif_Action cmd;
50                 wrepl_nbt_name *name;
51                 [value(name?16:0)] uint32 name_len;
52                 winsif_RecordType record_type;
53                 uint32 num_of_addresses;
54                 [size_is(num_of_addresses)] winsif_Address *addresses;
55                 winsif_Address address;
56                 hyper version_number;
57                 winsif_NodeType node_type;
58                 ipv4address owner_address;
59                 winsif_RecordState record_state;
60                 boolean32 is_static;
61                 time_t expire_time;
62         } winsif_RecordAction;
63
64         WERROR winsif_WinsRecordAction(
65                 [in,out,ref] winsif_RecordAction **record_action
66         );
67
68         /*****************/
69         /* Function 0x01 */
70         typedef struct {
71                 winsif_Address address;
72                 hyper version_number;
73         } winsif_AddressVersionMap;
74
75         typedef enum {
76                 WINSIF_PRIORITY_NORMAL  = 0x0000,
77                 WINSIF_PRIORITY_HIGH    = 0x0001
78         } winsif_PriorityClass;
79
80         typedef struct {
81                 winsif_Address address;
82                 uint32 num_replications;
83                 uint32 num_communication_failures;
84         } winsif_ReplCounter;
85
86         typedef struct {
87                 uint32 num_unique_registrations;
88                 uint32 num_group_registrations;
89                 uint32 num_queries;
90                 uint32 num_successful_queries;
91                 uint32 num_failed_queries;
92                 uint32 num_unique_refreshes;
93                 uint32 num_group_refreshes;
94                 uint32 num_releases;
95                 uint32 num_successful_releases;
96                 uint32 num_failed_releases;
97                 uint32 num_unique_conflicts;
98                 uint32 num_group_conflicts;
99         } winsif_StatCounters;
100
101         typedef struct {
102                 time_t wins_start_time;
103                 time_t last_periodic_scavenging;
104                 time_t last_triggered_scavenging;
105                 time_t last_tombstone_scavenging;
106                 time_t last_verification_scavenging;
107                 time_t last_periodic_pull_replication;
108                 time_t last_triggered_pull_replication;
109                 time_t ignore_last_ntrepl;
110                 time_t ignore_last_actrepl;
111                 time_t last_init_db;
112                 time_t counter_reset;
113         } winsif_StatTimeStamps;
114
115         typedef struct {
116                 winsif_StatCounters counters;
117                 winsif_StatTimeStamps time_stamps;
118                 uint32 num_partners;
119                 [size_is(num_partners)] winsif_ReplCounter *partners;
120         } winsif_Stat;
121
122         typedef struct {
123                 uint32 num_owners;
124                 winsif_AddressVersionMap address_version_maps[25];
125                 hyper my_max_version_number;
126                 uint32 refresh_interval;
127                 uint32 tombstone_interval;
128                 uint32 tombstone_timeout;
129                 uint32 verify_interval;
130                 winsif_PriorityClass prioritiy_class;
131                 uint32 num_worker_threads;
132                 winsif_Stat wstat;
133         } winsif_Results;
134
135         typedef enum {
136                 WINSIF_STATUS_CMD_ADDRESS_VERSION_MAP   = 0x0000,
137                 WINSIF_STATUS_CMD_CONFIG                = 0x0001,
138                 WINSIF_STATUS_CMD_STAT                  = 0x0002,
139                 WINSIF_STATUS_CMD_ALL_MAPS              = 0x0003
140         } winsif_StatusCmd;
141
142         WERROR winsif_WinsStatus(
143                 [in] winsif_StatusCmd cmd,
144                 [in,out,ref] winsif_Results *results
145         );
146
147         /*****************/
148         /* Function 0x02 */
149         typedef enum {
150                 WINSIF_TRIGGER_PULL     = 0x0000,
151                 WINSIF_TRIGGER_PUSH     = 0x0001,
152                 WINSIF_TRIGGER_PUSH_PROP= 0x0002
153         } winsif_TriggerType;
154
155         WERROR winsif_WinsTrigger(
156                 [in,ref] winsif_Address *owner_address,
157                 [in] winsif_TriggerType trigger_type
158         );
159
160         /*****************/
161         /* Function 0x03 */
162         WERROR winsif_WinsDoStaticInit(
163                 [in,unique,string,charset(UTF16)] uint16 *data_file_path,
164                 [in] boolean32 delete_file
165         );
166
167         /*****************/
168         /* Function 0x04 */
169         WERROR winsif_WinsDoScavenging();
170
171         /*****************/
172         /* Function 0x05 */
173         typedef struct {
174                 uint32 buffer_size;
175                 [size_is(num_records)] winsif_RecordAction *row;
176                 uint32 num_records;
177                 uint32 total_num_records;
178         } winsif_Records;
179
180         WERROR winsif_WinsGetDbRecs(
181                 [in,unique] winsif_Address *owner_address,
182                 [in] hyper min_version_number,
183                 [in] hyper max_version_number,
184                 [out,ref] winsif_Records *records
185         );
186
187         /*****************/
188         /* Function 0x06 */
189         WERROR winsif_WinsTerm(
190                 [in] uint16 abrupt_termination
191         );
192
193         /*****************/
194         /* Function 0x07 */
195         WERROR winsif_WinsBackup(
196                 [in,ref,string,charset(DOS)] uint8 *backup_path,
197                 [in] uint16 incremental
198         );
199
200         /*****************/
201         /* Function 0x08 */
202         WERROR winsif_WinsDelDbRecs(
203                 [in,ref] winsif_Address *owner_address,
204                 [in] hyper min_version_number,
205                 [in] hyper max_version_number
206         );
207
208         /*****************/
209         /* Function 0x09 */
210         WERROR winsif_WinsPullRange(
211                 [in,ref] winsif_Address *server_address,
212                 [in,ref] winsif_Address *owner_address,
213                 [in] hyper min_version_number,
214                 [in] hyper max_version_number
215         );
216
217         /*****************/
218         /* Function 0x0A */
219         WERROR winsif_WinsSetPriorityClass(
220                 [in] winsif_PriorityClass prioritiy_class
221         );
222
223         /*****************/
224         /* Function 0x0B */
225         WERROR winsif_WinsResetCounters();
226
227         /*****************/
228         /* Function 0x0C */
229         WERROR winsif_WinsWorkerThreadUpdate(
230                 [in] uint32 num_of_threads
231         );
232
233         /*****************/
234         /* Function 0x0D */
235         WERROR winsif_WinsGetNameAndAdd(
236                 [out,ref] winsif_Address *server_address,
237                 /*
238                  * TODO: fix pidl to handles this completly correct...
239                  *       currently it gives a warning about a missing pointer.
240                  */
241                 [out,ref,string,charset(DOS),size_is(80)] uint8 *unc_name
242         );
243
244         /*****************/
245         /* Function 0x0E */
246         typedef struct {
247                 uint32 name_len;
248                 [string,charset(DOS)] uint8 *name;
249         } winsif_BrowserInfo;
250
251         typedef struct {
252                 uint32 num_entries;
253                 [size_is(num_entries)] winsif_BrowserInfo *info;
254         } winsif_BrowserNames;
255
256         WERROR winsif_WinsGetBrowserNames_Old(
257                 [out,ref] winsif_BrowserNames *names
258         );
259
260         /*****************/
261         /* Function 0x0F */
262         WERROR winsif_WinsDeleteWins(
263                 [in,ref] winsif_Address *owner_address
264         );
265
266         /*****************/
267         /* Function 0x10 */
268         WERROR winsif_WinsSetFlags(
269                 [in] uint32 flags
270         );
271
272         /*****************/
273         /* Function 0x11 */
274         typedef struct {
275                 boolean32 tcp_ip;
276                 [string,charset(DOS)] uint8 *server_address;
277                 [string,charset(DOS)] uint8 *pipe_name;
278         } winsif_BindData;
279
280         WERROR winsif_WinsGetBrowserNames(
281                 [in,ref] winsif_BindData *server_handle,
282                 [out,ref] winsif_BrowserNames *names
283         );
284
285         /*****************/
286         /* Function 0x12 */
287         WERROR winsif_WinsGetDbRecsByName(
288                 [in,unique] winsif_Address *owner_address,
289                 [in] boolean32 search_backward,
290                 [in,unique] wrepl_nbt_name *name,
291                 [in,value(name?16:0),range(0,16)] uint32 name_len,
292                 [in] uint32 num_records_desired,
293                 [in] boolean32 only_statics,
294                 [out,ref] winsif_Records *records
295         );
296
297         /*****************/
298         /* Function 0x13 */
299         typedef struct {
300                 uint32 num_owners;
301                 [size_is(num_owners)] winsif_AddressVersionMap *address_version_maps;
302                 hyper my_max_version_number;
303                 uint32 refresh_interval;
304                 uint32 tombstone_interval;
305                 uint32 tombstone_timeout;
306                 uint32 verify_interval;
307                 winsif_PriorityClass prioritiy_class;
308                 uint32 num_worker_threads;
309                 winsif_Stat wstat;
310         } winsif_ResultsNew;
311
312         WERROR winsif_WinsStatusNew(
313                 [in] winsif_StatusCmd cmd,
314                 [out,ref] winsif_ResultsNew *results
315         );
316
317         /*****************/
318         /* Function 0x14 */
319         WERROR winsif_WinsStatusWHdl(
320                 [in,ref] winsif_BindData *server_handle,
321                 [in] winsif_StatusCmd cmd,
322                 [in,out,ref] winsif_ResultsNew *results
323         );
324
325         /*****************/
326         /* Function 0x15 */
327         typedef enum {
328                 WINSIF_SCAVENGING_GENERAL       = 0x0000,
329                 WINSIF_SCAVENGING_VERIFY        = 0x0001
330         } winsif_ScavengingOpcode;
331
332         typedef struct {
333                 winsif_ScavengingOpcode opcode;
334                 uint32 age;
335                 boolean32 force;
336         } winsif_ScavengingRequest;
337
338         WERROR winsif_WinsDoScanvengingNew(
339                 [in,ref] winsif_ScavengingRequest *request
340         );
341 }