Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / epan / dissectors / asn1 / z3950 / z3950.cnf
blob6cc56ae4794b0d20105bb8434641f11ec8cf33b2
1 # z3950.cnf
2 # Conformation file for the NISO Z39.50 Information Retrieval protocol
3 # Copyright 2018 Craig Jackson <cejackson51@gmail.com>
5 # $Id$
7 #.MODULE_IMPORT
9 #.EXPORTS
11 #.PDU
12 #Z39-50-APDU-1995
14 #.NO_EMIT
16 #.TYPE_RENAME
18 #.FIELD_RENAME
19 AttributeList/_untag/_item attributeList_item
20 OtherInformation/_untag/_item otherInformation_item
21 RPNStructure/rpnRpnOp/op operatorRpnOp
22 RPNStructure/op operandRpnOp
23 SearchResponse/resultSetStatus search_resultSetStatus
24 SortResponse/resultSetStatus sort_resultSetStatus
25 AttributeElement/attributeValue/numeric attributeValue_numeric
26 AttributeElement/attributeValue/complex attributeValue_complex
27 AttributeElement/attributeValue/complex/list attributeValue_complex_list
28 AttributeElement/attributeType attributeElement_attributeType
29 ListStatuses/_item/id listStatuses_id
30 CompSpec/generic compSpec_generic
31 SortElement/generic sortElement_generic
32 ScanResponse/entries scanResponse_entries
33 ListEntries/entries listEntries_entries
34 Specification/elementSpec specification_elementSpec
35 SortKey/elementSpec sortKey_elementSpec
36 SortKey/sortAttributes/list sortAttributes_list
37 SortKey/sortAttributes/id sortAttributes_id
38 PresentRequest/recordComposition/complex recordComposition_complex
39 DiagFormat/recordSyntax diagFormat_recordSyntax
40 DiagFormat/sort/dbSpecific diagFormat_sort_dbSpecific
41 DiagFormat/sort/tooMany diagFormat_sort_tooMany
42 DiagnosticFormat/_item/diagnostic diagnosticFormat_item_diagnostic
43 DiagFormat/proximity diagFormat_proximity
44 DiagFormat/proximity/exclusion diagFormat_proximity_exclusion
45 DiagFormat/proximity/ordered diagFormat_proximity_ordered
46 DiagFormat/proximity/unit diagFormat_proximity_unit
47 DiagFormat/accessCtrl/oid diagFormat_accessCtrl_oid
48 DiagFormat/accessCtrl/simple diagFormat_accessCtrl_simple
49 DiagFormat/term diagFormat_term
50 SortKeyDetails/caseSensitivity sortKeyDetails_caseSensitivity
51 SortKeyDetails/sortType/structured sortKeyDetails_sortType_structured
52 SortKeyDetails/sortType/numeric sortKeyDetails_sortType_numeric
53 PrivateCapabilities/operators privateCapabilities_operators
54 PromptId/enummeratedPrompt/type promptId_enummeratedPrompt_type
55 ExtendedServicesInfo/waitAction extendedServicesInfo_waitAction
56 NetworkAddress/other networkAddress_other
57 NetworkAddress/other/address networkAddress_other_address
58 NetworkAddress/other/type networkAddress_other_type
59 AttributeDescription/attributeValue attributeDescription_attributeValue
60 AttributeTypeDetails/attributeValues attributeTypeDetails_attributeValues
61 AttributeTypeDetails/attributeValues/_item attributeTypeDetails_attributeValues_item
62 AttributeOccurrence/attributeValues attributeOccurrence_attributeValues
63 AttributeValue/value attributeValue_value
64 DRNType/userId dRNType_userId
65 DES-RN-Object/challenge dES_RN_Object_challenge
66 DES-RN-Object/response rES_RN_Object_response
67 VariantSetInfo/variants variantSetInfo_variants
68 Variant/triples/_item/value variant_triples_item_value
69 Variant/triples/_item/value/unit variant_triples_item_value_unit
70 UnitType/units unitType_units
71 UnitInfo/units unitInfo_units
72 ValueDescription/unit valueDescription_unit
73 ProximitySupport/unitsSupported/_item/private/unit proximitySupport_unitsSupported_item_private_unit
74 ProximitySupport/unitsSupported/_item/private proximitySupport_unitsSupported_item_private
75 ProximitySupport/unitsSupported/_item/known proximitySupport_unitsSupported_item_known
76 Usage/type usage_type
77 FormatSpec/type formatSpec_type
78 ExtendedServicesInfo/type extendedServicesInfo_type
79 QueryExpression/term queryExpression_term
80 QueryTypeDetails/rpn queryTypeDetails_rpn
81 QueryTypeDetails/private queryTypeDetails_private
82 BriefBib/title briefBib_title
83 Charge/text charge_text
84 OCLC-UserInformation/text oCLC-UserInformation_text
85 CircRecord/restrictions circRecord_restrictions
86 ResourceControlRequest/responseRequired resourceControlRequest_responseRequired
87 KRBObject/challenge kRBObject_challenge
88 KRBObject/response kRBObject_response
89 CompSpec/recordSyntax compSpec_recordSyntax
90 DatabaseInfo/name databaseInfo_name
91 DatabaseInfo/nicknames databaseInfo_nicknames
92 DatabaseInfo/nicknames/_item databaseInfo_nicknames_item
93 NamePlusRecord/name namePlusRecord_name
94 BriefBib/format briefBib_format
95 TagSetInfo/elements tagSetInfo_elements
96 ElementSetDetails/elementSetName elementSetDetails_elementSetName
97 PrivateCapabilities/description privateCapabilities_description
98 TaskPackage/description taskPackage_description
99 ElementData/diagnostic elementData_diagnostic
100 Challenge/_item/diagnostic challenge_item_diagnostic
101 Challenge/_item/dataType challenge_item_dataType
102 Challenge/_item/promptInfo/character challenge_item_promptInfo_character
103 ElementInfo/dataType elementInfo_dataType
104 TaggedElement/content taggedElement_content
105 CategoryInfo/category categoryInfo_category
106 TermListDetails/attributes termListDetails_attributes
107 AttributeSetInfo/attributes attributeSetInfo_attributes
108 ExtendedServicesRequest/description extendedServicesRequest_description 
110 #.END
112 #.REGISTER
113 Explain-Record  B "1.2.840.10003.5.100" "Explain-record"
114 SutrsRecord     B "1.2.840.10003.5.101" "Sutrs-record"
115 OPACRecord      B "1.2.840.10003.5.102" "OPAC-record"
116 BriefBib        B "1.2.840.10003.5.103" "Summary-record"
117 GenericRecord   B "1.2.840.10003.5.105" "GRS-1-record"
118 TaskPackage     B "1.2.840.10003.5.106" "ESTaskPackage"
119 DiagnosticFormat  B "1.2.840.10003.4.2" "diag-1"
120 PromptObject    B "1.2.840.10003.8.1" "Prompt-1"
121 DES-RN-Object   B "1.2.840.10003.8.2" "DES-1"
122 KRBObject       B "1.2.840.10003.8.3" "KRB-1"
123 SearchInfoReport B "1.2.840.10003.10.1" "SearchResult-1"
124 OCLC-UserInformation B "1.2.840.10003.10.1000.17.1" "OCLC-UserInfo-1"
126 #.FN_HDR PDU
127   int choice;
128 #.FN_PARS PDU VAL_PTR=&choice
129 #.FN_FTR PDU
130   if (choice >= 0) {
131     packet_info *pinfo = actx->pinfo;
132     int32_t tag = PDU_choice[choice].tag;
134     col_set_str(pinfo->cinfo, COL_INFO,
135       val_to_str_const(tag, z3950_PDU_vals, "Unknown Z39.50 PDU"));
136   }
138 #.FN_BODY Query/type-0
139 /*XXX Not implemented yet */
141 #.FN_BODY ReferenceId
142   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
143               hf_index, BER_CLASS_CON, 2, true,
144               dissect_z3950_printable_OCTET_STRING);
146 #.FN_BODY Term/general
147   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
148               hf_index, BER_CLASS_CON, 2, true,
149               dissect_z3950_printable_OCTET_STRING);
151 #.FN_HDR AttributeSetId
152   tvbuff_t *oid_tvb=NULL;
154 #.FN_PARS AttributeSetId VAL_PTR=&oid_tvb
155 #.FN_FTR AttributeSetId
156   if (oid_tvb) {
157     packet_info *pinfo = actx->pinfo;
158     unsigned len = tvb_reported_length_remaining(oid_tvb, 0);
159     char *oid_str = oid_encoded2string(pinfo->pool,
160                                         tvb_get_ptr(oid_tvb, 0, len), len);
161     int attribute_set_idx = Z3950_ATSET_UNKNOWN;
162     z3950_atinfo_t *atinfo_data;
164     if (g_strcmp0(oid_str, Z3950_ATSET_BIB1_OID) == 0) {
165       attribute_set_idx = Z3950_ATSET_BIB1;
166     }
167     if ((atinfo_data = (z3950_atinfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_ATINFO_KEY)) == NULL) {
169       atinfo_data = wmem_new0(pinfo->pool, z3950_atinfo_t);
170       atinfo_data->atsetidx = attribute_set_idx;
171       p_add_proto_data(pinfo->pool, pinfo,
172                        proto_z3950, Z3950_ATINFO_KEY, atinfo_data);
173     }
174     else {
175       atinfo_data->atsetidx = attribute_set_idx;
176     }
177   }
179 #.FN_HDR AttributeElement/attributeType
180   int att_type=0;
181   packet_info *pinfo = actx->pinfo;
182   z3950_atinfo_t *atinfo_data;
183 #.FN_PARS AttributeElement/attributeType VAL_PTR=&att_type
184 #.FN_FTR AttributeElement/attributeType
185   atinfo_data = (z3950_atinfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_ATINFO_KEY);
186   if (atinfo_data && atinfo_data->atsetidx == Z3950_ATSET_BIB1) {
187     proto_item_append_text(actx->created_item, " (%s)",
188       val_to_str(att_type, z3950_bib1_att_types, "Unknown bib-1 attributeType %d"));
189     atinfo_data->attype = att_type;
190   }
191 #.FN_HDR AttributeElement/attributeValue/numeric
192   int att_value=0;
193   packet_info *pinfo = actx->pinfo;
194   z3950_atinfo_t *atinfo_data;
195   const value_string *att_value_string = NULL;
196 #.FN_PARS AttributeElement/attributeValue/numeric VAL_PTR=&att_value
197 #.FN_FTR AttributeElement/attributeValue/numeric
198   atinfo_data = (z3950_atinfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_ATINFO_KEY);
199   if (atinfo_data && atinfo_data->atsetidx == Z3950_ATSET_BIB1) {
200     switch (atinfo_data->attype) {
201     case Z3950_BIB1_AT_USE:
202       att_value_string = z3950_bib1_at_use;
203       break;
204     case Z3950_BIB1_AT_RELATION:
205       att_value_string = z3950_bib1_at_relation;
206       break;
207     case Z3950_BIB1_AT_POSITION:
208       att_value_string = z3950_bib1_at_position;
209       break;
210     case Z3950_BIB1_AT_STRUCTURE:
211       att_value_string = z3950_bib1_at_structure;
212       break;
213     case Z3950_BIB1_AT_TRUNCATION:
214       att_value_string = z3950_bib1_at_truncation;
215       break;
216     case Z3950_BIB1_AT_COMPLETENESS:
217       att_value_string = z3950_bib1_at_completeness;
218       break;
219     default:
220       att_value_string = NULL;
221     }
222     if (att_value_string) {
223       proto_item_append_text(actx->created_item, " (%s)",
224         val_to_str(att_value, att_value_string, "Unknown bib-1 attributeValue %d"));
225     }
226   }
227 #.FN_HDR DefaultDiagFormat/diagnosticSetId
228   tvbuff_t *oid_tvb=NULL;
230 #.FN_PARS DefaultDiagFormat/diagnosticSetId VAL_PTR=&oid_tvb
231 #.FN_FTR DefaultDiagFormat/diagnosticSetId
232   if (oid_tvb) {
233     packet_info *pinfo = actx->pinfo;
234     unsigned len = tvb_reported_length_remaining(oid_tvb, 0);
235     char *oid_str = oid_encoded2string(pinfo->pool,
236                                         tvb_get_ptr(oid_tvb, 0, len), len);
237     int diagset_idx = Z3950_DIAGSET_UNKNOWN;
238     z3950_diaginfo_t *diaginfo_data;
240     if (g_strcmp0(oid_str, Z3950_DIAGSET_BIB1_OID) == 0) {
241       diagset_idx = Z3950_DIAGSET_BIB1;
242     }
243     if ((diaginfo_data = (z3950_diaginfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_DIAGSET_KEY)) == NULL) {
245       diaginfo_data = wmem_new0(pinfo->pool, z3950_diaginfo_t);
246       diaginfo_data->diagsetidx = diagset_idx;
247       p_add_proto_data(pinfo->pool, pinfo,
248                        proto_z3950, Z3950_DIAGSET_KEY, diaginfo_data);
249     }
250     else {
251       diaginfo_data->diagsetidx = diagset_idx;
252     }
253   }
255 #.FN_HDR DefaultDiagFormat/condition
256   int diag_condition=0;
257   packet_info *pinfo = actx->pinfo;
258   z3950_diaginfo_t *diaginfo_data;
259 #.FN_PARS DefaultDiagFormat/condition VAL_PTR=&diag_condition
260 #.FN_FTR DefaultDiagFormat/condition
261   diaginfo_data = (z3950_diaginfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_DIAGSET_KEY);
262   if (diaginfo_data && diaginfo_data->diagsetidx == Z3950_DIAGSET_BIB1) {
263     proto_item_append_text(actx->created_item, " (%s)",
264       val_to_str(diag_condition, z3950_bib1_diagconditions, "Unknown bib-1 diagnostic %d"));
265     diaginfo_data->diagcondition = diag_condition;
266   }
268 # Editor modelines  -  https://www.wireshark.org/tools/modelines.html
270 # Local variables:
271 # c-basic-offset: 2
272 # tab-width: 8
273 # indent-tabs-mode: nil
274 # End:
276 # vi: set shiftwidth=2 tabstop=8 expandtab autoindent:
277 # :indentSize=2:tabSize=8:noTabs=true: