summaryrefslogtreecommitdiff
path: root/librpc/idl/ioctl.idl
blob: b4485e0da57eb7356733f16a1e93bc6c56c030c0 (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
#include "idl_types.h"
[
	pointer_default(unique)
]
interface copychunk
{
	typedef [public] struct {
		uint8 resume_key[24];
		uint32 context_len;
		/* <56> Windows sends 4 bytes of zero for the context field. */
		uint8 context[4];
	} req_resume_key_rsp;

	typedef struct {
		hyper source_off;
		hyper target_off;
		uint32 length;
		uint32 reserved;
	} srv_copychunk;

	typedef [public] struct {
		uint8 source_key[24];
		uint32 chunk_count;
		uint32 reserved;
		srv_copychunk chunks[chunk_count];
	} srv_copychunk_copy;

	typedef [public] struct {
		uint32 chunks_written;
		uint32 chunk_bytes_written;
		uint32 total_bytes_written;
	} srv_copychunk_rsp;

	typedef [public] struct {
		uint32 version;
		uint32 size;
		uint32 maximum_token_lifetime;
		uint32 default_token_lifetime;
		hyper maximum_xfer_size;
		hyper optimal_xfer_count;
		uint32 maximum_data_descriptors;
		uint32 maximum_xfer_length_per_descriptor;
		uint32 optimal_xfer_length_per_descriptor;
		uint16 optimal_xfer_length_granularity;
		uint8 reserved[2];
	} device_copy_offload_descriptor;

	/* XXX: 0x00000001 is unconfirmed */
	const uint32 STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA = 0x00000001;
	typedef [public] struct {
		uint32 token_type;
		uint8 reserved[2];
		uint16 token_id_len;
		[size_is(token_id_len)] uint8 token[];
	} storage_offload_token;

	typedef [public] struct {
		uint32 size;
		uint32 flags;
		uint32 token_time_to_live;
		uint32 reserved;
		hyper file_offset;
		hyper length;
	} fsctl_offload_read_input;

	const uint32 OFFLOAD_READ_FLAG_FILE_TOO_SMALL = 0x00000001;
	const uint32 OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_RANGE = 0x00000002;
	const uint32 OFFLOAD_READ_FLAG_CANNOT_OFFLOAD_BEYOND_RANGE = 0x00000004;
	typedef [public] struct {
		uint32 size;
		uint32 flags;
		hyper xfer_length;
		uint8 token[512];
	} fsctl_offload_read_output;

	typedef [public] struct {
		uint32 size;
		uint32 flags;
		hyper file_offset;
		hyper copy_length;
		hyper xfer_offset;
		uint8 token[512];
	} fsctl_offload_write_input;

	typedef [public] struct {
		uint32 size;
		uint32 flags;
		hyper length_written;
	} fsctl_offload_write_output;
}

interface compression
{
	const uint16 COMPRESSION_FORMAT_NONE = 0x0000;
	const uint16 COMPRESSION_FORMAT_DEFAULT = 0x0001;
	const uint16 COMPRESSION_FORMAT_LZNT1 = 0x0002;

	typedef [public] struct {
		uint16 format;
	} compression_state;
}