aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1')
-rw-r--r--epan/dissectors/asn1/CMakeLists.txt1
-rw-r--r--epan/dissectors/asn1/z3950/CMakeLists.txt40
-rw-r--r--epan/dissectors/asn1/z3950/packet-z3950-template.c1639
-rw-r--r--epan/dissectors/asn1/z3950/z3950-externals.asn1679
-rw-r--r--epan/dissectors/asn1/z3950/z3950-oclc.asn14
-rw-r--r--epan/dissectors/asn1/z3950/z3950.asn807
-rw-r--r--epan/dissectors/asn1/z3950/z3950.cnf278
7 files changed, 4458 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/CMakeLists.txt b/epan/dissectors/asn1/CMakeLists.txt
index 05f6a362b0..5874ddfdcc 100644
--- a/epan/dissectors/asn1/CMakeLists.txt
+++ b/epan/dissectors/asn1/CMakeLists.txt
@@ -128,6 +128,7 @@ set(ASN1_SRC_DIRS
x509if
x509sat
xnap
+ z3950
${CUSTOM_ASN1_SRC_DIR}
)
diff --git a/epan/dissectors/asn1/z3950/CMakeLists.txt b/epan/dissectors/asn1/z3950/CMakeLists.txt
new file mode 100644
index 0000000000..d2d5af9cbf
--- /dev/null
+++ b/epan/dissectors/asn1/z3950/CMakeLists.txt
@@ -0,0 +1,40 @@
+# CMakeLists.txt
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+
+set( PROTOCOL_NAME z3950 )
+
+set( PROTO_OPT )
+
+set( EXPORT_FILES
+ ${PROTOCOL_NAME}-exp.cnf
+)
+
+set( EXT_ASN_FILE_LIST
+)
+
+set( ASN_FILE_LIST
+ z3950.asn
+ z3950-oclc.asn
+ z3950-externals.asn
+)
+
+set( EXTRA_DIST
+ ${ASN_FILE_LIST}
+ packet-${PROTOCOL_NAME}-template.c
+ ${PROTOCOL_NAME}.cnf
+)
+
+set( SRC_FILES
+ ${EXTRA_DIST}
+ ${EXT_ASN_FILE_LIST}
+)
+
+set( A2W_FLAGS -b )
+
+ASN2WRS()
diff --git a/epan/dissectors/asn1/z3950/packet-z3950-template.c b/epan/dissectors/asn1/z3950/packet-z3950-template.c
new file mode 100644
index 0000000000..73ff59161d
--- /dev/null
+++ b/epan/dissectors/asn1/z3950/packet-z3950-template.c
@@ -0,0 +1,1639 @@
+/* packet-z3950.c
+ * Routines for dissection of the NISO Z39.50 Information Retrieval protocol
+ * Also contains a dissector for the MARC Machine Readable Cataloging file
+ * format. The general format is specified by ISO 2709 and the specific
+ * instance is MARC21.
+ *
+ * Copyright 2018, Craig Jackson <cejackson51@gmail.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * References:
+ * ISO 2709: https://www.iso.org/standard/41319.html
+ * MARC21: http://www.loc.gov/marc/bibliographic/
+ * Z39.50 Maintenance Agency: http://www.loc.gov/z3950/agency/
+ * Z39.50 2003 standard: http://www.loc.gov/z3950/agency/Z39-50-2003.pdf
+ * Z39.50 1995 ASN.1: https://www.loc.gov/z3950/agency/asn1.html
+ * Registered Z39.50 Object Identifiers:
+ * http://www.loc.gov/z3950/agency/defns/oids.html
+ * Bib-1 Attribute Set: https://www.loc.gov/z3950/agency/defns/bib1.html
+ * Bib-1 Diagnostics: https://www.loc.gov/z3950/agency/defns/bib1diag.html
+ * RFC for Z39.50 over TCP/IP: https://tools.ietf.org/html/rfc1729
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+#include <epan/exceptions.h>
+#include <epan/expert.h>
+#include <epan/oids.h>
+#include <epan/proto_data.h>
+#include <wsutil/str_util.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+#include "packet-tcp.h"
+
+typedef struct z3950_atinfo_t {
+ gint atsetidx;
+ gint attype;
+} z3950_atinfo_t;
+
+typedef struct z3950_diaginfo_t {
+ gint diagsetidx;
+ gint diagcondition;
+} z3950_diaginfo_t;
+
+#define PNAME "Z39.50 Protocol"
+#define PSNAME "Z39.50"
+#define PFNAME "z3950"
+#define Z3950_PORT 210 /* UDP port */
+
+/* Known attribute set ids */
+#define Z3950_ATSET_BIB1_OID "1.2.840.10003.3.1"
+
+/* Known diagnostic set ids */
+#define Z3950_DIAGSET_BIB1_OID "1.2.840.10003.4.1"
+
+/* Known record syntax ids */
+#define Z3950_RECORDSYNTAX_MARC21_OID "1.2.840.10003.5.10"
+
+/* Indexes of known attribute set ids */
+#define Z3950_ATSET_UNKNOWN 0
+#define Z3950_ATSET_BIB1 1
+
+/* bib-1 Attribute Types */
+#define Z3950_BIB1_AT_USE 1
+#define Z3950_BIB1_AT_RELATION 2
+#define Z3950_BIB1_AT_POSITION 3
+#define Z3950_BIB1_AT_STRUCTURE 4
+#define Z3950_BIB1_AT_TRUNCATION 5
+#define Z3950_BIB1_AT_COMPLETENESS 6
+
+/* Indexes of known diagnostic set ids */
+#define Z3950_DIAGSET_UNKNOWN 0
+#define Z3950_DIAGSET_BIB1 1
+
+/* Per-packet data keys */
+#define Z3950_ATINFO_KEY 1
+#define Z3950_DIAGSET_KEY 2
+
+/* MARC defines */
+#define MARC_SUBFIELD_INDICATOR '\x1f'
+#define MARC_LEADER_LENGTH 24
+#define MARC_CHAR_UNINITIALIZED 256
+
+#define marc_isdigit(x) (((x) >='0') && ((x) <= '9'))
+#define marc_char_to_int(x) ((x) - '0')
+
+typedef struct marc_directory_entry {
+ guint32 tag;
+ guint32 length;
+ guint32 starting_character;
+} marc_directory_entry;
+
+static dissector_handle_t z3950_handle=NULL;
+
+void proto_reg_handoff_z3950(void);
+void proto_register_z3950(void);
+
+/* Initialize the protocol and registered fields */
+static int proto_z3950 = -1;
+static int global_z3950_port = Z3950_PORT;
+static gboolean z3950_desegment = TRUE;
+
+static const value_string z3950_bib1_att_types[] = {
+ { Z3950_BIB1_AT_USE, "Use" },
+ { Z3950_BIB1_AT_RELATION, "Relation" },
+ { Z3950_BIB1_AT_POSITION, "Position" },
+ { Z3950_BIB1_AT_STRUCTURE, "Structure" },
+ { Z3950_BIB1_AT_TRUNCATION, "Truncation" },
+ { Z3950_BIB1_AT_COMPLETENESS, "Completeness"},
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_at_use[] = {
+ { 1, "Personal name" },
+ { 2, "Corporate name" },
+ { 3, "Conference name" },
+ { 4, "Title" },
+ { 5, "Title series" },
+ { 6, "Title uniform" },
+ { 7, "ISBN" },
+ { 8, "ISSN" },
+ { 9, "LC card number" },
+ { 10, "BNB card number" },
+ { 11, "BGF card number" },
+ { 12, "Local number" },
+ { 13, "Dewey classification" },
+ { 14, "UDC classification" },
+ { 15, "Bliss classification" },
+ { 16, "LC call number" },
+ { 17, "NLM call number" },
+ { 18, "NAL call number" },
+ { 19, "MOS call number" },
+ { 20, "Local classification" },
+ { 21, "Subject heading" },
+ { 22, "Subject Rameau" },
+ { 23, "BDI index subject" },
+ { 24, "INSPEC subject" },
+ { 25, "MESH subject" },
+ { 26, "PA subject" },
+ { 27, "LC subject heading" },
+ { 28, "RVM subject heading" },
+ { 29, "Local subject index" },
+ { 30, "Date" },
+ { 31, "Date of publication" },
+ { 32, "Date of acquisition" },
+ { 33, "Title key" },
+ { 34, "Title collective" },
+ { 35, "Title parallel" },
+ { 36, "Title cover" },
+ { 37, "Title added title pagw" },
+ { 38, "Title caption" },
+ { 39, "Title running" },
+ { 40, "Title spine" },
+ { 41, "Title other variant" },
+ { 42, "Title former" },
+ { 43, "Title abbreviated" },
+ { 44, "Title expanded" },
+ { 45, "Subject precis" },
+ { 46, "Subject rswk" },
+ { 47, "Subject subdivision" },
+ { 48, "No. nat'l biblio." },
+ { 49, "No. legal deposit" },
+ { 50, "No. govt pub." },
+ { 51, "No. music publisher" },
+ { 52, "Number db" },
+ { 53, "Number local call" },
+ { 54, "Code-language" },
+ { 55, "Code-geographic area" },
+ { 56, "Code-institution" },
+ { 57, "Name and title *" },
+ { 58, "Name geographic" },
+ { 59, "Place publication" },
+ { 60, "CODEN" },
+ { 61, "Microform generation" },
+ { 62, "Abstract" },
+ { 63, "Note" },
+ { 1000, "Author-title" },
+ { 1001, "Record type" },
+ { 1002, "Name" },
+ { 1003, "Author" },
+ { 1004, "Author-name personal" },
+ { 1005, "Author-name corporate" },
+ { 1006, "Author-name conference" },
+ { 1007, "Identifier-standard" },
+ { 1008, "Subject-LC children's" },
+ { 1009, "Subject name-personal" },
+ { 1010, "Body of text" },
+ { 1011, "Date/time added to db" },
+ { 1012, "Date/time last modified" },
+ { 1013, "Authority/format id" },
+ { 1014, "Concept-text" },
+ { 1015, "Concept-reference" },
+ { 1016, "Any" },
+ { 1017, "Server-choice" },
+ { 1018, "Publisher" },
+ { 1019, "Record-source" },
+ { 1020, "Editor" },
+ { 1021, "Bib-level" },
+ { 1022, "Geographic class" },
+ { 1023, "Indexed-by" },
+ { 1024, "Map-scale" },
+ { 1025, "Music-key" },
+ { 1026, "Related-periodical" },
+ { 1027, "Report-number" },
+ { 1028, "Stock-number" },
+ { 1030, "Thematic-number" },
+ { 1031, "Material-type" },
+ { 1032, "Doc-id" },
+ { 1033, "Host-item" },
+ { 1034, "Content-type" },
+ { 1035, "Anywhere" },
+ { 1036, "Author-Title-Subject" },
+ { 1037, "Serial Item and Contribution Identifer (SICI)" },
+ { 1038, "Abstract-language" },
+ { 1039, "Application-kind" },
+ { 1040, "Classification" },
+ { 1041, "Classification-basic" },
+ { 1042, "Classification-local-record" },
+ { 1043, "Enzyme" },
+ { 1044, "Possessing-institution" },
+ { 1045, "Record-linking" },
+ { 1046, "Record-status" },
+ { 1047, "Treatment" },
+ { 1048, "Control-number-GKD" },
+ { 1049, "Control-number-linking" },
+ { 1050, "Control-number-PND" },
+ { 1051, "Control-number-SWD" },
+ { 1052, "Control-number-ZDB" },
+ { 1053, "Country-publication" },
+ { 1054, "Date-conference" },
+ { 1055, "Date-record-status" },
+ { 1056, "Dissertation-information" },
+ { 1057, "Meeting-organizer" },
+ { 1058, "Note-availability" },
+ { 1059, "Number-CAS-registry" },
+ { 1060, "Number-document" },
+ { 1061, "Number-local-accounting" },
+ { 1062, "Number-local-acquisition" },
+ { 1063, "Number-local-call-copy-specific" },
+ { 1064, "Number-of-reference" },
+ { 1065, "Number-norm" },
+ { 1066, "Number-volume" },
+ { 1067, "Place-conference (meeting location)" },
+ { 1068, "Reference (references and footnotes)" },
+ { 1069, "Referenced-journal" },
+ { 1070, "Section-code" },
+ { 1071, "Section-heading" },
+ { 1072, "Subject-GOO" },
+ { 1073, "Subject-name-conference" },
+ { 1074, "Subject-name-corporate" },
+ { 1075, "Subject-genre/form" },
+ { 1076, "Subject-name-geographical" },
+ { 1077, "Subject-chronological" },
+ { 1078, "Subject-title" },
+ { 1079, "Subject-topical" },
+ { 1080, "Subject-uncontrolled" },
+ { 1081, "Terminology-chemical" },
+ { 1082, "Title-translated" },
+ { 1083, "Year-of-beginning" },
+ { 1084, "Year-of-ending" },
+ { 1085, "Subject-AGROVOC" },
+ { 1086, "Subject-COMPASS" },
+ { 1087, "Subject-EPT" },
+ { 1088, "Subject-NAL" },
+ { 1089, "Classification-BCM" },
+ { 1090, "Classification-DB" },
+ { 1091, "Identifier-ISRC" },
+ { 1092, "Identifier-ISMN" },
+ { 1093, "Identifier-ISRN" },
+ { 1094, "Identifier-DOI" },
+ { 1095, "Code-language-original" },
+ { 1096, "Title-later" },
+ { 1097, "DC-Title" },
+ { 1098, "DC-Creator" },
+ { 1099, "DC-Subject" },
+ { 1100, "DC-Description" },
+ { 1101, "DC-Publisher" },
+ { 1102, "DC-Date" },
+ { 1103, "DC-ResourceType" },
+ { 1104, "DC-ResourceIdentifier" },
+ { 1105, "DC-Language" },
+ { 1106, "DC-OtherContributor" },
+ { 1107, "DC-Format" },
+ { 1108, "DC-Source" },
+ { 1109, "DC-Relation" },
+ { 1110, "DC-Coverage" },
+ { 1111, "DC-RightsManagment" },
+ { 1112, "GILS Controlled Subject Index" },
+ { 1113, "GILS Subject Thesaurus" },
+ { 1114, "GILS Index Terms -- Controlled" },
+ { 1115, "GILS Controlled Term" },
+ { 1116, "GILS Spacial Domain" },
+ { 1117, "GILS Bounding Coordinates" },
+ { 1118, "GILS West Bounding Coordinate" },
+ { 1119, "GILS East Bounding Coordinate" },
+ { 1120, "GILS North Bounding Coordinate" },
+ { 1121, "GILS South Bounding Coordinate" },
+ { 1122, "GILS Place" },
+ { 1123, "GILS Place Keyword Thesaurus" },
+ { 1124, "GILS Place Keyword" },
+ { 1125, "GILS Time Period" },
+ { 1126, "GILS Time Period Textual" },
+ { 1127, "GILS Time Period Structured" },
+ { 1128, "GILS Beginning Date" },
+ { 1129, "GILS Ending Date" },
+ { 1130, "GILS Availability" },
+ { 1131, "GILS Distributor" },
+ { 1132, "GILS Distributor Name" },
+ { 1133, "GILS Distributor Organization" },
+ { 1134, "GILS Distributor Street Address" },
+ { 1135, "GILS Distributor City" },
+ { 1136, "GILS Distributor State or Province" },
+ { 1137, "GILS Distributor Zip or Postal Code" },
+ { 1138, "GILS Distributor Country" },
+ { 1139, "GILS Distributor Network Address" },
+ { 1140, "GILS Distributor Hours of Service" },
+ { 1141, "GILS Distributor Telephone" },
+ { 1142, "GILS Distributor Fax" },
+ { 1143, "GILS Resource Description" },
+ { 1144, "GILS Order Process" },
+ { 1145, "GILS Order Information" },
+ { 1146, "GILS Cost" },
+ { 1147, "GILS Cost Information" },
+ { 1148, "GILS Technical Prerequisites" },
+ { 1149, "GILS Available Time Period" },
+ { 1150, "GILS Available Time Textual" },
+ { 1151, "GILS Available Time Structured" },
+ { 1152, "GILS Available Linkage" },
+ { 1153, "GILS Linkage Type" },
+ { 1154, "GILS Linkage" },
+ { 1155, "GILS Sources of Data" },
+ { 1156, "GILS Methodology" },
+ { 1157, "GILS Access Constraints" },
+ { 1158, "GILS General Access Constraints" },
+ { 1159, "GILS Originator Dissemination Control" },
+ { 1160, "GILS Security Classification Control" },
+ { 1161, "GILS Use Constraints" },
+ { 1162, "GILS Point of Contact" },
+ { 1163, "GILS Contact Name" },
+ { 1164, "GILS Contact Organization" },
+ { 1165, "GILS Contact Street Address" },
+ { 1166, "GILS Contact City" },
+ { 1167, "GILS Contact State or Province" },
+ { 1168, "GILS Contact Zip or Postal Code" },
+ { 1169, "GILS Contact Country" },
+ { 1170, "GILS Contact Network Address" },
+ { 1171, "GILS Contact Hours of Service" },
+ { 1172, "GILS Contact Telephone" },
+ { 1173, "GILS Contact Fax" },
+ { 1174, "GILS Supplemental Information" },
+ { 1175, "GILS Purpose" },
+ { 1176, "GILS Agency Program" },
+ { 1177, "GILS Cross Reference" },
+ { 1178, "GILS Cross Reference Title" },
+ { 1179, "GILS Cross Reference Relationship" },
+ { 1180, "GILS Cross Reference Linkage" },
+ { 1181, "GILS Schedule Number" },
+ { 1182, "GILS Original Control Identifier" },
+ { 1183, "GILS Language of Record" },
+ { 1184, "GILS Record Review Date" },
+ { 1185, "Performer" },
+ { 1186, "Performer-Individual" },
+ { 1187, "Performer-Group" },
+ { 1188, "Instrumentation" },
+ { 1189, "Instrumentation-Original" },
+ { 1190, "Instrumentation-Current" },
+ { 1191, "Arrangement" },
+ { 1192, "Arrangement-Original" },
+ { 1193, "Arrangement-Current" },
+ { 1194, "Musical Key-Original" },
+ { 1195, "Musical Key-Current" },
+ { 1196, "Date-Composition" },
+ { 1197, "Date-Recording" },
+ { 1198, "Place-Recording" },
+ { 1199, "Country-Recording" },
+ { 1200, "Number-ISWC" },
+ { 1201, "Number-Matrix" },
+ { 1202, "Number-Plate" },
+ { 1203, "Classification-McColvin" },
+ { 1204, "Duration" },
+ { 1205, "Number-Copies" },
+ { 1206, "Musical Theme" },
+ { 1207, "Instruments - total number" },
+ { 1208, "Instruments - distinct number" },
+ { 1209, "Identifier - URN" },
+ { 1210, "Sears Subject Heading" },
+ { 1211, "OCLC Number" },
+ { 1212, "NORZIG Composition" },
+ { 1213, "NORZIG Intellectual level" },
+ { 1214, "NORZIG EAN" },
+ { 1215, "NORZIG NLC" },
+ { 1216, "NORZIG CRCS" },
+ { 1217, "NORZIG Nationality" },
+ { 1218, "NORZIG Equinox" },
+ { 1219, "NORZIG Compression" },
+ { 1220, "NORZIG Format" },
+ { 1221, "NORZIG Subject - occupation" },
+ { 1222, "NORZIG Subject - function" },
+ { 1223, "NORZIG Edition" },
+ { 1224, "GPO Item Number" },
+ { 1225, "Provider" },
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_at_relation[] = {
+ { 1, "Less than" },
+ { 2, "Less than or equal" },
+ { 3, "Equal" },
+ { 4, "Greater than or equal" },
+ { 5, "Greater than" },
+ { 6, "Not equal" },
+ { 100, "Phonetic" },
+ { 101, "Stem" },
+ { 102, "Relevance" },
+ { 103, "Always Matches" },
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_at_position[] = {
+ { 1, "First in field" },
+ { 2, "First in subfield" },
+ { 3, "Any position in field" },
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_at_structure[] = {
+ { 1, "Phrase" },
+ { 2, "Word" },
+ { 3, "Key" },
+ { 4, "Year" },
+ { 5, "Date (normalized)" },
+ { 6, "Word list" },
+ { 100, "Date (un-normalized)" },
+ { 101, "Name (normalized)" },
+ { 102, "Name (un-normalized)" },
+ { 103, "Structure" },
+ { 104, "Urx" },
+ { 105, "Free-form-text" },
+ { 106, "Document-text" },
+ { 107, "Local" },
+ { 108, "String" },
+ { 109, "Numeric" },
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_at_truncation[] = {
+ { 1, "Right truncation" },
+ { 2, "Left truncation" },
+ { 3, "Left and right truncation" },
+ { 100, "Do not truncate" },
+ { 101, "Process # in search term" },
+ { 102, "regExpr-1" },
+ { 103, "regExpr-2" },
+ { 104, "Z39.58-1992 Character masking" },
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_at_completeness[] = {
+ { 1, "Incomplete subfield" },
+ { 2, "Complete subfield" },
+ { 3, "Complete field" },
+ { 0, NULL}
+};
+
+static const value_string z3950_bib1_diagconditions[] = {
+ { 1, "Permanent system error" },
+ { 2, "Temporary system error" },
+ { 3, "Unsupported search" },
+ { 4, "Terms only exclusion (stop) words" },
+ { 5, "Too many argument words" },
+ { 6, "Too many boolean operators" },
+ { 7, "Too many truncated words" },
+ { 8, "Too many incomplete subfields" },
+ { 9, "Truncated words too short" },
+ { 10, "Invalid format for record number (search term)" },
+ { 11, "Too many characters in search statement" },
+ { 12, "Too many records retrieved" },
+ { 13, "Present request out of range" },
+ { 14, "System error in presenting records" },
+ { 15, "Record no authorized to be sent intersystem" },
+ { 16, "Record exceeds Preferred-message-size" },
+ { 17, "Record exceeds Maximum-record-size" },
+ { 18, "Result set not supported as a search term" },
+ { 19, "Only single result set as search term supported" },
+ { 20, "Only ANDing of a single result set as search term supported" },
+ { 21, "Result set exists and replace indicator off" },
+ { 22, "Result set naming not supported" },
+ { 23, "Combination of specified databases not supported" },
+ { 24, "Element set names not supported" },
+ { 25, "Specified element set name not valid for specified database" },
+ { 26, "Only a single element set name supported" },
+ { 27, "Result set no longer exists - unilaterally deleted by target" },
+ { 28, "Result set is in use" },
+ { 29, "One of the specified databases is locked" },
+ { 30, "Specified result set does not exist" },
+ { 31, "Resources exhausted - no results available" },
+ { 32, "Resources exhausted - unpredictable partial results available" },
+ { 33, "Resources exhausted - valid subset of results available" },
+ { 100, "Unspecified error" },
+ { 101, "Access-control failure" },
+ { 102, "Security challenge required but could not be issued - request terminated" },
+ { 103, "Security challenge required but could not be issued - record not included" },
+ { 104, "Security challenge failed - record not included" },
+ { 105, "Terminated by negative continue response" },
+ { 106, "No abstract syntaxes agreed to for this record" },
+ { 107, "Query type not supported" },
+ { 108, "Malformed query" },
+ { 109, "Database unavailable" },
+ { 110, "Operator unsupported" },
+ { 111, "Too many databases specified" },
+ { 112, "Too many result sets created" },
+ { 113, "Unsupported attribute type" },
+ { 114, "Unsupported Use attribute" },
+ { 115, "Unsupported value for Use attribute" },
+ { 116, "Use attribute required but not supplied" },
+ { 117, "Unsupported Relation attribute" },
+ { 118, "Unsupported Structure attribute" },
+ { 119, "Unsupported Position attribute" },
+ { 120, "Unsupported Truncation attribute" },
+ { 121, "Unsupported Attribute Set" },
+ { 122, "Unsupported Completeness attribute" },
+ { 123, "Unsupported attribute combination" },
+ { 124, "Unsupported coded value for term" },
+ { 125, "Malformed search term" },
+ { 126, "Illegal term value for attribute" },
+ { 127, "Unparsable format for un-normalized value" },
+ { 128, "Illegal result set name" },
+ { 129, "Proximity search of sets not supported" },
+ { 130, "Illegal result set in proximity search" },
+ { 131, "Unsupported proximity relation" },
+ { 132, "Unsupported proximity unit code" },
+ { 201, "Proximity not supported with this attribute combination" },
+ { 202, "Unsupported distance for proximity" },
+ { 203, "Ordered flag not supported for proximity" },
+ { 205, "Only zero step size supported for Scan" },
+ { 206, "Specified step size not supported for Scan" },
+ { 207, "Cannot sort according to sequence" },
+ { 208, "No result set name supplied on Sort" },
+ { 209, "Generic sort not supported (database-specific sort only supported)" },
+ { 210, "Database specific sort not supported" },
+ { 211, "Too many sort keys" },
+ { 212, "Duplicate sort keys" },
+ { 213, "Unsupported missing data action" },
+ { 214, "Illegal sort relation" },
+ { 215, "Illegal case value" },
+ { 216, "Illegal missing data action" },
+ { 217, "Segmentation: Cannot guarantee records will fit in specified segments" },
+ { 218, "ES: Package name already in use" },
+ { 219, "ES: no such package, on modify/delete" },
+ { 220, "ES: quota exceeded" },
+ { 221, "ES: extended service type not supported" },
+ { 222, "ES: permission denied on ES - id not authorized" },
+ { 223, "ES: permission denied on ES - cannot modify or delete" },
+ { 224, "ES: immediate execution failed" },
+ { 225, "ES: immediate execution not supported for this service" },
+ { 226, "ES: immediate execution not supported for these parameters" },
+ { 227, "No data available in requested record syntax" },
+ { 228, "Scan: malformed scan" },
+ { 229, "Term type not supported" },
+ { 230, "Sort: too many input results" },
+ { 231, "Sort: incompatible record formats" },
+ { 232, "Scan: term list not supported" },
+ { 233, "Scan: unsupported value of position-in-response" },
+ { 234, "Too many index terms processed" },
+ { 235, "Database does not exist" },
+ { 236, "Access to specified database denied" },
+ { 237, "Sort: illegal sort" },
+ { 238, "Record not available in requested syntax" },
+ { 239, "Record syntax not supported" },
+ { 240, "Scan: Resources exhausted looking for satisfying terms" },
+ { 241, "Scan: Beginning or end of term list" },
+ { 242, "Segmentation: max-segment-size too small to segment record" },
+ { 243, "Present: additional-ranges parameter not supported" },
+ { 244, "Present: comp-spec parameter not supported" },
+ { 245, "Type-1 query: restriction ('resultAttr') operand not supported" },
+ { 246, "Type-1 query: 'complex' attributeValue not supported" },
+ { 247, "Type-1 query: 'attributeSet' as part of AttributeElement not supported" },
+ { 1001, "Malformed APDU" },
+ { 1002, "ES: EXTERNAL form of Item Order request not supported" },
+ { 1003, "ES: Result set item form of Item Order request not supported" },
+ { 1004, "ES: Extended services not supported unless access control is in effect" },
+ { 1005, "Response records in Search response not supported" },
+ { 1006, "Response records in Search response not possible for specified database (or database combination)" },
+ { 1007, "No Explain server. Addinfo: pointers to servers that have a surrogate Explain database for this server" },
+ { 1008, "ES: missing mandatory parameter for specified function. Addinfo: parameter" },
+ { 1009, "ES: Item Order, unsupported OID in itemRequest. Addinfo: OID" },
+ { 1010, "Init/AC: Bad Userid" },
+ { 1011, "Init/AC: Bad Userid and/or Password" },
+ { 1012, "Init/AC: No searches remaining (pre-purchased searches exhausted)" },
+ { 1013, "Init/AC: Incorrect interface type (specified id valid only when used with a particular access method or client)" },
+ { 1014, "Init/AC: Authentication System error" },
+ { 1015, "Init/AC: Maximum number of simultaneous sessions for Userid" },
+ { 1016, "Init/AC: Blocked network address" },
+ { 1017, "Init/AC: No databases available for specified userId" },
+ { 1018, "Init/AC: System temporarily out of resources" },
+ { 1019, "Init/AC: System not available due to maintenance" },
+ { 1020, "Init/AC: System temporarily unavailable (Addinfo: when it's expected back up)" },
+ { 1021, "Init/AC: Account has expired" },
+ { 1022, "Init/AC: Password has expired so a new one must be supplied" },
+ { 1023, "Init/AC: Password has been changed by an administrator so a new one must be supplied" },
+ { 1024, "Unsupported Attribute" },
+ { 1025, "Service not supported for this database" },
+ { 1026, "Record cannot be opened because it is locked" },
+ { 1027, "SQL error" },
+ { 1028, "Record deleted" },
+ { 1029, "Scan: too many terms requested. Addinfo: max terms supported" },
+ { 1040, "ES: Invalid function" },
+ { 1041, "ES: Error in retention time" },
+ { 1042, "ES: Permissions data not understood" },
+ { 1043, "ES: Invalid OID for task specific parameters" },
+ { 1044, "ES: Invalid action" },
+ { 1045, "ES: Unknown schema" },
+ { 1046, "ES: Too many records in package" },
+ { 1047, "ES: Invalid wait action" },
+ { 1048, "ES: Cannot create task package -- exceeds maximum permissable size" },
+ { 1049, "ES: Cannot return task package -- exceeds maximum permissable size" },
+ { 1050, "ES: Extended services request too large" },
+ { 1051, "Scan: Attribute set id required -- not supplied" },
+ { 1052, "ES: Cannot process task package record -- exceeds maximum permissible record size for ES" },
+ { 1053, "ES: Cannot return task package record -- exceeds maximum permissible record size for ES response" },
+ { 1054, "Init: Required negotiation record not included" },
+ { 1055, "Init: negotiation option required" },
+ { 1056, "Attribute not supported for database" },
+ { 1057, "ES: Unsupported value of task package parameter" },
+ { 1058, "Duplicate Detection: Cannot dedup on requested record portion" },
+ { 1059, "Duplicate Detection: Requested detection criterion not supported" },
+ { 1060, "Duplicate Detection: Requested level of match not supported" },
+ { 1061, "Duplicate Detection: Requested regular expression not supported" },
+ { 1062, "Duplicate Detection: Cannot do clustering" },
+ { 1063, "Duplicate Detection: Retention criterion not supported" },
+ { 1064, "Duplicate Detection: Requested number (or percentage) of entries for retention too large" },
+ { 1065, "Duplicate Detection: Requested sort criterion not supported" },
+ { 1066, "CompSpec: Unknown schema, or schema not supported." },
+ { 1067, "Encapsulation: Encapsulated sequence of PDUs not supported" },
+ { 1068, "Encapsulation: Base operation (and encapsulated PDUs) not executed based on pre-screening analysis" },
+ { 1069, "No syntaxes available for this request" },
+ { 1070, "user not authorized to receive record(s) in requested syntax" },
+ { 1071, "preferredRecordSyntax not supplied" },
+ { 1072, "Query term includes characters that do not translate into the target character set" },
+ { 1073, "Database records do not contain data associated with access point" },
+ { 1074, "Proxy failure" },
+ { 0, NULL}
+};
+
+#include "packet-z3950-hf.c"
+
+static int hf_z3950_referenceId_printable = -1;
+static int hf_z3950_general_printable = -1;
+
+/* Initialize the subtree pointers */
+static int ett_z3950 = -1;
+
+#include "packet-z3950-ett.c"
+
+/* MARC variables and forwards */
+
+static int dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * data _U_);
+
+/* MARC fields */
+static int hf_marc_record = -1;
+static int hf_marc_record_terminator = -1;
+static int hf_marc_leader = -1;
+static int hf_marc_leader_length = -1;
+static int hf_marc_leader_status = -1;
+static int hf_marc_leader_type = -1;
+static int hf_marc_leader_biblevel = -1;
+static int hf_marc_leader_control = -1;
+static int hf_marc_leader_encoding = -1;
+static int hf_marc_leader_indicator_count = -1;
+static int hf_marc_leader_subfield_count = -1;
+static int hf_marc_leader_data_offset = -1;
+static int hf_marc_leader_encoding_level = -1;
+static int hf_marc_leader_descriptive_cataloging = -1;
+static int hf_marc_leader_multipart_level = -1;
+static int hf_marc_leader_length_of_field_length = -1;
+static int hf_marc_leader_starting_character_position_length = -1;
+static int hf_marc_leader_implementation_defined_length = -1;
+static int hf_marc_directory = -1;
+static int hf_marc_directory_entry = -1;
+static int hf_marc_directory_entry_tag = -1;
+static int hf_marc_directory_entry_length = -1;
+static int hf_marc_directory_entry_starting_position = -1;
+static int hf_marc_directory_terminator = -1;
+static int hf_marc_fields = -1;
+static int hf_marc_field = -1;
+static int hf_marc_field_control = -1;
+static int hf_marc_field_terminator = -1;
+static int hf_marc_field_indicator1 = -1;
+static int hf_marc_field_indicator2 = -1;
+static int hf_marc_field_subfield_indicator = -1;
+static int hf_marc_field_subfield_tag = -1;
+static int hf_marc_field_subfield = -1;
+
+/* MARC subtree pointers */
+static int ett_marc_record = -1;
+static int ett_marc_leader = -1;
+static int ett_marc_directory = -1;
+static int ett_marc_directory_entry = -1;
+static int ett_marc_fields = -1;
+static int ett_marc_field = -1;
+
+/* MARC expert fields */
+static expert_field ei_marc_invalid_length = EI_INIT;
+static expert_field ei_marc_invalid_value = EI_INIT;
+static expert_field ei_marc_invalid_record_length = EI_INIT;
+
+/* MARC value strings */
+
+static const value_string marc_tag_names[] = {
+ { 1, "Control Number" },
+ { 3, "Control Number Identifier" },
+ { 5, "Date and Time of Latest Transaction" },
+ { 6, "Fixed-length Data Elements - Addiional Matieral Characteristics" },
+ { 8, "Fixed-length Data Elements" },
+ { 7, "Physical Description Fixed Field" },
+ { 10, "Library of Congress Control Number" },
+ { 15, "National Bibliography Number" },
+ { 16, "National Bibliographic Agency Control Number" },
+ { 17, "Copyright or Legal Deposit Number" },
+ { 20, "International Standard Book Number (ISBN)" },
+ { 22, "International Standard Serial Number (ISSN)" },
+ { 24, "Other Standard Identifier" },
+ { 25, "Overseas Acquisition Number" },
+ { 26, "Fingerprint Identifier" },
+ { 27, "Standard Technical Report Number" },
+ { 28, "Publisher or Distributor Number" },
+ { 30, "CODEN Designation" },
+ { 32, "Postal Registration Number" },
+ { 33, "Date/Time and Place of an Event" },
+ { 35, "System Control Number" },
+ { 37, "Source of Acquisition" },
+ { 38, "Record Content Licensor" },
+ { 40, "Cataloging Source" },
+ { 41, "Language Code" },
+ { 42, "Authentication Code" },
+ { 43, "Geographic Area Code" },
+ { 44, "Country of Publishing/Producing Entity Code" },
+ { 45, "Time Period of Content" },
+ { 47, "Form of Musical Composition Code" },
+ { 50, "Library of Congress Call Number" },
+ { 51, "Library of Congress Copy, Issue, Offprint Statement" },
+ { 60, "National Library of Medicine Call Number" },
+ { 66, "Character Sets Present" },
+ { 80, "Universal Decimal Classification Number" },
+ { 82, "Dewey Decimal Classification Number" },
+ { 83, "Additional Dewey Decimal Classification Number" },
+ { 84, "Other Classification Number" },
+ { 100, "Main Entry - Personal Name" },
+ { 110, "Main Entry - Corporate Name" },
+ { 111, "Main Entry - Meeting Name" },
+ { 130, "Main Entry - Uniform Title" },
+ { 210, "Abbreviated Title" },
+ { 222, "Key Title" },
+ { 240, "Uniform Title" },
+ { 242, "Translation of Title by Cataloging Agency" },
+ { 243, "Collective Uniform Title" },
+ { 245, "Title Statement" },
+ { 246, "Varying Form of Title" },
+ { 247, "Former Title" },
+ { 249, "Local LoC Varying Form of Title" },
+ { 250, "Edition Statement" },
+ { 260, "Publication, Distribution, etc. (Imprint)" },
+ { 264, "Production, Publication, Distribution, Manufacture, and Copyright Notice" },
+ { 300, "Physical Description" },
+ { 310, "Current Publication Frequency" },
+ { 321, "former Publication Frequency" },
+ { 336, "Content Type" },
+ { 337, "Media Type" },
+ { 338, "Carrier Type" },
+ { 340, "Physical Medium" },
+ { 362, "Dates of Publication and/or Sequential Designation" },
+ { 400, "Series Statement/Added Entry-Personal Name" },
+ { 410, "Series Statement/Added Entry-Corporate Name" },
+ { 411, "Series Statement/Added Entry-Meeting Name" },
+ { 440, "Series Statement/Added Entry-Title" },
+ { 490, "Series Statement" },
+ { 500, "General Note" },
+ { 504, "Bibliography, etc. Note" },
+ { 505, "Formatted Contents Note" },
+ { 506, "Restrictions on Access Note" },
+ { 508, "Creation/Production Credits Note" },
+ { 510, "Citation/References Note" },
+ { 511, "Participant or Performer Note" },
+ { 515, "Numbering Peculiarities Note" },
+ { 518, "Date/Time and Place of an Event Note" },
+ { 520, "Summary, etc." },
+ { 521, "Target Audience Note" },
+ { 522, "Geographic Coverage Note" },
+ { 524, "Preferred Citation of Described Materials Note" },
+ { 525, "Supplement Note" },
+ { 530, "Additional Physical Form available Note" },
+ { 532, "Accessibility Note" },
+ { 533, "Reproduction Note" },
+ { 534, "Original Version Note" },
+ { 538, "System Details Note" },
+ { 540, "Terms Governing Use and Reproduction Note" },
+ { 541, "Immediate Source of Acquisition Note" },
+ { 542, "Information Relating to Copyright Status" },
+ { 546, "Language Note" },
+ { 550, "Issuing Body Note" },
+ { 555, "Cumulative Index/Finding Aids Note" },
+ { 583, "Action Note" },
+ { 588, "Source of Description, Etc. Note" },
+ { 590, "Local LoC Note" },
+ { 591, "Local LoC \"With\" Note" },
+ { 592, "Local LoC Acquisition Note" },
+ { 600, "Subject Added Entry - Personal Name" },
+ { 610, "Subject Added Entry - Corporate Name" },
+ { 611, "Subject Added Entry - Meeting Name" },
+ { 630, "Subject Added Entry - Uniform Title" },
+ { 647, "Subject Added Entry - Named Event" },
+ { 648, "Subject Added Entry - Chronological Term" },
+ { 650, "Subject Added Entry - Topical Term" },
+ { 651, "Subject Added Entry - Geographic Name" },
+ { 653, "Index Term - Uncontrolled" },
+ { 654, "Subject Added Entry - Faceted Topical Terms" },
+ { 655, "Index Term - Genre/Form" },
+ { 656, "Index Term - Occupation" },
+ { 657, "Index Term - Function" },
+ { 658, "Index Term - Curriculum Objective" },
+ { 662, "Subject Added Entry - Hierarchical Place Name" },
+ { 700, "Added Entry - Personal Name" },
+ { 710, "Added Entry - Corporate Name" },
+ { 711, "Added Entry - Meeting Name" },
+ { 720, "Added Entry - Uncontrolled Name" },
+ { 730, "Added Entry - Uniform Title" },
+ { 740, "Added Entry - Uncontrolled Related/Analytical Title" },
+ { 751, "Added Entry - Geographic Name" },
+ { 752, "Added Entry - Hierarchical Place Name" },
+ { 753, "System Details Access to Computer Files" },
+ { 754, "Added Entry - Taxonomic Identification" },
+ { 758, "Resource Identifier" },
+ { 760, "Main Series Entry" },
+ { 762, "Subseries Entry" },
+ { 765, "Original Language Entry" },
+ { 767, "Translation Entry" },
+ { 770, "Supplement/Special Issue Entry" },
+ { 772, "Supplement Parent Entry" },
+ { 773, "Host Item Entry" },
+ { 774, "Constituent Unit Entry" },
+ { 775, "Other Edition Entry" },
+ { 776, "Additional Physical Form Entry" },
+ { 777, "Issued With Entry" },
+ { 780, "Preceding Entry" },
+ { 785, "Succeeding Entry" },
+ { 786, "Data Source Entry" },
+ { 787, "Other Relationship Entry" },
+ { 800, "Series Added Entry - Personal Name" },
+ { 810, "Series Added Entry - Corporate Name" },
+ { 811, "Series Added Entry - Meeting Name" },
+ { 830, "Series Added Entry - Uniform Title" },
+ { 850, "Holding Institution" },
+ { 852, "Location" },
+ { 853, "Captions and Pattern - Basic Bibliographic Unit" },
+ { 856, "Electronic Location and Access" },
+ { 859, "Local LoC Electronic Location and Access" },
+ { 863, "Enumeration and Chronology - Basic Bibliographic Unit" },
+ { 880, "Alternate Graphic Representation" },
+ { 890, "Local LoC Visible File Entry" },
+ { 906, "Local LoC Processing Data" },
+ { 920, "Local LoC Selection Decision" },
+ { 922, "Local LoC Book Source" },
+ { 923, "Local LoC Supplier Invoice or Shipment Id" },
+ { 925, "Local LoC Selection Decision" },
+ { 952, "Local LoC Cataloger's Permanent Note" },
+ { 955, "Local LoC Functional Identifying Information" },
+ { 984, "Local LoC Shelflist Compare Status" },
+ { 985, "Local LoC Record History" },
+ { 987, "Local LoC Converstion History" },
+ { 991, "Local LoC Location Information" },
+ { 992, "Local LoC Location Information" },
+ { 0, NULL}
+};
+
+static int
+dissect_z3950_printable_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+ tvbuff_t *next_tvb = NULL;
+ int hf_alternate = -1;
+ guint old_offset = offset;
+
+ if (hf_index == hf_z3950_referenceId) {
+ hf_alternate = hf_z3950_referenceId_printable;
+ }
+ else if ( hf_index == hf_z3950_general) {
+ hf_alternate = hf_z3950_general_printable;
+ }
+
+ if (hf_alternate > 0) {
+ /* extract the value of the octet string so we can look at it. */
+ /* This does not display anything because tree is NULL. */
+ offset = dissect_ber_octet_string(implicit_tag, actx, NULL, tvb, offset, hf_index, &next_tvb);
+
+ if (next_tvb &&
+ tvb_ascii_isprint(next_tvb, 0, tvb_reported_length(next_tvb))) {
+ proto_tree_add_item(tree, hf_alternate, next_tvb,
+ 0, tvb_reported_length(next_tvb), ENC_ASCII|ENC_NA);
+ }
+ else {
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb,
+ old_offset, hf_index, NULL);
+ }
+ }
+ else {
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb,
+ old_offset, hf_index, NULL);
+ }
+
+ return offset;
+}
+
+#include "packet-z3950-fn.c"
+
+static int
+dissect_z3950(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ proto_item *z3950_item = NULL;
+ proto_tree *z3950_tree = NULL;
+ int offset = 0;
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+
+
+ /* make entry in the Protocol column on summary display */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+
+ /* create the z3950 protocol tree */
+ z3950_item = proto_tree_add_item(tree, proto_z3950, tvb, 0, -1, FALSE);
+ z3950_tree = proto_item_add_subtree(z3950_item, ett_z3950);
+
+ return dissect_z3950_PDU(FALSE, tvb, offset, &asn1_ctx, z3950_tree, -1);
+}
+
+static guint
+get_z3950_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
+{
+ guint plen;
+ guint ber_offset;
+ TRY {
+ /* Skip past identifier */
+ ber_offset = get_ber_identifier(tvb, offset, NULL, NULL, NULL);
+ ber_offset = get_ber_length(tvb, ber_offset, &plen, NULL);
+ plen += (ber_offset - offset);
+ }
+ CATCH(ReportedBoundsError) {
+ plen = 0;
+ }
+ ENDTRY;
+
+ return plen;
+}
+
+static int
+dissect_z3950_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * data _U_)
+{
+
+ /* Min length of 8 assumes 3 for identifer and 5 for length. */
+ tcp_dissect_pdus(tvb, pinfo, tree, z3950_desegment, 8, get_z3950_pdu_len, dissect_z3950, data);
+ return tvb_captured_length(tvb);
+}
+
+/*--- proto_register_z3950 -------------------------------------------*/
+void proto_register_z3950(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+
+#include "packet-z3950-hfarr.c"
+
+ { &hf_z3950_referenceId_printable,
+ { "referenceId", "z3950.referenceId.printable",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_z3950_general_printable,
+ { "general", "z3950.general.printable",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+/* MARC hf definitions */
+ { &hf_marc_record,
+ { "MARC record", "marc",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_record_terminator,
+ { "MARC record terminator", "marc.terminator",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader,
+ { "MARC leader", "marc.leader",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_length,
+ { "MARC leader length", "marc.leader.length",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_status,
+ { "MARC leader status", "marc.leader.status",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_type,
+ { "MARC leader type", "marc.leader.type",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_biblevel,
+ { "MARC leader biblevel", "marc.leader.biblevel",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_control,
+ { "MARC leader control", "marc.leader.control",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_encoding,
+ { "MARC leader encoding", "marc.leader.encoding",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_indicator_count,
+ { "MARC leader indicator count", "marc.leader.indicator_count",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_subfield_count,
+ { "MARC leader subfield count", "marc.leader.subfield_count",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_data_offset,
+ { "MARC leader data offset", "marc.leader.data_offset",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_encoding_level,
+ { "MARC leader encoding level", "marc.leader.encoding_level",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_descriptive_cataloging,
+ { "MARC leader descriptive cataloging", "marc.leader.descriptive_cataloging",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_multipart_level,
+ { "MARC leader multipart level", "marc.leader.multipart_level",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_length_of_field_length,
+ { "MARC leader length-of-field length", "marc.leader.length_of_field_length",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_starting_character_position_length,
+ { "MARC leader starting-character-position length", "marc.leader.starting_character_position_length",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_leader_implementation_defined_length,
+ { "MARC leader implementation-defined length", "marc.leader.implementation_defined_length",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_directory,
+ { "MARC directory", "marc.directory",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_directory_entry,
+ { "MARC directory entry", "marc.directory.entry",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_directory_entry_tag,
+ { "tag", "marc.directory.entry.tag",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_directory_entry_length,
+ { "length", "marc.directory.entry.length",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_directory_entry_starting_position,
+ { "starting position", "marc.directory.entry.starting_position",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_directory_terminator,
+ { "MARC directory terminator", "marc.directory.terminator",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_fields,
+ { "MARC data fields", "marc.fields",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field,
+ { "MARC field", "marc.field",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_control,
+ { "Control field", "marc.field.control",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_terminator,
+ { "MARC field terminator", "marc.field.terminator",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_indicator1,
+ { "MARC field indicator1", "marc.field.indicator1",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_indicator2,
+ { "MARC field indicator2", "marc.field.indicator2",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_subfield_indicator,
+ { "MARC field subfield indicator", "marc.field.subfield.indicator",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_subfield_tag,
+ { "MARC field subfield tag", "marc.field.subfield.tag",
+ FT_CHAR, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+ { &hf_marc_field_subfield,
+ { "MARC Subfield", "marc.field.subfield",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+ &ett_z3950,
+/* MARC etts */
+ &ett_marc_record,
+ &ett_marc_leader,
+ &ett_marc_directory,
+ &ett_marc_directory_entry,
+ &ett_marc_fields,
+ &ett_marc_field,
+#include "packet-z3950-ettarr.c"
+ };
+
+ module_t *z3950_module;
+
+/* Expert info */
+ static ei_register_info ei[] = {
+/* Z39.50 expert info */
+
+/* MARC expert info */
+ { &ei_marc_invalid_length, { "marc.invalid_length", PI_MALFORMED, PI_ERROR,
+ "MARC record too short", EXPFILL }},
+ { &ei_marc_invalid_value, { "marc.invalid_value", PI_MALFORMED, PI_ERROR,
+ "MARC field has invalid value", EXPFILL }},
+ { &ei_marc_invalid_record_length, { "marc.invalid_record_length", PI_MALFORMED, PI_ERROR,
+ "MARC length field has invalid value", EXPFILL }},
+ };
+
+ expert_module_t* expert_z3950;
+
+
+ /* Register protocol */
+ proto_z3950 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_z3950, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_z3950 = expert_register_protocol(proto_z3950);
+ expert_register_field_array(expert_z3950, ei, array_length(ei));
+
+ /* Register preferences */
+ z3950_module = prefs_register_protocol(proto_z3950, NULL);
+ prefs_register_bool_preference(z3950_module, "desegment_buffers",
+ "Reassemble Z39.50 buffers spanning multiple TCP segments",
+ "Whether the Z39.50 dissector should reassemble TDS buffers spanning multiple TCP segments. "
+ "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
+ &z3950_desegment);
+
+ /* Allow dissector to be found by name. */
+ z3950_handle = register_dissector(PSNAME, dissect_z3950_segment,
+ proto_z3950);
+
+}
+
+/*--- proto_reg_handoff_z3950 ---------------------------------------*/
+void
+proto_reg_handoff_z3950(void)
+{
+
+ dissector_add_uint_with_preference("tcp.port",
+ global_z3950_port, z3950_handle);
+
+#include "packet-z3950-dis-tab.c"
+
+ register_ber_oid_dissector(Z3950_RECORDSYNTAX_MARC21_OID, dissect_marc_record, proto_z3950, "MARC21");
+
+ oid_add_from_string("Z39.50", "1.2.840.10003");
+ oid_add_from_string("Z39.50-APDU", "1.2.840.10003.2");
+ oid_add_from_string("Z39.50-attributeSet", "1.2.840.10003.3");
+ oid_add_from_string("Z39.50-diagnostic", "1.2.840.10003.4");
+ oid_add_from_string("Z39.50-recordSyntax", "1.2.840.10003.5");
+ oid_add_from_string("Z39.50-resourceReport", "1.2.840.10003.7");
+ oid_add_from_string("Z39.50-accessControl", "1.2.840.10003.8");
+ oid_add_from_string("Z39.50-extendedService", "1.2.840.10003.9");
+ oid_add_from_string("Z39.50-userinfoFormat", "1.2.840.10003.10");
+ oid_add_from_string("Z39.50-elementSpec", "1.2.840.10003.11");
+ oid_add_from_string("Z39.50-variantSet", "1.2.840.10003.12");
+ oid_add_from_string("Z39.50-schema", "1.2.840.10003.13");
+ oid_add_from_string("Z39.50-tagSet", "1.2.840.10003.14");
+ oid_add_from_string("Z39.50-negotiation", "1.2.840.10003.15");
+ oid_add_from_string("Z39.50-query", "1.2.840.10003.16");
+ /* MARC Record Syntaxes */
+ oid_add_from_string("UNIMARC","1.2.840.10003.5.1");
+ oid_add_from_string("INTERMARC","1.2.840.10003.5.2");
+ oid_add_from_string("CCF","1.2.840.10003.5.3");
+ oid_add_from_string("MARC21 (formerly USMARC)",Z3950_RECORDSYNTAX_MARC21_OID);
+ oid_add_from_string("UKMARC","1.2.840.10003.5.11");
+ oid_add_from_string("NORMARC","1.2.840.10003.5.12");
+ oid_add_from_string("Librismarc","1.2.840.10003.5.13");
+ oid_add_from_string("danMARC2","1.2.840.10003.5.14");
+ oid_add_from_string("Finmarc","1.2.840.10003.5.15");
+ oid_add_from_string("MAB","1.2.840.10003.5.16");
+ oid_add_from_string("Canmarc","1.2.840.10003.5.17");
+ oid_add_from_string("SBN","1.2.840.10003.5.18");
+ oid_add_from_string("Picamarc","1.2.840.10003.5.19");
+ oid_add_from_string("Ausmarc","1.2.840.10003.5.20");
+ oid_add_from_string("Ibermarc","1.2.840.10003.5.21");
+ oid_add_from_string("Catmarc","1.2.840.10003.5.22");
+ oid_add_from_string("Malmarc","1.2.840.10003.5.23");
+ oid_add_from_string("JPmarc","1.2.840.10003.5.24");
+ oid_add_from_string("SWEMarc","1.2.840.10003.5.25");
+ oid_add_from_string("SIGLEmarc","1.2.840.10003.5.26");
+ oid_add_from_string("ISDS/ISSNmarc","1.2.840.10003.5.27");
+ oid_add_from_string("RUSMarc","1.2.840.10003.5.28");
+ oid_add_from_string("Hunmarc","1.2.840.10003.5.29");
+ oid_add_from_string("NACSIS-CATP","1.2.840.10003.5.30");
+ oid_add_from_string("FINMARC2000","1.2.840.10003.5.31");
+ oid_add_from_string("MARC21-fin","1.2.840.10003.5.32");
+ oid_add_from_string("COMARC","1.2.840.10003.5.33");
+ /* Non-MARC record syntaxes */
+ oid_add_from_string("Explain","1.2.840.10003.5.100");
+ oid_add_from_string("Explain with ZSQL","1.2.840.10003.5.100.1");
+ oid_add_from_string("SUTRS","1.2.840.10003.5.101");
+ oid_add_from_string("OPAC","1.2.840.10003.5.102");
+ oid_add_from_string("Summary","1.2.840.10003.5.103");
+ oid_add_from_string("GRS-0","1.2.840.10003.5.104");
+ oid_add_from_string("GRS-1","1.2.840.10003.5.105");
+ oid_add_from_string("ESTaskPackage","1.2.840.10003.5.106");
+ oid_add_from_string("fragment","1.2.840.10003.5.108");
+ /* Attribute sets */
+ oid_add_from_string("bib-1",Z3950_ATSET_BIB1_OID);
+ oid_add_from_string("exp-1","1.2.840.10003.3.2");
+ oid_add_from_string("ext-1","1.2.840.10003.3.3");
+ oid_add_from_string("ccl-1","1.2.840.10003.3.4");
+ oid_add_from_string("gils","1.2.840.10003.3.5");
+ oid_add_from_string("stas","1.2.840.10003.3.6");
+ oid_add_from_string("collections-1","1.2.840.10003.3.7");
+ oid_add_from_string("cimi-1","1.2.840.10003.3.8");
+ oid_add_from_string("geo-1","1.2.840.10003.3.9");
+ oid_add_from_string("ZBIG","1.2.840.10003.3.10");
+ oid_add_from_string("util","1.2.840.10003.3.11");
+ oid_add_from_string("xd-1","1.2.840.10003.3.12");
+ oid_add_from_string("Zthes","1.2.840.10003.3.13");
+ oid_add_from_string("Fin-1","1.2.840.10003.3.14");
+ oid_add_from_string("Dan-1","1.2.840.10003.3.15");
+ oid_add_from_string("Holdings","1.2.840.10003.3.16");
+ oid_add_from_string("MARC","1.2.840.10003.3.17");
+ oid_add_from_string("bib-2","1.2.840.10003.3.18");
+ oid_add_from_string("ZeeRex","1.2.840.10003.3.19");
+ /* Diagnostic sets */
+ oid_add_from_string("bib-1-diagnostics",Z3950_DIAGSET_BIB1_OID);
+
+}
+
+/* MARC routines */
+
+static int
+dissect_marc_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * data _U_)
+{
+ proto_item *record_item, *leader_item,
+ *directory_item,
+ *fields_item,
+ *item;
+ proto_tree *marc_tree, *leader_tree,
+ *directory_tree,
+ *fields_tree;
+ marc_directory_entry *marc_directory;
+ guint len = tvb_reported_length(tvb);
+ const guint8 *marc_value_str;
+ guint record_length = 0,
+ data_offset = 0,
+ length_of_field_size,
+ starting_character_position_size,
+ directory_entry_len,
+ directory_entry_count,
+ dir_index,
+ offset = 0;
+ guint32 marc_value_char;
+
+ record_item = proto_tree_add_item(tree, hf_marc_record,
+ tvb, 0, len, ENC_NA);
+ marc_tree = proto_item_add_subtree(record_item, ett_marc_record);
+ if (len < MARC_LEADER_LENGTH) {
+ expert_add_info_format(pinfo, record_item,
+ &ei_marc_invalid_record_length,
+ "MARC record length %d is shorter than leader", len);
+ }
+ leader_item = proto_tree_add_item(marc_tree, hf_marc_leader, tvb, 0,
+ MARC_LEADER_LENGTH, ENC_NA);
+ leader_tree = proto_item_add_subtree(leader_item, ett_marc_leader);
+
+ marc_value_str = NULL;
+ item = proto_tree_add_item_ret_string(leader_tree,
+ hf_marc_leader_length, tvb, offset, 5, ENC_ASCII|ENC_NA,
+ wmem_packet_scope(),&marc_value_str);
+ offset += 5;
+
+ if (marc_value_str) {
+ if (isdigit_string(marc_value_str)) {
+ record_length = (guint)strtoul(marc_value_str, NULL, 10);
+ }
+ else {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_value,
+ "MARC length field '%s' contains invalid characters",
+ marc_value_str );
+ }
+ if (record_length != len) {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_length,
+ "MARC length field value %d does not match reported length %d",
+ record_length, len);
+ }
+ }
+
+ proto_tree_add_item(leader_tree, hf_marc_leader_status, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(leader_tree, hf_marc_leader_type, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(leader_tree, hf_marc_leader_biblevel, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(leader_tree, hf_marc_leader_control, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(leader_tree, hf_marc_leader_encoding, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ marc_value_char = MARC_CHAR_UNINITIALIZED;
+ item = proto_tree_add_item_ret_uint(leader_tree, hf_marc_leader_indicator_count,
+ tvb, offset, 1, ENC_ASCII, &marc_value_char);
+ offset += 1;
+ if (marc_value_char != MARC_CHAR_UNINITIALIZED) {
+ if (!marc_isdigit(marc_value_char)) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_value,
+ "Indicator count '%c' is invalid", marc_value_char);
+ }
+ else {
+ if (marc_char_to_int(marc_value_char) != 2) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_length,
+ "MARC21 requires indicator count equal 2, not %d",
+ marc_char_to_int(marc_value_char));
+ }
+ }
+ }
+
+ marc_value_char = MARC_CHAR_UNINITIALIZED;
+ item = proto_tree_add_item_ret_uint(leader_tree, hf_marc_leader_subfield_count,
+ tvb, offset, 1, ENC_ASCII, &marc_value_char);
+ offset += 1;
+ if (marc_value_char != MARC_CHAR_UNINITIALIZED) {
+ if (!marc_isdigit(marc_value_char)) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_value,
+ "Subfield count '%c' is invalid", marc_value_char);
+ }
+ else {
+ if (marc_char_to_int(marc_value_char) != 2) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_length,
+ "MARC21 requires subfield count equal 2, not %d",
+ marc_char_to_int(marc_value_char));
+ }
+ }
+ }
+
+ item = proto_tree_add_item_ret_string(leader_tree, hf_marc_leader_data_offset,
+ tvb, offset, 5, ENC_ASCII|ENC_NA,
+ wmem_packet_scope(),&marc_value_str);
+ offset += 5;
+ if (marc_value_str) {
+ if (isdigit_string(marc_value_str)) {
+ data_offset = (guint)strtoul(marc_value_str, NULL, 10);
+ }
+ else {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_value,
+ "MARC data offset field '%s' contains invalid characters",
+ marc_value_str );
+ }
+ if (data_offset < MARC_LEADER_LENGTH ||
+ data_offset > record_length) {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_length,
+ "MARC data offset %d does not lie within record (length %d)",
+ data_offset, len);
+ }
+ }
+ proto_tree_add_item(leader_tree, hf_marc_leader_encoding_level, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(leader_tree, hf_marc_leader_descriptive_cataloging, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(leader_tree, hf_marc_leader_multipart_level, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ marc_value_char = MARC_CHAR_UNINITIALIZED;
+ item = proto_tree_add_item_ret_uint(leader_tree, hf_marc_leader_length_of_field_length,
+ tvb, offset, 1, ENC_ASCII, &marc_value_char);
+ offset += 1;
+ length_of_field_size = 4;
+ if (marc_value_char != MARC_CHAR_UNINITIALIZED) {
+ if (!marc_isdigit(marc_value_char)) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_value,
+ "Length-of field-length '%c' is invalid", marc_value_char);
+ }
+ else {
+ if (marc_char_to_int(marc_value_char) != 4) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_length,
+ "MARC21 requires length-of-field equal 4, not %d",
+ marc_char_to_int(marc_value_char));
+ }
+ }
+ }
+
+ marc_value_char = MARC_CHAR_UNINITIALIZED;
+ item = proto_tree_add_item_ret_uint(leader_tree, hf_marc_leader_starting_character_position_length,
+ tvb, offset, 1, ENC_ASCII, &marc_value_char);
+ offset += 1;
+ starting_character_position_size = 5;
+ if (marc_value_char != MARC_CHAR_UNINITIALIZED) {
+ if (!marc_isdigit(marc_value_char)) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_value,
+ "Starting-character-position length '%c' is invalid", marc_value_char);
+ }
+ else {
+ if (marc_char_to_int(marc_value_char) != 5) {
+ expert_add_info_format(pinfo, item, &ei_marc_invalid_length,
+ "MARC21 requires starting-character-position equal 5, not %d",
+ marc_char_to_int(marc_value_char));
+ }
+ }
+ }
+
+ proto_tree_add_item(leader_tree, hf_marc_leader_implementation_defined_length, tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+
+ /* One position is defined as unused-must-be-zero.
+ * Don't bother displaying or checking it. */
+ offset += 1;
+
+ /* Process the directory */
+
+ directory_entry_len = 3 + length_of_field_size
+ + starting_character_position_size;
+ directory_entry_count = ((data_offset - 1) - MARC_LEADER_LENGTH) / directory_entry_len;
+
+ marc_directory = (marc_directory_entry *)wmem_alloc0(wmem_packet_scope(),
+ directory_entry_count * sizeof(marc_directory_entry));
+
+ directory_item = proto_tree_add_item(marc_tree, hf_marc_directory,
+ tvb, offset, data_offset - offset, ENC_NA);
+ directory_tree = proto_item_add_subtree(directory_item, ett_marc_directory);
+
+ dir_index = 0;
+ /* Minus one for the terminator character */
+ while (offset < (data_offset - 1)) {
+ guint32 tag_value = 0,
+ length_value = 0,
+ starting_char_value = 0;
+ proto_item *length_item;
+ proto_item *directory_entry_item;
+ proto_tree *directory_entry_tree;
+
+ directory_entry_item = proto_tree_add_item(directory_tree, hf_marc_directory_entry,
+ tvb, offset, directory_entry_len, ENC_NA);
+ directory_entry_tree = proto_item_add_subtree(directory_entry_item, ett_marc_directory_entry);
+
+ marc_value_str = NULL;
+ item = proto_tree_add_item_ret_string(directory_entry_tree, hf_marc_directory_entry_tag,
+ tvb, offset, 3, ENC_ASCII,
+ wmem_packet_scope(), &marc_value_str);
+ offset += 3;
+ if (marc_value_str) {
+ if (isdigit_string(marc_value_str)) {
+ tag_value = (guint)strtoul(marc_value_str, NULL, 10);
+ }
+ else {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_value,
+ "MARC directory tag value %d ('%s') contains invalid characters",
+ dir_index, marc_value_str );
+ }
+ }
+ marc_value_str = NULL;
+ length_item = proto_tree_add_item_ret_string(directory_entry_tree,
+ hf_marc_directory_entry_length,
+ tvb, offset, length_of_field_size, ENC_ASCII,
+ wmem_packet_scope(), &marc_value_str);
+ offset += length_of_field_size;
+ if (marc_value_str) {
+ if (isdigit_string(marc_value_str)) {
+ length_value = (guint)strtoul(marc_value_str, NULL, 10);
+ }
+ else {
+ expert_add_info_format(pinfo, length_item,
+ &ei_marc_invalid_value,
+ "MARC directory length value %d ('%s') contains invalid characters",
+ dir_index, marc_value_str );
+ }
+ }
+ marc_value_str = NULL;
+ item = proto_tree_add_item_ret_string(directory_entry_tree, hf_marc_directory_entry_starting_position,
+ tvb, offset, starting_character_position_size, ENC_ASCII,
+ wmem_packet_scope(), &marc_value_str);
+ offset += starting_character_position_size;
+ if (marc_value_str) {
+ if (isdigit_string(marc_value_str)) {
+ starting_char_value = (guint)strtoul(marc_value_str, NULL, 10);
+ }
+ else {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_value,
+ "MARC directory entry %d starting char value '%s' contains invalid characters",
+ dir_index, marc_value_str );
+ }
+ }
+
+ if (starting_char_value >= (record_length - data_offset)) {
+ expert_add_info_format(pinfo, item,
+ &ei_marc_invalid_value,
+ "MARC directory entry %d starting char value %d is outside record size %d",
+ dir_index, starting_char_value, (record_length - data_offset));
+ }
+ if ((starting_char_value + length_value) >= (record_length - data_offset)) {
+ expert_add_info_format(pinfo, length_item,
+ &ei_marc_invalid_value,
+ "MARC directory entry %d length value %d goes outside record size %d",
+ dir_index, length_value, (record_length - data_offset));
+ }
+ marc_directory[dir_index].tag = tag_value;
+ marc_directory[dir_index].length = length_value;
+ marc_directory[dir_index].starting_character = starting_char_value;
+ dir_index++;
+ }
+ proto_tree_add_item(directory_tree, hf_marc_directory_terminator,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+
+ fields_item = proto_tree_add_item(marc_tree, hf_marc_fields,
+ tvb, offset, record_length - offset, ENC_NA);
+ fields_tree = proto_item_add_subtree(fields_item, ett_marc_fields);
+
+ for (dir_index = 0; dir_index < directory_entry_count; dir_index++) {
+ const gchar *tag_str;
+ proto_item *field_item;
+ proto_tree *field_tree;
+
+ field_item = proto_tree_add_item(fields_tree, hf_marc_field,
+ tvb, offset, marc_directory[dir_index].length, ENC_NA);
+ field_tree = proto_item_add_subtree(field_item, ett_marc_field);
+
+ tag_str = try_val_to_str(marc_directory[dir_index].tag, marc_tag_names);
+ if (tag_str) {
+ proto_item_append_text(field_item," Tag %03d (%s)",
+ marc_directory[dir_index].tag, tag_str);
+ }
+ else {
+ proto_item_append_text(field_item," Tag %03d",
+ marc_directory[dir_index].tag);
+ }
+
+ if (marc_directory[dir_index].tag < 10) {
+ proto_tree_add_item(field_tree, hf_marc_field_control,
+ tvb, offset, marc_directory[dir_index].length - 1, ENC_ASCII|ENC_NA);
+ offset += marc_directory[dir_index].length - 1;
+ proto_tree_add_item(field_tree, hf_marc_field_terminator,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ }
+ else {
+ guint next_offset = offset + marc_directory[dir_index].length - 1;
+ proto_tree_add_item(field_tree, hf_marc_field_indicator1,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(field_tree, hf_marc_field_indicator2,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ do {
+ gint next_subfield;
+ proto_tree_add_item(field_tree, hf_marc_field_subfield_indicator,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ proto_tree_add_item(field_tree, hf_marc_field_subfield_tag,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ next_subfield = tvb_find_guint8(tvb, offset, next_offset - offset,
+ MARC_SUBFIELD_INDICATOR);
+ if (next_subfield >= 0) {
+ proto_tree_add_item(field_tree, hf_marc_field_subfield,
+ tvb, offset, next_subfield - offset, ENC_ASCII|ENC_NA);
+ offset += (next_subfield - offset);
+ }
+ else {
+ proto_tree_add_item(field_tree, hf_marc_field_subfield,
+ tvb, offset, next_offset - offset, ENC_ASCII|ENC_NA);
+ offset = next_offset;
+ }
+ } while (offset < next_offset);
+ proto_tree_add_item(field_tree, hf_marc_field_terminator,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+ }
+
+ }
+ proto_tree_add_item(marc_tree, hf_marc_record_terminator,
+ tvb, offset, 1, ENC_ASCII);
+ offset += 1;
+
+ if (offset != len) {
+ expert_add_info_format(pinfo, record_item,
+ &ei_marc_invalid_record_length,
+ "MARC record component length %d does not match record length %d",
+ offset, len);
+ }
+
+ return len;
+}
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/asn1/z3950/z3950-externals.asn b/epan/dissectors/asn1/z3950/z3950-externals.asn
new file mode 100644
index 0000000000..4ce9683617
--- /dev/null
+++ b/epan/dissectors/asn1/z3950/z3950-externals.asn
@@ -0,0 +1,1679 @@
+RecordSyntax-SUTRS
+{z39-50-recordSyntax sutrs (101)} DEFINITIONS ::=
+BEGIN
+IMPORTS InternationalString FROM Z39-50-APDU-1995;
+ SutrsRecord ::= InternationalString
+-- Line terminator is ASCII LF (X'0A').
+-- Recommended maximum line length is 72 characters.
+END
+
+RecordSyntax-opac
+{z39-50-recordSyntax opac (102)} DEFINITIONS ::=
+BEGIN
+IMPORTS InternationalString FROM Z39-50-APDU-1995;
+
+OPACRecord ::= SEQUENCE {
+ bibliographicRecord [1] IMPLICIT EXTERNAL OPTIONAL,
+ holdingsData [2] IMPLICIT SEQUENCE OF HoldingsRecord OPTIONAL}
+
+HoldingsRecord ::= CHOICE {
+ marcHoldingsRecord [1] IMPLICIT EXTERNAL,
+ holdingsAndCirc [2] IMPLICIT HoldingsAndCircData}
+
+HoldingsAndCircData ::= SEQUENCE {
+ -- the following elements are required to display
+ -- holdings in conformance with NISO standards.
+ typeOfRecord [1] IMPLICIT InternationalString OPTIONAL,-- LDR 06
+ encodingLevel [2] IMPLICIT InternationalString OPTIONAL, -- LDR 017
+ format [3] IMPLICIT InternationalString OPTIONAL, -- 007
+ -- 00-01
+ receiptAcqStatus [4] IMPLICIT InternationalString OPTIONAL, -- 008 06
+ generalRetention [5] IMPLICIT InternationalString OPTIONAL, -- 008 12
+ completeness [6] IMPLICIT InternationalString OPTIONAL, -- 008 16
+ dateOfReport [7] IMPLICIT InternationalString OPTIONAL, -- 008
+ -- 26-31
+ nucCode [8] IMPLICIT InternationalString OPTIONAL, -- 852 $a
+ localLocation [9] IMPLICIT InternationalString OPTIONAL, -- 852 $b
+ shelvingLocation [10] IMPLICIT InternationalString OPTIONAL, -- 852 $c
+ callNumber [11] IMPLICIT InternationalString OPTIONAL, -- 852 $h
+ -- and $i
+ shelvingData [12] IMPLICIT InternationalString OPTIONAL, -- 852 $j
+ -- thru $m
+ copyNumber [13] IMPLICIT InternationalString OPTIONAL, -- 852 $t
+ publicNote [14] IMPLICIT InternationalString OPTIONAL, -- 852 $z
+ reproductionNote [15] IMPLICIT InternationalString OPTIONAL, -- 843
+ termsUseRepro [16] IMPLICIT InternationalString OPTIONAL, -- 845
+ enumAndChron [17] IMPLICIT InternationalString OPTIONAL, -- all 85x,
+ -- 86x
+ volumes [18] IMPLICIT SEQUENCE OF Volume OPTIONAL,
+ -- repeats for each volume held
+ circulationData [19] IMPLICIT SEQUENCE OF CircRecord OPTIONAL
+ -- repeats for each circulating item.
+ }
+
+Volume ::= SEQUENCE {
+ enumeration [1] IMPLICIT InternationalString OPTIONAL,
+ chronology [2] IMPLICIT InternationalString OPTIONAL,
+ enumAndChron [3] IMPLICIT InternationalString OPTIONAL }
+
+CircRecord ::= SEQUENCE {
+ availableNow [1] IMPLICIT BOOLEAN,
+ availablityDate [2] IMPLICIT InternationalString OPTIONAL,
+ availableThru [3] IMPLICIT InternationalString OPTIONAL,
+ restrictions [4] IMPLICIT InternationalString OPTIONAL,
+ itemId [5] IMPLICIT InternationalString OPTIONAL,
+ renewable [6] IMPLICIT BOOLEAN,
+ onHold [7] IMPLICIT BOOLEAN,
+ enumAndChron [8] IMPLICIT InternationalString OPTIONAL,
+ midspine [9] IMPLICIT InternationalString OPTIONAL,
+ temporaryLocation [10] IMPLICIT InternationalString OPTIONAL}
+END
+
+DiagnosticFormatDiag1
+{z39-50-diagnostic diag-1 (2)} DEFINITIONS ::=
+BEGIN
+IMPORTS Term, Specification, AttributeList, SortElement,
+DatabaseName,
+DefaultDiagFormat, InternationalString FROM Z39-50-APDU-1995;
+
+
+DiagnosticFormat ::= SEQUENCE OF SEQUENCE{
+ diagnostic [1] CHOICE{
+ defaultDiagRec [1] IMPLICIT DefaultDiagFormat,
+ explicitDiagnostic [2] DiagFormat} OPTIONAL,
+ message [2] IMPLICIT InternationalString OPTIONAL}
+
+
+DiagFormat ::= CHOICE{
+
+tooMany [1000] IMPLICIT SEQUENCE{
+ tooManyWhat [1] IMPLICIT INTEGER{
+ argumentWords (1),
+ truncatedWords (2),
+ booleanOperators (3),
+ incompleteSubfields (4),
+ characters (5),
+ recordsRetrieved (6),
+ dataBasesSpecified (7),
+ resultSetsCreated (8),
+ indexTermsProcessed (9)},
+ max [2] IMPLICIT INTEGER OPTIONAL},
+
+
+badSpec [1001] IMPLICIT SEQUENCE{
+ -- element set name or specification
+ spec [1] IMPLICIT Specification,
+ -- esn or element spec not supported
+ db [2] IMPLICIT DatabaseName OPTIONAL,
+ -- if db specified, above spec not
+ -- supported for db; otherwise,
+ -- spec not supported period.
+ goodOnes [3] IMPLICIT SEQUENCE OF Specification
+ OPTIONAL
+ -- target supplies ones that are
+ -- supported
+ },
+
+
+dbUnavail [1002] IMPLICIT SEQUENCE{ -- database unavailable
+ db [1] IMPLICIT DatabaseName,
+ why [2] IMPLICIT SEQUENCE{
+ reasonCode [1] IMPLICIT INTEGER{
+ doesNotExist (0),
+ existsButUnavail (1),
+ locked (2),
+ accessDenied (3)}
+ OPTIONAL,
+ message [2] IMPLICIT
+ InternationalString OPTIONAL}},
+
+
+unSupOp [1003] IMPLICIT INTEGER{ -- unsupported operator
+ and (0),
+ or (1),
+ and-not (2),
+ prox (3)},
+
+
+attribute [1004] IMPLICIT SEQUENCE{
+ -- Applies for unsupported attribute set,
+ -- attribute type, attribute value, or term (for
+ -- a given attribute type or value).
+ id [1] IMPLICIT OBJECT IDENTIFIER,
+ -- if only "id" occurs, then
+ -- attribute set is not supported
+ type [2] IMPLICIT INTEGER OPTIONAL,
+ -- must occur if value occurs.
+ value [3] IMPLICIT INTEGER OPTIONAL,
+ -- if omitted, and Type occurs,
+ -- then Type is what is unsupported
+ term [4] Term OPTIONAL
+ -- If occurs, term is illegal or
+ -- not supported, for attribute
+ -- value, if value occurs;
+ -- otherwise, for type.
+ },
+
+
+attCombo [1005] IMPLICIT SEQUENCE{
+ -- attribute combination not supported
+ unsupportedCombination [1] IMPLICIT AttributeList,
+ recommendedAlternatives [2] IMPLICIT SEQUENCE OF
+ AttributeList OPTIONAL},
+
+
+term [1006] IMPLICIT SEQUENCE{
+ problem [1] IMPLICIT INTEGER{
+ codedValue (1),
+ unparsable (2),
+ tooShort (3),
+ type (4)} OPTIONAL,
+ term [2] Term},
+
+
+proximity [1007] CHOICE{ -- proximity diagnostics:
+ resultSets [1] IMPLICIT NULL,
+ -- proximity between sets not
+ -- supported
+ badSet [2] IMPLICIT InternationalString,
+ -- bad result set specified
+ relation [3] IMPLICIT INTEGER,
+ -- 1 to 6 ; relation not supported
+ unit [4] IMPLICIT INTEGER,
+ -- unsupported unit code
+ distance [5] IMPLICIT INTEGER,
+ -- unsupported distance
+ attributes [6] AttributeList,
+ -- proximity not supported with
+ -- specified attribute combination
+ ordered [7] IMPLICIT NULL,
+ -- ordered flag not supported
+ exclusion [8] IMPLICIT NULL
+ -- exclusion flag not supported
+ },
+
+
+scan [1008] CHOICE{ -- scan diagnostics:
+ nonZeroStepSize [0] IMPLICIT NULL,
+ -- only zero step size
+ -- supported
+ specifiedStepSize [1] IMPLICIT NULL,
+ -- specified step size not
+ -- supported
+ termList1 [3] IMPLICIT NULL,
+ -- term list not supported
+ -- (no alternative supplied)
+ termList2 [4] IMPLICIT SEQUENCE OF
+ AttributeList,
+ -- term list not supported
+ -- (alternatives supplied)
+ posInResponse [5] IMPLICIT INTEGER{
+ -- value of positionIn-
+ -- Response not supported
+ mustBeOne (1),
+ mustBePositive (2),
+ mustBeNonNegative (3),
+ other (4)},
+ resources [6] IMPLICIT NULL,
+ -- resources exhausted
+ -- looking for satisfying
+ -- terms
+ endOfList [7] IMPLICIT NULL
+ -- beginning or end of term
+ -- list
+ },
+
+
+sort [1009] CHOICE{
+ sequence [0] IMPLICIT NULL,
+ -- cannot sort according
+ -- to sequence
+ noRsName [1] IMPLICIT NULL,
+ -- no result set name
+ -- supplied
+ tooMany [2] IMPLICIT INTEGER,
+ -- Too many input result
+ -- sets, maximum supplied.
+ incompatible [3] IMPLICIT NULL,
+ -- records with different
+ -- formats not compatible for
+ -- sorting
+ generic [4] IMPLICIT NULL,
+ -- generic sort not supported
+ -- (db specific only)
+ dbSpecific [5] IMPLICIT NULL,
+ -- db specific sort not
+ -- supported
+ sortElement [6] SortElement,
+ key [7] IMPLICIT INTEGER{
+ tooMany (1),
+ -- too many sort keys
+ duplicate (2)},
+ -- duplicate sort keys
+ action [8] IMPLICIT NULL,
+ -- unuspported missing data
+ -- action
+ illegal [9] IMPLICIT INTEGER{
+ relation (1),
+ -- illegal sort relation
+ case (2),
+ -- illegal case value
+ action (3),
+ -- illegal missing data
+ -- action
+ sort (4)},
+ -- illegal sort
+ inputTooLarge [10] IMPLICIT SEQUENCE OF
+ InternationalString,
+ -- one or more of the
+ -- input result sets too
+ -- large to sort
+ aggregateTooLarge [11] IMPLICIT NULL
+ -- aggregate result set
+ -- too large
+ },
+segmentation [1010] CHOICE{
+ segmentCount [0] IMPLICIT NULL,
+ -- Cannot guarantee record will fit
+ -- within max segments. Target
+ -- suggests that origin try again
+ -- to retrieve record, without
+ -- including max-segment-count.
+ segmentSize [1] IMPLICIT INTEGER
+ -- record cannot be segmented into
+ -- fragments such that the largest
+ -- will fit within max segment
+ -- size specified. Target supplies (in
+ -- bytes) the smallest acceptable value.
+ -- of Max-segment-size to retrieve
+ -- the record.
+ },
+
+extServices [1011] CHOICE{
+ req [1] IMPLICIT INTEGER{ -- bad request
+ nameInUse (1),
+ -- package name already in use
+ noSuchName (2),
+ -- no such package, on
+ -- modify/delete
+ quota (3),
+ -- quota exceeded
+ type (4)},
+ -- extended service type not
+ -- supported
+ permission [2] IMPLICIT INTEGER{
+ -- permission denied on ES, because:
+ id (1),
+ -- id not authorized, or
+ modifyDelete (2)},
+ -- cannot modify or delete
+ immediate [3] IMPLICIT INTEGER{
+ -- immediate execution:
+ failed (1),
+ service (2),
+ -- not supported for this service,
+ parameters (3)
+ -- not supported for these
+ -- parameters.
+ }},
+
+
+accessCtrl [1012] CHOICE{
+ noUser [1] IMPLICIT NULL,
+ -- no user to display challenge to
+ refused [2] IMPLICIT NULL,
+ -- access control information
+ -- refused by user
+ simple [3] IMPLICIT NULL,
+ -- only simple form supported
+ -- (target used externally defined)
+ oid [4] IMPLICIT SEQUENCE OF OBJECT
+ IDENTIFIER,
+ -- oid not supported (origin
+ -- supplies alternative suggested
+ -- oids)
+ alternative [5] IMPLICIT SEQUENCE OF OBJECT
+ IDENTIFIER,
+ -- origin insists that target use
+ -- an alternative challenge for
+ -- this data (e.g. stronger
+ -- authentication or stronger
+ -- Access control). The origin
+ -- supplies suggested alternative
+ -- oids.
+ pwdInv [6] IMPLICIT NULL,
+ -- password invalid
+ pwdExp [7] IMPLICIT NULL
+ -- password expired
+ },
+
+
+recordSyntax [1013] IMPLICIT SEQUENCE{
+ -- record cannot be transferred in requested syntax
+ unsupportedSyntax [1] IMPLICIT OBJECT
+ IDENTIFIER,
+ suggestedAlternatives [2] IMPLICIT SEQUENCE OF
+ OBJECT IDENTIFIER
+ OPTIONAL}
+}
+END
+
+RecordSyntax-explain
+{z39-50-recordSyntax explain (100)} DEFINITIONS ::=
+
+BEGIN
+IMPORTS AttributeSetId, Term, OtherInformation, DatabaseName, ElementSetName,
+IntUnit, Unit, StringOrNumeric, Specification,
+InternationalString,
+AttributeList, AttributeElement
+FROM Z39-50-APDU-1995;
+
+Explain-Record ::= CHOICE{
+ -- Each of these may be used as search term
+ -- when Use attribute is 'explain-category'.
+ targetInfo [0] IMPLICIT TargetInfo,
+ databaseInfo [1] IMPLICIT DatabaseInfo,
+ schemaInfo [2] IMPLICIT SchemaInfo,
+ tagSetInfo [3] IMPLICIT TagSetInfo,
+ recordSyntaxInfo [4] IMPLICIT RecordSyntaxInfo,
+ attributeSetInfo [5] IMPLICIT AttributeSetInfo,
+ termListInfo [6] IMPLICIT TermListInfo,
+ extendedServicesInfo [7] IMPLICIT ExtendedServicesInfo,
+ attributeDetails [8] IMPLICIT AttributeDetails,
+ termListDetails [9] IMPLICIT TermListDetails,
+ elementSetDetails [10] IMPLICIT ElementSetDetails,
+ retrievalRecordDetails [11] IMPLICIT RetrievalRecordDetails,
+ sortDetails [12] IMPLICIT SortDetails,
+ processing [13] IMPLICIT ProcessingInformation,
+ variants [14] IMPLICIT VariantSetInfo,
+ units [15] IMPLICIT UnitInfo,
+ categoryList [100] IMPLICIT CategoryList}
+
+-- Element set name 'B' (brief) retrieves:
+-- - 'commonInfo' (except for otherInfo within commonInfo)
+-- - key elements
+-- - other elements designated as 'non-key brief elements'
+-- Esn 'description' retrieves brief elements as well as 'description', and
+-- specific additional descriptive elements if designated.
+-- Element set name 'F' (full) retrieves all of the above, as well as those
+-- designated as "non-brief elements". Some elements designated as OPTIONAL
+-- may be madatory in full records, and are so identified. (Note that all
+-- elements that are not part of the brief element set must be designated as
+-- OPTIONAL in the ASN.1, otherwise it would be illegal to omit them).
+-- Other esns are defined (below) as needed.
+
+
+-- - - - - - - - - - - - - Info Records
+ -- Info records are mainly for software consumption
+ -- They describe individual entities within the target system:
+ -- The target itself
+ -- Individual databases
+ -- Schemas
+ -- Tag sets
+ -- Record syntaxes
+ -- Attribute sets
+ -- Term lists
+ -- Extended services
+ -- The information about each Schema, Tag Set, Record Syntax and Attribute
+ -- Set should match the universal definitions of these items. The only
+ -- exception is that a target may omit any- items it doesn't support, for
+ -- example the description of the BIB-1 attribute set may omit attributes
+ -- that the target does not support under any circumstances.
+ -- Databases that may be searched together can be listed in the
+ -- dbCominations element of the TargetInfo record.
+
+
+
+TargetInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ name [1] IMPLICIT InternationalString,
+ -- Non-key brief elements follow:
+ recent-news [2] IMPLICIT HumanString OPTIONAL,
+ icon [3] IMPLICIT IconObject OPTIONAL,
+ namedResultSets [4] IMPLICIT BOOLEAN,
+ multipleDBsearch [5] IMPLICIT BOOLEAN,
+ maxResultSets [6] IMPLICIT INTEGER OPTIONAL,
+ maxResultSize [7] IMPLICIT INTEGER OPTIONAL,
+ maxTerms [8] IMPLICIT INTEGER OPTIONAL,
+ timeoutInterval [9] IMPLICIT IntUnit OPTIONAL,
+ welcomeMessage [10] IMPLICIT HumanString OPTIONAL,
+ -- non-brief elements follow:
+ -- 'description' esn retrieves the following two (as well as brief):
+ contactInfo [11] IMPLICIT ContactInfo OPTIONAL,
+ description [12] IMPLICIT HumanString OPTIONAL,
+ nicknames [13] IMPLICIT SEQUENCE OF InternationalString
+ OPTIONAL,
+ usage-restrictions [14] IMPLICIT HumanString OPTIONAL,
+ paymentAddr [15] IMPLICIT HumanString OPTIONAL,
+ hours [16] IMPLICIT HumanString OPTIONAL,
+ dbCombinations [17] IMPLICIT SEQUENCE OF DatabaseList OPTIONAL,
+ addresses [18] IMPLICIT SEQUENCE OF NetworkAddress OPTIONAL,
+ languages [101] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
+ -- Languages supported for message strings. Each is a three-character
+ -- language code from Z39.53-1994.
+-- characterSets [102] this tag reserved for "character sets supported for name and message strings".
+
+ -- commonAccessInfo elements list objects the target supports. All objects
+ -- listed in AccessInfo for any individual database should also be listed
+ -- here.
+ commonAccessInfo [19] IMPLICIT AccessInfo OPTIONAL}
+--
+
+
+DatabaseInfo ::= SEQUENCE {
+ -- A target may provide "virtual databases" that are combinations of
+ -- individual database. These databases are indicated by the
+ -- presence of subDbs in the combination database's
+ -- DatabaseDescription.
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ name [1] IMPLICIT DatabaseName,
+ -- Non-key brief elements follow:
+ explainDatabase [2] IMPLICIT NULL OPTIONAL,
+ -- If present, this database is the Explain
+ -- database, or an Explain database
+ -- for a different server,
+ -- possibly on a different host. The means
+ -- by which that server may be accessed is
+ -- not addressed by this standard. One
+ -- suggested possibility is an implementor
+ -- agreement whereby the database name is a
+ -- url which may be used to connect to the
+ -- server.
+ nicknames [3] IMPLICIT SEQUENCE OF DatabaseName OPTIONAL,
+ icon [4] IMPLICIT IconObject OPTIONAL,
+ user-fee [5] IMPLICIT BOOLEAN,
+ available [6] IMPLICIT BOOLEAN,
+ titleString [7] IMPLICIT HumanString OPTIONAL,
+ -- Non-brief elements follow:
+ keywords [8] IMPLICIT SEQUENCE OF HumanString OPTIONAL,
+ description [9] IMPLICIT HumanString OPTIONAL,
+ associatedDbs [10] IMPLICIT DatabaseList OPTIONAL,
+ -- databases that may be searched in
+ -- combination with this one
+ subDbs [11] IMPLICIT DatabaseList OPTIONAL,
+ -- When present, this database is a
+ -- composite representing the combined
+ -- databases 'subDbs'. The individual subDbs
+ -- are also available.
+ disclaimers [12] IMPLICIT HumanString OPTIONAL,
+ news [13] IMPLICIT HumanString OPTIONAL,
+ recordCount [14] CHOICE {
+ actualNumber [0] IMPLICIT INTEGER,
+ approxNumber [1] IMPLICIT INTEGER}
+ OPTIONAL,
+ defaultOrder [15] IMPLICIT HumanString OPTIONAL,
+ avRecordSize [16] IMPLICIT INTEGER OPTIONAL,
+ maxRecordSize [17] IMPLICIT INTEGER OPTIONAL,
+ hours [18] IMPLICIT HumanString OPTIONAL,
+ bestTime [19] IMPLICIT HumanString OPTIONAL,
+ lastUpdate [20] IMPLICIT GeneralizedTime OPTIONAL,
+ updateInterval [21] IMPLICIT IntUnit OPTIONAL,
+ coverage [22] IMPLICIT HumanString OPTIONAL,
+ proprietary [23] IMPLICIT BOOLEAN OPTIONAL,
+ -- mandatory in full record
+ copyrightText [24] IMPLICIT HumanString OPTIONAL,
+ copyrightNotice [25] IMPLICIT HumanString OPTIONAL,
+ producerContactInfo [26] IMPLICIT ContactInfo OPTIONAL,
+ supplierContactInfo [27] IMPLICIT ContactInfo OPTIONAL,
+ submissionContactInfo [28] IMPLICIT ContactInfo OPTIONAL,
+ -- accessInfo lists items connected with the database. All listed items
+ -- should be in the target's AccessInfo.
+ accessInfo [29] IMPLICIT AccessInfo OPTIONAL}
+
+
+
+SchemaInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ schema [1] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-key brief elements follow:
+ name [2] IMPLICIT InternationalString,
+ -- Non-brief elements follow:
+ description [3] IMPLICIT HumanString OPTIONAL,
+ tagTypeMapping [4] IMPLICIT SEQUENCE OF SEQUENCE {
+ tagType [0] IMPLICIT INTEGER,
+ tagSet [1] IMPLICIT OBJECT IDENTIFIER
+ OPTIONAL,
+ -- If tagSet is omitted, then
+ -- this tagType is for a tagSet
+ -- locally defined within the
+ -- schema that cannot be
+ -- referenced by another schema.
+ defaultTagType [2] IMPLICIT NULL OPTIONAL} OPTIONAL,
+ recordStructure [5] IMPLICIT SEQUENCE OF ElementInfo OPTIONAL}
+
+
+
+ -- ElementInfo referenced in SchemaInfo and RecordSyntaxInfo
+ ElementInfo ::= SEQUENCE {
+ elementName [1] IMPLICIT InternationalString,
+ elementTagPath [2] IMPLICIT Path,
+ dataType [3] ElementDataType OPTIONAL,
+ -- If omitted, not specified.
+ required [4] IMPLICIT BOOLEAN,
+ repeatable [5] IMPLICIT BOOLEAN,
+ description [6] IMPLICIT HumanString OPTIONAL}
+
+ -- Path is referenced by ElementInfo as well as PerElementDetails
+ Path ::= SEQUENCE OF SEQUENCE{
+ tagType [1] IMPLICIT INTEGER,
+ tagValue [2] StringOrNumeric}
+
+ ElementDataType ::= CHOICE{
+ primitive [0] IMPLICIT PrimitiveDataType,
+ structured [1] IMPLICIT SEQUENCE OF ElementInfo}
+ PrimitiveDataType ::= INTEGER{
+ octetString (0),
+ numeric (1),
+ date (2),
+ external (3),
+ string (4),
+ trueOrFalse (5),
+ oid (6),
+ intUnit (7),
+ empty (8),
+ noneOfTheAbove (100) -- see 'description'
+ }
+
+
+TagSetInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ tagSet [1] IMPLICIT OBJECT IDENTIFIER,
+ -- non-key brief elements follow:
+ name [2] IMPLICIT InternationalString,
+ -- non-brief elements follow:
+ description [3] IMPLICIT HumanString OPTIONAL,
+ elements [4] IMPLICIT SEQUENCE OF SEQUENCE {
+ elementname [1] IMPLICIT InternationalString,
+ nicknames [2] IMPLICIT SEQUENCE OF
+ InternationalString OPTIONAL,
+ elementTag [3] StringOrNumeric,
+ description [4] IMPLICIT HumanString OPTIONAL,
+ dataType [5] PrimitiveDataType OPTIONAL,
+ -- If the data type is expected
+ -- to be structured, that is
+ -- described in the schema info,
+ -- and datatypeis omitted here.
+ otherTagInfo OtherInformation OPTIONAL} OPTIONAL}
+
+
+
+RecordSyntaxInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ recordSyntax [1] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-key brief elements follow:
+ name [2] IMPLICIT InternationalString,
+ -- non-brief elements follow:
+ transferSyntaxes [3] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ description [4] IMPLICIT HumanString OPTIONAL,
+ asn1Module [5] IMPLICIT InternationalString OPTIONAL,
+ abstractStructure [6] IMPLICIT SEQUENCE OF ElementInfo OPTIONAL
+ -- Omitting abstractStructure only means target
+ -- isn't using Explain to describe the structure,
+ -- not that there is no structure.
+ }
+
+
+
+AttributeSetInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ attributeSet [1] IMPLICIT AttributeSetId,
+ -- non-key brief elements follow:
+ name [2] IMPLICIT InternationalString,
+ -- non-brief elements follow:
+ attributes [3] IMPLICIT SEQUENCE OF AttributeType OPTIONAL,
+ -- mandatory in full record
+ description [4] IMPLICIT HumanString OPTIONAL}
+
+
+
+-- AttributeType referenced in AttributeSetInfo
+ AttributeType ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ attributeType [2] IMPLICIT INTEGER,
+ attributeValues [3] IMPLICIT SEQUENCE OF AttributeDescription}
+
+ AttributeDescription ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ attributeValue [2] StringOrNumeric,
+ equivalentAttributes [3] IMPLICIT SEQUENCE OF StringOrNumeric
+ OPTIONAL
+ -- each is an occurence of
+ -- 'attributeValue' from
+ --AttributeDescription for a
+ -- different attribute. Equivalences
+ -- listed here should be derived from the
+ -- attribute set definition, not from a
+ -- particular server's behavior.
+ }
+
+
+TermListInfo ::= SEQUENCE{
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ databaseName [1] IMPLICIT DatabaseName,
+ -- Non-key brief elements follow:
+ termLists [2] IMPLICIT SEQUENCE OF SEQUENCE{
+ name [1] IMPLICIT InternationalString,
+ title [2] IMPLICIT HumanString OPTIONAL,
+ -- Title is for users to see
+ -- and can differ by language.
+ -- Name, on the other hand, is
+ -- typically a short string
+ -- not necessarily meant to be
+ -- human-readable, and not
+ -- variable by language.
+ searchCost [3] IMPLICIT INTEGER {
+ optimized (0),
+ -- The attribute (or combination)
+ -- associated with this list will
+ -- do fast searches.
+ normal (1),
+ -- The attribute (combination) will
+ -- work expected. So there's
+ -- probably an index for the
+ -- attribute (combination) or some
+ -- similar mechanism.
+ expensive (2),
+ -- Can use the attribute
+ -- (combination), but it might not
+ -- provide satisfactory results.
+ -- Probably there is no index, or
+ -- post-processing of records is
+ -- required.
+ filter (3)
+ -- can't search with this
+ -- attribute (combination) alone.
+ } OPTIONAL,
+ scanable [4] IMPLICIT BOOLEAN,
+ -- 'true' means this list can be
+ -- scanned.
+ broader [5] IMPLICIT SEQUENCE OF InternationalString
+ OPTIONAL,
+ narrower [6] IMPLICIT SEQUENCE OF InternationalString
+ OPTIONAL
+ -- broader and narrower list
+ -- alternative term lists related to
+ -- this one. The term lists so listed
+ -- should also be in this termLists
+ -- structure.
+ }
+ -- no non-brief elements
+ }
+
+
+
+
+ExtendedServicesInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ type [1] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-key brief elements follow:
+ name [2] IMPLICIT InternationalString OPTIONAL,
+ -- should be supplied if privateType is 'true'
+ privateType [3] IMPLICIT BOOLEAN,
+ restrictionsApply [5] IMPLICIT BOOLEAN, -- if 'true' see 'description'
+ feeApply [6] IMPLICIT BOOLEAN, -- if 'true' see 'description'
+ available [7] IMPLICIT BOOLEAN,
+ retentionSupported [8] IMPLICIT BOOLEAN,
+ waitAction [9] IMPLICIT INTEGER{
+ waitSupported (1),
+ waitAlways (2),
+ waitNotSupported (3),
+ depends (4),
+ notSaying (5)},
+ -- non-brief elements follow:
+ -- To get brief plus 'description' use esn 'description'
+ description [10] IMPLICIT HumanString OPTIONAL,
+ -- to get above elements and 'specificExplain' use esn
+ --'specificExplain'
+ specificExplain [11] IMPLICIT EXTERNAL OPTIONAL,
+ -- Use oid of specific ES, and select choice
+ -- [3] 'explain'. Format to be developed in
+ -- conjunction with the specific ES definition.
+ -- to get all elements except 'specificExplain', use esn 'asn'
+ esASN [12] IMPLICIT InternationalString OPTIONAL
+ -- the ASN.1 for this ES
+ }
+
+-- - - - - - - - - - - - - Detail records
+ -- The detail records describe relationships among entities supported by the
+ -- target. RetrievalRecordDetails describes the way that schema elements are
+ -- mapped into record elements. This mapping may be different for each
+ -- combination of database, schema, record syntax. The per-element details
+ -- describe the default mapping. Origin-request re-tagging can change that
+ -- mapping. When multiple databases are listed in a databaseNames element,
+ -- the record applies equally to all of the listed databases. This is
+ -- unrelated to searching the databases together. AttributeDetails describes
+ -- how databases can be searched. Each supported attribute is listed, and
+ -- the allowable combinations can be described.
+
+AttributeDetails ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ databaseName [1] IMPLICIT DatabaseName,
+ -- Non-brief elements follow:
+ attributesBySet [2] IMPLICIT SEQUENCE OF AttributeSetDetails
+ OPTIONAL,
+ -- mandatory in full record
+ attributeCombinations [3] IMPLICIT AttributeCombinations OPTIONAL}
+
+
+-- AttributeSetDetails referenced by AttributeDetails
+ AttributeSetDetails ::= SEQUENCE {
+ attributeSet [0] IMPLICIT AttributeSetId,
+ attributesByType [1] IMPLICIT SEQUENCE OF AttributeTypeDetails}
+
+
+ AttributeTypeDetails ::= SEQUENCE {
+ attributeType [0] IMPLICIT INTEGER,
+ defaultIfOmitted [1] IMPLICIT OmittedAttributeInterpretation OPTIONAL,
+ attributeValues [2] IMPLICIT SEQUENCE OF AttributeValue OPTIONAL }
+ -- If no attributeValues are supplied, all
+ -- values of this type are fully supported, and
+ -- the descriptions in AttributeSetInfo are
+ -- adequate.
+
+
+ OmittedAttributeInterpretation ::=
+SEQUENCE {
+ defaultValue [0] StringOrNumeric OPTIONAL,
+ -- A default value is listed if that's how
+ -- the server works
+ defaultDescription [1] IMPLICIT HumanString OPTIONAL }
+ -- The human-readable description should
+ -- generally be provided. It is legal for
+ -- both default elements to be missing,
+ -- which means that the target will allow
+ -- the attribute type to be omitted, but
+ -- isn't saying what it will do.
+
+AttributeValue ::= SEQUENCE {
+ value [0] StringOrNumeric,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ subAttributes [2] IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL,
+ superAttributes [3] IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL,
+ partialSupport [4] IMPLICIT NULL OPTIONAL
+ -- partialSupport indicates that an attributeValue is
+ -- accepted, but may not be processed in the
+ -- "expected" way. One important reason for this is
+ -- composite databases: in this case partialSupport
+ -- may indicate that only some of the subDbs support
+ -- the attribute, and others ignore it.
+ }
+
+
+TermListDetails ::= SEQUENCE{ -- one for each termList in TermListInfo
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ termListName [1] IMPLICIT InternationalString,
+ -- Non-key elements (all non-brief) follow:
+ description [2] IMPLICIT HumanString OPTIONAL,
+ attributes [3] IMPLICIT AttributeCombinations OPTIONAL,
+ -- Pattern for attributes that hit this list.
+ -- Mandatory in full record
+ scanInfo [4] IMPLICIT SEQUENCE {
+ maxStepSize [0] IMPLICIT INTEGER OPTIONAL,
+ collatingSequence [1] IMPLICIT HumanString OPTIONAL,
+ increasing [2] IMPLICIT BOOLEAN OPTIONAL}
+ OPTIONAL,
+ -- Occurs only if list is scanable.
+ -- If list is scanable and if scanInfo is omitted,
+ -- target doesn't consider these important.
+ estNumberTerms [5] IMPLICIT INTEGER OPTIONAL,
+ sampleTerms [6] IMPLICIT SEQUENCE OF Term OPTIONAL}
+
+
+
+ElementSetDetails ::= SEQUENCE {
+ -- ElementSetDetails describes the way that database records are mapped to
+ -- record elements. This mapping may be different for each combination of
+ -- database name and element set. The database record description is a
+ -- schema, which may be private to the target. The schema's abstract
+ -- record structure and tag sets provide the vocabulary for discussing
+ -- record content; their presence in the Explain database does not imply
+ -- support for complex retrieval specification.
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ databaseName [1] IMPLICIT DatabaseName,
+ elementSetName [2] IMPLICIT ElementSetName,
+ recordSyntax [3] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-key Brief elements follow:
+ schema [4] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-brief elements follow:
+ description [5] IMPLICIT HumanString OPTIONAL,
+ detailsPerElement [6] IMPLICIT SEQUENCE OF PerElementDetails OPTIONAL
+ -- mandatory in full record
+ }
+
+
+
+RetrievalRecordDetails ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ databaseName [1] IMPLICIT DatabaseName,
+ schema [2] IMPLICIT OBJECT IDENTIFIER,
+ recordSyntax [3] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-brief elements follow:
+ description [4] IMPLICIT HumanString OPTIONAL,
+ detailsPerElement [5] IMPLICIT SEQUENCE OF PerElementDetails OPTIONAL
+ -- mandatory in full record
+ }
+
+
+
+-- PerElementDetails is referenced in RetreivalRecordDetails and
+-- ElementSetDetails.
+ PerElementDetails ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ -- If the name is omitted, the record
+ -- syntax's name for this element is
+ -- appropriate.
+ recordTag [1] IMPLICIT RecordTag OPTIONAL,
+ -- The record tag may be omitted if tags are
+ -- inappropriate for the syntax, or if the
+ -- origin can be expected to know it for
+ -- some other reason.
+ schemaTags [2] IMPLICIT SEQUENCE OF Path OPTIONAL,
+ -- The information from the listed schema
+ -- elements is in some way to produce the
+ -- data sent in the listed record tag. The
+ -- 'contents' element below may describe the
+ -- the logic used.
+ maxSize [3] IMPLICIT INTEGER OPTIONAL,
+ minSize [4] IMPLICIT INTEGER OPTIONAL,
+ avgSize [5] IMPLICIT INTEGER OPTIONAL,
+ fixedSize [6] IMPLICIT INTEGER OPTIONAL,
+ repeatable [8] IMPLICIT BOOLEAN,
+ required [9] IMPLICIT BOOLEAN,
+ -- 'required' really means that target will
+ -- always supply the element.
+ description [12] IMPLICIT HumanString OPTIONAL,
+ contents [13] IMPLICIT HumanString OPTIONAL,
+ billingInfo [14] IMPLICIT HumanString OPTIONAL,
+ restrictions [15] IMPLICIT HumanString OPTIONAL,
+ alternateNames [16] IMPLICIT SEQUENCE OF InternationalString
+ OPTIONAL,
+ genericNames [17] IMPLICIT SEQUENCE OF InternationalString
+ OPTIONAL,
+ searchAccess [18] IMPLICIT AttributeCombinations OPTIONAL}
+
+ -- RecordTag referenced in PerElementDetails above
+ RecordTag ::= SEQUENCE {
+ qualifier [0] StringOrNumeric OPTIONAL,
+ -- E.g. tag set for GRS-1
+ tagValue [1] StringOrNumeric}
+
+
+
+
+SortDetails ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ databaseName [1] IMPLICIT DatabaseName,
+ -- No non-key brief elements
+ -- Non-brief elements follow:
+ sortKeys [2] IMPLICIT SEQUENCE OF SortKeyDetails OPTIONAL
+ -- mandatory in full record
+ }
+
+ SortKeyDetails ::= SEQUENCE {
+ description [0] IMPLICIT HumanString OPTIONAL,
+ elementSpecifications [1] IMPLICIT SEQUENCE OF Specification
+ OPTIONAL,
+ -- each specification is a way of
+ -- specifying this same sort key
+ attributeSpecifications [2] IMPLICIT AttributeCombinations OPTIONAL,
+ -- each combination is a way of
+ -- specifying this same sort key
+ sortType [3] CHOICE {
+ character [0] IMPLICIT NULL,
+ numeric [1] IMPLICIT NULL,
+ structured [2] IMPLICIT
+ HumanString} OPTIONAL,
+ caseSensitivity [4] IMPLICIT INTEGER {
+ always (0),
+ -- always case-sensitive
+ never (1),
+ -- never case-sensitive
+ default-yes (2),
+ -- case-sensitivity is as specified
+ -- on request, and if not
+ -- specified, case-sensitive.
+ default-no (3)
+ -- case-sensitivity is as specified
+ -- on request, and if not
+ -- specified, not case-sensitive.
+ }
+ OPTIONAL}
+
+
+
+ProcessingInformation ::= SEQUENCE{
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ databaseName [1] IMPLICIT DatabaseName,
+ processingContext [2] IMPLICIT INTEGER {
+ access (0),
+ -- e.g. choosing databases
+ search (1),
+ -- e.g. "search strategies" or search forms
+ retrieval (2),
+ -- e.g. recommended element combinations
+ record-presentation (3),
+ -- display of retrieved records
+ record-handling (4)
+ -- handling (e.g. saving) of retrieved
+ -- records
+ },
+ name [3] IMPLICIT InternationalString,
+ oid [4] IMPLICIT OBJECT IDENTIFIER,
+ -- So origin can retreive brief record and
+ -- determine if it can handle 'instructions' when
+ -- retrieving the full record.
+ -- No non-key brief elements
+ -- Non-brief elements follow:
+ description [5] IMPLICIT HumanString OPTIONAL,
+ -- use element set name 'description'
+ -- to retrieve all except instructions.
+ instructions [6] IMPLICIT EXTERNAL OPTIONAL -- mandatory in full record
+ }
+
+
+
+
+VariantSetInfo ::= SEQUENCE {
+ -- A record in this category describes a variant set definition, i.e.,
+ -- classes, types, and values, for a specific variant set definition
+ -- supported by the target. Support by the target of a particular
+ -- variant set definition does not imply that the definition is
+ -- supported for any specific database or element.
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ variantSet [1] IMPLICIT OBJECT IDENTIFIER,
+ -- Non-key brief elements follow:
+ name [2] IMPLICIT InternationalString,
+ -- Non-brief elements follow:
+ variants [3] IMPLICIT SEQUENCE OF VariantClass OPTIONAL
+ -- mandatory in full record
+ }
+
+ -- Subsidiary structures for VariantSetInfo
+ VariantClass ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ variantClass [2] IMPLICIT INTEGER,
+ variantTypes [3] IMPLICIT SEQUENCE OF VariantType}
+
+ VariantType ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ variantType [2] IMPLICIT INTEGER,
+ variantValue [3] IMPLICIT VariantValue OPTIONAL}
+
+ VariantValue ::= SEQUENCE {
+ dataType [0] PrimitiveDataType,
+ values [1] ValueSet OPTIONAL }
+
+ ValueSet ::= CHOICE {
+ range [0] IMPLICIT ValueRange,
+ enumerated [1] IMPLICIT SEQUENCE OF ValueDescription }
+
+ ValueRange ::= SEQUENCE {
+ -- At last one the following must be supplied, both
+ -- may be supplied.
+ lower [0] ValueDescription OPTIONAL,
+ upper [1] ValueDescription OPTIONAL }
+
+ ValueDescription ::= CHOICE{
+ integer INTEGER,
+ string InternationalString,
+ octets OCTET STRING,
+ oid OBJECT IDENTIFIER,
+ unit [1] IMPLICIT Unit,
+ valueAndUnit [2] IMPLICIT IntUnit
+ -- oid and unit can't be used in a ValueRange
+ }
+
+
+
+UnitInfo ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Key elements follow:
+ unitSystem [1] IMPLICIT InternationalString,
+ -- No non-key brief elements
+ -- Non-brief elements follow:
+ description [2] IMPLICIT HumanString OPTIONAL,
+ units [3] IMPLICIT SEQUENCE OF UnitType OPTIONAL }
+ -- mandatory in full record
+
+ -- Subsidiary structures for UnitInfo
+ UnitType ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ unitType [2] StringOrNumeric,
+ units [3] IMPLICIT SEQUENCE OF Units}
+
+ Units ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ unit [2] StringOrNumeric}
+
+
+
+CategoryList ::= SEQUENCE {
+ commonInfo [0] IMPLICIT CommonInfo OPTIONAL,
+ -- Only one record expected per Explain database. All elements
+ -- appear in brief presentation.
+ categories [1] IMPLICIT SEQUENCE OF CategoryInfo }
+
+ CategoryInfo ::= SEQUENCE {
+ category [1] IMPLICIT InternationalString,
+ originalCategory [2] IMPLICIT InternationalString OPTIONAL,
+ description [3] IMPLICIT HumanString OPTIONAL,
+ asn1Module [4] IMPLICIT InternationalString OPTIONAL}
+
+
+
+
+-- - - - - - - - - - - - - - Subsidiary definitions
+
+CommonInfo ::= SEQUENCE {
+ dateAdded [0] IMPLICIT GeneralizedTime OPTIONAL,
+ dateChanged [1] IMPLICIT GeneralizedTime OPTIONAL,
+ expiry [2] IMPLICIT GeneralizedTime OPTIONAL,
+ humanString-Language [3] IMPLICIT LanguageCode OPTIONAL,
+ -- following not to occur for brief:
+ otherInfo OtherInformation OPTIONAL}
+
+HumanString ::= SEQUENCE OF SEQUENCE {
+ language [0] IMPLICIT LanguageCode OPTIONAL,
+ text [1] IMPLICIT InternationalString}
+
+IconObject ::= SEQUENCE OF SEQUENCE{
+ -- Note that the "SEQUENCE OF" is to allow alternative
+ -- representations of the same Icon; it is not intended to allow
+ -- multiple icons.
+ bodyType [1] CHOICE{
+ ianaType [1] IMPLICIT InternationalString,
+ z3950type [2] IMPLICIT InternationalString,
+ otherType [3] IMPLICIT InternationalString},
+ content [2] IMPLICIT OCTET STRING}
+
+
+LanguageCode ::=InternationalString
+ -- from ANSI/NISO Z39.53-1994
+
+ContactInfo ::= SEQUENCE {
+ name [0] IMPLICIT InternationalString OPTIONAL,
+ description [1] IMPLICIT HumanString OPTIONAL,
+ address [2] IMPLICIT HumanString OPTIONAL,
+ email [3] IMPLICIT InternationalString OPTIONAL,
+ phone [4] IMPLICIT InternationalString OPTIONAL}
+
+NetworkAddress ::= CHOICE {
+ internetAddress [0] IMPLICIT SEQUENCE {
+ hostAddress [0] IMPLICIT
+ InternationalString,
+ port [1] IMPLICIT INTEGER},
+ osiPresentationAddress [1] IMPLICIT SEQUENCE {
+ pSel [0] IMPLICIT InternationalString,
+ sSel [1] IMPLICIT InternationalString
+ OPTIONAL,
+ tSel [2] IMPLICIT InternationalString
+ OPTIONAL,
+ nSap [3] IMPLICIT InternationalString},
+ other [2] IMPLICIT SEQUENCE {
+ type [0] IMPLICIT InternationalString,
+ address [1] IMPLICIT InternationalString}}
+
+
+AccessInfo ::= SEQUENCE {
+ -- AccessInfo contains the fundmental information about what facilites
+ -- are required to use this target or server. For example, if an origin
+ -- can handle none of the record syntaxes a database can provide,
+ -- it might choose not to access the database.
+ queryTypesSupported [0] IMPLICIT SEQUENCE OF QueryTypeDetails OPTIONAL,
+ diagnosticsSets [1] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ attributeSetIds [2] IMPLICIT SEQUENCE OF AttributeSetId OPTIONAL,
+ schemas [3] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ recordSyntaxes [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ resourceChallenges [5] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ restrictedAccess [6] IMPLICIT AccessRestrictions OPTIONAL,
+ costInfo [8] IMPLICIT Costs OPTIONAL,
+ variantSets [9] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ elementSetNames [10] IMPLICIT SEQUENCE OF ElementSetName OPTIONAL,
+ unitSystems [11] IMPLICIT SEQUENCE OF InternationalString}
+
+
+-- begin auxiliary definitions for AccessInfo
+-- Begin Query Details
+QueryTypeDetails ::= CHOICE {
+ private [0] IMPLICIT PrivateCapabilities,
+ rpn [1] IMPLICIT RpnCapabilities,
+ iso8777 [2] IMPLICIT Iso8777Capabilities,
+ z39-58 [100] IMPLICIT HumanString,
+ erpn [101] IMPLICIT RpnCapabilities,
+ rankedList [102] IMPLICIT HumanString}
+
+
+PrivateCapabilities ::= SEQUENCE {
+ operators [0] IMPLICIT SEQUENCE OF SEQUENCE {
+ operator [0] IMPLICIT InternationalString,
+ description [1] IMPLICIT HumanString OPTIONAL } OPTIONAL,
+ searchKeys [1] IMPLICIT SEQUENCE OF SearchKey OPTIONAL,
+ -- field names that can be searched
+ description [2] IMPLICIT SEQUENCE OF HumanString OPTIONAL }
+
+
+RpnCapabilities ::= SEQUENCE {
+ operators [0] IMPLICIT SEQUENCE OF INTEGER OPTIONAL,
+ -- Omitted means all operators are supported.
+ resultSetAsOperandSupported [1] IMPLICIT BOOLEAN,
+ restrictionOperandSupported [2] IMPLICIT BOOLEAN,
+ proximity [3] IMPLICIT ProximitySupport OPTIONAL}
+
+Iso8777Capabilities ::= SEQUENCE {
+ searchKeys [0] IMPLICIT SEQUENCE OF SearchKey,
+ -- field names that may be searched
+ restrictions [1] IMPLICIT HumanString OPTIONAL
+ -- Omitted means supported, not specifying units.
+ }
+
+ProximitySupport ::= SEQUENCE {
+ anySupport [0] IMPLICIT BOOLEAN,
+ -- 'false' means no proximity support, in which case
+ -- unitsSupported not supplied.
+ unitsSupported [1] IMPLICIT SEQUENCE OF CHOICE{
+ known [1] IMPLICIT INTEGER,
+ -- values from KnownProximityUnit
+ private [2] IMPLICIT SEQUENCE{
+ unit [0] IMPLICIT INTEGER,
+ description [1] HumanString OPTIONAL}}
+ OPTIONAL}
+
+SearchKey ::= SEQUENCE {
+ searchKey [0] IMPLICIT InternationalString,
+ description [1] IMPLICIT HumanString OPTIONAL }
+-- End Query details
+
+
+
+AccessRestrictions ::= SEQUENCE OF SEQUENCE {
+ accessType [0] INTEGER {
+ any (0),
+ search (1),
+ present (2),
+ specific-elements (3),
+ extended-services (4),
+ by-database (5)},
+ accessText [1] IMPLICIT HumanString OPTIONAL,
+ accessChallenges [2] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL}
+
+
+Costs ::= SEQUENCE {
+ connectCharge [0] IMPLICIT Charge OPTIONAL, -- Per-connection charge
+ connectTime [1] IMPLICIT Charge OPTIONAL, -- Time-based charge
+ displayCharge [2] IMPLICIT Charge OPTIONAL, -- Per-record charge
+ searchCharge [3] IMPLICIT Charge OPTIONAL, -- Per-search charge
+ subscriptCharge [4] IMPLICIT Charge OPTIONAL, -- Subscription charges
+ otherCharges [5] IMPLICIT SEQUENCE OF SEQUENCE{ -- Other charges
+ forWhat [1] IMPLICIT HumanString,
+ charge [2] IMPLICIT Charge} OPTIONAL}
+
+ Charge ::= SEQUENCE{
+ cost [1] IMPLICIT IntUnit,
+ perWhat [2] IMPLICIT Unit OPTIONAL,
+ -- e.g. "second," "minute," "line," "record"...
+ text [3] IMPLICIT HumanString OPTIONAL}
+-- End Auxiliary definitions for AccessInfo
+
+
+DatabaseList ::= SEQUENCE OF DatabaseName
+
+AttributeCombinations ::= SEQUENCE {
+ defaultAttributeSet [0] IMPLICIT AttributeSetId,
+ -- Default for the combinations. Also probably
+ -- a good choice for the default
+ -- in searches, but that isn't required.
+ legalCombinations [1] IMPLICIT SEQUENCE OF AttributeCombination }
+
+
+AttributeCombination ::= SEQUENCE OF AttributeOccurrence
+ -- An AttributeCombination is a pattern for legal combination of attributes
+
+
+AttributeOccurrence ::= SEQUENCE {
+ -- An AttributeOccurrence lists the legal values for a
+ -- specific attribute type in a combination.
+ attributeSet [0] IMPLICIT AttributeSetId OPTIONAL,
+ attributeType [1] IMPLICIT INTEGER,
+ mustBeSupplied [2] IMPLICIT NULL OPTIONAL,
+ attributeValues CHOICE {
+ any-or-none [3] IMPLICIT NULL,
+ -- All supported values are OK
+ specific [4] IMPLICIT SEQUENCE OF
+ StringOrNumeric}}
+ -- Only these values allowed
+
+
+END
+
+
+
+
+
+RecordSyntax-summary
+
+{z39-50-recordSyntax summary (103)} DEFINITIONS ::=
+BEGIN
+IMPORTS OtherInformation, InternationalString FROM Z39-50-APDU-1995;
+
+BriefBib ::= SEQUENCE {
+ title [1] IMPLICIT InternationalString,
+ author [2] IMPLICIT InternationalString OPTIONAL,
+ callNumber [3] IMPLICIT InternationalString OPTIONAL,
+ recordType [4] IMPLICIT InternationalString OPTIONAL,
+ bibliographicLevel [5] IMPLICIT InternationalString OPTIONAL,
+ format [6] IMPLICIT SEQUENCE OF FormatSpec OPTIONAL,
+ publicationPlace [7] IMPLICIT InternationalString OPTIONAL,
+ publicationDate [8] IMPLICIT InternationalString OPTIONAL,
+ targetSystemKey [9] IMPLICIT InternationalString OPTIONAL,
+ satisfyingElement [10] IMPLICIT InternationalString OPTIONAL,
+ rank [11] IMPLICIT INTEGER OPTIONAL,
+ documentId [12] IMPLICIT InternationalString OPTIONAL,
+ abstract [13] IMPLICIT InternationalString OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+ FormatSpec ::= SEQUENCE {
+ type [1] IMPLICIT InternationalString,
+ size [2] IMPLICIT INTEGER OPTIONAL,
+ bestPosn [3] IMPLICIT INTEGER OPTIONAL}
+END
+
+
+
+
+
+RecordSyntax-generic -- For detailed semantics, see Appendix RET.
+{z39-50-recordSyntax grs-1 (105)} DEFINITIONS ::=
+BEGIN
+EXPORTS Variant;
+IMPORTS IntUnit, Unit, InternationalString, StringOrNumeric, Term
+FROM Z39-50-APDU-1995;
+
+GenericRecord ::= SEQUENCE OF TaggedElement
+TaggedElement ::= SEQUENCE {
+ tagType [1] IMPLICIT INTEGER OPTIONAL,
+ -- If omitted, default should be supplied dynamically
+ -- by tagSet-M; otherwise it should be statically
+ -- specified by the schema.
+ tagValue [2] StringOrNumeric,
+ tagOccurrence [3] IMPLICIT INTEGER OPTIONAL,
+ -- Occurrence within the database record, and
+ -- relative to the parent. No default; if omitted,
+ -- target not telling or it is irrelevant.
+ content [4] ElementData,
+ metaData [5] IMPLICIT ElementMetaData OPTIONAL,
+ appliedVariant [6] IMPLICIT Variant OPTIONAL}
+
+ElementData ::= CHOICE{
+ octets OCTET STRING,
+ numeric INTEGER,
+ date GeneralizedTime,
+ ext EXTERNAL,
+ string InternationalString,
+ trueOrFalse BOOLEAN,
+ oid OBJECT IDENTIFIER,
+ intUnit [1] IMPLICIT IntUnit,
+ elementNotThere [2] IMPLICIT NULL, -- element requested but not there
+ elementEmpty [3] IMPLICIT NULL, -- element there, but empty
+ noDataRequested [4] IMPLICIT NULL, -- variant request said 'no data'
+ diagnostic [5] IMPLICIT EXTERNAL,
+ subtree [6] SEQUENCE OF TaggedElement
+ -- recursive, for nested tags
+ }
+
+ElementMetaData ::= SEQUENCE{
+ seriesOrder [1] IMPLICIT Order OPTIONAL,
+ -- only for a non-leaf node
+ usageRight [2] IMPLICIT Usage OPTIONAL,
+ hits [3] IMPLICIT SEQUENCE OF HitVector OPTIONAL,
+ displayName [4] IMPLICIT InternationalString OPTIONAL,
+ -- name for element that origin can use for
+ -- display
+ supportedVariants [5] IMPLICIT SEQUENCE OF Variant OPTIONAL,
+ message [6] IMPLICIT InternationalString OPTIONAL,
+ elementDescriptor [7] IMPLICIT OCTET STRING OPTIONAL,
+ surrogateFor [8] IMPLICIT TagPath OPTIONAL,
+ -- the retrieved element is a surrogate for the
+ -- element given by this path
+ surrogateElement [9] IMPLICIT TagPath OPTIONAL,
+ -- the element given by this path is a
+ -- surrogate for the retrieved element
+ other [99] IMPLICIT EXTERNAL OPTIONAL}
+
+ TagPath ::= SEQUENCE OF SEQUENCE{
+ tagType [1] IMPLICIT INTEGER OPTIONAL,
+ tagValue [2] StringOrNumeric,
+ tagOccurrence [3] IMPLICIT INTEGER OPTIONAL}
+
+
+Order ::= SEQUENCE{
+ ascending [1] IMPLICIT BOOLEAN,
+ -- "true" means monotonically increasing (i.e. non-
+ -- decreasing); "false" means monotonically
+ -- decreasing (i.e. non-increasing).
+ order [2] IMPLICIT INTEGER
+ -- Same as defined by 'elementOrdering' in tagSet-M,
+ -- though this may be overidden by schema.
+ }
+
+Usage ::= SEQUENCE {
+ type [1] IMPLICIT INTEGER{
+ redistributable (1),
+ -- Element is freely redistributable.
+ restricted (2),
+ -- Restriction contains statement.
+ licensePointer (3)
+ -- Restriction contains license pointer.
+ },
+ restriction [2] IMPLICIT InternationalString OPTIONAL}
+
+HitVector ::= SEQUENCE{
+ -- Each hit vector points to a fragment within the
+ -- element, via location and/or token.
+ satisfier Term OPTIONAL, -- sourceword, etc.
+ offsetIntoElement [1] IMPLICIT IntUnit OPTIONAL,
+ length [2] IMPLICIT IntUnit OPTIONAL,
+ hitRank [3] IMPLICIT INTEGER OPTIONAL,
+ targetToken [4] IMPLICIT OCTET STRING OPTIONAL
+ -- Origin may use token subsequently within a
+ -- variantRequest (in an elementRequest) to
+ -- retrieve (or to refer to) the fragment.
+ }
+
+
+Variant ::= SEQUENCE{
+ globalVariantSetId [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
+ -- Applies to the triples below, when
+ -- variantSetId omitted. If
+ -- globalVariantSetId omitted, default applies.
+ -- Default may be provided by the tagSet-M
+ -- element defaultVariantSetId.
+ triples [2] IMPLICIT SEQUENCE OF SEQUENCE{
+ variantSetId [0] IMPLICIT OBJECT IDENTIFIER
+ OPTIONAL,
+ -- If omitted,
+ -- globalVariantSetId
+ -- (above) applies, unless
+ -- that too is omitted, in
+ -- which case, default
+ -- used.
+ class [1] IMPLICIT INTEGER,
+ type [2] IMPLICIT INTEGER,
+ value [3] CHOICE{
+ integer INTEGER,
+ string InternationalString,
+ octetString OCTET STRING,
+ oid OBJECT IDENTIFIER,
+ boolean BOOLEAN,
+ null NULL,
+ -- Following need context tags:
+ unit [1] IMPLICIT Unit,
+ valueAndUnit [2] IMPLICIT
+ IntUnit}}}
+END
+
+
+RecordSyntax-ESTaskPackage
+{z39-50-recordSyntax esTaskPackage (106)} DEFINITIONS ::=
+BEGIN
+IMPORTS Permissions, InternationalString, IntUnit, DiagRec
+FROM Z39-50-APDU-1995;
+
+TaskPackage ::= SEQUENCE{
+ packageType [1] IMPLICIT OBJECT IDENTIFIER,
+ -- oid of specific ES definition
+ packageName [2] IMPLICIT InternationalString OPTIONAL,
+ userId [3] IMPLICIT InternationalString OPTIONAL,
+ retentionTime [4] IMPLICIT IntUnit OPTIONAL,
+ permissions [5] IMPLICIT Permissions OPTIONAL,
+ description [6] IMPLICIT InternationalString OPTIONAL,
+ targetReference [7] IMPLICIT OCTET STRING OPTIONAL,
+ creationDateTime [8] IMPLICIT GeneralizedTime OPTIONAL,
+ taskStatus [9] IMPLICIT INTEGER{
+ pending (0),
+ active (1),
+ complete (2),
+ aborted (3)},
+ packageDiagnostics [10] IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
+ taskSpecificParameters [11] IMPLICIT EXTERNAL
+ -- Use oid for specific ES definition
+ -- (same oid as packageType above)
+ -- and select [2] "taskPackage."
+ }
+END
+
+AccessControlFormat-Prompt-1
+{z39-50-accessControl prompt-1 (1)} DEFINITIONS ::=
+BEGIN
+IMPORTS InternationalString, DiagRec FROM Z39-50-APDU-1995;
+--
+PromptObject ::= CHOICE{
+ challenge [1] IMPLICIT Challenge,
+ response [2] IMPLICIT Response}
+
+ Challenge ::= SEQUENCE OF SEQUENCE {
+ promptId [1] PromptId,
+ -- Target supplies a number (for an enumerated
+ -- prompt) or string (for a non-enumerated
+ -- prompt), for each prompt, and the origin
+ -- returns it in response, for this prompt, so
+ -- target may correlate the prompt response with
+ -- the prompt.
+ defaultResponse [2] IMPLICIT InternationalString OPTIONAL,
+ promptInfo [3] CHOICE{
+ character [1] IMPLICIT InternationalString,
+ encrypted [2] IMPLICIT Encryption} OPTIONAL,
+ -- Information corresponding to an
+ -- emumerated prompt. For example if 'type',
+ -- within PromptId, is 'copyright', then
+ -- promptInfo may contain a copyright
+ -- statement.
+ regExpr [4] IMPLICIT InternationalString OPTIONAL,
+ -- A regular expression that promptResponse should
+ -- match. See IEEE 1003.2 Volume 1, Section 2.8
+ -- "Regular Expression Notation." For example if
+ -- promptId is "Year of publication," regExpr
+ -- might be "19[89][0-9]|20[0-9][0-9]".
+ responseRequired [5] IMPLICIT NULL OPTIONAL,
+ allowedValues [6] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
+ -- e.g. promptId="Desired color"; allowed = 'red',
+ -- 'blue','Green'.
+ shouldSave [7] IMPLICIT NULL OPTIONAL,
+ -- Target recommends that origin save the data
+ -- that it prompts from the user corresponding to
+ -- this prompt, because it is likely to be
+ -- requested again (so origin might not have to
+ -- prompt the user next time).
+ dataType [8] IMPLICIT INTEGER{
+ integer (1),
+ date (2),
+ float (3),
+ alphaNumeric (4),
+ url-urn (5),
+ boolean (6)} OPTIONAL,
+ -- Target telling origin type of data it
+ -- wants. E.g., if "date" is specified,
+ -- presumably the origin will try to prompt
+ -- something "date-like" from the user.
+ diagnostic [9] IMPLICIT EXTERNAL OPTIONAL
+ -- Intended for repeat requests when there is an
+ -- error the origin should report to the user from
+ -- previous attempt.
+ }
+
+
+ Response ::= SEQUENCE OF SEQUENCE {
+ promptId [1] PromptId,
+ -- Corresponds to a prompt in the challenge, or
+ -- may be unprompted, for example "newPassword."
+ -- If unprompted, should be "enumerated."
+ -- If this responds to a non-enumerated prompt,
+ -- then nonEnumeratedPrompt should contain the
+ -- prompt string from the challenge.
+ promptResponse [2] CHOICE{
+ string [1] IMPLICIT InternationalString,
+ accept [2] IMPLICIT BOOLEAN,
+ acknowledge [3] IMPLICIT NULL,
+ diagnostic [4] DiagRec,
+ encrypted [5] IMPLICIT Encryption}}
+
+
+ PromptId ::= CHOICE{
+ enummeratedPrompt [1] IMPLICIT SEQUENCE{
+ type [1] IMPLICIT INTEGER{
+ groupId (0),
+ userId (1),
+ password (2),
+ newPassword (3),
+ copyright (4),
+ -- When type on Challenge is
+ -- 'copyright', promptInfo has text of
+ -- copyright message to be displayed
+ -- verbatim to the user. If
+ -- promptResponse indicates
+ -- 'acceptance', this indicates the
+ -- user has been shown, and accepted,
+ -- the terms of the copyright. This is
+ -- not intended to be legally binding,
+ -- but provides a good-faith attempt
+ -- on the part of the target to inform
+ -- the user of the copyright.
+ sessionId (5)},
+ suggestedString [2] IMPLICIT
+ InternationalString OPTIONAL},
+ nonEnumeratedPrompt [2] IMPLICIT InternationalString}
+
+
+ Encryption ::= SEQUENCE{
+ cryptType [1] IMPLICIT OCTET STRING OPTIONAL,
+ credential [2] IMPLICIT OCTET STRING OPTIONAL,
+ --random number, SALT, or other factor
+ data [3] IMPLICIT OCTET STRING}
+
+END
+
+
+
+
+
+AccessControlFormat-des-1
+{z39-50-accessControlFormat des-1 (2)} DEFINITIONS ::=
+BEGIN
+ DES-RN-Object ::= CHOICE {
+ challenge [1] IMPLICIT DRNType,
+ response [2] IMPLICIT DRNType}
+
+ DRNType ::= SEQUENCE{
+ userId [1] IMPLICIT OCTET STRING OPTIONAL,
+ salt [2] IMPLICIT OCTET STRING OPTIONAL,
+ randomNumber [3] IMPLICIT OCTET STRING}
+END
+
+
+
+
+
+AccessControlFormat-krb-1
+{z39-50-accessControlFormat krb-1 (3)} DEFINITIONS ::=
+BEGIN
+IMPORTS InternationalString FROM Z39-50-APDU-1995;
+
+ KRBObject ::= CHOICE {
+ challenge [1] IMPLICIT KRBRequest,
+ response [2] IMPLICIT KRBResponse}
+
+ KRBRequest ::= SEQUENCE{
+ service [1] IMPLICIT InternationalString,
+ instance [2] IMPLICIT InternationalString OPTIONAL,
+ realm [3] IMPLICIT InternationalString OPTIONAL
+ -- target requests a ticket for the given service,
+ -- instance, and realm
+ }
+
+ KRBResponse ::= SEQUENCE{
+ userid [1] IMPLICIT InternationalString OPTIONAL,
+ ticket [2] IMPLICIT OCTET STRING
+ -- origin responds with a ticket for the requested
+ -- service
+ }
+END
+
+UserInfoFormat-searchResult-1
+{z39-50-userInfoFormat searchResult-1 (1)} DEFINITIONS ::=
+BEGIN
+IMPORTS DatabaseName, Term, Query, IntUnit, InternationalString
+FROM Z39-50-APDU-1995;
+
+SearchInfoReport ::= SEQUENCE OF SEQUENCE{
+ subqueryId [1] IMPLICIT InternationalString OPTIONAL,
+ -- shorthand identifier of subquery
+ fullQuery [2] IMPLICIT BOOLEAN,
+ -- 'true' means this is the full query;
+ -- 'false', a sub-query
+ subqueryExpression [3] QueryExpression OPTIONAL,
+
+ -- A subquery of the query as submitted. May
+ -- be whole query; if so, "fullQuery" should
+ -- be 'true'.
+ subqueryInterpretation [4] QueryExpression OPTIONAL,
+
+ -- how target interpreted subquery
+ subqueryRecommendation [5] QueryExpression OPTIONAL,
+ -- target-recommended alternative
+ subqueryCount [6] IMPLICIT INTEGER OPTIONAL,
+ -- Number of records for this subQuery,
+ -- across all of the specified databases.
+ -- (If during search, via resource control,
+ -- number of records so far).
+ subqueryWeight [7] IMPLICIT IntUnit OPTIONAL,
+ -- relative weight of this subquery
+ resultsByDB [8] IMPLICIT ResultsByDB OPTIONAL}
+
+ResultsByDB ::= SEQUENCE OF SEQUENCE{
+ databases [1] CHOICE{
+ all [1] IMPLICIT NULL,
+ -- applies across all of the databases in
+ -- Search PDU
+ list [2] IMPLICIT SEQUENCE OF DatabaseName
+ -- applies across all databases in this
+ -- list
+ },
+ count [2] IMPLICIT INTEGER OPTIONAL,
+ -- Number of records for query component (and, as
+ -- above, if during search, via resource control,
+ -- number of records so far).
+ resultSetName [3] IMPLICIT InternationalString OPTIONAL
+ -- Target-assigned result set by which subQuery is
+ -- available. Should not be provided unless
+ -- processing for this query component is concluded
+ -- (i.e., when this report comes during search, via
+ -- resource control, as opposed to after search, via
+ -- additionalSearchInfo).
+ }
+
+QueryExpression ::= CHOICE {
+ term [1] IMPLICIT SEQUENCE{
+ queryTerm [1] Term,
+ termComment [2] IMPLICIT InternationalString OPTIONAL},
+ query [2] Query}
+END
diff --git a/epan/dissectors/asn1/z3950/z3950-oclc.asn b/epan/dissectors/asn1/z3950/z3950-oclc.asn
new file mode 100644
index 0000000000..e6592405c7
--- /dev/null
+++ b/epan/dissectors/asn1/z3950/z3950-oclc.asn
@@ -0,0 +1,14 @@
+Z39-50-OCLC-UserInformation
+{z39-50-userInformation local (1000) oclc (17) oclc-1 (1)} DEFINITIONS ::=
+
+BEGIN
+OCLC-UserInformation ::= SEQUENCE {
+ motd [1] IMPLICIT VisibleString OPTIONAL,
+ dblist SEQUENCE OF DBName OPTIONAL,
+ failReason [3] IMPLICIT BOOLEAN OPTIONAL,
+ text [2] IMPLICIT VisibleString OPTIONAL
+ }
+
+DBName ::= [2] IMPLICIT VisibleString
+END
+
diff --git a/epan/dissectors/asn1/z3950/z3950.asn b/epan/dissectors/asn1/z3950/z3950.asn
new file mode 100644
index 0000000000..e63f46d840
--- /dev/null
+++ b/epan/dissectors/asn1/z3950/z3950.asn
@@ -0,0 +1,807 @@
+ANSI-Z39-50-ObjectIdentifier DEFINITIONS ::=
+BEGIN
+z39-50 OBJECT IDENTIFIER ::=
+{ iso (1) member-body (2) us (840) ansi-standard-Z39-50 (10003)}
+-- thus {Z39-50} is shorthand for {1 2 840 10003}
+Z39-50-APDU OBJECT IDENTIFIER ::= {Z39-50 2} -- See OID.3
+-- and {Z39-50 2} is shorthand for {1 2 840 10003 2} and so on.
+Z39-50-attributeSet OBJECT IDENTIFIER ::= {Z39-50 3} -- See Appendix ATR
+z39-50-diagnostic OBJECT IDENTIFIER ::= {z39-50 4} -- See Appendix DIAG
+z39-50-recordSyntax OBJECT IDENTIFIER ::= {z39-50 5} --See Appendix REC
+Z39-50-resourceReport OBJECT IDENTIFIER ::= {Z39-50 7} --See Appendix RSC
+Z39-50-accessControl OBJECT IDENTIFIER ::= {Z39-50 8} --See Appendix ACC
+Z39-50-extendedService OBJECT IDENTIFIER ::= {Z39-50 9} --See Appendix EXT
+Z39-50-userInfoFormat OBJECT IDENTIFIER ::= {Z39-50 10} --See Appendix USR
+Z39-50-elementSpec OBJECT IDENTIFIER ::= {Z39-50 11} --See Appendix ESP
+Z39-50-variantSet OBJECT IDENTIFIER ::= {Z39-50 12} --See Appendix VAR
+Z39-50-schema OBJECT IDENTIFIER ::= {Z39-50 13} --See Appendix TAG
+Z39-50-tagSet OBJECT IDENTIFIER ::= {Z39-50 14} --See Appendix TAG
+Z39-50-negotiation OBJECT IDENTIFIER ::= {Z39-50 15}
+Z39-50-query OBJECT IDENTIFIER ::= {Z39-50 16}
+END
+
+Z39-50-APDU-1995
+ -- OID for this definition, assigned in OID.3.1, is {Z39-50 2 1}
+
+DEFINITIONS ::=
+BEGIN -- Z39.50-1995 Maintenance Agency Official Text for ANSI/NISO Z39.50-1995 - July 1995
+--
+EXPORTS OtherInformation, Term,
+AttributeSetId, AttributeList,
+AttributeElement, ElementSetName, SortElement, DatabaseName, CompSpec,
+Specification, Permissions, InternationalString, IntUnit, Unit,
+StringOrNumeric, Query, Records, ResultSetId, DefaultDiagFormat, DiagRec;
+--
+PDU ::= CHOICE{
+ initRequest [20] IMPLICIT InitializeRequest,
+ initResponse [21] IMPLICIT InitializeResponse,
+ searchRequest [22] IMPLICIT SearchRequest,
+ searchResponse [23] IMPLICIT SearchResponse,
+ presentRequest [24] IMPLICIT PresentRequest,
+ presentResponse [25] IMPLICIT PresentResponse,
+ deleteResultSetRequest [26] IMPLICIT DeleteResultSetRequest,
+ deleteResultSetResponse [27] IMPLICIT DeleteResultSetResponse,
+ accessControlRequest [28] IMPLICIT AccessControlRequest,
+ accessControlResponse [29] IMPLICIT AccessControlResponse,
+ resourceControlRequest [30] IMPLICIT ResourceControlRequest,
+ resourceControlResponse [31] IMPLICIT ResourceControlResponse,
+ triggerResourceControlRequest [32] IMPLICIT TriggerResourceControlRequest,
+ resourceReportRequest [33] IMPLICIT ResourceReportRequest,
+ resourceReportResponse [34] IMPLICIT ResourceReportResponse,
+ scanRequest [35] IMPLICIT ScanRequest,
+ scanResponse [36] IMPLICIT ScanResponse,
+ -- [37] through [42] reserved
+ sortRequest [43] IMPLICIT SortRequest,
+ sortResponse [44] IMPLICIT SortResponse,
+ segmentRequest [45] IMPLICIT Segment,
+ extendedServicesRequest [46] IMPLICIT ExtendedServicesRequest,
+ extendedServicesResponse [47] IMPLICIT ExtendedServicesResponse,
+ close [48] IMPLICIT Close}
+
+-- Initialize APDUs
+--
+
+ InitializeRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ protocolVersion ProtocolVersion,
+ options Options,
+ preferredMessageSize [5] IMPLICIT INTEGER,
+ exceptionalRecordSize [6] IMPLICIT INTEGER,
+-- idAuthentication [7] ANY OPTIONAL, see note below
+ idAuthentication [7] CHOICE{
+ open VisibleString,
+ idPass SEQUENCE {
+ groupId [0] IMPLICIT InternationalString OPTIONAL,
+ userId [1] IMPLICIT InternationalString OPTIONAL,
+ password [2] IMPLICIT InternationalString OPTIONAL },
+ anonymous NULL,
+ other EXTERNAL} OPTIONAL,
+ implementationId [110] IMPLICIT InternationalString OPTIONAL,
+ implementationName [111] IMPLICIT InternationalString OPTIONAL,
+ implementationVersion [112] IMPLICIT InternationalString OPTIONAL,
+ userInformationField [11] EXTERNAL OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+--Note:
+-- For idAuthentication, the type ANY is retained
+-- for compatibility with earlier versions.
+-- For interoperability, the following is recommended:
+-- IdAuthentication [7] CHOICE{
+-- open VisibleString,
+-- idPass SEQUENCE {
+-- groupId [0] IMPLICIT InternationalString OPTIONAL,
+-- userId [1] IMPLICIT InternationalString OPTIONAL,
+-- password [2] IMPLICIT InternationalString OPTIONAL },
+-- anonymous NULL,
+-- other EXTERNAL
+-- May use access control formats for 'other'. See Appendix 7 ACC.
+--
+ InitializeResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ protocolVersion ProtocolVersion,
+ options Options,
+ preferredMessageSize [5] IMPLICIT INTEGER,
+ exceptionalRecordSize [6] IMPLICIT INTEGER,
+ result [12] IMPLICIT BOOLEAN,
+ -- relect = FALSE; Accept = TRUE
+ implementationId [110] IMPLICIT InternationalString OPTIONAL,
+ implementationName [111] IMPLICIT InternationalString OPTIONAL,
+ implementationVersion [112] IMPLICIT InternationalString OPTIONAL,
+ userInformationField [11] EXTERNAL OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+-- Begin auxiliary definitions for Init PDUs
+ ProtocolVersion ::= [3] IMPLICIT BIT STRING{
+ version-1 (0),
+ -- This bit should always be set, but does not
+ -- correspond to any Z39.50 version.
+ version-2 (1),
+ -- "Version 2 supported."
+ -- This bit should always be set.
+ version-3 (2)
+ -- "Version 3 supported."
+-- Values higher than 'version-3' should be ignored. Both the Initialize
+-- request and Initialize Response APDUs include a value string corresponding
+-- to the supported versions. The highest common version is selected
+-- for use. If there are no versions in common, "Result" in the Init Response
+-- should indicate "reject."
+-- Note: Versions 1 and 2 are identical. Systems supporting version 2 should
+-- indicate support for version 1 as well, for interoperability with systems
+-- that indicate support for version 1 only (e.g. ISO 10163-1991
+-- implementations).
+ }
+ Options ::= [4] IMPLICIT BIT STRING{
+ search (0),
+ present (1),
+ delSet (2),
+ resourceReport (3),
+ triggerResourceCtrl (4),
+ resourceCtrl (5),
+ accessCtrl (6),
+ scan (7),
+ sort (8),
+ -- (9) (reserved)
+ extendedServices (10),
+ level-1Segmentation (11),
+ level-2Segmentation (12),
+ concurrentOperations (13),
+ namedResultSets (14)}
+-- end auxiliary definitions for Init PDUs
+
+
+--Search APDUs
+ SearchRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ smallSetUpperBound [13] IMPLICIT INTEGER,
+ largeSetLowerBound [14] IMPLICIT INTEGER,
+ mediumSetPresentNumber [15] IMPLICIT INTEGER,
+ replaceIndicator [16] IMPLICIT BOOLEAN,
+ resultSetName [17] IMPLICIT InternationalString,
+ databaseNames [18] IMPLICIT SEQUENCE OF DatabaseName,
+ smallSetElementSetNames [100] ElementSetNames OPTIONAL,
+ mediumSetElementSetNames [101] ElementSetNames OPTIONAL,
+ preferredRecordSyntax [104] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
+ query [21] Query,
+ -- Following two parameters may be used only if version 3 is in force.
+ additionalSearchInfo [203] IMPLICIT OtherInformation OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+
+-- Query Definitions
+ Query ::= CHOICE{
+ type-0 [0] ANY,
+ type-1 [1] IMPLICIT RPNQuery,
+ type-2 [2] OCTET STRING,
+ type-100 [100] OCTET STRING,
+ type-101 [101] IMPLICIT RPNQuery,
+ type-102 [102] OCTET STRING}
+--
+-- Definitions for RPN query
+ RPNQuery ::= SEQUENCE{
+ attributeSet AttributeSetId,
+ rpn RPNStructure}
+--
+ RPNStructure ::= CHOICE{
+ op [0] Operand,
+ rpnRpnOp [1] IMPLICIT SEQUENCE{
+ rpn1 RPNStructure,
+ rpn2 RPNStructure,
+ op Operator }}
+ Operand ::= CHOICE{
+ attrTerm AttributesPlusTerm,
+ resultSet ResultSetId,
+ -- If version 2 is in force:
+ -- - If query type is 1, one of the above two must be chosen;
+ -- - resultAttr (below) may be used only if query type is 101.
+ resultAttr ResultSetPlusAttributes}
+
+ AttributesPlusTerm ::= [102] IMPLICIT SEQUENCE{
+ attributes AttributeList,
+ term Term}
+
+ ResultSetPlusAttributes ::= [214] IMPLICIT
+SEQUENCE{
+ resultSet ResultSetId,
+ attributes AttributeList}
+
+ AttributeList ::= [44] IMPLICIT SEQUENCE OF AttributeElement
+--
+ Term ::= CHOICE{
+ general [45] IMPLICIT OCTET STRING,
+ -- values below may be used only if version 3 is in force
+ numeric [215] IMPLICIT INTEGER,
+ characterString [216] IMPLICIT InternationalString,
+ oid [217] IMPLICIT OBJECT IDENTIFIER,
+ dateTime [218] IMPLICIT GeneralizedTime,
+ external [219] IMPLICIT EXTERNAL,
+ integerAndUnit [220] IMPLICIT IntUnit,
+ null [221] IMPLICIT NULL}
+
+ Operator ::= [46] CHOICE{
+ and [0] IMPLICIT NULL,
+ or [1] IMPLICIT NULL,
+ and-not [2] IMPLICIT NULL,
+ -- If version 2 is in force:
+ -- - For query type 1, one of the above three
+ -- must be chosen;
+ -- - prox (below) may be used only if query type
+ -- is 101.
+ prox [3] IMPLICIT ProximityOperator}
+
+ AttributeElement ::= SEQUENCE{
+ attributeSet [1] IMPLICIT AttributeSetId OPTIONAL,
+ -- Must be omitted if version 2 is in force.
+ -- If included, overrides value of attributeSet
+ -- in RPNQuery above, but only for this attribute.
+ attributeType [120] IMPLICIT INTEGER,
+ attributeValue CHOICE{
+ numeric [121] IMPLICIT INTEGER,
+ -- If version 2 is in force,
+ -- Must select 'numeric' for attributeValue.
+
+ complex [224] IMPLICIT SEQUENCE{
+ list [1] IMPLICIT SEQUENCE OF StringOrNumeric,
+ semanticAction [2] IMPLICIT SEQUENCE OF INTEGER OPTIONAL}}}
+
+
+ ProximityOperator ::= SEQUENCE{
+ exclusion [1] IMPLICIT BOOLEAN OPTIONAL,
+ distance [2] IMPLICIT INTEGER,
+ ordered [3] IMPLICIT BOOLEAN,
+ relationType [4] IMPLICIT INTEGER{
+ lessThan (1),
+ lessThanOrEqual (2),
+ equal (3),
+ greaterThanOrEqual (4),
+ greaterThan (5),
+ notEqual (6)},
+ proximityUnitCode [5] CHOICE{
+ known [1] IMPLICIT KnownProximityUnit,
+ private [2] IMPLICIT INTEGER}}
+--
+ KnownProximityUnit ::= INTEGER{
+ character (1),
+ word (2),
+ sentence (3),
+ paragraph (4),
+ section (5),
+ chapter (6),
+ document (7),
+ element (8),
+ subelement (9),
+ elementType (10),
+ byte (11) -- Version 3 only
+ }
+-- End definitions for RPN Query
+
+
+SearchResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ resultCount [23] IMPLICIT INTEGER,
+ numberOfRecordsReturned [24] IMPLICIT INTEGER,
+ nextResultSetPosition [25] IMPLICIT INTEGER,
+ searchStatus [22] IMPLICIT BOOLEAN,
+ resultSetStatus [26] IMPLICIT INTEGER{
+ subset (1),
+ interim (2),
+ none (3)} OPTIONAL,
+ presentStatus PresentStatus OPTIONAL,
+ records Records OPTIONAL,
+ -- Following two parameters may be used only if version 3 is in force.
+ additionalSearchInfo [203] IMPLICIT OtherInformation OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+
+
+--Retrieval APDUs
+ PresentRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ resultSetId ResultSetId,
+ resultSetStartPoint [30] IMPLICIT INTEGER,
+ numberOfRecordsRequested [29] IMPLICIT INTEGER,
+ additionalRanges [212] IMPLICIT SEQUENCE OF Range OPTIONAL,
+ -- additionalRanges may be included only if version 3 is in force.
+ recordComposition CHOICE{
+ simple [19] ElementSetNames,
+ -- must choose 'simple' if version 2
+ -- is in force
+ complex [209] IMPLICIT CompSpec}
+OPTIONAL,
+ preferredRecordSyntax [104] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
+ maxSegmentCount [204] IMPLICIT INTEGER OPTIONAL, -- level 1 or 2
+ maxRecordSize [206] IMPLICIT INTEGER OPTIONAL, -- level 2 only
+ maxSegmentSize [207] IMPLICIT INTEGER OPTIONAL, -- level 2 only
+ otherInfo OtherInformation OPTIONAL}
+--
+
+ Segment ::= SEQUENCE{
+ -- Segment PDU may only be used when version 3 is in force,
+ -- and only when segmentation is in effect.
+ referenceId ReferenceId OPTIONAL,
+ numberOfRecordsReturned [24] IMPLICIT INTEGER,
+ segmentRecords [0] IMPLICIT SEQUENCE OF NamePlusRecord,
+ otherInfo OtherInformation OPTIONAL}
+--
+ PresentResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ numberOfRecordsReturned [24] IMPLICIT INTEGER,
+ nextResultSetPosition [25] IMPLICIT INTEGER,
+ presentStatus PresentStatus,
+ records Records OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+-- begin auxiliary definitions for Search and Present APDUs
+
+-- begin definition of records
+ Records ::= CHOICE{
+ responseRecords [28] IMPLICIT SEQUENCE OF NamePlusRecord,
+ nonSurrogateDiagnostic [130] IMPLICIT DefaultDiagFormat,
+ multipleNonSurDiagnostics [205] IMPLICIT SEQUENCE OF DiagRec}
+--
+ NamePlusRecord ::= SEQUENCE{
+ name [0] IMPLICIT DatabaseName OPTIONAL,
+ record [1] CHOICE{
+ retrievalRecord [1] EXTERNAL,
+ surrogateDiagnostic [2] DiagRec,
+ -- Must select one of the above two, retrievalRecord or
+ -- surrogateDiagnostic, unless 'level 2 segmentation'
+ -- is in effect.
+ startingFragment [3] FragmentSyntax,
+ intermediateFragment [4] FragmentSyntax,
+ finalFragment [5] FragmentSyntax}}
+
+ FragmentSyntax ::= CHOICE{
+ externallyTagged EXTERNAL,
+ notExternallyTagged OCTET STRING}
+
+ DiagRec ::= CHOICE{
+ defaultFormat DefaultDiagFormat,
+ -- Must choose defaultFormat if version 2 is in effect.
+ externallyDefined EXTERNAL}
+
+ DefaultDiagFormat::= SEQUENCE{
+ diagnosticSetId OBJECT IDENTIFIER,
+ condition INTEGER,
+ addinfo CHOICE{
+ v2Addinfo VisibleString, -- version 2
+ v3Addinfo InternationalString -- version 3
+ }}
+ -- end definition of records
+
+ Range ::= SEQUENCE{
+ startingPosition [1] IMPLICIT INTEGER,
+ numberOfRecords [2] IMPLICIT INTEGER}
+--
+ ElementSetNames ::= CHOICE {
+ genericElementSetName [0] IMPLICIT InternationalString,
+ databaseSpecific [1] IMPLICIT SEQUENCE OF SEQUENCE{
+ dbName DatabaseName,
+ esn ElementSetName}}
+
+
+ PresentStatus ::= [27] IMPLICIT INTEGER{
+ success (0),
+ partial-1 (1),
+ partial-2 (2),
+ partial-3 (3),
+ partial-4 (4),
+ failure (5)}
+
+-- begin definition of composition specification
+ CompSpec ::= SEQUENCE{
+ selectAlternativeSyntax [1] IMPLICIT BOOLEAN,
+ -- See comment for recordSyntax, below.
+ generic [2] IMPLICIT Specification OPTIONAL,
+ dbSpecific [3] IMPLICIT SEQUENCE OF SEQUENCE{
+ db [1] DatabaseName,
+ spec [2] IMPLICIT Specification} OPTIONAL,
+ -- At least one of generic and dbSpecific must
+ -- occur, and both may occur. If both, then for
+ -- any record not in the list of databases
+ -- within dbSpecific, generic applies.
+ recordSyntax [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL
+ -- For each record, the target selects the
+ -- first record syntax in this list that it can
+ -- support. If the list is exhausted, the
+ -- target may select an alternative syntax if
+ -- selectAlternativeSyntax is 'true'.
+ }
+
+ Specification ::= SEQUENCE{
+ schema [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
+ elementSpec [2] CHOICE{
+ elementSetName [1] IMPLICIT InternationalString,
+ externalEspec [2] IMPLICIT EXTERNAL} OPTIONAL}
+-- end definition of composition specification
+-- end auxiliary definitions for search and response APDUs
+
+-- Delete APDUs
+ DeleteResultSetRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ deleteFunction [32] IMPLICIT INTEGER{
+ list (0),
+ all (1)},
+ resultSetList SEQUENCE OF ResultSetId OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+--
+ DeleteResultSetResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ deleteOperationStatus [0] IMPLICIT DeleteSetStatus,
+ deleteListStatuses [1] IMPLICIT ListStatuses OPTIONAL,
+ numberNotDeleted [34] IMPLICIT INTEGER OPTIONAL,
+ bulkStatuses [35] IMPLICIT ListStatuses OPTIONAL,
+ deleteMessage [36] IMPLICIT InternationalString OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+ ListStatuses ::= SEQUENCE OF SEQUENCE{
+ id ResultSetId,
+ status DeleteSetStatus}
+
+ DeleteSetStatus ::= [33] IMPLICIT INTEGER{
+ success (0),
+ resultSetDidNotExist (1),
+ previouslyDeletedByTarget (2),
+ systemProblemAtTarget (3),
+ accessNotAllowed (4),
+ resourceControlAtOrigin (5),
+ resourceControlAtTarget (6),
+ bulkDeleteNotSupported (7),
+ notAllRsltSetsDeletedOnBulkDlte (8),
+ notAllRequestedResultSetsDeleted (9),
+ resultSetInUse (10)}
+--
+
+--Access- and Resource-control APDUs
+--
+ AccessControlRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ securityChallenge CHOICE{
+ simpleForm [37] IMPLICIT OCTET STRING,
+ externallyDefined [0] EXTERNAL},
+ otherInfo OtherInformation OPTIONAL}
+
+ AccessControlResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ securityChallengeResponse CHOICE{
+ simpleForm [38] IMPLICIT
+ OCTET STRING,
+ externallyDefined [0] EXTERNAL}
+ OPTIONAL,
+ -- Optional only in version 3; mandatory in
+ -- version 2. If omitted (in version 3) then
+ -- diagnostic must occur.
+ diagnostic [223] DiagRec OPTIONAL, -- Version 3 only.
+ otherInfo OtherInformation OPTIONAL}
+
+
+
+ ResourceControlRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ suspendedFlag [39] IMPLICIT BOOLEAN OPTIONAL,
+ resourceReport [40] ResourceReport OPTIONAL,
+ partialResultsAvailable [41] IMPLICIT INTEGER{
+ subset (1),
+ interim (2),
+ none (3)} OPTIONAL,
+ responseRequired [42] IMPLICIT BOOLEAN,
+ triggeredRequestFlag [43] IMPLICIT BOOLEAN OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+
+ ResourceControlResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ continueFlag [44] IMPLICIT BOOLEAN,
+ resultSetWanted [45] IMPLICIT BOOLEAN OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+
+
+ TriggerResourceControlRequest ::=
+SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ requestedAction [46] IMPLICIT INTEGER{
+ resourceReport (1),
+ resourceControl (2),
+ cancel (3)},
+ prefResourceReportFormat [47] IMPLICIT ResourceReportId OPTIONAL,
+ resultSetWanted [48] IMPLICIT BOOLEAN OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+
+
+ ResourceReportRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ opId [210] IMPLICIT ReferenceId OPTIONAL,
+ prefResourceReportFormat [49] IMPLICIT ResourceReportId OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+--
+ ResourceReportResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ resourceReportStatus [50] IMPLICIT INTEGER{
+ success (0),
+ partial (1),
+ failure-1 (2),
+ failure-2 (3),
+ failure-3 (4),
+ failure-4 (5),
+ failure-5 (6),
+ failure-6 (7)},
+ resourceReport [51] ResourceReport OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+--
+ ResourceReport ::= EXTERNAL
+ ResourceReportId ::= OBJECT IDENTIFIER
+
+--Scan APDUs
+ ScanRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ databaseNames [3] IMPLICIT SEQUENCE OF DatabaseName,
+ attributeSet AttributeSetId OPTIONAL,
+ termListAndStartPoint AttributesPlusTerm,
+ stepSize [5] IMPLICIT INTEGER OPTIONAL,
+ numberOfTermsRequested [6] IMPLICIT INTEGER,
+ preferredPositionInResponse [7] IMPLICIT INTEGER OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+ ScanResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ stepSize [3] IMPLICIT INTEGER OPTIONAL,
+ scanStatus [4] IMPLICIT INTEGER {
+ success (0),
+ partial-1 (1),
+ partial-2 (2),
+ partial-3 (3),
+ partial-4 (4),
+ partial-5 (5),
+ failure (6) },
+ numberOfEntriesReturned [5] IMPLICIT INTEGER,
+ positionOfTerm [6] IMPLICIT INTEGER OPTIONAL,
+ entries [7] IMPLICIT ListEntries OPTIONAL,
+ attributeSet [8] IMPLICIT AttributeSetId OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+
+-- begin auxiliary definitions for Scan
+ ListEntries ::= SEQUENCE{
+ entries [1] IMPLICIT SEQUENCE OF Entry OPTIONAL,
+ nonsurrogateDiagnostics [2] IMPLICIT SEQUENCE OF DiagRec OPTIONAL
+ -- At least one of entries and nonsurrogateDiagnostic must occur
+ }
+
+ Entry ::= CHOICE {
+ termInfo [1] IMPLICIT TermInfo,
+ surrogateDiagnostic [2] DiagRec}
+--
+ TermInfo ::= SEQUENCE {
+ term Term,
+ displayTerm [0] IMPLICIT InternationalString OPTIONAL,
+ -- Presence of displayTerm means that term is
+ -- not considered by the target to be suitable
+ -- for display, and displayTerm should instead
+ -- be displayed. 'term' is the actual term in
+ -- the term list; 'displayTerm' is for display
+ -- purposes only, and is not an actual term in
+ -- the term list.
+ suggestedAttributes AttributeList OPTIONAL,
+ alternativeTerm [4] IMPLICIT SEQUENCE OF AttributesPlusTerm OPTIONAL,
+ globalOccurrences [2] IMPLICIT INTEGER OPTIONAL,
+ byAttributes [3] IMPLICIT OccurrenceByAttributes OPTIONAL,
+ otherTermInfo OtherInformation OPTIONAL}
+
+ OccurrenceByAttributes ::= SEQUENCE OF
+SEQUENCE{
+ attributes [1] AttributeList,
+ occurrences CHOICE{
+ global [2] INTEGER,
+ byDatabase [3] IMPLICIT SEQUENCE OF
+ SEQUENCE{
+ db DatabaseName,
+ num [1] IMPLICIT INTEGER OPTIONAL,
+ otherDbInfo OtherInformation OPTIONAL}}
+ OPTIONAL,
+ otherOccurInfo OtherInformation OPTIONAL}
+-- end auxiliary definitions for Scan
+
+-- Sort APDUs
+SortRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ inputResultSetNames [3] IMPLICIT SEQUENCE OF InternationalString,
+ sortedResultSetName [4] IMPLICIT InternationalString,
+ sortSequence [5] IMPLICIT SEQUENCE OF SortKeySpec,
+ -- order of occurrence is
+ -- from major to minor
+ otherInfo OtherInformation OPTIONAL}
+
+SortResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ sortStatus [3] IMPLICIT INTEGER{
+ success (0),
+ partial-1 (1),
+ failure (2)},
+ resultSetStatus [4] IMPLICIT INTEGER{
+ empty (1),
+ interim (2),
+ unchanged (3),
+ none (4)} OPTIONAL,
+ diagnostics [5] IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+-- begin auxiliary definitions for Sort
+ SortKeySpec ::= SEQUENCE{
+ sortElement SortElement,
+ sortRelation [1] IMPLICIT INTEGER{
+ ascending (0),
+ descending (1),
+ ascendingByFrequency (3),
+ descendingByfrequency (4)},
+ caseSensitivity [2] IMPLICIT INTEGER{
+ caseSensitive (0),
+ caseInsensitive (1)},
+ missingValueAction [3] CHOICE{
+ abort [1] IMPLICIT NULL,
+ null [2] IMPLICIT NULL,
+ -- supply a null value
+ -- for missing value
+ missingValueData [3] IMPLICIT OCTET
+ STRING} OPTIONAL}
+
+ SortElement ::= CHOICE{
+ generic [1] SortKey,
+ datbaseSpecific [2] IMPLICIT SEQUENCE OF SEQUENCE{
+ databaseName DatabaseName,
+ dbSort SortKey}}
+
+ SortKey ::= CHOICE{
+ sortfield [0] IMPLICIT InternationalString,
+ -- An element, element-group-tag, or alias
+ -- supported by the target and denoting a set
+ -- of elements associated with each record.
+ elementSpec [1] IMPLICIT Specification,
+ sortAttributes [2] IMPLICIT SEQUENCE{
+ id AttributeSetId,
+ list AttributeList}}
+-- end auxiliary definitions for sort
+
+
+
+-- Extended Service APDUs
+ ExtendedServicesRequest ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ function [3] IMPLICIT INTEGER {
+ create (1),
+ delete (2),
+ modify (3)},
+ packageType [4] IMPLICIT OBJECT IDENTIFIER,
+ packageName [5] IMPLICIT InternationalString OPTIONAL,
+ -- PackageName mandatory for 'modify' or
+ -- 'delete'; optional for 'create'.
+ -- Following four parameters mandatory
+ -- for 'create'; should be included on
+ -- 'modify' if being modified; not needed
+ -- on 'delete'.
+ userId [6] IMPLICIT InternationalString OPTIONAL,
+ retentionTime [7] IMPLICIT IntUnit OPTIONAL,
+ permissions [8] IMPLICIT Permissions OPTIONAL,
+ description [9] IMPLICIT InternationalString OPTIONAL,
+ taskSpecificParameters [10] IMPLICIT EXTERNAL OPTIONAL,
+ -- Mandatory for 'create'; included on
+ -- 'modify' if specific parameters being
+ -- modified; not necessary on 'delete'.
+ -- For the 'EXTERNAL,' use OID of
+ -- specific ES definition and select
+ -- CHOICE [1]: 'esRequest'.
+ waitAction [11] IMPLICIT INTEGER{
+ wait (1),
+ waitIfPossible (2),
+ dontWait (3),
+ dontReturnPackage (4)},
+ elements ElementSetName OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+--
+
+ExtendedServicesResponse ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL,
+ operationStatus [3] IMPLICIT INTEGER{
+ done (1),
+ accepted (2),
+ failure (3)},
+ diagnostics [4] IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
+ taskPackage [5] IMPLICIT EXTERNAL OPTIONAL,
+ -- Use OID: {Z39-50-recordSyntax (106)}
+ -- and corresponding syntax. For the
+ -- EXTERNAL, 'taskSpecific,' within that
+ -- definition, use OID of the specific
+ -- es, and choose [2], 'taskPackage'.
+ otherInfo OtherInformation OPTIONAL}
+
+ Permissions ::= SEQUENCE OF SEQUENCE{
+ userId [1] IMPLICIT InternationalString,
+ allowableFunctions [2] IMPLICIT SEQUENCE OF INTEGER{
+ delete (1),
+ modifyContents (2),
+ modifyPermissions (3),
+ present (4),
+ invoke (5)}}
+
+Close ::= SEQUENCE{
+ referenceId ReferenceId OPTIONAL, -- See 3.2.11.1.5.
+ closeReason CloseReason,
+ diagnosticInformation [3] IMPLICIT InternationalString OPTIONAL,
+ resourceReportFormat [4] IMPLICIT ResourceReportId OPTIONAL,
+ -- For use by origin only, and only on
+ -- Close request; origin requests target
+ -- to include report in response.
+ resourceReport [5] ResourceReport OPTIONAL,
+ -- For use by target only, unilaterally
+ -- on Close request; on Close response
+ -- may be unilateral or in response to
+ -- origin request.
+ otherInfo OtherInformation OPTIONAL}
+
+ CloseReason ::= [211] IMPLICIT INTEGER{
+ finished (0),
+ shutdown (1),
+ systemProblem (2),
+ costLimit (3),
+ resources (4),
+ securityViolation (5),
+ protocolError (6),
+ lackOfActivity (7),
+ peerAbort (8),
+ unspecified (9)}
+
+
+-- Global auxiliary definitions
+ ReferenceId ::= [2] IMPLICIT OCTET STRING
+ ResultSetId ::= [31] IMPLICIT InternationalString
+ ElementSetName ::= [103] IMPLICIT InternationalString
+ DatabaseName ::= [105] IMPLICIT InternationalString
+ AttributeSetId ::= OBJECT IDENTIFIER
+
+
+-- OtherInformation
+ OtherInformation ::= [201] IMPLICIT SEQUENCE OF
+SEQUENCE{
+ category [1] IMPLICIT InfoCategory OPTIONAL,
+ information CHOICE{
+ characterInfo [2] IMPLICIT InternationalString,
+ binaryInfo [3] IMPLICIT OCTET STRING,
+ externallyDefinedInfo [4] IMPLICIT EXTERNAL,
+ oid [5] IMPLICIT OBJECT IDENTIFIER}}
+--
+ InfoCategory ::= SEQUENCE{
+ categoryTypeId [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
+ categoryValue [2] IMPLICIT INTEGER}
+
+
+-- Units
+ -- IntUnit is used when value and unit are supplied together. Unit, alone,
+ -- is used when just specifying a unit (without a value). For example,
+ -- IntUnit is used in Term, in an RPNQuery, or it can be the datatype of
+ -- an element within a retrieval record. Unit (alone) would be used in an
+ -- element request, when requesting data be returned according to a
+ -- particular unit.
+
+ IntUnit ::= SEQUENCE{
+ value [1] IMPLICIT INTEGER,
+ unitUsed [2] IMPLICIT Unit}
+--
+ Unit ::= SEQUENCE{
+ unitSystem [1] InternationalString OPTIONAL, -- e.g. 'SI'
+ unitType [2] StringOrNumeric OPTIONAL, -- e.g. 'mass'
+ unit [3] StringOrNumeric OPTIONAL, -- e.g. 'kilograms'
+ scaleFactor [4] IMPLICIT INTEGER OPTIONAL -- e.g. 9 means 10**9
+ }
+
+--CharacterString
+ InternationalString ::= GeneralString
+ -- When version 2 is in force, this collapses to VisibleString. That
+ -- is, only characters in the visibleString repertoire may be used.
+ -- (Datatype compatibility with version 2 is not affected, because
+ -- references are IMPLICIT.) When version 3 is in force, the semantics
+ -- of the GeneralString content may be altered by negotiation during
+ -- initialization. If no such negotiation is in effect, then
+ -- GeneralString semantics are in force.
+
+StringOrNumeric ::= CHOICE{
+ string [1] IMPLICIT InternationalString,
+ numeric [2] IMPLICIT INTEGER}
+
+END --IR DEFINITIONS
diff --git a/epan/dissectors/asn1/z3950/z3950.cnf b/epan/dissectors/asn1/z3950/z3950.cnf
new file mode 100644
index 0000000000..94fa9b5eb4
--- /dev/null
+++ b/epan/dissectors/asn1/z3950/z3950.cnf
@@ -0,0 +1,278 @@
+# z3950.cnf
+# Conformation file for the NISO Z39.50 Information Retrieval protocol
+# Copyright 2018 Craig Jackson <cejackson51@gmail.com>
+
+# $Id$
+
+#.MODULE_IMPORT
+
+#.EXPORTS
+
+#.PDU
+#Z39-50-APDU-1995
+
+#.NO_EMIT
+
+#.TYPE_RENAME
+
+#.FIELD_RENAME
+AttributeList/_untag/_item attributeList_item
+OtherInformation/_untag/_item otherInformation_item
+RPNStructure/rpnRpnOp/op operatorRpnOp
+RPNStructure/op operandRpnOp
+SearchResponse/resultSetStatus search_resultSetStatus
+SortResponse/resultSetStatus sort_resultSetStatus
+AttributeElement/attributeValue/numeric attributeValue_numeric
+AttributeElement/attributeValue/complex attributeValue_complex
+AttributeElement/attributeValue/complex/list attributeValue_complex_list
+AttributeElement/attributeType attributeElement_attributeType
+ListStatuses/_item/id listStatuses_id
+CompSpec/generic compSpec_generic
+SortElement/generic sortElement_generic
+ScanResponse/entries scanResponse_entries
+ListEntries/entries listEntries_entries
+Specification/elementSpec specification_elementSpec
+SortKey/elementSpec sortKey_elementSpec
+SortKey/sortAttributes/list sortAttributes_list
+SortKey/sortAttributes/id sortAttributes_id
+PresentRequest/recordComposition/complex recordComposition_complex
+DiagFormat/recordSyntax diagFormat_recordSyntax
+DiagFormat/sort/dbSpecific diagFormat_sort_dbSpecific
+DiagFormat/sort/tooMany diagFormat_sort_tooMany
+DiagnosticFormat/_item/diagnostic diagnosticFormat_item_diagnostic
+DiagFormat/proximity diagFormat_proximity
+DiagFormat/proximity/exclusion diagFormat_proximity_exclusion
+DiagFormat/proximity/ordered diagFormat_proximity_ordered
+DiagFormat/proximity/unit diagFormat_proximity_unit
+DiagFormat/accessCtrl/oid diagFormat_accessCtrl_oid
+DiagFormat/accessCtrl/simple diagFormat_accessCtrl_simple
+DiagFormat/term diagFormat_term
+SortKeyDetails/caseSensitivity sortKeyDetails_caseSensitivity
+SortKeyDetails/sortType/structured sortKeyDetails_sortType_structured
+SortKeyDetails/sortType/numeric sortKeyDetails_sortType_numeric
+PrivateCapabilities/operators privateCapabilities_operators
+PromptId/enummeratedPrompt/type promptId_enummeratedPrompt_type
+ExtendedServicesInfo/waitAction extendedServicesInfo_waitAction
+NetworkAddress/other networkAddress_other
+NetworkAddress/other/address networkAddress_other_address
+NetworkAddress/other/type networkAddress_other_type
+AttributeDescription/attributeValue attributeDescription_attributeValue
+AttributeTypeDetails/attributeValues attributeTypeDetails_attributeValues
+AttributeTypeDetails/attributeValues/_item attributeTypeDetails_attributeValues_item
+AttributeOccurrence/attributeValues attributeOccurrence_attributeValues
+AttributeValue/value attributeValue_value
+DRNType/userId dRNType_userId
+DES-RN-Object/challenge dES_RN_Object_challenge
+DES-RN-Object/response rES_RN_Object_response
+VariantSetInfo/variants variantSetInfo_variants
+Variant/triples/_item/value variant_triples_item_value
+Variant/triples/_item/value/unit variant_triples_item_value_unit
+UnitType/units unitType_units
+UnitInfo/units unitInfo_units
+ValueDescription/unit valueDescription_unit
+ProximitySupport/unitsSupported/_item/private/unit proximitySupport_unitsSupported_item_private_unit
+ProximitySupport/unitsSupported/_item/private proximitySupport_unitsSupported_item_private
+ProximitySupport/unitsSupported/_item/known proximitySupport_unitsSupported_item_known
+Usage/type usage_type
+FormatSpec/type formatSpec_type
+ExtendedServicesInfo/type extendedServicesInfo_type
+QueryExpression/term queryExpression_term
+QueryTypeDetails/rpn queryTypeDetails_rpn
+QueryTypeDetails/private queryTypeDetails_private
+BriefBib/title briefBib_title
+Charge/text charge_text
+OCLC-UserInformation/text oCLC-UserInformation_text
+CircRecord/restrictions circRecord_restrictions
+ResourceControlRequest/responseRequired resourceControlRequest_responseRequired
+KRBObject/challenge kRBObject_challenge
+KRBObject/response kRBObject_response
+CompSpec/recordSyntax compSpec_recordSyntax
+DatabaseInfo/name databaseInfo_name
+DatabaseInfo/nicknames databaseInfo_nicknames
+DatabaseInfo/nicknames/_item databaseInfo_nicknames_item
+NamePlusRecord/name namePlusRecord_name
+BriefBib/format briefBib_format
+TagSetInfo/elements tagSetInfo_elements
+ElementSetDetails/elementSetName elementSetDetails_elementSetName
+PrivateCapabilities/description privateCapabilities_description
+TaskPackage/description taskPackage_description
+ElementData/diagnostic elementData_diagnostic
+Challenge/_item/diagnostic challenge_item_diagnostic
+Challenge/_item/dataType challenge_item_dataType
+Challenge/_item/promptInfo/character challenge_item_promptInfo_character
+ElementInfo/dataType elementInfo_dataType
+TaggedElement/content taggedElement_content
+CategoryInfo/category categoryInfo_category
+TermListDetails/attributes termListDetails_attributes
+AttributeSetInfo/attributes attributeSetInfo_attributes
+ExtendedServicesRequest/description extendedServicesRequest_description
+
+#.END
+
+#.REGISTER
+Explain-Record B "1.2.840.10003.5.100" "Explain-record"
+SutrsRecord B "1.2.840.10003.5.101" "Sutrs-record"
+OPACRecord B "1.2.840.10003.5.102" "OPAC-record"
+BriefBib B "1.2.840.10003.5.103" "Summary-record"
+GenericRecord B "1.2.840.10003.5.105" "GRS-1-record"
+TaskPackage B "1.2.840.10003.5.106" "ESTaskPackage"
+DiagnosticFormat B "1.2.840.10003.4.2" "diag-1"
+PromptObject B "1.2.840.10003.8.1" "Prompt-1"
+DES-RN-Object B "1.2.840.10003.8.2" "DES-1"
+KRBObject B "1.2.840.10003.8.3" "KRB-1"
+SearchInfoReport B "1.2.840.10003.10.1" "SearchResult-1"
+OCLC-UserInformation B "1.2.840.10003.10.1000.17.1" "OCLC-UserInfo-1"
+
+#.FN_HDR PDU
+ gint choice;
+#.FN_PARS PDU VAL_PTR=&choice
+#.FN_FTR PDU
+ if (choice >= 0) {
+ packet_info *pinfo = actx->pinfo;
+ gint32 tag = PDU_choice[choice].tag;
+
+ col_set_str(pinfo->cinfo, COL_INFO,
+ val_to_str_const(tag, z3950_PDU_vals, "Unknown Z39.50 PDU"));
+ }
+
+#.FN_BODY Query/type-0
+/*XXX Not implemented yet */
+
+#.FN_BODY ReferenceId
+ offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
+ hf_index, BER_CLASS_CON, 2, TRUE,
+ dissect_z3950_printable_OCTET_STRING);
+
+#.FN_BODY Term/general
+ offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
+ hf_index, BER_CLASS_CON, 2, TRUE,
+ dissect_z3950_printable_OCTET_STRING);
+
+#.FN_HDR AttributeSetId
+ tvbuff_t *oid_tvb=NULL;
+
+#.FN_PARS AttributeSetId VAL_PTR=&oid_tvb
+#.FN_FTR AttributeSetId
+ if (oid_tvb) {
+ guint len = tvb_reported_length_remaining(oid_tvb, 0);
+ gchar *oid_str = oid_encoded2string(wmem_packet_scope(),
+ tvb_get_ptr(oid_tvb, 0, len), len);
+ gint attribute_set_idx = Z3950_ATSET_UNKNOWN;
+ z3950_atinfo_t *atinfo_data;
+ packet_info *pinfo = actx->pinfo;
+
+ if (g_strcmp0(oid_str, Z3950_ATSET_BIB1_OID) == 0) {
+ attribute_set_idx = Z3950_ATSET_BIB1;
+ }
+ if ((atinfo_data = (z3950_atinfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_ATINFO_KEY)) == NULL) {
+
+ atinfo_data = wmem_new0(pinfo->pool, z3950_atinfo_t);
+ atinfo_data->atsetidx = attribute_set_idx;
+ p_add_proto_data(pinfo->pool, pinfo,
+ proto_z3950, Z3950_ATINFO_KEY, atinfo_data);
+ }
+ else {
+ atinfo_data->atsetidx = attribute_set_idx;
+ }
+ }
+
+#.FN_HDR AttributeElement/attributeType
+ gint att_type=0;
+ packet_info *pinfo = actx->pinfo;
+ z3950_atinfo_t *atinfo_data;
+#.FN_PARS AttributeElement/attributeType VAL_PTR=&att_type
+#.FN_FTR AttributeElement/attributeType
+ atinfo_data = (z3950_atinfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_ATINFO_KEY);
+ if (atinfo_data && atinfo_data->atsetidx == Z3950_ATSET_BIB1) {
+ proto_item_append_text(actx->created_item, " (%s)",
+ val_to_str(att_type, z3950_bib1_att_types, "Unknown bib-1 attributeType %d"));
+ atinfo_data->attype = att_type;
+ }
+#.FN_HDR AttributeElement/attributeValue/numeric
+ gint att_value=0;
+ packet_info *pinfo = actx->pinfo;
+ z3950_atinfo_t *atinfo_data;
+ const value_string *att_value_string = NULL;
+#.FN_PARS AttributeElement/attributeValue/numeric VAL_PTR=&att_value
+#.FN_FTR AttributeElement/attributeValue/numeric
+ atinfo_data = (z3950_atinfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_ATINFO_KEY);
+ if (atinfo_data && atinfo_data->atsetidx == Z3950_ATSET_BIB1) {
+ switch (atinfo_data->attype) {
+ case Z3950_BIB1_AT_USE:
+ att_value_string = z3950_bib1_at_use;
+ break;
+ case Z3950_BIB1_AT_RELATION:
+ att_value_string = z3950_bib1_at_relation;
+ break;
+ case Z3950_BIB1_AT_POSITION:
+ att_value_string = z3950_bib1_at_position;
+ break;
+ case Z3950_BIB1_AT_STRUCTURE:
+ att_value_string = z3950_bib1_at_structure;
+ break;
+ case Z3950_BIB1_AT_TRUNCATION:
+ att_value_string = z3950_bib1_at_truncation;
+ break;
+ case Z3950_BIB1_AT_COMPLETENESS:
+ att_value_string = z3950_bib1_at_completeness;
+ break;
+ default:
+ att_value_string = NULL;
+ }
+ if (att_value_string) {
+ proto_item_append_text(actx->created_item, " (%s)",
+ val_to_str(att_value, att_value_string, "Unknown bib-1 attributeValue %d"));
+ }
+ }
+#.FN_HDR DefaultDiagFormat/diagnosticSetId
+ tvbuff_t *oid_tvb=NULL;
+
+#.FN_PARS DefaultDiagFormat/diagnosticSetId VAL_PTR=&oid_tvb
+#.FN_FTR DefaultDiagFormat/diagnosticSetId
+ if (oid_tvb) {
+ guint len = tvb_reported_length_remaining(oid_tvb, 0);
+ gchar *oid_str = oid_encoded2string(wmem_packet_scope(),
+ tvb_get_ptr(oid_tvb, 0, len), len);
+ gint diagset_idx = Z3950_DIAGSET_UNKNOWN;
+ z3950_diaginfo_t *diaginfo_data;
+ packet_info *pinfo = actx->pinfo;
+
+ if (g_strcmp0(oid_str, Z3950_DIAGSET_BIB1_OID) == 0) {
+ diagset_idx = Z3950_DIAGSET_BIB1;
+ }
+ if ((diaginfo_data = (z3950_diaginfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_DIAGSET_KEY)) == NULL) {
+
+ diaginfo_data = wmem_new0(pinfo->pool, z3950_diaginfo_t);
+ diaginfo_data->diagsetidx = diagset_idx;
+ p_add_proto_data(pinfo->pool, pinfo,
+ proto_z3950, Z3950_DIAGSET_KEY, diaginfo_data);
+ }
+ else {
+ diaginfo_data->diagsetidx = diagset_idx;
+ }
+ }
+
+#.FN_HDR DefaultDiagFormat/condition
+ gint diag_condition=0;
+ packet_info *pinfo = actx->pinfo;
+ z3950_diaginfo_t *diaginfo_data;
+#.FN_PARS DefaultDiagFormat/condition VAL_PTR=&diag_condition
+#.FN_FTR DefaultDiagFormat/condition
+ diaginfo_data = (z3950_diaginfo_t *)p_get_proto_data(pinfo->pool, pinfo, proto_z3950, Z3950_DIAGSET_KEY);
+ if (diaginfo_data && diaginfo_data->diagsetidx == Z3950_DIAGSET_BIB1) {
+ proto_item_append_text(actx->created_item, " (%s)",
+ val_to_str(diag_condition, z3950_bib1_diagconditions, "Unknown bib-1 diagnostic %d"));
+ diaginfo_data->diagcondition = diag_condition;
+ }
+#
+# Editor modelines - http://www.wireshark.org/tools/modelines.html
+#
+# Local variables:
+# c-basic-offset: 2
+# tab-width: 8
+# indent-tabs-mode: nil
+# End:
+#
+# vi: set shiftwidth=2 tabstop=8 expandtab autoindent:
+# :indentSize=2:tabSize=8:noTabs=true:
+#