Regenerate all asn2wrs generated dissectors
[obnox/wireshark/wip.git] / asn1 / dap / dap.cnf
1 #.IMPORT        ../x509if/x509if-exp.cnf
2 #.IMPORT        ../x509af/x509af-exp.cnf
3 #.IMPORT        ../x509sat/x509sat-exp.cnf
4 #.IMPORT        ../pkixcrmf/crmf-exp.cnf
5 #.IMPORT        ../dsp/dsp-exp.cnf
6 #.IMPORT        ../disp/disp-exp.cnf
7 #.IMPORT        ../ros/ros-exp.cnf
8 #.IMPORT        ../acse/acse-exp.cnf
9
10 #.OMIT_ASSIGNMENT
11 DAP-InvokeIDSet
12 #.END
13
14 #.MODULE_IMPORT
15 ServiceAdministration   x509if
16 AttributeCertificateDefinitions x509af
17 BasicAccessControl      crmf
18
19 # Forward declaration of classes
20 #.CLASS CONTEXT
21 &Type      
22 &Assertion  
23 &id         ObjectIdentifierType
24 #.END
25
26 #.CLASS CONTRACT
27 &connection           ClassReference CONNECTION-PACKAGE
28 &OperationsOf         ClassReference OPERATION-PACKAGE
29 &InitiatorConsumerOf  ClassReference OPERATION-PACKAGE
30 &InitiatorSupplierOf  ClassReference OPERATION-PACKAGE
31 &id                   ObjectIdentifierType
32 #.END
33
34 #.CLASS APPLICATION-CONTEXT
35 &bind-operation         ClassReference OPERATION
36 &Operations             ClassReference OPERATION
37 &applicationContextName ObjectIdentifierType
38 #.END
39
40 #.CLASS OBJECT-CLASS
41 &Superclasses         ClassReference OBJECT-CLASS
42 &kind                 TypeReference ObjectClassKind
43 &MandatoryAttributes  ClassReference ATTRIBUTE
44 &OptionalAttributes   ClassReference ATTRIBUTE
45 &id                   ObjectIdentifierType
46 #.END
47
48 #.CLASS ATTRIBUTE
49 &derivation            ClassReference ATTRIBUTE
50 &Type                  
51 &equality-match        ClassReference MATCHING-RULE
52 &ordering-match        ClassReference MATCHING-RULE
53 &substrings-match      ClassReference MATCHING-RULE
54 &single-valued         BooleanType
55 &collective            BooleanType
56 &no-user-modification  BooleanType
57 &usage                 TypeReference AttributeUsage
58 &id                    ObjectIdentifierType
59 #.END
60
61 #.CLASS MATCHING-RULE
62 &ParentMatchingRules   ClassReference MATCHING-RULE
63 &AssertionType         
64 &uniqueMatchIndicator  ClassReference ATTRIBUTE
65 &id                    ObjectIdentifierType
66 #.END
67
68 #.OMIT_ASSIGNMENT
69 CommonArguments
70 CommonResults
71 CommonResultsSeq
72 #.END
73
74 #.EXPORTS
75 Filter
76 Referral
77 SecurityParameters
78 EntryModification
79 ContextSelection
80 DirectoryBindArgument
81 DirectoryBindError
82 ReadArgument
83 ReadResult
84 ListArgument
85 ListResult
86 SearchArgument
87 SearchResult
88 AddEntryArgument
89 AddEntryResult
90 CompareArgument
91 CompareResult
92 RemoveEntryArgument
93 RemoveEntryResult
94 ModifyEntryArgument
95 ModifyEntryResult
96 ModifyDNArgument
97 ModifyDNResult
98 AbandonArgument
99 AbandonResult
100 AttributeError
101 NameError
102 ServiceError
103 Abandoned
104 SearchControlOptions 
105 SecurityError
106 ServiceControlOptions
107 AbandonFailedError
108 UpdateError
109 HierarchySelections
110 FamilyGrouping
111 FamilyReturn
112
113 #.TYPE_RENAME
114 FamilyEntry/information         FamilyInformation
115 AbandonResult/information       AbandonInformation
116 AddEntryResult/information      AddEntryInformation
117 RemoveEntryResult/information   RemoveEntryInformation
118 ModifyEntryResult/information   ModifyEntryInformation
119 ModifyDNResult/information      ModifyDNInformation
120
121 EntryInformation/information/_item      EntryInformationItem
122
123 #.FIELD_RENAME
124
125 ModifyRights/_item/item/attribute       attribute-type
126
127 ModifyRights/_item/item/entry   item-entry
128 AddEntryArgumentData/entry      add-entry
129
130 EntryInformation/information    entry-information
131 FamilyEntry/information         family-information
132 AbandonResult/information       abandon-information
133 AddEntryResult/information      add-entry-information
134 RemoveEntryResult/information   remove-entry-information
135 ModifyEntryResult/information   modify-entry-information
136 ModifyDNResult/information      modify-dn-information
137
138 EntryInformation/information/_item      entry-information-item
139
140 Filter/item     filter-item
141
142 NameErrorData/matched   matched-name
143
144 SecurityParameters/name         distinguished-name
145 SimpleCredentials/name          distinguished-name
146 StrongCredentials/name          distinguished-name
147
148 ModifyDNArgument/object         distinguished-name
149
150 AbandonFailedErrorData/problem          abandon-failed-problem
151 ServiceErrorData/problem                service-error-problem
152 AttributeErrorData/problems/_item/problem       attribute-error-problem
153 NameErrorData/problem                   name-error-problem
154 SecurityErrorData/problem               security-error-problem
155 UpdateErrorData/problem                 update-error-problem
156
157 DirectoryBindErrorData/error/securityError      securityProblem
158 SecurityError/signedSecurityError/securityError securityErrorData
159
160 DirectoryBindErrorData/error/serviceError       serviceProblem
161
162 FilterItem/substrings/type                      sunstringType
163
164 ModifyRights/_item/item/value                   value-assertion
165
166 TokenData/name          distinguished-name
167
168 TokenData/time          utctime
169
170 PagedResultsRequest/queryReference      pagedResultsQueryReference
171
172 EntryInformationSelection/extraAttributes/select        extraSelect
173
174 # This table creates the value_sting to name P7 operation codes and errors
175 # in file packet-p7-table.c which is included in the template file
176 #
177 #.TABLE_HDR
178 /* DAP OPERATIONS */
179 const value_string dap_opr_code_string_vals[] = {
180 #.TABLE_BODY OPERATION
181         { %(&operationCode)s, "%(_ident)s" },
182 #.TABLE_FTR
183         { 0, NULL }
184 };
185 #.END
186
187 #.TABLE_HDR
188 /* DAP ERRORS */
189 static const value_string dap_err_code_string_vals[] = {
190 #.TABLE_BODY ERROR
191         { %(&errorCode)s, "%(_ident)s" },  
192 #.TABLE_FTR
193           { 0, NULL }
194 };
195 #.END
196
197 # Create a table of opcode and corresponding args and res
198 #.TABLE11_HDR
199 static const ros_opr_t dap_opr_tab[] = {
200 #.TABLE11_BODY OPERATION
201   /* %(_name)s */ 
202   { %(&operationCode)-25s,      %(_argument_pdu)s,      %(_result_pdu)s }, 
203 #.TABLE11_FTR
204   { 0,                          (new_dissector_t)(-1),  (new_dissector_t)(-1) },
205 };
206 #.END
207
208 #.TABLE21_HDR
209 static const ros_err_t dap_err_tab[] = {
210 #.TABLE21_BODY ERROR
211   /* %(_name)s*/ 
212   { %(&errorCode)s,     %(_parameter_pdu)s },
213 #.TABLE21_FTR
214   { 0,  (new_dissector_t)(-1) },
215 };
216 #.END
217
218
219 #.PDU_NEW
220 ERROR.&ParameterType
221 OPERATION.&ArgumentType
222 OPERATION.&ResultType
223 #.END
224
225 #.FN_BODY       FilterItem/substrings/strings/_item/initial
226         proto_item *it;
227         it = proto_tree_add_item(tree, hf_index, tvb, offset, -1, FALSE);
228         proto_item_append_text(it," XXX: Not yet implemented!");
229
230 #.FN_BODY       FilterItem/substrings/strings/_item/any
231         /* XXX: not yet implemented */
232
233 #.FN_BODY       FilterItem/substrings/strings/_item/final
234         /* XXX: not yet implemented */
235
236 #.FN_BODY       MatchingRuleAssertion/matchValue
237         /* XXX: not yet implemented */
238
239 #.FN_BODY       SpkmCredentials/req
240         /* XXX: not yet implemented */
241
242 #.FN_BODY       SpkmCredentials/rep
243         /* XXX: not yet implemented */
244
245 #.FN_BODY       SecurityErrorData/spkmInfo
246         /* XXX: not yet implemented */
247
248 #.FN_BODY       DirectoryBindArgument
249
250         guint32 len;
251
252         /* check and see if this is an empty set */
253         dissect_ber_length(actx->pinfo, tree, tvb, offset+1, &len, NULL);
254
255         if(len == 0) {
256                 /* its an empty set - i.e anonymous  (assuming version is DEFAULTed) */
257                 proto_tree_add_text(tree, tvb, offset, -1,"Anonymous");
258
259                 if(check_col(actx->pinfo->cinfo, COL_INFO))
260                         col_append_str(actx->pinfo->cinfo, COL_INFO, " anonymous");
261
262         }
263         /* do the default thing */
264
265         %(DEFAULT_BODY)s        
266
267 #.FN_BODY       SimpleCredentials
268
269         %(DEFAULT_BODY)s
270
271         if(check_col(actx->pinfo->cinfo, COL_INFO))     
272                 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", x509if_get_last_dn());
273
274
275         
276         
277 #.FN_BODY PagedResultsRequest/queryReference  VAL_PTR=&out_tvb 
278         tvbuff_t *out_tvb;
279         int     i;
280         int     len;
281
282         %(DEFAULT_BODY)s
283
284         if(out_tvb) {
285                 len = tvb_length(out_tvb);
286                 /* now see if we can add a string representation */
287                 for(i=0; i<len; i++)
288                         if(!g_ascii_isprint(tvb_get_guint8(out_tvb, i)))
289                                 break;
290         
291                 if(i == len) {
292                         if(actx->created_item) {
293
294                                 proto_item_append_text(actx->created_item," (");
295                                 for(i=0; i<len; i++)
296                                         proto_item_append_text(actx->created_item,"%%c",tvb_get_guint8(out_tvb,i));
297                                 proto_item_append_text(actx->created_item,")");
298                         }
299                 }
300         }
301         
302 #.FN_PARS SecurityProblem
303         VAL_PTR = &problem
304
305 #.FN_BODY SecurityProblem
306   guint32 problem;
307
308   %(DEFAULT_BODY)s
309
310   if (check_col(actx->pinfo->cinfo, COL_INFO)) {
311         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_SecurityProblem_vals, "SecurityProblem(%%d)"));
312   }
313
314 #.FN_PARS ServiceProblem
315         VAL_PTR = &problem
316
317 #.FN_BODY ServiceProblem
318   guint32 problem;
319
320   %(DEFAULT_BODY)s
321
322   if (check_col(actx->pinfo->cinfo, COL_INFO)) {
323         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_ServiceProblem_vals, "ServiceProblem(%%d)"));
324   }
325
326 #.FN_PARS UpdateProblem
327         VAL_PTR = &problem
328
329 #.FN_BODY UpdateProblem
330   guint32 problem;
331
332   %(DEFAULT_BODY)s
333
334   if (check_col(actx->pinfo->cinfo, COL_INFO)) {
335         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_UpdateProblem_vals, "UpdateProblem(%%d)"));
336   }
337
338 #.FN_PARS LimitProblem
339         VAL_PTR = &problem
340
341 #.FN_BODY LimitProblem
342   guint32 problem;
343
344   %(DEFAULT_BODY)s
345
346   if (check_col(actx->pinfo->cinfo, COL_INFO)) {
347         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_LimitProblem_vals, "LimitProblem(%%d)"));
348   }
349
350 #.END
351
352
353 #.FN_BODY SearchArgumentData/subset  VAL_PTR=&subset
354   guint32 subset;
355
356   %(DEFAULT_BODY)s
357
358   if (check_col(actx->pinfo->cinfo, COL_INFO)) {
359         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(subset, dap_T_subset_vals, "Subset(%%d)"));
360   }
361
362
363 #.FN_BODY Name
364         const char *dn;
365
366         %(DEFAULT_BODY)s
367
368         if(check_col(actx->pinfo->cinfo, COL_INFO)) {
369                 dn = x509if_get_last_dn();
370                 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", (dn && *dn) ? dn : "(root)");
371         }
372