kernel-netlink: Use correct config option name for HW offloading check
[strongswan.git] / src / libcharon / plugins / smp / schema.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- strongSwan Management Protocol (SMP) V1.0 -->
4
5 <!--
6 Copyright (C) 2007 Martin Willi
7 Copyright (C) 2006 Andreas Eigenmann, Joël Stillhart
8 HSR Hochschule fuer Technik Rapperswil
9
10 This program is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2 of the License, or (at your
13 option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
14
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 for more details.
19 -->
20
21 <grammar xmlns="http://relaxng.org/ns/structure/1.0"
22 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
23 ns="http://www.strongswan.org/smp/1.0">
24 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
25 <!-- Message -->
26 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
27 <start>
28 <element name="message">
29 <choice>
30 <group>
31 <attribute name="type">
32 <value>request</value>
33 </attribute>
34 <optional>
35 <element name="query">
36 <optional>
37 <ref name="QueryRequestIkesa"/>
38 </optional>
39 <optional>
40 <ref name="QueryRequestConfig"/>
41 </optional>
42 <!-- others -->
43 </element>
44 </optional>
45 <optional>
46 <element name="control">
47 <optional>
48 <ref name="ControlRequestIkeTerminate"/>
49 </optional>
50 <optional>
51 <ref name="ControlRequestChildTerminate"/>
52 </optional>
53 <optional>
54 <ref name="ControlRequestIkeInitiate"/>
55 </optional>
56 <optional>
57 <ref name="ControlRequestChildInitiate"/>
58 </optional>
59 <!-- others -->
60 </element>
61 </optional>
62 <!-- others -->
63 </group>
64 <group>
65 <attribute name="type">
66 <value>response</value>
67 </attribute>
68 <choice>
69 <element name="error">
70 <attribute name="code">
71 <data type="nonNegativeInteger"/>
72 </attribute>
73 <data type="string"/>
74 </element>
75 <group>
76 <optional>
77 <element name="query">
78 <optional>
79 <ref name="QueryResponseIkesa"/>
80 </optional>
81 <optional>
82 <ref name="QueryResponseConfig"/>
83 </optional>
84 <!-- others -->
85 </element>
86 </optional>
87 <optional>
88 <element name="control">
89 <optional>
90 <ref name="ControlResponse"/>
91 </optional>
92 <!-- others -->
93 </element>
94 </optional>
95 <!-- others -->
96 </group>
97 </choice>
98 </group>
99 </choice>
100 </element>
101 </start>
102 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
103 <!-- Query -->
104 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
105 <define name="QueryRequestIkesa">
106 <element name="ikesalist">
107 <empty/>
108 </element>
109 </define>
110 <define name="QueryResponseIkesa">
111 <element name="ikesalist">
112 <zeroOrMore>
113 <element name="ikesa">
114 <element name="id">
115 <data type="positiveInteger"/>
116 </element>
117 <element name="status">
118 <choice>
119 <value type="string">created</value>
120 <value type="string">connecting</value>
121 <value type="string">established</value>
122 <value type="string">rekeying</value>
123 <value type="string">deleting</value>
124 </choice>
125 </element>
126 <element name="role">
127 <choice>
128 <value type="string">initiator</value>
129 <value type="string">responder</value>
130 </choice>
131 </element>
132 <element name="peerconfig">
133 <data type="string"/>
134 </element>
135 <element name="lifetime">
136 <data type="integer"/>
137 </element>
138 <element name="rekeytime">
139 <data type="integer"/>
140 </element>
141 <element name="local">
142 <ref name="ikeEnd"/>
143 </element>
144 <element name="remote">
145 <ref name="ikeEnd"/>
146 </element>
147 <element name="childsalist">
148 <zeroOrMore>
149 <element name="childsa">
150 <ref name="childsa"/>
151 </element>
152 </zeroOrMore>
153 </element>
154 </element>
155 </zeroOrMore>
156 </element>
157 </define>
158 <define name="ikeEnd">
159 <element name="spi">
160 <data type="hexBinary" />
161 </element>
162 <element name="identification">
163 <ref name="identification"/>
164 </element>
165 <element name="address">
166 <ref name="address"/>
167 </element>
168 <element name="port">
169 <data type="nonNegativeInteger">
170 <param name="maxInclusive">65535</param>
171 </data>
172 </element>
173 <optional>
174 <element name="nat">
175 <data type="boolean"/>
176 </element>
177 </optional>
178 </define>
179 <define name="childsa">
180 <element name="reqid">
181 <data type="nonNegativeInteger"/>
182 </element>
183 <element name="lifetime">
184 <data type="integer"/>
185 </element>
186 <element name="rekeytime">
187 <data type="integer"/>
188 </element>
189 <element name="local">
190 <ref name="childEnd"/>
191 </element>
192 <element name="remote">
193 <ref name="childEnd"/>
194 </element>
195 </define>
196 <define name="childEnd">
197 <element name="spi">
198 <element name="networks">
199 <ref name="networks">
200 </element>
201 </define>
202 <define name="QueryRequestConfig">
203 <element name="configlist">
204 <empty/>
205 </element>
206 </define>
207 <define name="QueryResponseConfig">
208 <element name="configlist">
209 <zeroOrMore>
210 <element name="peerconfig">
211 <element name="name">
212 <data type="string"/>
213 </element>
214 <element name="local">
215 <ref name="identification"/>
216 </element>
217 <element name="remote">
218 <ref name="identification"/>
219 </element>
220 <element name="ikeconfig">
221 <ref name="ikeconfig"/>
222 </element>
223 <element name="childconfiglist">
224 <zeroOrMore>
225 <element name="childconfig">
226 <ref name="childconfig"/>
227 </element>
228 </zeroOrMore>
229 </element>
230 </element>
231 </zeroOrMore>
232 </element>
233 </define>
234 <define name="ikeconfig">
235 <element name="local">
236 <ref name="address"/>
237 </element>
238 <element name="remote">
239 <ref name="address"/>
240 </element>
241 </define>
242 <define name="childconfig">
243 <element name="name">
244 <data type="string"/>
245 </element>
246 <element name="local">
247 <ref name="networks">
248 </element>
249 <element name="remote">
250 <ref name="networks">
251 </element>
252 </define>
253 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
254 <!-- Control -->
255 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
256 <define name="ControlRequestIkeTerminate">
257 <element name="ikesaterminate">
258 <data type="positiveInteger"/>
259 </element>
260 </define>
261 <define name="ControlRequestChildTerminate">
262 <element name="childsaterminate">
263 <data type="positiveInteger"/>
264 </element>
265 </define>
266 <define name="ControlRequestIkeInitiate">
267 <element name="ikesainitiate">
268 <data type="string"/>
269 </element>
270 </define>
271 <define name="ControlRequestChildInitiate">
272 <element name="childsainitiate">
273 <data type="string"/>
274 </element>
275 </define>
276 <define name="QueryResponse">
277 <element name="status">
278 <data type="nonNegativeInteger"/>
279 </element>
280 <element name="log">
281 <zeroOrMore>
282 <element name="item">
283 <attribute name="level">
284 <data type="nonNegativeInteger">
285 </attribute>
286 <attribute name="thread">
287 <data type="nonNegativeInteger">
288 </attribute>
289 <attribute name="source">
290 <data type="string">
291 </attribute>
292 <data type="string"/>
293 <element>
294 </zeroOrMore>
295 </element>
296 </define>
297 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
298 <!-- identification and address -->
299 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
300 <define name="identification">
301 <choice>
302 <group>
303 <attribute name="type">
304 <value>any</value>
305 </attribute>
306 <empty/>
307 </group>
308 <group>
309 <attribute name="type">
310 <value>ipv4</value>
311 </attribute>
312 <ref name="ipv4"/>
313 </group>
314 <group>
315 <attribute name="type">
316 <value>ipv6</value>
317 </attribute>
318 <ref name="ipv6"/>
319 </group>
320 <group>
321 <attribute name="type">
322 <value>fqdn</value>
323 </attribute>
324 <ref name="fqdn"/>
325 </group>
326 <group>
327 <attribute name="type">
328 <value>email</value>
329 </attribute>
330 <ref name="email"/>
331 </group>
332 <group>
333 <attribute name="type">
334 <value>asn1gn</value>
335 </attribute>
336 <data type="string"/>
337 </group>
338 <group>
339 <attribute name="type">
340 <value>asn1dn</value>
341 </attribute>
342 <data type="string"/>
343 </group>
344 <group>
345 <attribute name="type">
346 <value>keyid</value>
347 </attribute>
348 <data type="base64Binary"/>
349 </group>
350 </choice>
351 </define>
352 <define name="address">
353 <choice>
354 <group>
355 <attribute name="type">
356 <value>ipv4</value>
357 </attribute>
358 <ref name="ipv4"/>
359 </group>
360 <group>
361 <attribute name="type">
362 <value>ipv6</value>
363 </attribute>
364 <ref name="ipv6"/>
365 </group>
366 </choice>
367 </define>
368 <define name="ipv4">
369 <data type="string">
370 <param name="pattern">(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))?</param>
371 </data>
372 </define>
373 <define name="ipv6">
374 <data type="string">
375 <param name="pattern">([0-9a-fA-F]{1,4}:|:){1,7}([0-9a-fA-F]{1,4}|:)(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?</param>
376 </data>
377 </define>
378 <define name="fqdn">
379 <data type="string">
380 <param name="pattern">[a-z0-9\-](\.[a-z0-9\-]+)*</param>
381 </data>
382 </define>
383 <define name="email">
384 <data type="string">
385 <param name="pattern">[a-zA-Z0-9_\-\.]+@(([a-z0-9\-](\.[a-z0-9\-]+)*)|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))</param>
386 </data>
387 </define>
388 <define name="networks">
389 <zeroOrMore>
390 <element name="network">
391 <optional>
392 <attribute name="protocol"/>
393 </optional>
394 <optional>
395 <attribute name="port"/>
396 </optional>
397 </element>
398 </zeroOrMore>
399 </define>
400 </grammar>