dns: Use new DNS debugclass in DNS server
[kai/samba.git] / source4 / librpc / idl / irpc.idl
1 #include "idl_types.h"
2
3 import "misc.idl", "security.idl", "nbt.idl", "netlogon.idl", "server_id.idl";
4
5 /*
6   definitions for irpc primitives
7 */
8 [ uuid("e770c620-0b06-4b5e-8d87-a26e20f28340"),
9   version(1.0),
10   pointer_default(unique)
11 ] interface irpc
12 {
13         typedef bitmap {
14                 IRPC_FLAG_REPLY    = 0x0001
15         } irpc_flags;
16
17         typedef struct {
18                 security_token *token;
19         } irpc_creds;
20
21         typedef [public] struct {
22                 GUID uuid;
23                 uint32 if_version;
24                 uint32 callnum;
25                 uint32 callid;
26                 irpc_flags flags;
27                 NTSTATUS status;
28                 [subcontext(4)] irpc_creds creds;
29                 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
30         } irpc_header;
31
32         typedef [public] struct {
33                 utf8string name;
34                 uint32 count;
35                 [size_is(count)] server_id ids[*];
36         } irpc_name_record;
37
38         typedef [public] struct {
39                 [size_is(num_records)] irpc_name_record *names[*];
40                 uint32 num_records;
41         } irpc_name_records;
42
43         /******************************************************
44          uptime call - supported by all messaging servers
45         *******************************************************/
46         void irpc_uptime([out,ref] NTTIME *start_time);
47
48         /******************************************************
49          management calls for the nbt server
50         ******************************************************/
51         typedef [v1_enum] enum {
52                 NBTD_INFO_STATISTICS
53         } nbtd_info_level;
54
55         typedef struct {
56                 hyper total_received;
57                 hyper total_sent;
58                 hyper query_count;
59                 hyper register_count;
60                 hyper release_count;
61         } nbtd_statistics;
62
63         typedef [switch_type(nbtd_info_level)] union {
64                 [case(NBTD_INFO_STATISTICS)] nbtd_statistics *stats;
65         } nbtd_info;
66
67         void nbtd_information(
68                 [in]  nbtd_info_level level,
69                 [out,switch_is(level)] nbtd_info info
70                 );
71
72         /* Send a GetDCName from the privileged port (owned by nbtd),
73          * and await a reply */
74
75         void nbtd_getdcname(
76                 [in] astring domainname,
77                 [in] astring ip_address,
78                 [in] astring my_computername,
79                 [in] astring my_accountname,
80                 [in] uint32 account_control,
81                 [in] dom_sid *domain_sid,
82                 [out,unique] astring *dcname
83                 );
84
85         typedef struct {
86                 ipv4address addr;
87         } nbtd_proxy_wins_addr;
88
89         void nbtd_proxy_wins_challenge(
90                 [in] nbt_name name,
91                 [in,out] uint32 num_addrs,
92                 [in,out] nbtd_proxy_wins_addr addrs[num_addrs]
93                 );
94
95         void nbtd_proxy_wins_release_demand(
96                 [in] nbt_name name,
97                 [in] uint32 num_addrs,
98                 [in] nbtd_proxy_wins_addr addrs[num_addrs]
99                 );
100
101         /*
102           Generic Kerberos package call (on the NETLOGON pipe, as a SamLogon)
103
104           The normal use for this call is to check the PAC signature in the KDC
105           
106           The KDC has the routines to check this, so it is easier to
107           proxy the request over by IRPC than set up the environment
108          */
109
110         void kdc_check_generic_kerberos(
111                 [in] DATA_BLOB generic_request,
112                 [out] DATA_BLOB generic_reply
113                 );
114
115         /******************************************************
116          management calls for the smb server
117         ******************************************************/
118         typedef [v1_enum] enum {
119                 SMBSRV_INFO_SESSIONS,
120                 SMBSRV_INFO_TCONS
121         } smbsrv_info_level;
122
123         typedef struct {
124                 hyper vuid;
125                 astring account_name;
126                 astring domain_name;
127                 astring client_ip;
128                 NTTIME  connect_time;
129                 NTTIME  auth_time;
130                 NTTIME  last_use_time;
131         } smbsrv_session_info;
132
133         typedef struct {
134                 uint32 num_sessions;
135                 [size_is(num_sessions)] smbsrv_session_info *sessions;
136         } smbsrv_sessions;
137
138         typedef struct {
139                 uint32 tid;
140                 astring share_name;
141                 astring client_ip;
142                 NTTIME  connect_time;
143                 NTTIME  last_use_time;
144         } smbsrv_tcon_info;
145
146         typedef struct {
147                 uint32 num_tcons;
148                 [size_is(num_tcons)] smbsrv_tcon_info *tcons;
149         } smbsrv_tcons;
150
151         typedef [switch_type(smbsrv_info_level)] union {
152                 [case(SMBSRV_INFO_SESSIONS)] smbsrv_sessions sessions;
153                 [case(SMBSRV_INFO_TCONS)]    smbsrv_tcons    tcons;
154         } smbsrv_info;
155
156         void smbsrv_information(
157                 [in]  smbsrv_info_level level,
158                 [out,switch_is(level)] smbsrv_info info
159                 );
160
161         /*
162           called when samba should shutdown
163          */
164         void samba_terminate(
165                 [in] astring reason
166                 );
167
168         /******************************************************
169          management calls for the drepl server
170         ******************************************************/
171         /**
172          * Force dreplsrv to fefresh internal cache.
173          * @param partition_dn Partition to refresh cacheh for.
174          *                     If empy/NULL, refresh all partitions.
175          */
176         WERROR dreplsrv_refresh();
177
178         /*
179           called when role transfer is requested via LDAP
180         */
181         typedef [v1_enum] enum {
182                DREPL_SCHEMA_MASTER,
183                DREPL_RID_MASTER,
184                DREPL_INFRASTRUCTURE_MASTER,
185                DREPL_NAMING_MASTER,
186                DREPL_PDC_MASTER
187         } drepl_role_master;
188
189         WERROR drepl_takeFSMORole(
190                 [in] drepl_role_master role
191                 );
192
193         /*
194          * message to tell the drepl server to initiate a REPL_SECRET
195          * replication of a users secrets
196          */
197         void drepl_trigger_repl_secret(
198                 [in] astring user_dn
199                 );
200
201         /*
202           message to do RODC DNS updates via the dnsupdate task
203         */
204         NTSTATUS dnsupdate_RODC(
205                 [in,unique] dom_sid *dom_sid,
206                 [in,unique] [string,charset(UTF16)] uint16 *site_name,
207                 [in] uint32 dns_ttl,
208                 [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
209                 );
210 }