b46695a29e4121ef3fe5e2cfaea6811879dba086
[samba.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 stat;
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         void WinsWorkerThreadUpdate();
230
231         /*****************/
232         /* Function 0x0D */
233         void WinsGetNameAndAdd();
234
235         /*****************/
236         /* Function 0x0E */
237         void WinsGetBrowserNames_Old();
238
239         /*****************/
240         /* Function 0x0F */
241         void WinsDeleteWins();
242
243         /*****************/
244         /* Function 0x10 */
245         void WinsSetFlags();
246
247         /*****************/
248         /* Function 0x11 */
249         void WinsGetBrowserNames();
250
251
252         /*****************/
253         /* Function 0x12 */
254         void WinsGetDbRecsByName();
255
256         /*****************/
257         /* Function 0x13 */
258         void WinsStatusNew();
259
260         /*****************/
261         /* Function 0x14 */
262         void WinsStatusWHdl();
263
264         /*****************/
265         /* Function 0x15 */
266         void WinsDoScanvenging2();
267 }