summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/dap/dap.cnf
blob: 0ab35d108767e79f5e0d1e676a5a6295d121b707 (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
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
#.TYPE_ATTR
# X509AF also exports the type Time. This makes sure asn2wrs uses the locally defined version.
Time                     TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(dap_Time_vals)  BITMASK = 0
#.END

#.IMPORT	../x509if/x509if-exp.cnf
#.IMPORT	../x509af/x509af-exp.cnf
#.IMPORT	../x509sat/x509sat-exp.cnf
#.IMPORT	../crmf/crmf-exp.cnf
#.IMPORT	../dsp/dsp-exp.cnf
#.IMPORT	../disp/disp-exp.cnf
#.IMPORT	../ros/ros-exp.cnf
#.IMPORT	../acse/acse-exp.cnf

#.OMIT_ASSIGNMENT
DAP-InvokeIDSet
#.END

#.NO_EMIT ONLY_VALS
Name

#.MODULE_IMPORT
AttributeCertificateDefinitions	x509af
BasicAccessControl	crmf

# Forward declaration of classes
#.CLASS CONTEXT
&Type
&Assertion
&id         ObjectIdentifierType
#.END

#.CLASS CONTRACT
&connection           ClassReference CONNECTION-PACKAGE
&OperationsOf         ClassReference OPERATION-PACKAGE
&InitiatorConsumerOf  ClassReference OPERATION-PACKAGE
&InitiatorSupplierOf  ClassReference OPERATION-PACKAGE
&id                   ObjectIdentifierType
#.END

#.CLASS APPLICATION-CONTEXT
&bind-operation		ClassReference OPERATION
&Operations		ClassReference OPERATION
&applicationContextName	ObjectIdentifierType
#.END

#.CLASS OBJECT-CLASS
&Superclasses         ClassReference OBJECT-CLASS
&kind                 TypeReference ObjectClassKind
&MandatoryAttributes  ClassReference ATTRIBUTE
&OptionalAttributes   ClassReference ATTRIBUTE
&id                   ObjectIdentifierType
#.END

#.CLASS ATTRIBUTE
&derivation            ClassReference ATTRIBUTE
&Type
&equality-match        ClassReference MATCHING-RULE
&ordering-match        ClassReference MATCHING-RULE
&substrings-match      ClassReference MATCHING-RULE
&single-valued         BooleanType
&collective            BooleanType
&no-user-modification  BooleanType
&usage                 TypeReference AttributeUsage
&id                    ObjectIdentifierType
#.END

#.CLASS MATCHING-RULE
&ParentMatchingRules   ClassReference MATCHING-RULE
&AssertionType
&uniqueMatchIndicator  ClassReference ATTRIBUTE
&id                    ObjectIdentifierType
#.END

#.OMIT_ASSIGNMENT
CommonArguments
CommonResults
CommonResultsSeq
#.END

#.EXPORTS
Filter
Referral
EntryModification
ContextSelection
DirectoryBindArgument
DirectoryBindError
ReadArgument
ReadResult
ListArgument
ListResult
SearchArgument
SearchResult
AddEntryArgument
AddEntryResult
CompareArgument
CompareResult
RemoveEntryArgument
RemoveEntryResult
ModifyEntryArgument
ModifyEntryResult
ModifyDNArgument
ModifyDNResult
AbandonArgument
AbandonResult
AttributeError
NameError
ServiceError
Abandoned
SearchControlOptions
SecurityError
SecurityProblem
SecurityParameters EXTERN WS_DLL
ServiceControlOptions
AbandonFailedError
UpdateError
HierarchySelections
FamilyGrouping
FamilyReturn

#.TYPE_RENAME
FamilyEntry/information		FamilyInformation
AbandonResult/information	AbandonInformation
AddEntryResult/information	AddEntryInformation
RemoveEntryResult/information	RemoveEntryInformation
ModifyEntryResult/information	ModifyEntryInformation
ModifyDNResult/information	ModifyDNInformation

EntryInformation/information/_item	EntryInformationItem

#.FIELD_RENAME

ModifyRights/_item/item/attribute	attribute-type

ModifyRights/_item/item/entry	item-entry
AddEntryArgumentData/entry	add-entry

EntryInformation/information	entry-information
FamilyEntry/information		family-information
AbandonResult/information	abandon-information
AddEntryResult/information	add-entry-information
RemoveEntryResult/information	remove-entry-information
ModifyEntryResult/information	modify-entry-information
ModifyDNResult/information	modify-dn-information

EntryInformation/information/_item	entry-information-item

Filter/item	filter-item

NameErrorData/matched	matched-name

SecurityParameters/name		distinguished-name
SimpleCredentials/name		distinguished-name
StrongCredentials/name		distinguished-name

ModifyDNArgument/object		distinguished-name

AbandonFailedErrorData/problem		abandon-failed-problem
ServiceErrorData/problem		service-error-problem
AttributeErrorData/problems/_item/problem	attribute-error-problem
NameErrorData/problem			name-error-problem
SecurityErrorData/problem		security-error-problem
UpdateErrorData/problem			update-error-problem

DirectoryBindErrorData/error/securityError	securityProblem
SecurityError/signedSecurityError/securityError	securityErrorData

DirectoryBindErrorData/error/serviceError	serviceProblem

FilterItem/substrings/type			sunstringType

ModifyRights/_item/item/value			value-assertion

TokenData/name		distinguished-name

TokenData/time		utctime

PagedResultsRequest/queryReference	pagedResultsQueryReference

EntryInformationSelection/extraAttributes/select	extraSelect

SaslCredentials/credentials				saslCredentials

#.FIELD_ATTR
SaslCredentials/credentials ABBREV=saslCredentials
TokenData/time				ABBREV=utctime
NameErrorData/matched		ABBREV=matched_name

# This table creates the value_string to name DAP operation codes and errors
# in file packet-dap-table.c which is included in the template file
#
#.TABLE_HDR
/* DAP OPERATIONS */
static const value_string dap_opr_code_string_vals[] = {
#.TABLE_BODY OPERATION
	{ %(&operationCode)s, "%(_ident)s" },
#.TABLE_FTR
	{ 0, NULL }
};
#.END

#.TABLE_HDR
/* DAP ERRORS */
static const value_string dap_err_code_string_vals[] = {
#.TABLE_BODY ERROR
	{ %(&errorCode)s, "%(_ident)s" },
#.TABLE_FTR
	  { 0, NULL }
};
#.END

# Create a table of opcode and corresponding args and res
#.TABLE11_HDR
static const ros_opr_t dap_opr_tab[] = {
#.TABLE11_BODY OPERATION
  /* %(_name)s */
  { %(&operationCode)-25s,	%(_argument_pdu)s,	%(_result_pdu)s },
#.TABLE11_FTR
  { 0,				(dissector_t)(-1),	(dissector_t)(-1) },
};
#.END

#.TABLE21_HDR
static const ros_err_t dap_err_tab[] = {
#.TABLE21_BODY ERROR
  /* %(_name)s*/
  { %(&errorCode)s,	%(_parameter_pdu)s },
#.TABLE21_FTR
  { 0,	(dissector_t)(-1) },
};
#.END


#.PDU
ERROR.&ParameterType
OPERATION.&ArgumentType
OPERATION.&ResultType
#.END

#.FN_BODY	FilterItem/substrings/strings/_item/initial
	proto_item *it;
	it = proto_tree_add_item(tree, hf_index, tvb, offset, -1, ENC_BIG_ENDIAN);
	proto_item_append_text(it," XXX: Not yet implemented!");

#.FN_BODY	FilterItem/substrings/strings/_item/any
	/* XXX: not yet implemented */

#.FN_BODY	FilterItem/substrings/strings/_item/final
	/* XXX: not yet implemented */

#.FN_BODY	MatchingRuleAssertion/matchValue
	/* XXX: not yet implemented */

#.FN_BODY	SpkmCredentials/req
	/* XXX: not yet implemented */

#.FN_BODY	SpkmCredentials/rep
	/* XXX: not yet implemented */

#.FN_BODY	SecurityErrorData/spkmInfo
	/* XXX: not yet implemented */

#.FN_BODY 	DirectoryBindArgument

	uint32_t len;

	/* check and see if this is an empty set */
	dissect_ber_length(actx->pinfo, tree, tvb, offset+1, &len, NULL);

	if(len == 0) {
		/* it's an empty set - i.e anonymous  (assuming version is DEFAULTed) */
		proto_tree_add_expert(tree, actx->pinfo, &ei_dap_anonymous, tvb, offset, -1);

		col_append_str(actx->pinfo->cinfo, COL_INFO, " anonymous");

	}
	/* do the default thing */

	%(DEFAULT_BODY)s

#.FN_BODY	SimpleCredentials

	%(DEFAULT_BODY)s

	col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", x509if_get_last_dn());




#.FN_BODY PagedResultsRequest/queryReference  VAL_PTR=&out_tvb
	tvbuff_t *out_tvb;
	int	i;
	int	len;

	%(DEFAULT_BODY)s

	if(out_tvb) {
		/* now see if we can add a string representation */
		len = tvb_reported_length(out_tvb);
		if(tvb_ascii_isprint(out_tvb, 0, len)) {
			if(actx->created_item) {

				proto_item_append_text(actx->created_item," (");
				for(i=0; i<len; i++)
					proto_item_append_text(actx->created_item,"%%c",tvb_get_uint8(out_tvb,i));
				proto_item_append_text(actx->created_item,")");
			}
		}
	}

#.FN_PARS SecurityProblem
	VAL_PTR = &problem

#.FN_BODY SecurityProblem
  uint32_t problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_SecurityProblem_vals, "SecurityProblem(%%d)"));

#.FN_PARS ServiceProblem
	VAL_PTR = &problem

#.FN_BODY ServiceProblem
  uint32_t problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_ServiceProblem_vals, "ServiceProblem(%%d)"));

#.FN_PARS UpdateProblem
	VAL_PTR = &problem

#.FN_BODY UpdateProblem
  uint32_t problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_UpdateProblem_vals, "UpdateProblem(%%d)"));

#.FN_PARS LimitProblem
	VAL_PTR = &problem

#.FN_BODY LimitProblem
  uint32_t problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_LimitProblem_vals, "LimitProblem(%%d)"));

#.END


#.FN_BODY SearchArgumentData/subset  VAL_PTR=&subset
  uint32_t subset;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(subset, dap_T_subset_vals, "Subset(%%d)"));


#.FN_BODY Name
	const char *dn;

	%(DEFAULT_BODY)s

	dn = x509if_get_last_dn();
	col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", (dn && *dn) ? dn : "(root)");