This repository has been archived by the owner on Jan 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
/
connect_compat.h
296 lines (213 loc) · 7.55 KB
/
connect_compat.h
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/*
* This file is part of the libvirt-go project
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Copyright (c) 2013 Alex Zorin
* Copyright (C) 2016 Red Hat, Inc.
*
*/
#ifndef LIBVIRT_GO_CONNECT_COMPAT_H__
#define LIBVIRT_GO_CONNECT_COMPAT_H__
/* 1.2.1 */
#ifndef VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER
#define VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER 1 << 16
#endif
/* 1.2.2 */
#ifndef VIR_NODE_CPU_STATS_INTR
#define VIR_NODE_CPU_STATS_INTR "intr"
#endif
/* 1.2.6 */
#ifndef VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE
#define VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE 1 << 0
#endif
/* 1.2.8 */
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE 1 << 0
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE 1 << 1
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT 1 << 2
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT 1 << 3
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING 1 << 4
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED 1 << 5
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF 1 << 6
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER 1 << 7
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS 1U << 31
#endif
#ifndef VIR_CONNECT_LIST_STORAGE_POOLS_ZFS
#define VIR_CONNECT_LIST_STORAGE_POOLS_ZFS 1 << 17
#endif
#if LIBVIR_VERSION_NUMBER < 1002008
typedef struct _virDomainStatsRecord virDomainStatsRecord;
typedef virDomainStatsRecord *virDomainStatsRecordPtr;
struct _virDomainStatsRecord {
virDomainPtr dom;
virTypedParameterPtr params;
int nparams;
};
#endif
/* 1.2.9 */
#ifndef VIR_NODE_ALLOC_PAGES_ADD
#define VIR_NODE_ALLOC_PAGES_ADD 0
#endif
#ifndef VIR_NODE_ALLOC_PAGES_SET
#define VIR_NODE_ALLOC_PAGES_SET 1 << 0
#endif
/* 1.2.11 */
#ifndef VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED
#define VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED 1
#endif
#ifndef VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED
#define VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED 2
#endif
#ifndef VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN
#define VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN 0
#endif
#ifndef VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED
#define VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED 1
#endif
#ifndef VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL
#define VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL 2
#endif
/* 1.2.12 */
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING 1 << 30
#endif
/* 1.2.14 */
#ifndef VIR_CONNECT_BASELINE_CPU_MIGRATABLE
#define VIR_CONNECT_BASELINE_CPU_MIGRATABLE 1 << 1
#endif
/* 3.1.0 */
#ifndef VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE
#define VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE 1 << 18
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM 1 << 12
#endif
/* 3.4.0 */
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES 1 << 13
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV 1 << 14
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV 1 << 15
#endif
/* 4.5.0 */
#ifndef VIR_NODE_SEV_CBITPOS
#define VIR_NODE_SEV_CBITPOS "cbitpos"
#endif
#ifndef VIR_NODE_SEV_REDUCED_PHYS_BITS
#define VIR_NODE_SEV_REDUCED_PHYS_BITS "reduced-phys-bits"
#endif
#ifndef VIR_NODE_SEV_PDH
#define VIR_NODE_SEV_PDH "pdh"
#endif
#ifndef VIR_NODE_SEV_CERT_CHAIN
#define VIR_NODE_SEV_CERT_CHAIN "cert-chain"
#endif
#if LIBVIR_VERSION_NUMBER < 4005000
typedef struct _virNWFilterBinding *virNWFilterBindingPtr;
#endif
#ifndef VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT
#define VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT 1 << 29
#endif
/* 5.6.0 */
#ifndef VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT
#define VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT 1 << 19
#endif
#ifndef VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINT
# define VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINT (1 << 14)
#endif
#ifndef VIR_CONNECT_LIST_DOMAINS_NO_CHECKPOINT
# define VIR_CONNECT_LIST_DOMAINS_NO_CHECKPOINT (1 << 15)
#endif
/* 5.8.0 */
#ifndef VIR_CONNECT_IDENTITY_USER_NAME
#define VIR_CONNECT_IDENTITY_USER_NAME "user-name"
#endif
#ifndef VIR_CONNECT_IDENTITY_UNIX_USER_ID
#define VIR_CONNECT_IDENTITY_UNIX_USER_ID "unix-user-id"
#endif
#ifndef VIR_CONNECT_IDENTITY_GROUP_NAME
#define VIR_CONNECT_IDENTITY_GROUP_NAME "group-name"
#endif
#ifndef VIR_CONNECT_IDENTITY_UNIX_GROUP_ID
#define VIR_CONNECT_IDENTITY_UNIX_GROUP_ID "unix-group-id"
#endif
#ifndef VIR_CONNECT_IDENTITY_PROCESS_ID
#define VIR_CONNECT_IDENTITY_PROCESS_ID "process-id"
#endif
#ifndef VIR_CONNECT_IDENTITY_PROCESS_TIME
#define VIR_CONNECT_IDENTITY_PROCESS_TIME "process-time"
#endif
#ifndef VIR_CONNECT_IDENTITY_SASL_USER_NAME
#define VIR_CONNECT_IDENTITY_SASL_USER_NAME "sasl-user-name"
#endif
#ifndef VIR_CONNECT_IDENTITY_X509_DISTINGUISHED_NAME
#define VIR_CONNECT_IDENTITY_X509_DISTINGUISHED_NAME "x509-distinguished-name"
#endif
#ifndef VIR_CONNECT_IDENTITY_SELINUX_CONTEXT
#define VIR_CONNECT_IDENTITY_SELINUX_CONTEXT "selinux-context"
#endif
/* 6.8.0 */
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV 1 << 16
#endif
/* 6.9.0 */
#ifndef VIR_CONNECT_COMPARE_CPU_VALIDATE_XML
#define VIR_CONNECT_COMPARE_CPU_VALIDATE_XML 1 << 1
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA 1 << 17
#endif
/* 7.0.0 */
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD 1 << 18
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE 1 << 19
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX
#define VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX 1 << 20
#endif
/* 7.3.0 */
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_INACTIVE
#define VIR_CONNECT_LIST_NODE_DEVICES_INACTIVE (1 << 30)
#endif
#ifndef VIR_CONNECT_LIST_NODE_DEVICES_ACTIVE
#define VIR_CONNECT_LIST_NODE_DEVICES_ACTIVE (1U << 31)
#endif
#endif /* LIBVIRT_GO_CONNECT_COMPAT_H__ */