diff options
Diffstat (limited to 'source4/librpc/idl')
-rw-r--r-- | source4/librpc/idl/IDL_LICENSE.txt | 9 | ||||
-rw-r--r-- | source4/librpc/idl/irpc.idl | 221 | ||||
-rw-r--r-- | source4/librpc/idl/ntp_signd.idl | 40 | ||||
-rw-r--r-- | source4/librpc/idl/opendb.idl | 46 | ||||
-rw-r--r-- | source4/librpc/idl/sasl_helpers.idl | 20 | ||||
-rw-r--r-- | source4/librpc/idl/winbind.idl | 35 | ||||
-rw-r--r-- | source4/librpc/idl/winsif.idl | 342 | ||||
-rw-r--r-- | source4/librpc/idl/winsrepl.idl | 174 | ||||
-rw-r--r-- | source4/librpc/idl/wscript_build | 17 |
9 files changed, 904 insertions, 0 deletions
diff --git a/source4/librpc/idl/IDL_LICENSE.txt b/source4/librpc/idl/IDL_LICENSE.txt new file mode 100644 index 0000000..01ae670 --- /dev/null +++ b/source4/librpc/idl/IDL_LICENSE.txt @@ -0,0 +1,9 @@ +The IDL files in this directory are made available by the Samba Team +under the following license: + + Permission to use, copy, modify, and distribute these interface + definitions for any purpose is hereby granted without fee. + + This work is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/source4/librpc/idl/irpc.idl b/source4/librpc/idl/irpc.idl new file mode 100644 index 0000000..b4517da --- /dev/null +++ b/source4/librpc/idl/irpc.idl @@ -0,0 +1,221 @@ +#include "idl_types.h" + +import "misc.idl", "security.idl", "nbt.idl", "netlogon.idl", "server_id.idl"; + +/* + definitions for irpc primitives +*/ +[ uuid("e770c620-0b06-4b5e-8d87-a26e20f28340"), + version(1.0), + pointer_default(unique) +] interface irpc +{ + typedef bitmap { + IRPC_FLAG_REPLY = 0x0001 + } irpc_flags; + + 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 + *******************************************************/ + void irpc_uptime([out,ref] NTTIME *start_time); + + /****************************************************** + management calls for the nbt server + ******************************************************/ + typedef [v1_enum] enum { + NBTD_INFO_STATISTICS + } nbtd_info_level; + + typedef struct { + hyper total_received; + hyper total_sent; + hyper query_count; + hyper register_count; + hyper release_count; + } nbtd_statistics; + + typedef [switch_type(nbtd_info_level)] union { + [case(NBTD_INFO_STATISTICS)] nbtd_statistics *stats; + } nbtd_info; + + void nbtd_information( + [in] nbtd_info_level level, + [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, + [in] astring my_computername, + [in] astring my_accountname, + [in] uint32 account_control, + [in] dom_sid *domain_sid, + [out,unique] astring *dcname + ); + + typedef struct { + ipv4address addr; + } nbtd_proxy_wins_addr; + + void nbtd_proxy_wins_challenge( + [in] nbt_name name, + [in,out] uint32 num_addrs, + [in,out] nbtd_proxy_wins_addr addrs[num_addrs] + ); + + 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 + ******************************************************/ + typedef [v1_enum] enum { + SMBSRV_INFO_SESSIONS, + SMBSRV_INFO_TCONS + } smbsrv_info_level; + + typedef struct { + hyper vuid; + astring account_name; + astring domain_name; + astring client_ip; + NTTIME connect_time; + NTTIME auth_time; + NTTIME last_use_time; + } smbsrv_session_info; + + typedef struct { + uint32 num_sessions; + [size_is(num_sessions)] smbsrv_session_info *sessions; + } smbsrv_sessions; + + typedef struct { + uint32 tid; + astring share_name; + astring client_ip; + NTTIME connect_time; + NTTIME last_use_time; + } smbsrv_tcon_info; + + typedef struct { + uint32 num_tcons; + [size_is(num_tcons)] smbsrv_tcon_info *tcons; + } smbsrv_tcons; + + typedef [switch_type(smbsrv_info_level)] union { + [case(SMBSRV_INFO_SESSIONS)] smbsrv_sessions sessions; + [case(SMBSRV_INFO_TCONS)] smbsrv_tcons tcons; + } smbsrv_info; + + void smbsrv_information( + [in] smbsrv_info_level level, + [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 cache for. + * If empty/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(); +} diff --git a/source4/librpc/idl/ntp_signd.idl b/source4/librpc/idl/ntp_signd.idl new file mode 100644 index 0000000..c081ca0 --- /dev/null +++ b/source4/librpc/idl/ntp_signd.idl @@ -0,0 +1,40 @@ +/* + NTP signing IRPC interface +*/ + +#include "idl_types.h" + +[ + uuid("0da00951-5b6c-4488-9a89-750cac70920c"), + version(1.0), + pointer_default(unique) +] +interface ntp_signd +{ + + const int NTP_SIGND_PROTOCOL_VERSION_0 = 0; + + typedef [v1_enum] enum { + SIGN_TO_CLIENT = 0, + ASK_SERVER_TO_SIGN = 1, + CHECK_SERVER_SIGNATURE = 2, + SIGNING_SUCCESS = 3, + SIGNING_FAILURE = 4 + } ntp_signd_op; + + typedef [flag(NDR_BIG_ENDIAN),public] struct { + [value(NTP_SIGND_PROTOCOL_VERSION_0)] uint32 version; + ntp_signd_op op; + uint16 packet_id; + [flag(NDR_LITTLE_ENDIAN)] uint32 key_id; + [flag(NDR_REMAINING)] DATA_BLOB packet_to_sign; + + } sign_request; + + typedef [flag(NDR_BIG_ENDIAN),public] struct samba_key_out { + [value(NTP_SIGND_PROTOCOL_VERSION_0)] uint32 version; + ntp_signd_op op; + uint32 packet_id; + [flag(NDR_REMAINING)] DATA_BLOB signed_packet; + } signed_reply; +} diff --git a/source4/librpc/idl/opendb.idl b/source4/librpc/idl/opendb.idl new file mode 100644 index 0000000..b769929 --- /dev/null +++ b/source4/librpc/idl/opendb.idl @@ -0,0 +1,46 @@ +#include "idl_types.h" + +/* + IDL structures for opendb code + + this defines the structures used in the opendb database code, in + ntvfs/common/opendb.c +*/ + +import "server_id.idl"; + +[ + pointer_default(unique) +] +interface opendb +{ + typedef struct { + server_id server; + uint32 stream_id; + uint32 share_access; + uint32 access_mask; + pointer file_handle; + pointer fd; + /* we need a per-entry delete on close, as well as a per-file + one, to cope with strange semantics on open */ + boolean8 delete_on_close; + boolean8 allow_level_II_oplock; + uint32 oplock_level; + } opendb_entry; + + typedef struct { + server_id server; + pointer notify_ptr; + } opendb_pending; + + typedef [public] struct { + boolean8 delete_on_close; + NTTIME open_write_time; + NTTIME changed_write_time; + utf8string path; + uint32 num_entries; + opendb_entry entries[num_entries]; + uint32 num_pending; + opendb_pending pending[num_pending]; + } opendb_file; +} diff --git a/source4/librpc/idl/sasl_helpers.idl b/source4/librpc/idl/sasl_helpers.idl new file mode 100644 index 0000000..5f5d521 --- /dev/null +++ b/source4/librpc/idl/sasl_helpers.idl @@ -0,0 +1,20 @@ +#include "idl_types.h" + +[ + uuid("7512b2f4-5f4f-11e4-bbe6-3c970e8d8226"), + version(1.0), + pointer_default(unique), + helpstring("SASL helpers") +] +interface sasl_helpers { + typedef [public,flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX)] struct { + [value(strlen_m(authid))] uint16 authid_length; + [charset(UTF8)] uint8 authid[authid_length]; + uint16 passwd_length; + uint8 passwd[passwd_length]; + [value(strlen_m(service))] uint16 service_length; + [charset(UTF8)] uint8 service[service_length]; + [value(strlen_m(realm))] uint16 realm_length; + [charset(UTF8)] uint8 realm[realm_length]; + } saslauthdRequest; +} diff --git a/source4/librpc/idl/winbind.idl b/source4/librpc/idl/winbind.idl new file mode 100644 index 0000000..f79eba7 --- /dev/null +++ b/source4/librpc/idl/winbind.idl @@ -0,0 +1,35 @@ +/* + winbind IRPC interface +*/ + +#include "idl_types.h" + +import "netlogon.idl"; + +[ + uuid("b875118e-47a3-4210-b5f7-c240cce656b2"), + version(1.0), + pointer_default(unique) +] +interface winbind +{ + typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel; + typedef [switch_type(uint16)] union netr_Validation netr_Validation; + + /* + * do a netr_LogonSamLogon() against the right DC + */ + NTSTATUS winbind_SamLogon( + [in] uint16 logon_level, + [in] [switch_is(logon_level)] netr_LogonLevel logon, + [in] uint16 validation_level, + [out] [switch_is(validation_level)] netr_Validation validation, + [out] uint8 authoritative + ); + + NTSTATUS winbind_DsrUpdateReadOnlyServerDnsRecords( + [in,unique] [string,charset(UTF16)] uint16 *site_name, + [in] uint32 dns_ttl, + [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names + ); +} diff --git a/source4/librpc/idl/winsif.idl b/source4/librpc/idl/winsif.idl new file mode 100644 index 0000000..1ca028a --- /dev/null +++ b/source4/librpc/idl/winsif.idl @@ -0,0 +1,342 @@ +#include "idl_types.h" + +import "nbt.idl"; + +[ + uuid("45f52c28-7f9f-101a-b52b-08002b2efabe"), + version(1.0), + helpstring("WINS Administration Interface1"), + helper("../libcli/nbt/libnbt.h"), + pointer_default(unique) +] interface winsif +{ + /*****************/ + /* Function 0x00 */ + typedef struct { + uint8 type; + uint32 length; + ipv4address addr; + } winsif_Address; + + typedef enum { + WINSIF_ACTION_INSERT = 0x0000, + WINSIF_ACTION_DELETE = 0x0001, + WINSIF_ACTION_RELEASE = 0x0002, + WINSIF_ACTION_MODIFY = 0x0003, + WINSIF_ACTION_QUERY = 0x0004 + } winsif_Action; + + typedef enum { + WINSIF_RECORD_UNIQUE_NAME = 0x0000, + WINSIF_RECORD_GROUP_NAME = 0x0001, + WINSIF_RECORD_SGROUP_NAME = 0x0002, + WINSIF_RECORD_MHOMED_NAME = 0x0003 + } winsif_RecordType; + + typedef [enum8bit] enum { + WINSIF_NODE_B = 0x00, + WINSIF_NODE_P = 0x01, + WINSIF_NODE_H = 0x03 + } winsif_NodeType; + + typedef [v1_enum] enum { + WINSIF_RECORD_ACTIVE = 0x00000000, + WINSIF_RECORD_RELEASED = 0x00000001, + WINSIF_RECORD_TOMBSTONE = 0x00000002, + WINSIF_RECORD_DELETED = 0x00000003 + } winsif_RecordState; + + typedef struct { + winsif_Action cmd; + wrepl_nbt_name *name; + [value(name?16:0)] uint32 name_len; + winsif_RecordType record_type; + uint32 num_of_addresses; + [size_is(num_of_addresses)] winsif_Address *addresses; + winsif_Address address; + hyper version_number; + winsif_NodeType node_type; + ipv4address owner_address; + winsif_RecordState record_state; + boolean32 is_static; + time_t expire_time; + } winsif_RecordAction; + + WERROR winsif_WinsRecordAction( + [in,out,ref] winsif_RecordAction **record_action + ); + + /*****************/ + /* Function 0x01 */ + typedef struct { + winsif_Address address; + hyper version_number; + } winsif_AddressVersionMap; + + typedef enum { + WINSIF_PRIORITY_NORMAL = 0x0000, + WINSIF_PRIORITY_HIGH = 0x0001 + } winsif_PriorityClass; + + typedef struct { + winsif_Address address; + uint32 num_replications; + uint32 num_communication_failures; + } winsif_ReplCounter; + + typedef struct { + uint32 num_unique_registrations; + uint32 num_group_registrations; + uint32 num_queries; + uint32 num_successful_queries; + uint32 num_failed_queries; + uint32 num_unique_refreshes; + uint32 num_group_refreshes; + uint32 num_releases; + uint32 num_successful_releases; + uint32 num_failed_releases; + uint32 num_unique_conflicts; + uint32 num_group_conflicts; + } winsif_StatCounters; + + typedef struct { + time_t wins_start_time; + time_t last_periodic_scavenging; + time_t last_triggered_scavenging; + time_t last_tombstone_scavenging; + time_t last_verification_scavenging; + time_t last_periodic_pull_replication; + time_t last_triggered_pull_replication; + time_t ignore_last_ntrepl; + time_t ignore_last_actrepl; + time_t last_init_db; + time_t counter_reset; + } winsif_StatTimeStamps; + + typedef struct { + winsif_StatCounters counters; + winsif_StatTimeStamps time_stamps; + uint32 num_partners; + [size_is(num_partners)] winsif_ReplCounter *partners; + } winsif_Stat; + + typedef struct { + uint32 num_owners; + winsif_AddressVersionMap address_version_maps[25]; + hyper my_max_version_number; + uint32 refresh_interval; + uint32 tombstone_interval; + uint32 tombstone_timeout; + uint32 verify_interval; + winsif_PriorityClass prioritiy_class; + uint32 num_worker_threads; + winsif_Stat wstat; + } winsif_Results; + + typedef enum { + WINSIF_STATUS_CMD_ADDRESS_VERSION_MAP = 0x0000, + WINSIF_STATUS_CMD_CONFIG = 0x0001, + WINSIF_STATUS_CMD_STAT = 0x0002, + WINSIF_STATUS_CMD_ALL_MAPS = 0x0003 + } winsif_StatusCmd; + + WERROR winsif_WinsStatus( + [in] winsif_StatusCmd cmd, + [in,out,ref] winsif_Results *results + ); + + /*****************/ + /* Function 0x02 */ + typedef enum { + WINSIF_TRIGGER_PULL = 0x0000, + WINSIF_TRIGGER_PUSH = 0x0001, + WINSIF_TRIGGER_PUSH_PROP= 0x0002 + } winsif_TriggerType; + + WERROR winsif_WinsTrigger( + [in,ref] winsif_Address *owner_address, + [in] winsif_TriggerType trigger_type + ); + + /*****************/ + /* Function 0x03 */ + WERROR winsif_WinsDoStaticInit( + [in,unique,string,charset(UTF16)] uint16 *data_file_path, + [in] boolean32 delete_file + ); + + /*****************/ + /* Function 0x04 */ + WERROR winsif_WinsDoScavenging(); + + /*****************/ + /* Function 0x05 */ + typedef struct { + uint32 buffer_size; + [size_is(num_records)] winsif_RecordAction *row; + uint32 num_records; + uint32 total_num_records; + } winsif_Records; + + WERROR winsif_WinsGetDbRecs( + [in,unique] winsif_Address *owner_address, + [in] hyper min_version_number, + [in] hyper max_version_number, + [out,ref] winsif_Records *records + ); + + /*****************/ + /* Function 0x06 */ + WERROR winsif_WinsTerm( + [in] uint16 abrupt_termination + ); + + /*****************/ + /* Function 0x07 */ + WERROR winsif_WinsBackup( + [in,ref,string,charset(DOS)] uint8 *backup_path, + [in] uint16 incremental + ); + + /*****************/ + /* Function 0x08 */ + WERROR winsif_WinsDelDbRecs( + [in,ref] winsif_Address *owner_address, + [in] hyper min_version_number, + [in] hyper max_version_number + ); + + /*****************/ + /* Function 0x09 */ + WERROR winsif_WinsPullRange( + [in,ref] winsif_Address *server_address, + [in,ref] winsif_Address *owner_address, + [in] hyper min_version_number, + [in] hyper max_version_number + ); + + /*****************/ + /* Function 0x0A */ + WERROR winsif_WinsSetPriorityClass( + [in] winsif_PriorityClass prioritiy_class + ); + + /*****************/ + /* Function 0x0B */ + WERROR winsif_WinsResetCounters(); + + /*****************/ + /* Function 0x0C */ + WERROR winsif_WinsWorkerThreadUpdate( + [in] uint32 num_of_threads + ); + + /*****************/ + /* Function 0x0D */ + WERROR winsif_WinsGetNameAndAdd( + [out,ref] winsif_Address *server_address, + /* + * TODO: fix pidl to handles this completly correct... + * currently it gives a warning about a missing pointer. + */ + [out,ref,string,charset(DOS),size_is(80)] uint8 *unc_name + ); + + /*****************/ + /* Function 0x0E */ + typedef struct { + uint32 name_len; + [string,charset(DOS)] uint8 *name; + } winsif_BrowserInfo; + + typedef struct { + uint32 num_entries; + [size_is(num_entries)] winsif_BrowserInfo *info; + } winsif_BrowserNames; + + WERROR winsif_WinsGetBrowserNames_Old( + [out,ref] winsif_BrowserNames *names + ); + + /*****************/ + /* Function 0x0F */ + WERROR winsif_WinsDeleteWins( + [in,ref] winsif_Address *owner_address + ); + + /*****************/ + /* Function 0x10 */ + WERROR winsif_WinsSetFlags( + [in] uint32 flags + ); + + /*****************/ + /* Function 0x11 */ + typedef struct { + boolean32 tcp_ip; + [string,charset(DOS)] uint8 *server_address; + [string,charset(DOS)] uint8 *pipe_name; + } winsif_BindData; + + WERROR winsif_WinsGetBrowserNames( + [in,ref] winsif_BindData *server_handle, + [out,ref] winsif_BrowserNames *names + ); + + /*****************/ + /* Function 0x12 */ + WERROR winsif_WinsGetDbRecsByName( + [in,unique] winsif_Address *owner_address, + [in] boolean32 search_backward, + [in,unique] wrepl_nbt_name *name, + [in,value(name?16:0),range(0,16)] uint32 name_len, + [in] uint32 num_records_desired, + [in] boolean32 only_statics, + [out,ref] winsif_Records *records + ); + + /*****************/ + /* Function 0x13 */ + typedef struct { + uint32 num_owners; + [size_is(num_owners)] winsif_AddressVersionMap *address_version_maps; + hyper my_max_version_number; + uint32 refresh_interval; + uint32 tombstone_interval; + uint32 tombstone_timeout; + uint32 verify_interval; + winsif_PriorityClass prioritiy_class; + uint32 num_worker_threads; + winsif_Stat wstat; + } winsif_ResultsNew; + + WERROR winsif_WinsStatusNew( + [in] winsif_StatusCmd cmd, + [out,ref] winsif_ResultsNew *results + ); + + /*****************/ + /* Function 0x14 */ + WERROR winsif_WinsStatusWHdl( + [in,ref] winsif_BindData *server_handle, + [in] winsif_StatusCmd cmd, + [in,out,ref] winsif_ResultsNew *results + ); + + /*****************/ + /* Function 0x15 */ + typedef enum { + WINSIF_SCAVENGING_GENERAL = 0x0000, + WINSIF_SCAVENGING_VERIFY = 0x0001 + } winsif_ScavengingOpcode; + + typedef struct { + winsif_ScavengingOpcode opcode; + uint32 age; + boolean32 force; + } winsif_ScavengingRequest; + + WERROR winsif_WinsDoScanvengingNew( + [in,ref] winsif_ScavengingRequest *request + ); +} diff --git a/source4/librpc/idl/winsrepl.idl b/source4/librpc/idl/winsrepl.idl new file mode 100644 index 0000000..4ef2e8e --- /dev/null +++ b/source4/librpc/idl/winsrepl.idl @@ -0,0 +1,174 @@ +#include "idl_types.h" + +/* + IDL structures for WINS replication protocol (port 42) + + Note that WINS replication is not traditionally encoded using + IDL/NDR + + Written by Andrew Tridgell <tridge@osdl.org> +*/ + +import "nbt.idl"; + +[ + uuid("915f5653-bac1-431c-97ee-9ffb34526921"), + helpstring("WINS Replication PDUs"), + helper("../libcli/nbt/libnbt.h") +] interface winsrepl +{ + const int WINS_REPLICATION_PORT = 42; + + typedef [flag(NDR_BIG_ENDIAN)] struct { + ipv4address owner; + ipv4address ip; + } wrepl_ip; + + typedef [flag(NDR_LITTLE_ENDIAN)] struct { + uint32 num_ips; + wrepl_ip ips[num_ips]; + } wrepl_address_list; + + typedef [nodiscriminant] union { + [case(0)] ipv4address ip; + [case(2)] wrepl_address_list addresses; + } wrepl_addresses; + + typedef [enum8bit] enum { + WREPL_TYPE_UNIQUE = 0x0, + WREPL_TYPE_GROUP = 0x1, + WREPL_TYPE_SGROUP = 0x2, + WREPL_TYPE_MHOMED = 0x3 + } wrepl_name_type; + + typedef [enum8bit] enum { + WREPL_STATE_ACTIVE = 0x0, + WREPL_STATE_RELEASED = 0x1, + WREPL_STATE_TOMBSTONE = 0x2, + WREPL_STATE_RESERVED = 0x3 + } wrepl_name_state; + + typedef [enum8bit] enum { + WREPL_NODE_B = 0x0, + WREPL_NODE_P = 0x1, + WREPL_NODE_M = 0x2, + WREPL_NODE_H = 0x3 + } wrepl_name_node; + + typedef [bitmap32bit] bitmap { + WREPL_FLAGS_RECORD_TYPE = 0x00000003, + WREPL_FLAGS_RECORD_STATE = 0x0000000C, + WREPL_FLAGS_REGISTERED_LOCAL = 0x00000010, + WREPL_FLAGS_NODE_TYPE = 0x00000060, + WREPL_FLAGS_IS_STATIC = 0x00000080 + } wrepl_flags; + + typedef [v1_enum] enum { + WREPL_GROUP_FLAG_NO_GROUP = 0x00000000, + WREPL_GROUP_FLAG_IS_GROUP = 0x00000001 + } wrepl_group_flag; + +#define WREPL_IS_GROUP(flags) (\ + ((((flags) & WREPL_FLAGS_RECORD_TYPE) == WREPL_TYPE_GROUP)|| \ + (((flags) & WREPL_FLAGS_RECORD_TYPE) == WREPL_TYPE_SGROUP))\ + ? WREPL_GROUP_FLAG_IS_GROUP : WREPL_GROUP_FLAG_NO_GROUP) + + typedef struct { + wrepl_nbt_name name; + wrepl_flags flags; + [flag(NDR_LITTLE_ENDIAN),value(WREPL_IS_GROUP(flags))] wrepl_group_flag is_group; + udlongr id; + [switch_is(flags & 2)] wrepl_addresses addresses; + ipv4address unknown; + } wrepl_wins_name; + + typedef struct { + uint32 num_names; + wrepl_wins_name names[num_names]; + } wrepl_send_reply; + + typedef struct { + ipv4address address; + udlongr max_version; + udlongr min_version; + uint32 type; + } wrepl_wins_owner; + + typedef struct { + uint32 partner_count; + wrepl_wins_owner partners[partner_count]; + ipv4address initiator; + } wrepl_table; + + typedef [v1_enum] enum { + WREPL_REPL_TABLE_QUERY = 0, + WREPL_REPL_TABLE_REPLY = 1, + WREPL_REPL_SEND_REQUEST = 2, + WREPL_REPL_SEND_REPLY = 3, + WREPL_REPL_UPDATE = 4, + WREPL_REPL_UPDATE2 = 5, + WREPL_REPL_INFORM = 8, + WREPL_REPL_INFORM2 = 9 + } wrepl_replication_cmd; + + typedef [nodiscriminant] union { + [case(WREPL_REPL_TABLE_QUERY)] ; + [case(WREPL_REPL_TABLE_REPLY)] wrepl_table table; + [case(WREPL_REPL_SEND_REQUEST)] wrepl_wins_owner owner; + [case(WREPL_REPL_SEND_REPLY)] wrepl_send_reply reply; + [case(WREPL_REPL_UPDATE)] wrepl_table table; + [case(WREPL_REPL_UPDATE2)] wrepl_table table; + [case(WREPL_REPL_INFORM)] wrepl_table table; + [case(WREPL_REPL_INFORM2)] wrepl_table table; + } wrepl_replication_info; + + typedef struct { + wrepl_replication_cmd command; + [switch_is(command)] wrepl_replication_info info; + } wrepl_replication; + + typedef struct { + uint32 assoc_ctx; + uint16 minor_version; + uint16 major_version; + } wrepl_start; + + typedef struct { + uint32 reason; + } wrepl_stop; + + typedef [v1_enum] enum { + WREPL_START_ASSOCIATION = 0, + WREPL_START_ASSOCIATION_REPLY = 1, + WREPL_STOP_ASSOCIATION = 2, + WREPL_REPLICATION = 3 + } wrepl_mess_type; + + typedef [nodiscriminant] union { + [case(WREPL_START_ASSOCIATION)] wrepl_start start; + [case(WREPL_START_ASSOCIATION_REPLY)] wrepl_start start_reply; + [case(WREPL_STOP_ASSOCIATION)] wrepl_stop stop; + [case(WREPL_REPLICATION)] wrepl_replication replication; + } wrepl_message; + + /* + the opcode appears to be a bitfield, but as far as I can tell + you must always set the following bits. Additional bits don't + seem to matter. Very strange. + */ + const int WREPL_OPCODE_BITS = 0x7800; + + + typedef [gensize,flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct { + uint32 opcode; + uint32 assoc_ctx; + wrepl_mess_type mess_type; + [switch_is(mess_type)] wrepl_message message; + [flag(NDR_REMAINING)] DATA_BLOB padding; + } wrepl_packet; + + typedef [flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct { + [value(ndr_size_wrepl_packet(&packet, ndr->flags))] uint32 size; + wrepl_packet packet; + } wrepl_wrap; +} diff --git a/source4/librpc/idl/wscript_build b/source4/librpc/idl/wscript_build new file mode 100644 index 0000000..58555e6 --- /dev/null +++ b/source4/librpc/idl/wscript_build @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +import os + +topinclude=os.path.join(bld.srcnode.abspath(), 'librpc/idl') + +bld.SAMBA_PIDL_LIST('PIDL', + source='''ntp_signd.idl + opendb.idl sasl_helpers.idl + winsif.idl winsrepl.idl''', + options="--includedir=%s --header --ndr-parser" % topinclude, + output_dir='../gen_ndr') + +bld.SAMBA_PIDL_LIST('PIDL', + source='''irpc.idl''', + options="--includedir=%s --header --ndr-parser --client --python" % topinclude, + output_dir='../gen_ndr') |