cddl 0.1.0 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/bin/cddl +80 -23
  3. data/cddl.gemspec +4 -2
  4. data/data/cddl.abnf +50 -20
  5. data/data/prelude.cddl +9 -3
  6. data/lib/cbor-pp-play.rb +13 -0
  7. data/lib/cbor-pp.rb +213 -0
  8. data/lib/cddl.rb +1001 -163
  9. data/test/test-cddl.rb +1620 -93
  10. data/test-data/7071-concise-cut.cddl +48 -0
  11. data/test-data/7071-concise.cddl +1 -1
  12. data/test-data/7071-verbose.cddl +1 -1
  13. data/test-data/a.cddl +9 -0
  14. data/test-data/ambig.cddl +2 -0
  15. data/test-data/b.cddl +3 -0
  16. data/test-data/badaddr.cddl +1 -0
  17. data/test-data/basic_syntax_example.cddl +7 -0
  18. data/test-data/cdni-ct.cddl +72 -0
  19. data/test-data/cose.cddl +68 -0
  20. data/test-data/dcaf.cddl +58 -0
  21. data/test-data/dcaf1.cddl +48 -0
  22. data/test-data/dotsize.cddl +7 -0
  23. data/test-data/extractor-demo.cddl +14 -0
  24. data/test-data/grasp-01-extract.cddl +91 -0
  25. data/test-data/grasp-01-test.cddl +90 -0
  26. data/test-data/grasp-01.cddl +90 -0
  27. data/test-data/grasp-09.cddl +108 -0
  28. data/test-data/grasp-v1.cddl +97 -0
  29. data/test-data/grasp-v2X.cddl +89 -0
  30. data/test-data/ifmap-base-2.0v17.cddl +392 -0
  31. data/test-data/ifmap-base-2.2v9_fh-cabo.cddl +149 -0
  32. data/test-data/ifmap-metadata-2.2v9_fh-cabo.cddl +239 -0
  33. data/test-data/ifmap2.cddl +21 -0
  34. data/test-data/jcr-ex.cddl +42 -0
  35. data/test-data/kevin5.cddl +5 -0
  36. data/test-data/map-group.cddl +13 -0
  37. data/test-data/mapkey.cddl +2 -0
  38. data/test-data/minimal.cddl +1 -0
  39. data/test-data/patch1.cddl +13 -0
  40. data/test-data/reused_named_group.cddl +14 -0
  41. data/test-data/structure.cddl +9 -0
  42. data/test-data/toerless0.cddl +14 -0
  43. data/test-data/toerless1.cddl +11 -0
  44. data/test-data/two_anonymous_groups.cddl +13 -0
  45. data/test-data/wrong1.cddl +17 -0
  46. data/test-data/wrong1a.cddl +23 -0
  47. data/test-data/wrong2.cddl +17 -0
  48. data/test-data/wrong2a.cddl +17 -0
  49. data/test-data/xmlmig.cddl +15 -0
  50. metadata +72 -5
@@ -0,0 +1,108 @@
1
+ grasp-message = (message .within message-structure) / noop-message
2
+
3
+ message-structure = [MESSAGE_TYPE, session-id, ?initiator,
4
+ *grasp-option]
5
+
6
+ MESSAGE_TYPE = 0..255
7
+ session-id = 0..4294967295 ;up to 32 bits
8
+ grasp-option = any
9
+
10
+ message /= discovery-message
11
+ discovery-message = [M_DISCOVERY, session-id, initiator, objective]
12
+
13
+ message /= response-message ;response to Discovery
14
+ response-message = [M_RESPONSE, session-id, initiator, ttl,
15
+ (+locator-option // divert-option), ?objective]
16
+
17
+ message /= synch-message ;response to Synchronization request
18
+ synch-message = [M_SYNCH, session-id, objective]
19
+
20
+ message /= flood-message
21
+ flood-message = [M_FLOOD, session-id, initiator, ttl,
22
+ +[objective, (locator-option / [])]]
23
+
24
+ message /= request-negotiation-message
25
+ request-negotiation-message = [M_REQ_NEG, session-id, objective]
26
+
27
+ message /= request-synchronization-message
28
+ request-synchronization-message = [M_REQ_SYN, session-id, objective]
29
+
30
+ message /= negotiation-message
31
+ negotiation-message = [M_NEGOTIATE, session-id, objective]
32
+
33
+ message /= end-message
34
+ end-message = [M_END, session-id, accept-option / decline-option ]
35
+
36
+ message /= wait-message
37
+ wait-message = [M_WAIT, session-id, waiting-time]
38
+
39
+ message /= invalid-message
40
+ invalid-message = [M_INVALID, session-id, ?any]
41
+
42
+ noop-message = [M_NOOP]
43
+
44
+ divert-option = [O_DIVERT, +locator-option]
45
+
46
+ accept-option = [O_ACCEPT]
47
+
48
+ decline-option = [O_DECLINE, ?reason]
49
+ reason = text ;optional error message
50
+
51
+ waiting-time = 0..4294967295 ; in milliseconds
52
+ ttl = 0..4294967295 ; in milliseconds
53
+
54
+ locator-option /= [O_IPv4_LOCATOR, ipv4-address,
55
+ transport-proto, port-number]
56
+ ipv4-address = bytes .size 4
57
+
58
+ locator-option /= [O_IPv6_LOCATOR, ipv6-address,
59
+ transport-proto, port-number]
60
+ ipv6-address = bytes .size 16
61
+
62
+ locator-option /= [O_FQDN_LOCATOR, text, transport-proto, port-number]
63
+
64
+ transport-proto = IPPROTO_TCP / IPPROTO_UDP
65
+ IPPROTO_TCP = 6
66
+ IPPROTO_UDP = 17
67
+ port-number = 0..65535
68
+
69
+ locator-option /= [O_URI_LOCATOR, text]
70
+
71
+ initiator = ipv4-address / ipv6-address
72
+
73
+ objective-flags = uint .bits objective-flag
74
+
75
+ objective-flag = &(
76
+ F_DISC: 0 ; valid for discovery
77
+ F_NEG: 1 ; valid for negotiation
78
+ F_SYNCH: 2 ; valid for synchronization
79
+ F_NEG_DRY: 3 ; negotiation is dry-run
80
+ )
81
+
82
+ objective = [objective-name, objective-flags, loop-count, ?any]
83
+
84
+ objective-name = text ;see specification for uniqueness rules
85
+
86
+ loop-count = 0..255
87
+
88
+ ; Constants for message types and option types
89
+
90
+ M_NOOP = 0
91
+ M_DISCOVERY = 1
92
+ M_RESPONSE = 2
93
+ M_REQ_NEG = 3
94
+ M_REQ_SYN = 4
95
+ M_NEGOTIATE = 5
96
+ M_END = 6
97
+ M_WAIT = 7
98
+ M_SYNCH = 8
99
+ M_FLOOD = 9
100
+ M_INVALID = 99
101
+
102
+ O_DIVERT = 100
103
+ O_ACCEPT = 101
104
+ O_DECLINE = 102
105
+ O_IPv6_LOCATOR = 103
106
+ O_IPv4_LOCATOR = 104
107
+ O_FQDN_LOCATOR = 105
108
+ O_URI_LOCATOR = 106
@@ -0,0 +1,97 @@
1
+ grasp-message = message
2
+
3
+ session-id = 0..16777215
4
+ ; that is still 24 bits; we could pick any size we want
5
+
6
+ message /= discovery-message
7
+ discovery-message = [M_DISCOVERY, session-id, objective]
8
+
9
+ message /= response-message
10
+ response-message = [M_RESPONSE, session-id, *locator-option / divert-option / objective]
11
+
12
+ message /= request-message
13
+ request-message = [M_REQUEST, session-id, objective]
14
+
15
+ message /= negotiation-message
16
+ negotiation-message = [M_NEGOTIATE, session-id, objective]
17
+
18
+ message /= end-message
19
+ end-message = [M_END, session-id, accept-option / decline option]
20
+
21
+ message /= wait-message
22
+ wait-message = [M_WAIT, session-id, waiting-time-option]
23
+
24
+
25
+ M_DISCOVERY = 1
26
+ M_RESPONSE = 2
27
+ M_REQUEST = 3
28
+ M_NEGOTIATE = 4
29
+ M_END = 5
30
+ M_WAIT = 6
31
+
32
+ option /= divert-option
33
+ divert-option = [OPTION_DIVERT, *locator-option]
34
+ OPTION_DIVERT = 372 ; use section numbers for now
35
+
36
+ option /= accept-option
37
+ accept-option = [OPTION_ACCEPT]
38
+ OPTION_ACCEPT = 373
39
+
40
+ option /= decline-option
41
+ decline-option = [OPTION_DECLINE]
42
+ OPTION_DECLINE = 374
43
+
44
+ option /= waiting-time-option
45
+ waiting-time-option = [OPTION_WAITING, option-waiting-time]
46
+ OPTION_WAITING = 375
47
+ option-waiting-time = 0..4294967295 ; in milliseconds
48
+
49
+ option /= option-device-id
50
+ option-device-id = [OPTION_DEVICE_ID, bytes]
51
+ OPTION_DEVICE_ID = 376
52
+
53
+ locator-option /= ipv4-locator-option
54
+ ipv4-locator-option = bytes .size 4
55
+ ; this is simpler than [OPTION_IPv4_LOCATOR, bytes .size 4] -- do we want regularity or simplicity?
56
+
57
+ locator-option /= ipv6-locator-option
58
+ ipv6-locator-option = bytes .size 16
59
+
60
+ locator-option /= fqdn-locator-option
61
+ OPTION_FQDN_LOCATOR = 3773
62
+ fqdn-locator-option = [OPTION_FQDN_LOCATOR, text]
63
+
64
+ locator-option /= url-locator-option
65
+ OPTION_URL_LOCATOR = 3774
66
+ url-locator-option = [OPTION_URL_LOCATOR, text]
67
+
68
+ objective-flags = uint .bits objective-flag
69
+
70
+ objective-flag = &(
71
+ D: 0
72
+ N: 1
73
+ S: 2
74
+ )
75
+
76
+ ; D means valid for discovery only
77
+ ; N means valid for discovery and negotiation
78
+ ; S means valid for discovery and synchronization
79
+
80
+ option /= objective
81
+
82
+ objective /= generic-obj
83
+ generic-obj = [objective-name, objective-flags, loop-count, any]
84
+
85
+ objective /= vendor-obj
86
+ vendor-obj = [{"PEN":pen}, objective-name, objective-flags, loop-count, any]
87
+
88
+ ; Objectives have names rather than numbers here. But the names need
89
+ ; to be unique. Registry needed, it seems.
90
+
91
+ ; A PEN is used to distinguish vendor-specific options. Or we could
92
+ ; decide to use a domain name. Anything unique will do.
93
+
94
+ pen = 0..4294967295
95
+ objective-name = tstr
96
+ loop-count = 0..255
97
+
@@ -0,0 +1,89 @@
1
+ grasp-message = message
2
+
3
+ session-id = 0..16777215
4
+ ; that is up to 24 bits
5
+
6
+ message /= discovery-message
7
+ discovery-message = [M_DISCOVERY, session-id, objective]
8
+
9
+ message /= response-message
10
+ response-message = [M_RESPONSE, session-id, +locator-option / divert-option / objective]
11
+ ; must split to satisfy CDDL tool
12
+
13
+ message /= request-message
14
+ request-message = [M_REQUEST, session-id, objective]
15
+
16
+ message /= negotiation-message
17
+ negotiation-message = [M_NEGOTIATE, session-id, objective]
18
+
19
+ message /= end-message
20
+ end-message = [M_END, session-id, (accept-option / decline-option)]
21
+
22
+ message /= wait-message
23
+ wait-message = [M_WAIT, session-id, waiting-time-option]
24
+
25
+ divert-option = [O_DIVERT, +locator-option]
26
+
27
+ accept-option = [O_ACCEPT]
28
+
29
+ decline-option = [O_DECLINE]
30
+
31
+ waiting-time-option = [O_WAITING, option-waiting-time]
32
+ option-waiting-time = 0..4294967295 ; in milliseconds
33
+
34
+ option-device-id = [O_DEVICE_ID, bytes]
35
+
36
+ locator-option /= ipv4-locator-option
37
+ ipv4-locator-option = bytes .size 4
38
+ ; this is simpler than [O_IPv4_LOCATOR, bytes .size 4]
39
+
40
+ locator-option /= ipv6-locator-option
41
+ ipv6-locator-option = bytes .size 16
42
+
43
+ locator-option /= fqdn-locator-option
44
+ fqdn-locator-option = [O_FQDN_LOCATOR, text]
45
+
46
+ locator-option /= url-locator-option
47
+ url-locator-option = [O_URL_LOCATOR, text]
48
+
49
+ objective-flags = uint .bits objective-flag
50
+
51
+ objective-flag = &(
52
+ D: 0
53
+ N: 1
54
+ S: 2
55
+ )
56
+
57
+ ; D means valid for discovery only
58
+ ; N means valid for discovery and negotiation
59
+ ; S means valid for discovery and synchronization
60
+
61
+ objective /= generic-obj
62
+ generic-obj = [objective-name, objective-flags, loop-count, ?any]
63
+
64
+ objective /= vendor-obj
65
+ vendor-obj = [{"PEN":pen}, objective-name, objective-flags,
66
+ loop-count, ?any]
67
+
68
+ ; A PEN is used to distinguish vendor-specific options.
69
+
70
+ pen = 0..4294967295
71
+ objective-name = tstr
72
+ loop-count = 0..255
73
+
74
+ ; Constants
75
+
76
+ M_DISCOVERY = 1
77
+ M_RESPONSE = 2
78
+ M_REQUEST = 3
79
+ M_NEGOTIATE = 4
80
+ M_END = 5
81
+ M_WAIT = 6
82
+
83
+ O_DIVERT = 100
84
+ O_ACCEPT = 101
85
+ O_DECLINE = 102
86
+ O_WAITING = 103
87
+ O_DEVICE_ID = 104
88
+ O_FQDN_LOCATOR = 105
89
+ O_URL_LOCATOR = 106
@@ -0,0 +1,392 @@
1
+ messages = request / response
2
+
3
+ request = new-session-request / end-session / renew-session / publish-request / search-request / subscribe-request / poll-request
4
+ / purge-publisher-request
5
+
6
+ ; response = subscribe-received / publish-received / purge-publisher-received / results
7
+
8
+ ;results = error-result / poll-result / search-result / new-session-result / end-session-result
9
+
10
+ message<namespace,name,attributes,content> = [
11
+ namespace: namespace,
12
+ name: name,
13
+ attributes: attributes,
14
+ content: content
15
+ ]
16
+
17
+ error-code = "AccessDenied" / "Failure" / "InvalidIdentifier" / "InvalidIdentifierType" /
18
+ "IdentifierTooLong" / "InvalidMetadata" / "InvalidSchemaVersion" / "InvalidSessionID" /
19
+ "MetadataTooLong" / "SearchResultsTooBig" / "PollResultsTooBig" / "SystemError"
20
+
21
+ error-result =
22
+ message<"ifmap", "error-result",
23
+ [ ],
24
+ [ ? "name", ? tstr,
25
+ "error-code", error-code,
26
+ "error-string", tstr
27
+ ]>
28
+
29
+ poll-result = ["", "poll-result", [], [ *(search-result / error-result)]]
30
+
31
+ response-choice = error-result / poll-result / search-result / subscribe-received /
32
+ publish-received / purge-publisher-received / new-session-result /
33
+ renew-session-result / end-session-result
34
+
35
+ response =
36
+ message<"ifmap", "response",
37
+ [ ? validation-attributes ],
38
+ [ response-choice ]>
39
+
40
+ purge-publisher-received =
41
+ ["", "purge-publisher-received", [], []]
42
+
43
+ purge-publisher-request =
44
+ message<"ifmap", "purge-publisher",
45
+ [ "ifmap-publisher-id", tstr,
46
+ session-attributes
47
+ ],
48
+ []>
49
+
50
+ ; needs to be constructed according to IF-MAP Filter syntax
51
+ filter-type = tstr
52
+
53
+ poll-request =
54
+ message<"ifmap", "poll",
55
+ [ session-attributes,
56
+ validation-attributes
57
+ ],
58
+ []>
59
+
60
+ subscribe-received =
61
+ ["", "subscribe-received", [], []]
62
+
63
+ subscribe-request =
64
+ message<"ifmap", "subscribe",
65
+ [ session-attributes,
66
+ validation-attributes
67
+ ],
68
+ [ 1*(subscribe-update / subscribe-delete)
69
+ ]>
70
+
71
+ subscribe-delete =
72
+ message<"", "delete",
73
+ [ "name", tstr,
74
+ ],
75
+ []>
76
+
77
+ subscribe-update =
78
+ message<"", "update",
79
+ [ "match-links", filter-type,
80
+ "max-depth", uint,
81
+ "terminal-identifier-type", tstr,
82
+ "max-size", uint,
83
+ "result-filter", filter-type,
84
+ "name", tstr,
85
+ ],
86
+ [ access-request / identity / ip-address / mac-address / device
87
+ ]>
88
+ search-request =
89
+ message<"ifmap", "search",
90
+ [ session-attributes,
91
+ validation-attributes,
92
+ "match-links", filter-type,
93
+ "max-depth", uint,
94
+ "terminal-identifier-type", tstr,
95
+ "max-size", uint,
96
+ "result-filter", filter-type
97
+ ],
98
+ [ access-request / identity / ip-address / mac-address / device
99
+ ]>
100
+
101
+ search-result =
102
+ ["", "search-result",
103
+ ["name", tstr],
104
+ [ *result-item]]
105
+
106
+ result-item =
107
+ message<"", "result-item",
108
+ [],
109
+ [ 1*2(access-request / identity / ip-address / mac-address / device),
110
+ "metadata", metadata-list-type
111
+ ]>
112
+
113
+ publish-request =
114
+ message<"ifmap", "publish",
115
+ [ session-attributes, validation-attributes ],
116
+ [+ (update-request / notify-request / delete-request) ]>
117
+
118
+ update-request = message<"", "update", [ ? lifetime-attributes], [ 1*2 identifier, metadata-list-type ]>
119
+ notify-request = message<"", "notify", [ ? lifetime-attributes], [ 1*2 identifier ]>
120
+ delete-request = message<"", "delete", [ "filter", tstr], []>
121
+
122
+ publish-received =
123
+ ["", "publish-received", [], []]
124
+
125
+ renew-session = message<"ifmap", "renew-session", [ ? session-attributes ], []>
126
+ renew-session-result = ["", "renew-session-result", [], []]
127
+
128
+ end-session = message<"ifmap", "end-session", [], []>
129
+ end-session-result =
130
+ ["", "end-session-result", [], []]
131
+
132
+ new-session-request =
133
+ message<"ifmap", "new-session",
134
+ [ "max-poll-result-size", uint],
135
+ []>
136
+
137
+ new-session-result =
138
+ ["", "new-session-result",
139
+ [ session-attributes,
140
+ "ifmap-publisher-id", tstr,
141
+ "max-poll-result-size", uint,
142
+ ],
143
+ []]
144
+
145
+ identifier = access-request / device / identity / ip-address / mac-address
146
+
147
+ session-attributes = (
148
+ "session-id", tstr
149
+ )
150
+
151
+ validation-attributes = (
152
+ "validation", ("None" / "BaseOnly" / "MetadataOnly" / "All")
153
+ )
154
+
155
+ adm-dom = (
156
+ "administrative-domain", tstr,
157
+ )
158
+
159
+ lifetime-attributes = (
160
+ "lifetime", ("session" / "forever")
161
+ )
162
+
163
+ access-request =
164
+ message<"ifmap", "access-request",
165
+ [ ? adm-dom,
166
+ "name", tstr
167
+ ],
168
+ []>
169
+
170
+ device = message<"ifmap", "device", [], [device-type]>
171
+ device-type =
172
+ message<"ifmap","aik-name", [], tstr> /
173
+ message<"ifmap","name", [], tstr>
174
+
175
+ identity = message<"ifmap", "identity",
176
+ [ ? adm-dom,
177
+ "name", tstr,
178
+ "type", ("aik-name" / "distinguished-name" / "dns-name" / "email-address" /
179
+ "hip-hit" / "kerberos-principal" / "trusted-platform-module" /
180
+ "username" / "other"),
181
+ "other-type-definition", tstr
182
+ ],
183
+ []>
184
+
185
+ ip-address = message<"ifmap", "ip-address",
186
+ [ ? adm-dom,
187
+ "value", tstr,
188
+ "type", ("IPv4" / "IPv6")
189
+ ],
190
+ []>
191
+
192
+ mac-address = message<"ifmap", "mac-address",
193
+ [ ? adm-dom,
194
+ "value", tstr,
195
+ ],
196
+ []>
197
+
198
+ metadata-attributes = (
199
+ "ifmap-publisher-id", tstr,
200
+ "ifmap-timestamp", tdate,
201
+ "ifmap-timestamp-fraction", tstr
202
+ )
203
+
204
+ ; optional metadata attributes? not yet possible
205
+ single-value-metadata-attributes = (
206
+ ? metadata-attributes,
207
+ "ifmap-cardinality", "singleValue"
208
+ )
209
+
210
+ multi-value-metadata-attributes = (
211
+ ? metadata-attributes,
212
+ "ifmap-cardinality", "multiValue"
213
+ )
214
+
215
+ access-request-device = message<"meta", "access-request-device",
216
+ [ single-value-metadata-attributes ], []>
217
+
218
+ access-request-ip = message<"meta", "access-request-ip",
219
+ [ single-value-metadata-attributes ], []>
220
+
221
+ access-request-mac = message<"meta", "access-request-mac",
222
+ [ single-value-metadata-attributes ], []>
223
+
224
+ authenticated-as = message<"meta", "authenticated-as",
225
+ [ single-value-metadata-attributes ], []>
226
+
227
+ authenticated-by = message<"meta", "authenticated-by",
228
+ [ single-value-metadata-attributes ], []>
229
+
230
+ capability = message<"meta", "capability",
231
+ [ multi-value-metadata-attributes ],
232
+ [ ? adm-dom,
233
+ "name", tstr
234
+ ]>
235
+
236
+ device-attribute = message<"meta", "device-attribute",
237
+ [ multi-value-metadata-attributes ],
238
+ [ "name", tstr
239
+ ]>
240
+
241
+ manufacturer = message<"", "manufacturer", [], tstr>
242
+ model = message<"", "model", [], tstr>
243
+ os = message<"", "os", [], tstr>
244
+ os-version = message<"", "os-version", [], tstr>
245
+ type = message<"", "type", [],
246
+ ("p2p" / "cve" / "botnet infection" / "worm infection" / "excessive flows" /
247
+ "behavioral change" / "policy violation" / "other")>
248
+ discovered-time = message<"", "discovered-time", [], tdate>
249
+ discoverer-id = message<"", "discoverer-id", [], tstr>
250
+ discovery-method = message<"", "discovery-method", [], tstr>
251
+ name = message<"", "name", [], tstr>
252
+ magnitude = message<"", "magnitude", [], 0..100>
253
+ confidence = message<"", "confidence", [], 0..100>
254
+ significance = message<"", "significance", [], ("critical" / "important" / "informational")>
255
+ information = message<"", "information", [], tstr>
256
+ vulnerability-uri = message<"", "vulnerability-uri", [], uri>
257
+ enforcement-action = message<"", "enforcement-action", [], tstr>
258
+ other-type-definition = message<"", "other-type-definition", [], tstr>
259
+ enforcement-reason = message<"", "enforcement-reason", [], tstr>
260
+ start-time = message<"", "start-time", [], tdate>
261
+ end-time = message<"", "end-time", [], tdate>
262
+ dhcp-server = message<"", "dhcp-server", [], tstr>
263
+ vlan = message<"", "vlan", [], uint>
264
+ vlan-name = message<"", "vlan-name", [], uint>
265
+ port = message<"", "port", [], uint>
266
+ location-information = message<"", "location-information",
267
+ [ "type", tstr,
268
+ "value", tstr], []>
269
+ qualifier = message<"", "qualifier", [], tstr>
270
+
271
+ device-characteristic = message<"meta", "device-characteristic",
272
+ [ multi-value-metadata-attributes ],
273
+ [ ? manufacturer,
274
+ ? model,
275
+ ? os,
276
+ ? os-version,
277
+ * type,
278
+ discovered-time,
279
+ discoverer-id,
280
+ + discovery-method
281
+ ]>
282
+
283
+ device-ip = message<"meta", "device-ip",
284
+ [ single-value-metadata-attributes ], [ device, ip-address]>
285
+
286
+ discovered-by = message<"meta", "discovered-by",
287
+ [ single-value-metadata-attributes ], []>
288
+
289
+ enforcement-report = message<"meta", "enforcement-report",
290
+ [ multi-value-metadata-attributes ],
291
+ [ enforcement-action,
292
+ other-type-definition,
293
+ enforcement-reason
294
+ ]>
295
+
296
+ event = message<"meta", "event",
297
+ [ multi-value-metadata-attributes ],
298
+ [ name,
299
+ discovered-time,
300
+ discoverer-id,
301
+ magnitude,
302
+ confidence,
303
+ significance,
304
+ ? type,
305
+ ? other-type-definition,
306
+ ? information,
307
+ ? vulnerability-uri
308
+ ]>
309
+
310
+ ip-mac = message<"meta", "ip-mac",
311
+ [ multi-value-metadata-attributes ],
312
+ [ ? start-time,
313
+ ? end-time,
314
+ ? dhcp-server
315
+ ]>
316
+
317
+ layer2-information = message<"meta", "layer2-information",
318
+ [ multi-value-metadata-attributes ],
319
+ [ ? vlan,
320
+ ? vlan-name,
321
+ ? port,
322
+ ? adm-dom
323
+ ]>
324
+
325
+ location = message<"meta", "location",
326
+ [ multi-value-metadata-attributes ],
327
+ [ discovered-time,
328
+ discoverer-id,
329
+ + location-information
330
+ ]>
331
+
332
+ request-for-investigation = message<"meta", "request-for-investigation",
333
+ [ multi-value-metadata-attributes ],
334
+ [ ? qualifier ]>
335
+
336
+ role = message<"meta", "role",
337
+ [ multi-value-metadata-attributes ],
338
+ [ ? adm-dom,
339
+ name
340
+ ]>
341
+
342
+ unexpected-behavior = message<"meta", "unexpected-behavior",
343
+ [ multi-value-metadata-attributes ],
344
+ [ discovered-time,
345
+ discoverer-id,
346
+ ? information,
347
+ magnitude,
348
+ ? confidence,
349
+ significance,
350
+ ? type
351
+ ]>
352
+
353
+ wlan-security-type = "open" / "wep" / "tkip" / "ccmp" / "bip" / "other"
354
+
355
+ ssid = message<"", "ssid", [], tstr>
356
+ ssid-unicast-security = message<"", "ssid-unicast-security",
357
+ [ ? other-type-definition ],
358
+ [ wlan-security-type ]>
359
+ ssid-group-security = message<"", "ssid-group-security",
360
+ [ ? other-type-definition ],
361
+ [ wlan-security-type ]>
362
+ ssid-management-security = message<"", "ssid-management-security",
363
+ [ ? other-type-definition ],
364
+ [ wlan-security-type ]>
365
+
366
+ wlan-information = message<"meta", "wlan-information",
367
+ [ single-value-metadata-attributes ],
368
+ [ ? ssid,
369
+ + ssid-unicast-security,
370
+ ssid-group-security,
371
+ + ssid-management-security
372
+ ]>
373
+
374
+ client-time = message<"opmeta", "client-time",
375
+ [ single-value-metadata-attributes,
376
+ "current-time", tdate
377
+ ], []>
378
+
379
+ ; list every capability explicitly?
380
+ server-capability = message<"opmeta", "server-capability",
381
+ [ single-value-metadata-attributes,
382
+ ],
383
+ [ message<"", "capability", [], tstr>,
384
+ ]>
385
+
386
+ metadata-list-type = [
387
+ *(access-request-device / access-request-ip / access-request-mac /
388
+ authenticated-as / authenticated-by / capability / device-attribute /
389
+ device-characteristic / device-ip / discovered-by / enforcement-report /
390
+ event / ip-mac / layer2-information / location / request-for-investigation /
391
+ role / unexpected-behavior / wlan-information
392
+ )]