diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-11-02 16:27:46 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-02-11 16:02:14 +0100 |
commit | c6774989e0a878f59f53fa1fe5439b881945a042 (patch) | |
tree | 68345fa7b587571ad49d48dace76132ca9b24515 /librpc | |
parent | ffd0585dd2db0af298fdbe1c7d5aba3cd3699bbc (diff) | |
download | samba-c6774989e0a878f59f53fa1fe5439b881945a042.tar.gz |
librpc/idl: add witness.idl
See [MS-SWN] for the details.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/idl/witness.idl | 110 | ||||
-rw-r--r-- | librpc/idl/wscript_build | 2 | ||||
-rw-r--r-- | librpc/wscript_build | 12 |
3 files changed, 122 insertions, 2 deletions
diff --git a/librpc/idl/witness.idl b/librpc/idl/witness.idl new file mode 100644 index 00000000000..cf605366f0a --- /dev/null +++ b/librpc/idl/witness.idl @@ -0,0 +1,110 @@ +#include "idl_types.h" + +import "misc.idl"; + +[ + uuid("ccd8c074-d0e5-4a40-92b4-d074faa6ba28"), + version(1.1), + pointer_default(unique), + helpstring("SMB Witness Service"), + endpoint("ncacn_ip_tcp:") +] +interface witness +{ + typedef [v1_enum] enum { + WITNESS_V1 = 0x00010001, + WITNESS_V2 = 0x00020000 + } witness_version; + + /*****************/ + /* Function 0x00 */ + + typedef [enum16bit] enum { + WITNESS_STATE_UNKNOWN = 0x00, + WITNESS_STATE_AVAILABLE = 0x01, + WITNESS_STATE_UNAVAILABLE = 0xff + } witness_interfaceInfo_state; + + typedef [bitmap32bit] bitmap { + WITNESS_INFO_IPv4_VALID = 0x01, + WITNESS_INFO_IPv6_VALID = 0x02, + WITNESS_INFO_WITNESS_IF = 0x04 + } witness_interfaceInfo_flags; + + typedef struct { + [charset(UTF16),to_null] uint16 group_name[260]; + witness_version version; + witness_interfaceInfo_state state; + [flag(NDR_BIG_ENDIAN)] ipv4address ipv4; + [flag(NDR_BIG_ENDIAN)] ipv6address ipv6; + witness_interfaceInfo_flags flags; + } witness_interfaceInfo; + + typedef struct { + uint32 num_interfaces; + [size_is(num_interfaces)] witness_interfaceInfo *interfaces; + } witness_interfaceList; + + WERROR witness_GetInterfaceList( + [out] witness_interfaceList **interface_list + ); + + /*****************/ + /* Function 0x01 */ + + WERROR witness_Register( + [out,ref] policy_handle *context_handle, + [in] witness_version version, + [in,unique,string,charset(UTF16)] uint16 *net_name, + [in,unique,string,charset(UTF16)] uint16 *ip_address, + [in,unique,string,charset(UTF16)] uint16 *client_computer_name + ); + + /*****************/ + /* Function 0x02 */ + + WERROR witness_UnRegister( + [in] policy_handle context_handle + ); + + /*****************/ + /* Function 0x03 */ + + typedef [v1_enum] enum { + WITNESS_NOTIFY_RESOURCE_CHANGE = 1, + WITNESS_NOTIFY_CLIENT_MOVE = 2, + WITNESS_NOTIFY_SHARE_MOVE = 3, + WITNESS_NOTIFY_IP_CHANGE = 4 + } witness_notifyResponse_type; + + typedef struct { + witness_notifyResponse_type message_type; + uint32 length; + uint32 num_messages; + [size_is(length)] uint8 *message_buffer; + } witness_notifyResponse; + + WERROR witness_AsyncNotify( + [in] policy_handle context_handle, + [out] witness_notifyResponse **response + ); + + /*****************/ + /* Function 0x04 */ + + typedef [bitmap32bit] bitmap { + WITNESS_REGISTER_NONE = 0x00, + WITNESS_REGISTER_IP_NOTIFICATION = 0x01 + } witness_RegisterEx_flags; + + WERROR witness_RegisterEx( + [out,ref] policy_handle *context_handle, + [in] witness_version version, + [in,unique,string,charset(UTF16)] uint16 *net_name, + [in,unique,string,charset(UTF16)] uint16 *share_name, + [in,unique,string,charset(UTF16)] uint16 *ip_address, + [in,unique,string,charset(UTF16)] uint16 *client_computer_name, + [in] witness_RegisterEx_flags flags, + [in] uint32 timeout + ); +} diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build index 854a2e2e96b..f181786d013 100644 --- a/librpc/idl/wscript_build +++ b/librpc/idl/wscript_build @@ -12,7 +12,7 @@ bld.SAMBA_PIDL_LIST('PIDL', drsblobs.idl efs.idl frstrans.idl mgmt.idl netlogon.idl notify.idl policyagent.idl scerpc.idl svcctl.idl wkssvc.idl eventlog6.idl backupkey.idl - fsrvp.idl''', + fsrvp.idl witness.idl''', options='--header --ndr-parser --samba3-ndr-server --server --client --python', output_dir='../gen_ndr') diff --git a/librpc/wscript_build b/librpc/wscript_build index a3d7607d745..1c2062f046e 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -300,6 +300,11 @@ bld.SAMBA_SUBSYSTEM('NDR_FSRVP', public_deps='ndr' ) +bld.SAMBA_SUBSYSTEM('NDR_WITNESS', + source='gen_ndr/ndr_witness.c', + public_deps='ndr' + ) + bld.SAMBA_SUBSYSTEM('NDR_DCERPC', source='gen_ndr/ndr_dcerpc.c ndr/ndr_dcerpc.c', public_deps='ndr', @@ -614,12 +619,17 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_FSRVP', public_deps='dcerpc-binding NDR_FSRVP' ) +bld.SAMBA_SUBSYSTEM('RPC_NDR_WITNESS', + source='gen_ndr/ndr_witness_c.c', + public_deps='dcerpc-binding NDR_WITNESS' + ) + # a grouping library for NDR subsystems that may be used by more than one target bld.SAMBA_LIBRARY('ndr-samba', source=[], deps='''NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_SCHANNEL NDR_MGMT NDR_DNSP NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM - NDR_NTPRINTING NDR_FSRVP NDR_OPEN_FILES NDR_SMBXSRV''', + NDR_NTPRINTING NDR_FSRVP NDR_WITNESS NDR_OPEN_FILES NDR_SMBXSRV''', private_library=True, grouping_library=True ) |