2012-11-02 19:27:46 +04:00
#include "idl_types.h"
import "misc.idl";
[
uuid("ccd8c074-d0e5-4a40-92b4-d074faa6ba28"),
version(1.1),
pointer_default(unique),
helpstring("SMB Witness Service"),
2015-06-25 17:24:06 +03:00
helper("../librpc/ndr/ndr_witness.h"),
2020-10-21 19:30:29 +03:00
endpoint("ncacn_ip_tcp:"),
authservice("cifs")
2012-11-02 19:27:46 +04:00
]
interface witness
{
2023-12-29 12:20:02 +03:00
typedef [flag(NDR_PAHEX),v1_enum,public] enum {
2012-11-02 19:27:46 +04:00
WITNESS_V1 = 0x00010001,
2015-04-13 14:05:59 +03:00
WITNESS_V2 = 0x00020000,
WITNESS_UNSPECIFIED_VERSION = 0xFFFFFFFF
2012-11-02 19:27:46 +04:00
} witness_version;
/*****************/
/* Function 0x00 */
2023-12-29 12:20:02 +03:00
typedef [flag(NDR_PAHEX),enum16bit] enum {
2012-11-02 19:27:46 +04:00
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;
2024-01-12 18:54:32 +03:00
typedef [public] struct {
2012-11-02 19:27:46 +04:00
uint32 num_interfaces;
[size_is(num_interfaces)] witness_interfaceInfo *interfaces;
} witness_interfaceList;
2015-01-16 15:43:01 +03:00
[public] WERROR witness_GetInterfaceList(
2012-11-02 19:27:46 +04:00
[out] witness_interfaceList **interface_list
);
/*****************/
/* Function 0x01 */
2015-01-16 15:43:01 +03:00
[public] WERROR witness_Register(
2012-11-02 19:27:46 +04:00
[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 */
2015-01-16 15:43:01 +03:00
[public] WERROR witness_UnRegister(
2012-11-02 19:27:46 +04:00
[in] policy_handle context_handle
);
/*****************/
/* Function 0x03 */
2015-06-25 17:24:06 +03:00
typedef [v1_enum,public] enum {
2012-11-02 19:27:46 +04:00
WITNESS_NOTIFY_RESOURCE_CHANGE = 1,
WITNESS_NOTIFY_CLIENT_MOVE = 2,
WITNESS_NOTIFY_SHARE_MOVE = 3,
WITNESS_NOTIFY_IP_CHANGE = 4
} witness_notifyResponse_type;
2023-12-29 12:20:02 +03:00
typedef [flag(NDR_PAHEX),v1_enum] enum {
2014-02-04 18:43:39 +04:00
WITNESS_RESOURCE_STATE_UNKNOWN = 0x00,
WITNESS_RESOURCE_STATE_AVAILABLE = 0x01,
WITNESS_RESOURCE_STATE_UNAVAILABLE = 0xff
} witness_ResourceChange_type;
typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN),gensize,public] struct {
[value(ndr_size_witness_ResourceChange(r,ndr->flags))] uint32 length;
witness_ResourceChange_type type;
nstring name;
} witness_ResourceChange;
typedef [bitmap32bit] bitmap {
WITNESS_IPADDR_V4 = 0x01,
WITNESS_IPADDR_V6 = 0x02,
WITNESS_IPADDR_ONLINE = 0x08,
WITNESS_IPADDR_OFFLINE = 0x10
} witness_IPaddrInfo_flags;
2020-07-31 12:27:25 +03:00
typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
2014-02-04 18:43:39 +04:00
witness_IPaddrInfo_flags flags;
2015-09-24 07:40:19 +03:00
[flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
[flag(NDR_BIG_ENDIAN)] ipv6address ipv6;
2014-02-04 18:43:39 +04:00
} witness_IPaddrInfo;
2020-07-31 12:27:25 +03:00
typedef [public,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN),gensize] struct {
[value(ndr_size_witness_IPaddrInfoList(r, ndr->flags))] uint32 length;
2014-02-04 18:43:39 +04:00
[value(0)] uint32 reserved;
uint32 num;
witness_IPaddrInfo addr[num];
} witness_IPaddrInfoList;
typedef [public,switch_type(witness_notifyResponse_type),nodiscriminant, flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] union {
[case(WITNESS_NOTIFY_RESOURCE_CHANGE)] witness_ResourceChange resource_change;
[case(WITNESS_NOTIFY_CLIENT_MOVE)] witness_IPaddrInfoList client_move;
[case(WITNESS_NOTIFY_SHARE_MOVE)] witness_IPaddrInfoList share_move;
[case(WITNESS_NOTIFY_IP_CHANGE)] witness_IPaddrInfoList ip_change;
2015-07-02 17:50:52 +03:00
[default,flag(NDR_REMAINING)] DATA_BLOB data;
2014-02-04 18:43:39 +04:00
} witness_notifyResponse_message;
2015-06-25 17:24:06 +03:00
typedef [flag(NDR_PAHEX),gensize,public,nopush,nopull] struct {
2014-02-04 18:43:39 +04:00
witness_notifyResponse_type type;
2015-06-25 17:24:06 +03:00
[value(ndr_size_witness_notifyResponse(r, ndr->flags)-20)] uint32 length;
2014-02-04 18:43:39 +04:00
uint32 num;
2019-11-18 06:02:39 +03:00
[subcontext(4), subcontext_size(length), flag(NDR_REMAINING), switch_is(type), size_is(num)] witness_notifyResponse_message *messages;
2012-11-02 19:27:46 +04:00
} witness_notifyResponse;
2015-01-16 15:43:01 +03:00
[public] WERROR witness_AsyncNotify(
2012-11-02 19:27:46 +04:00
[in] policy_handle context_handle,
[out] witness_notifyResponse **response
);
/*****************/
/* Function 0x04 */
2023-11-24 18:38:06 +03:00
typedef [bitmap32bit,public] bitmap {
2012-11-02 19:27:46 +04:00
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
);
}