summaryrefslogtreecommitdiffstats
path: root/source3/librpc/idl/rpcd_witness.idl
blob: 80852d25e81e686c28bf451d512da9d1b3efabbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#include "idl_types.h"

import "misc.idl";
import "server_id.idl";
import "security.idl";
import "witness.idl";

[
	uuid("d320d080-a007-11ee-9cb4-37fa942d84d2"),
	version(0.0),
	pointer_default(unique),
	helpstring("rpcd_witness structures")
]
interface rpcd_witness
{
	/*
	 * This the content of records stored in
	 * rpcd_witness_registration.tdb.
	 */
	typedef [public] struct {
		witness_version version;
		[string,charset(UTF8)] char net_name[];
		[string,charset(UTF8)] char *share_name;
		[string,charset(UTF8)] char ip_address[];
		[string,charset(UTF8)] char client_computer_name[];
		witness_RegisterEx_flags flags;
		uint32 timeout;
		policy_handle context_handle;
		server_id server_id;
		[charset(UTF8),string] char account_name[];
		[charset(UTF8),string] char domain_name[];
		dom_sid account_sid;
		[charset(UTF8),string] char local_address[];
		[charset(UTF8),string] char remote_address[];
		NTTIME registration_time;
	} rpcd_witness_registration;

	void rpcd_witness_registration_decode(
		[in] rpcd_witness_registration reg
		);

	typedef [enum16bit] enum {
		RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE  = 0x0001,
		RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4  = 0x0002,
		RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6  = 0x0003,
		RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE   = 0x0004,
		RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4   = 0x0005,
		RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6   = 0x0006,
		RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER     = 0x0007,
		RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE       = 0x0008
	} rpcd_witness_registration_update_type;

	typedef struct {
		uint32 new_node;
	} rpcd_witness_registration_update_move_to_node;

	typedef struct {
		[flag(NDR_BIG_ENDIAN)] ipv4address new_ipv4;
	} rpcd_witness_registration_update_move_to_ipv4;

	typedef struct {
		[flag(NDR_BIG_ENDIAN)] ipv6address new_ipv6;
	} rpcd_witness_registration_update_move_to_ipv6;

	typedef struct {
		witness_notifyResponse *response;
		WERROR result;
	} rpcd_witness_registration_update_force_response;

	typedef [switch_type(rpcd_witness_registration_update_type)] union {
		[case(RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE)]
		rpcd_witness_registration_update_move_to_node client_move_to_node;

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4)]
		rpcd_witness_registration_update_move_to_ipv4 client_move_to_ipv4;

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6)]
		rpcd_witness_registration_update_move_to_ipv6 client_move_to_ipv6;

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE)]
		rpcd_witness_registration_update_move_to_node share_move_to_node;

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4)]
		rpcd_witness_registration_update_move_to_ipv4 share_move_to_ipv4;

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6)]
		rpcd_witness_registration_update_move_to_ipv6 share_move_to_ipv6;

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER)];
		/* empty */

		[case(RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE)]
		rpcd_witness_registration_update_force_response force_response;
	} rpcd_witness_registration_updateU;

	/*
	 * This is the content of
	 * MSG_RPCD_WITNESS_REGISTRATION_UPDATE messages
	 */
	typedef [public] struct {
		policy_handle context_handle;
		rpcd_witness_registration_update_type type;
		[switch_is(type)] rpcd_witness_registration_updateU update;
	} rpcd_witness_registration_updateB;

	void rpcd_witness_registration_update_decode(
		[in] rpcd_witness_registration_updateB update
		);
}