tevent: release 0.16.1
[Samba.git] / librpc / idl / witness.idl
blobdc3af4a6e0b85688cc25d1a3334ce948e516f9e9
1 #include "idl_types.h"
3 import "misc.idl";
6 uuid("ccd8c074-d0e5-4a40-92b4-d074faa6ba28"),
7 version(1.1),
8 pointer_default(unique),
9 helpstring("SMB Witness Service"),
10 helper("../librpc/ndr/ndr_witness.h"),
11 endpoint("ncacn_ip_tcp:"),
12 authservice("cifs")
14 interface witness
16 typedef [flag(NDR_PAHEX),v1_enum,public] enum {
17 WITNESS_V1 = 0x00010001,
18 WITNESS_V2 = 0x00020000,
19 WITNESS_UNSPECIFIED_VERSION = 0xFFFFFFFF
20 } witness_version;
22 /*****************/
23 /* Function 0x00 */
25 typedef [flag(NDR_PAHEX),enum16bit] enum {
26 WITNESS_STATE_UNKNOWN = 0x00,
27 WITNESS_STATE_AVAILABLE = 0x01,
28 WITNESS_STATE_UNAVAILABLE = 0xff
29 } witness_interfaceInfo_state;
31 typedef [bitmap32bit] bitmap {
32 WITNESS_INFO_IPv4_VALID = 0x01,
33 WITNESS_INFO_IPv6_VALID = 0x02,
34 WITNESS_INFO_WITNESS_IF = 0x04
35 } witness_interfaceInfo_flags;
37 typedef struct {
38 [charset(UTF16),to_null] uint16 group_name[260];
39 witness_version version;
40 witness_interfaceInfo_state state;
41 [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
42 [flag(NDR_BIG_ENDIAN)] ipv6address ipv6;
43 witness_interfaceInfo_flags flags;
44 } witness_interfaceInfo;
46 typedef [public] struct {
47 uint32 num_interfaces;
48 [size_is(num_interfaces)] witness_interfaceInfo *interfaces;
49 } witness_interfaceList;
51 [public] WERROR witness_GetInterfaceList(
52 [out] witness_interfaceList **interface_list
55 /*****************/
56 /* Function 0x01 */
58 [public] WERROR witness_Register(
59 [out,ref] policy_handle *context_handle,
60 [in] witness_version version,
61 [in,unique,string,charset(UTF16)] uint16 *net_name,
62 [in,unique,string,charset(UTF16)] uint16 *ip_address,
63 [in,unique,string,charset(UTF16)] uint16 *client_computer_name
66 /*****************/
67 /* Function 0x02 */
69 [public] WERROR witness_UnRegister(
70 [in] policy_handle context_handle
73 /*****************/
74 /* Function 0x03 */
76 typedef [v1_enum,public] enum {
77 WITNESS_NOTIFY_RESOURCE_CHANGE = 1,
78 WITNESS_NOTIFY_CLIENT_MOVE = 2,
79 WITNESS_NOTIFY_SHARE_MOVE = 3,
80 WITNESS_NOTIFY_IP_CHANGE = 4
81 } witness_notifyResponse_type;
83 typedef [flag(NDR_PAHEX),v1_enum] enum {
84 WITNESS_RESOURCE_STATE_UNKNOWN = 0x00,
85 WITNESS_RESOURCE_STATE_AVAILABLE = 0x01,
86 WITNESS_RESOURCE_STATE_UNAVAILABLE = 0xff
87 } witness_ResourceChange_type;
89 typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN),gensize,public] struct {
90 [value(ndr_size_witness_ResourceChange(r,ndr->flags))] uint32 length;
91 witness_ResourceChange_type type;
92 nstring name;
93 } witness_ResourceChange;
95 typedef [bitmap32bit] bitmap {
96 WITNESS_IPADDR_V4 = 0x01,
97 WITNESS_IPADDR_V6 = 0x02,
98 WITNESS_IPADDR_ONLINE = 0x08,
99 WITNESS_IPADDR_OFFLINE = 0x10
100 } witness_IPaddrInfo_flags;
102 typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
103 witness_IPaddrInfo_flags flags;
104 [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
105 [flag(NDR_BIG_ENDIAN)] ipv6address ipv6;
106 } witness_IPaddrInfo;
108 typedef [public,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN),gensize] struct {
109 [value(ndr_size_witness_IPaddrInfoList(r, ndr->flags))] uint32 length;
110 [value(0)] uint32 reserved;
111 uint32 num;
112 witness_IPaddrInfo addr[num];
113 } witness_IPaddrInfoList;
115 typedef [public,switch_type(witness_notifyResponse_type),nodiscriminant, flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] union {
116 [case(WITNESS_NOTIFY_RESOURCE_CHANGE)] witness_ResourceChange resource_change;
117 [case(WITNESS_NOTIFY_CLIENT_MOVE)] witness_IPaddrInfoList client_move;
118 [case(WITNESS_NOTIFY_SHARE_MOVE)] witness_IPaddrInfoList share_move;
119 [case(WITNESS_NOTIFY_IP_CHANGE)] witness_IPaddrInfoList ip_change;
120 [default,flag(NDR_REMAINING)] DATA_BLOB data;
121 } witness_notifyResponse_message;
123 typedef [flag(NDR_PAHEX),gensize,public,nopush,nopull] struct {
124 witness_notifyResponse_type type;
125 [value(ndr_size_witness_notifyResponse(r, ndr->flags)-20)] uint32 length;
126 uint32 num;
127 [subcontext(4), subcontext_size(length), flag(NDR_REMAINING), switch_is(type), size_is(num)] witness_notifyResponse_message *messages;
128 } witness_notifyResponse;
130 [public] WERROR witness_AsyncNotify(
131 [in] policy_handle context_handle,
132 [out] witness_notifyResponse **response
135 /*****************/
136 /* Function 0x04 */
138 typedef [bitmap32bit,public] bitmap {
139 WITNESS_REGISTER_NONE = 0x00,
140 WITNESS_REGISTER_IP_NOTIFICATION = 0x01
141 } witness_RegisterEx_flags;
143 WERROR witness_RegisterEx(
144 [out,ref] policy_handle *context_handle,
145 [in] witness_version version,
146 [in,unique,string,charset(UTF16)] uint16 *net_name,
147 [in,unique,string,charset(UTF16)] uint16 *share_name,
148 [in,unique,string,charset(UTF16)] uint16 *ip_address,
149 [in,unique,string,charset(UTF16)] uint16 *client_computer_name,
150 [in] witness_RegisterEx_flags flags,
151 [in] uint32 timeout