s4-dns: Reload DNS zones from dsdb when zones are modified through RPC or DRS
[obnox/samba/samba-obnox.git] / source4 / librpc / idl / irpc.idl
index eb3d159c7db190c2c789ef54db4ab403a3203d6e..65ae4b6c5d83e39aef6d8d83059cdf4f6ee86b4d 100644 (file)
@@ -1,6 +1,6 @@
 #include "idl_types.h"
 
-import "security.idl", "nbt.idl";
+import "misc.idl", "security.idl", "nbt.idl", "netlogon.idl", "server_id.idl";
 
 /*
   definitions for irpc primitives
@@ -14,15 +14,32 @@ import "security.idl", "nbt.idl";
                IRPC_FLAG_REPLY    = 0x0001
        } irpc_flags;
 
-       typedef [public,noejs] struct {
+       typedef struct {
+               security_token *token;
+       } irpc_creds;
+
+       typedef [public] struct {
                GUID uuid;
                uint32 if_version;
                uint32 callnum;
                uint32 callid;
                irpc_flags flags;
                NTSTATUS status;
+               [subcontext(4)] irpc_creds creds;
+               [flag(NDR_ALIGN8)] DATA_BLOB _pad;
        } irpc_header;
 
+       typedef [public] struct {
+               utf8string name;
+               uint32 count;
+               [size_is(count)] server_id ids[*];
+       } irpc_name_record;
+
+       typedef [public] struct {
+               [size_is(num_records)] irpc_name_record *names[*];
+               uint32 num_records;
+       } irpc_name_records;
+
        /******************************************************
          uptime call - supported by all messaging servers
        *******************************************************/
@@ -43,7 +60,7 @@ import "security.idl", "nbt.idl";
                hyper release_count;
        } nbtd_statistics;
 
-       typedef union {
+       typedef [switch_type(nbtd_info_level)] union {
                [case(NBTD_INFO_STATISTICS)] nbtd_statistics *stats;
        } nbtd_info;
 
@@ -52,6 +69,9 @@ import "security.idl", "nbt.idl";
                [out,switch_is(level)] nbtd_info info
                );
 
+       /* Send a GetDCName from the privileged port (owned by nbtd),
+        * and await a reply */
+
        void nbtd_getdcname(
                [in] astring domainname,
                [in] astring ip_address,
@@ -62,22 +82,36 @@ import "security.idl", "nbt.idl";
                [out,unique] astring *dcname
                );
 
-       typedef [noejs] struct {
+       typedef struct {
                ipv4address addr;
        } nbtd_proxy_wins_addr;
 
-       [noejs] void nbtd_proxy_wins_challenge(
+       void nbtd_proxy_wins_challenge(
                [in] nbt_name name,
                [in,out] uint32 num_addrs,
                [in,out] nbtd_proxy_wins_addr addrs[num_addrs]
                );
 
-       [noejs] void nbtd_proxy_wins_release_demand(
+       void nbtd_proxy_wins_release_demand(
                [in] nbt_name name,
                [in] uint32 num_addrs,
                [in] nbtd_proxy_wins_addr addrs[num_addrs]
                );
 
+       /*
+         Generic Kerberos package call (on the NETLOGON pipe, as a SamLogon)
+
+         The normal use for this call is to check the PAC signature in the KDC
+         
+         The KDC has the routines to check this, so it is easier to
+         proxy the request over by IRPC than set up the environment
+        */
+
+       void kdc_check_generic_kerberos(
+               [in] DATA_BLOB generic_request,
+               [out] DATA_BLOB generic_reply
+               );
+
        /******************************************************
          management calls for the smb server
        ******************************************************/
@@ -114,7 +148,7 @@ import "security.idl", "nbt.idl";
                [size_is(num_tcons)] smbsrv_tcon_info *tcons;
        } smbsrv_tcons;
 
-       typedef union {
+       typedef [switch_type(smbsrv_info_level)] union {
                [case(SMBSRV_INFO_SESSIONS)] smbsrv_sessions sessions;
                [case(SMBSRV_INFO_TCONS)]    smbsrv_tcons    tcons;
        } smbsrv_info;
@@ -124,4 +158,64 @@ import "security.idl", "nbt.idl";
                [out,switch_is(level)] smbsrv_info info
                );
 
+       /*
+         called when samba should shutdown
+        */
+       void samba_terminate(
+               [in] astring reason
+               );
+
+       /******************************************************
+         management calls for the drepl server
+       ******************************************************/
+       /**
+        * Force dreplsrv to fefresh internal cache.
+        * @param partition_dn Partition to refresh cacheh for.
+        *                     If empy/NULL, refresh all partitions.
+        */
+       WERROR dreplsrv_refresh();
+
+       /*
+         called when role transfer is requested via LDAP
+       */
+       typedef [v1_enum] enum {
+               DREPL_SCHEMA_MASTER,
+               DREPL_RID_MASTER,
+               DREPL_INFRASTRUCTURE_MASTER,
+               DREPL_NAMING_MASTER,
+               DREPL_PDC_MASTER
+       } drepl_role_master;
+
+       WERROR drepl_takeFSMORole(
+               [in] drepl_role_master role
+               );
+
+       /*
+        * message to tell the drepl server to initiate a REPL_SECRET
+        * replication of a users secrets
+        */
+       void drepl_trigger_repl_secret(
+               [in] astring user_dn
+               );
+
+       /*
+         message to do RODC DNS updates via the dnsupdate task
+       */
+       NTSTATUS dnsupdate_RODC(
+               [in,unique] dom_sid *dom_sid,
+               [in,unique] [string,charset(UTF16)] uint16 *site_name,
+               [in] uint32 dns_ttl,
+               [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
+               );
+
+       /******************************************************
+        * Management calls for the dns server
+        ******************************************************/
+       /**
+        * Force internal DNS server to reload the DNS zones.
+        *
+        * Called when zones are added or deleted through RPC
+        * or replicated by DRS.
+        */
+       NTSTATUS dnssrv_reload_dns_zones();
 }