6 uuid("ccd8c074-d0e5-4a40-92b4-d074faa6ba28"),
8 pointer_default(unique),
9 helpstring("SMB Witness Service"),
10 helper
("../librpc/ndr/ndr_witness.h"),
11 endpoint("ncacn_ip_tcp:")
15 typedef [v1_enum] enum {
16 WITNESS_V1
= 0x00010001,
17 WITNESS_V2
= 0x00020000,
18 WITNESS_UNSPECIFIED_VERSION
= 0xFFFFFFFF
24 typedef [enum16bit
] enum {
25 WITNESS_STATE_UNKNOWN
= 0x00,
26 WITNESS_STATE_AVAILABLE
= 0x01,
27 WITNESS_STATE_UNAVAILABLE
= 0xff
28 } witness_interfaceInfo_state
;
30 typedef [bitmap32bit
] bitmap
{
31 WITNESS_INFO_IPv4_VALID
= 0x01,
32 WITNESS_INFO_IPv6_VALID
= 0x02,
33 WITNESS_INFO_WITNESS_IF
= 0x04
34 } witness_interfaceInfo_flags
;
37 [charset
(UTF16
),to_null
] uint16 group_name
[260];
38 witness_version
version;
39 witness_interfaceInfo_state state
;
40 [flag
(NDR_BIG_ENDIAN
)] ipv4address ipv4
;
41 [flag
(NDR_BIG_ENDIAN
)] ipv6address ipv6
;
42 witness_interfaceInfo_flags flags
;
43 } witness_interfaceInfo
;
46 uint32 num_interfaces
;
47 [size_is(num_interfaces
)] witness_interfaceInfo
*interfaces
;
48 } witness_interfaceList
;
50 [public] WERROR witness_GetInterfaceList
(
51 [out] witness_interfaceList
**interface_list
57 [public] WERROR witness_Register
(
58 [out,ref] policy_handle
*context_handle,
59 [in] witness_version
version,
60 [in,unique,string,charset
(UTF16
)] uint16
*net_name
,
61 [in,unique,string,charset
(UTF16
)] uint16
*ip_address
,
62 [in,unique,string,charset
(UTF16
)] uint16
*client_computer_name
68 [public] WERROR witness_UnRegister
(
69 [in] policy_handle
context_handle
75 typedef [v1_enum,public] enum {
76 WITNESS_NOTIFY_RESOURCE_CHANGE
= 1,
77 WITNESS_NOTIFY_CLIENT_MOVE
= 2,
78 WITNESS_NOTIFY_SHARE_MOVE
= 3,
79 WITNESS_NOTIFY_IP_CHANGE
= 4
80 } witness_notifyResponse_type
;
82 typedef [v1_enum] enum {
83 WITNESS_RESOURCE_STATE_UNKNOWN
= 0x00,
84 WITNESS_RESOURCE_STATE_AVAILABLE
= 0x01,
85 WITNESS_RESOURCE_STATE_UNAVAILABLE
= 0xff
86 } witness_ResourceChange_type
;
88 typedef [flag
(NDR_NOALIGN|NDR_LITTLE_ENDIAN
),gensize
,public] struct {
89 [value
(ndr_size_witness_ResourceChange
(r
,ndr
->flags
))] uint32 length
;
90 witness_ResourceChange_type type
;
92 } witness_ResourceChange
;
94 typedef [bitmap32bit
] bitmap
{
95 WITNESS_IPADDR_V4
= 0x01,
96 WITNESS_IPADDR_V6
= 0x02,
97 WITNESS_IPADDR_ONLINE
= 0x08,
98 WITNESS_IPADDR_OFFLINE
= 0x10
99 } witness_IPaddrInfo_flags
;
101 typedef [flag
(NDR_NOALIGN|NDR_LITTLE_ENDIAN
),gensize
] struct {
102 witness_IPaddrInfo_flags flags
;
103 [flag
(NDR_BIG_ENDIAN
)] ipv4address ipv4
;
104 [flag
(NDR_BIG_ENDIAN
)] ipv6address ipv6
;
105 } witness_IPaddrInfo
;
107 typedef [flag
(NDR_NOALIGN|NDR_LITTLE_ENDIAN
)] struct {
108 [value
(12+(r
->num
*ndr_size_witness_IPaddrInfo
(r
->addr
, ndr
->flags
)))] uint32 length
;
109 [value
(0)] uint32 reserved
;
111 witness_IPaddrInfo addr
[num
];
112 } witness_IPaddrInfoList
;
114 typedef [public,switch_type(witness_notifyResponse_type
),nodiscriminant
, flag
(NDR_NOALIGN|NDR_LITTLE_ENDIAN
)] union {
115 [case(WITNESS_NOTIFY_RESOURCE_CHANGE
)] witness_ResourceChange resource_change
;
116 [case(WITNESS_NOTIFY_CLIENT_MOVE
)] witness_IPaddrInfoList client_move
;
117 [case(WITNESS_NOTIFY_SHARE_MOVE
)] witness_IPaddrInfoList share_move
;
118 [case(WITNESS_NOTIFY_IP_CHANGE
)] witness_IPaddrInfoList ip_change
;
119 [default,flag
(NDR_REMAINING
)] DATA_BLOB data
;
120 } witness_notifyResponse_message
;
122 typedef [flag
(NDR_PAHEX
),gensize
,public,nopush
,nopull
] struct {
123 witness_notifyResponse_type type
;
124 [value
(ndr_size_witness_notifyResponse
(r
, ndr
->flags
)-20)] uint32 length
;
126 [subcontext
(4), subcontext_size
(length
), flag
(NDR_REMAINING
), switch_is(type
)] witness_notifyResponse_message messages
[num
];
127 } witness_notifyResponse
;
129 [public] WERROR witness_AsyncNotify
(
130 [in] policy_handle
context_handle,
131 [out] witness_notifyResponse
**response
137 typedef [bitmap32bit
] bitmap
{
138 WITNESS_REGISTER_NONE
= 0x00,
139 WITNESS_REGISTER_IP_NOTIFICATION
= 0x01
140 } witness_RegisterEx_flags
;
142 WERROR witness_RegisterEx
(
143 [out,ref] policy_handle
*context_handle,
144 [in] witness_version
version,
145 [in,unique,string,charset
(UTF16
)] uint16
*net_name
,
146 [in,unique,string,charset
(UTF16
)] uint16
*share_name
,
147 [in,unique,string,charset
(UTF16
)] uint16
*ip_address
,
148 [in,unique,string,charset
(UTF16
)] uint16
*client_computer_name
,
149 [in] witness_RegisterEx_flags flags
,