X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fasn.xml;h=bb84b528260101bf189fbd722ac0062535e331dd;hb=c9f14d1b54f5e094112153e473ed015c1542affb;hp=85bdc94f80c5617361c4d63583f63036f2fd301f;hpb=ab0fd2f75e554d1c9c0e722abf073f9840f7739b;p=yaz-moved-to-github.git diff --git a/doc/asn.xml b/doc/asn.xml index 85bdc94..bb84b52 100644 --- a/doc/asn.xml +++ b/doc/asn.xml @@ -1,5 +1,4 @@ - - The ASN.1 Module + The Z39.50 ASN.1 Module Introduction The &asn; module provides you with a set of C struct definitions for the @@ -11,6 +10,13 @@ the &odr; module (see section The ODR Module) provides auxiliary definitions. + + The &asn; module is located in sub directory z39.50. + There you'll find C files that implements encoders and decoders for the + Z39.50 types. You'll also find the protocol definitions: + z3950v3.asn, esupdate.asn, + and others. + Preparing PDUs @@ -47,8 +53,8 @@ structure before freeing the structure itself. - You can use the odr_malloc() function (see section - Using ODR for details). When you use + You can use the odr_malloc() function (see + for details). When you use odr_malloc(), you can release all of the allocated data in a single operation, independent of any pointers and relations between the data. odr_malloc() is based on a @@ -125,68 +131,6 @@ - Object Identifiers - - When you refer to object identifiers in your application, you need to - be aware that SR and Z39.50 use two different set of OIDs to refer to - the same objects. To handle this easily, &yaz; provides a utility module - to &asn; which provides an internal representation of the OIDs used in - both protocols. Each oid is described by a structure: - - - -typedef struct oident -{ - enum oid_proto proto; - enum oid_class class; - enum oid_value value; - int oidsuffix[OID_SIZE]; - char *desc; -} oident; - - - - The proto field can be set to either - PROTO_SR or PROTO_Z3950. - The class might be, say, - CLASS_RECSYN, and the value might be - VAL_USMARC for the USMARC record format. Functions - - - -int *oid_ent_to_oid(struct oident *ent, int *dst); -struct oident *oid_getentbyoid(int *o); - - - - are provided to map between object identifiers and database entries. - If you store a member of the oid_proto type in - your association state information, it's a simple matter, at runtime, - to generate the correct OID when you need it. For decoding, you can - simply ignore the proto field, or if you're strict, you can verify - that your peer is using the OID family from the correct protocol. - The desc field is a short, human-readable name - for the PDU, useful mainly for diagnostic output. - - - - - The old function oid_getoidbyent still exists but - is not thread safe. Use oid_ent_to_oid instead - and pass an array of size OID_SIZE. - - - - - - Plans are underway to merge the two protocols into a single - definition, with one set of object identifiers. When this happens, the - oid module will no longer be required to support protocol - independence, but it should still be useful as a simple OID database. - - - - EXTERNAL Data @@ -264,7 +208,7 @@ typedef struct Z_External - Z_ext_typeent *z_ext_gettypebyref(oid_value ref); + Z_ext_typeent *z_ext_gettypebyref(const oid *oid); @@ -278,7 +222,7 @@ typedef struct Z_External typedef struct Z_ext_typeent { - oid_value dref; /* the direct-reference OID value. */ + int oid[OID_SIZE]; /* the direct-reference OID. */ int what; /* discriminator value for the external CHOICE */ Odr_fun fun; /* decoder function */ } Z_ext_typeent; @@ -301,8 +245,8 @@ typedef struct Z_ext_typeent z_ext_gettypebyref to look for the provided direct-reference. If the return value is different from NULL, you can use the provided - function to decode the BER string (see section - Using ODR). + function to decode the BER string (see + ). @@ -340,7 +284,8 @@ typedef struct Z_ext_typeent PDU, as well as their default settings. - Default settings for PDU Initialize Request +
+ Default settings for PDU Initialize Request @@ -390,7 +335,8 @@ typedef struct Z_ext_typeent
- Default settings for PDU Initialize + <table frame="top" id="asn.default.initialize.response"> + <title>Default settings for PDU Initialize Response @@ -441,7 +387,8 @@ typedef struct Z_ext_typeent
- Default settings for PDU Search Request +
+ Default settings for PDU Search Request @@ -503,7 +450,8 @@ typedef struct Z_ext_typeent
- Default settings for PDU Search Response +
+ Default settings for PDU Search Response @@ -552,7 +500,8 @@ typedef struct Z_ext_typeent
- Default settings for PDU Present Request +
+ Default settings for PDU Present Request @@ -605,7 +554,8 @@ typedef struct Z_ext_typeent
- Default settings for PDU Present Response +
+ Default settings for PDU Present Response @@ -628,7 +578,7 @@ typedef struct Z_ext_typeent nextResultSetPositionint0 - presentStatusintZ_PRES_SUCCESS + presentStatusintZ_PresentStatus_success recordsZ_RecordsNULL @@ -640,7 +590,8 @@ typedef struct Z_ext_typeent
- Default settings for Delete Result Set Request + <table frame="top" id="asn.default.delete.result.set.request"> + <title>Default settings for Delete Result Set Request @@ -658,7 +609,7 @@ typedef struct Z_ext_typeent Z_ReferenceIdNULL - deleteFunctionintZ_DeleteRequest_list + deleteFunctionintZ_DeleteResultSetRequest_list num_idsint0 @@ -673,7 +624,8 @@ typedef struct Z_ext_typeent
- Default settings for Delete Result Set Response + <table frame="top" id="asn.default.delete.result.set.response"> + <title>Default settings for Delete Result Set Response @@ -718,7 +670,8 @@ typedef struct Z_ext_typeent
- Default settings for Scan Request + <table frame="top" id="asn.default.scan.request"> + <title>Default settings for Scan Request @@ -763,7 +716,8 @@ typedef struct Z_ext_typeent
- Default settings for Scan Response + <table frame="top" id="asn.default.scan.response"> + <title>Default settings for Scan Response @@ -806,8 +760,8 @@ typedef struct Z_ext_typeent
- Default settings for Trigger Resource - Control Request +
+ Default settings for Trigger Resource Control Request @@ -842,8 +796,8 @@ typedef struct Z_ext_typeent
- Default settings for Resource - Control Request +
+ Default settings for Resource Control Request @@ -882,8 +836,8 @@ typedef struct Z_ext_typeent
- Default settings for Resource - Control Response +
+ Default settings for Resource Control Response @@ -913,8 +867,8 @@ typedef struct Z_ext_typeent
- Default settings for Access - Control Request +
+ Default settings for Access Control Request @@ -944,8 +898,8 @@ typedef struct Z_ext_typeent
- Default settings for Access - Control Response +
+ Default settings for Access Control Response @@ -978,7 +932,8 @@ typedef struct Z_ext_typeent
- Default settings for Segment +
+ Default settings for Segment @@ -1010,7 +965,8 @@ typedef struct Z_ext_typeent
- Default settings for Close +
+ Default settings for Close @@ -1060,7 +1016,7 @@ typedef struct Z_ext_typeent sgml-indent-step:1 sgml-indent-data:t sgml-parent-document: "yaz.xml" - sgml-local-catalogs: "../../docbook/docbook.cat" + sgml-local-catalogs: nil sgml-namecase-general:t End: -->