blob: 466d95f343b6822b4ac498ca502c1faeb47ef76b (
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
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
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- strongSwan Managment Protocol (SMP) V1.0 -->
<!--
Copyright (C) 2007 Martin Willi
Copyright (C) 2006 Andreas Eigenmann, Joël Stillhart
Hochschule fuer Technik Rapperswil
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.strongswan.org/smp/1.0">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Message -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<start>
<element name="message">
<choice>
<group>
<attribute name="type">
<value>request</value>
</attribute>
<optional>
<element name="query">
<optional>
<ref name="QueryRequestIkesa"/>
</optional>
<!-- others -->
</element>
</optional>
<!-- others -->
</group>
<group>
<attribute name="type">
<value>response</value>
</attribute>
<choice>
<element name="error">
<attribute name="code">
<data type="string"/>
</attribute>
</element>
<group>
<optional>
<element name="query">
<optional>
<ref name="QueryResponseIkesa"/>
</optional>
<!-- others -->
</element>
</optional>
<!-- others -->
</group>
</choice>
</group>
</choice>
</element>
</start>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- IKE SA query -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<define name="QueryRequestIkesa">
<element name="ikesalist">
<empty/>
</element>
</define>
<define name="QueryResponseIkesa">
<element name="ikesalist">
<zeroOrMore>
<element name="ikesa">
<element name="id">
<data type="positiveInteger"/>
</element>
<element name="status">
<choice>
<value type="string">created</value>
<value type="string">connecting</value>
<value type="string">established</value>
<value type="string">rekeying</value>
<value type="string">deleting</value>
</choice>
</element>
<element name="role">
<choice>
<value type="string">initiator</value>
<value type="string">responder</value>
</choice>
</element>
<element name="peerconfig">
<data type="string"/>
</element>
<element name="lifetime">
<data type="integer"/>
</element>
<element name="rekeytime">
<data type="integer"/>
</element>
<element name="local">
<ref name="ikeEnd"/>
</element>
<element name="remote">
<ref name="ikeEnd"/>
</element>
<element name="childsalist">
<zeroOrMore>
<element name="childsa">
<ref name="childsa"/>
</element>
</zeroOrMore>
</element>
</element>
</zeroOrMore>
</element>
</define>
<define name="ikeEnd">
<element name="spi">
<data type="hexBinary" />
</element>
<element name="identification">
<ref name="identification"/>
</element>
<element name="address">
<ref name="address"/>
</element>
<element name="port">
<data type="nonNegativeInteger">
<param name="maxInclusive">65535</param>
</data>
</element>
<optional>
<element name="nat">
<data type="boolean"/>
</element>
</optional>
</define>
<define name="childsa">
<element name="reqid">
<data type="nonNegativeInteger"/>
</element>
<element name="lifetime">
<data type="integer"/>
</element>
<element name="rekeytime">
<data type="integer"/>
</element>
<element name="local">
<ref name="childEnd"/>
</element>
<element name="remote">
<ref name="childEnd"/>
</element>
</define>
<define name="childEnd">
<element name="spi">
<element name="networks">
<zeroOrMore>
<element name="network">
<optional>
<attribute name="protocol"/>
</optional>
<optional>
<attribute name="port"/>
</optional>
</element>
</zeroOrMore>
</element>
</define>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- identification and address -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<define name="identification">
<choice>
<group>
<attribute name="type">
<value>any</value>
</attribute>
<empty/>
</group>
<group>
<attribute name="type">
<value>ipv4</value>
</attribute>
<ref name="ipv4"/>
</group>
<group>
<attribute name="type">
<value>ipv6</value>
</attribute>
<ref name="ipv6"/>
</group>
<group>
<attribute name="type">
<value>fqdn</value>
</attribute>
<ref name="fqdn"/>
</group>
<group>
<attribute name="type">
<value>email</value>
</attribute>
<ref name="email"/>
</group>
<group>
<attribute name="type">
<value>asn1gn</value>
</attribute>
<data type="string"/>
</group>
<group>
<attribute name="type">
<value>asn1dn</value>
</attribute>
<data type="string"/>
</group>
<group>
<attribute name="type">
<value>keyid</value>
</attribute>
<data type="base64Binary"/>
</group>
</choice>
</define>
<define name="address">
<choice>
<group>
<attribute name="type">
<value>ipv4</value>
</attribute>
<ref name="ipv4"/>
</group>
<group>
<attribute name="type">
<value>ipv6</value>
</attribute>
<ref name="ipv6"/>
</group>
</choice>
</define>
<define name="ipv4">
<data type="string">
<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>
</data>
</define>
<define name="ipv6">
<data type="string">
<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>
</data>
</define>
<define name="fqdn">
<data type="string">
<param name="pattern">[a-z0-9\-](\.[a-z0-9\-]+)*</param>
</data>
</define>
<define name="email">
<data type="string">
<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>
</data>
</define>
</grammar>
|