X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fasn.xml;h=7f6208ec74d3fec2a1b022465952338d74ca1a00;hb=c7cff6778b8d69f6e3c41dbfd939f44436911b90;hp=453e856af5bbc63be04bea23407266cf7fe05101;hpb=fe4182bf1ca7bebcb3172cde916d4467c2154e7b;p=yaz-moved-to-github.git diff --git a/doc/asn.xml b/doc/asn.xml index 453e856..7f6208e 100644 --- a/doc/asn.xml +++ b/doc/asn.xml @@ -1,9 +1,9 @@ - - The ASN Module - Introduction + + The Z39.50 ASN.1 Module + Introduction The &asn; module provides you with a set of C struct definitions for the - various PDUs of the protocol, as well as for the complex types + various PDUs of the Z39.50 protocol, as well as for the complex types appearing within the PDUs. For the primitive data types, the C representation often takes the form of an ordinary C language type, such as int. For ASN.1 constructs that have no direct @@ -11,8 +11,15 @@ 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 + Preparing PDUs A structure representing a complex ASN.1 type doesn't in itself contain the @@ -47,8 +54,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 @@ -110,7 +117,7 @@ As well as the individual PDU functions, a function zget_APDU() is provided, which allocates - a toplevel Z-APDU of the type requested: + a top-level Z-APDU of the type requested: @@ -125,7 +132,16 @@ - Object Identifiers + Object Identifiers (YAZ 2) + + + + This material only applies to version 2 series of YAZ. You need not + read this material if you are working with YAZ 3. + See for more information on OIDs. + + + 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 @@ -187,7 +203,7 @@ struct oident *oid_getentbyoid(int *o); - EXTERNAL Data + EXTERNAL Data In order to achieve extensibility and adaptability to different @@ -264,7 +280,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 +294,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 +317,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 + ). @@ -333,18 +349,19 @@ typedef struct Z_ext_typeent - PDU Contents Table + PDU Contents Table We include, for reference, a listing of the fields of each top-level PDU, as well as their default settings. - Default settings for PDU Initialize Request +
+ Default settings for PDU Initialize Request - - - + + + Field @@ -372,10 +389,10 @@ typedef struct Z_ext_typeent idAuthenticationZ_IdAuthenticationNULL - implementationIdchar*"YAZ (id=81)" + implementationIdchar*"81" - implementationNamechar*"Index Data/YAZ" + implementationNamechar*"YAZ" implementationVersionchar*YAZ_VERSION @@ -390,12 +407,13 @@ 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 - - - + + + Field @@ -423,10 +441,10 @@ typedef struct Z_ext_typeent resultbool_tTRUE - implementationIdchar*"YAZ (id=81)" + implementationIdchar*"id)" - implementationNamechar*"Index Data/YAZ" + implementationNamechar*"YAZ" implementationVersionchar*YAZ_VERSION @@ -441,11 +459,12 @@ typedef struct Z_ext_typeent
- Default settings for PDU Search Request +
+ Default settings for PDU Search Request - - - + + + Field @@ -503,11 +522,12 @@ typedef struct Z_ext_typeent
- Default settings for PDU Search Response +
+ Default settings for PDU Search Response - - - + + + Field @@ -552,11 +572,12 @@ typedef struct Z_ext_typeent
- Default settings for PDU Present Request +
+ Default settings for PDU Present Request - - - + + + Field @@ -605,11 +626,12 @@ typedef struct Z_ext_typeent
- Default settings for PDU Present Response +
+ Default settings for PDU Present Response - - - + + + Field @@ -628,7 +650,7 @@ typedef struct Z_ext_typeent nextResultSetPositionint0 - presentStatusintZ_PRES_SUCCESS + presentStatusintZ_PresentStatus_success recordsZ_RecordsNULL @@ -640,12 +662,13 @@ 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 - - - + + + Field @@ -658,7 +681,7 @@ typedef struct Z_ext_typeent Z_ReferenceIdNULL - deleteFunctionintZ_DeleteRequest_list + deleteFunctionintZ_DeleteResultSetRequest_list num_idsint0 @@ -673,12 +696,13 @@ 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 - - - + + + Field @@ -718,12 +742,13 @@ typedef struct Z_ext_typeent
- Default settings for Scan Request + <table frame="top" id="asn.default.scan.request"> + <title>Default settings for Scan Request - - - + + + Field @@ -763,12 +788,13 @@ typedef struct Z_ext_typeent
- Default settings for Scan Response + <table frame="top" id="asn.default.scan.response"> + <title>Default settings for Scan Response - - - + + + Field @@ -806,12 +832,12 @@ typedef struct Z_ext_typeent
- Default settings for Trigger Resource - Control Request +
+ Default settings for Trigger Resource Control Request - - - + + + Field @@ -842,12 +868,12 @@ typedef struct Z_ext_typeent
- Default settings for Resource - Control Request +
+ Default settings for Resource Control Request - - - + + + Field @@ -882,12 +908,12 @@ typedef struct Z_ext_typeent
- Default settings for Resource - Control Response +
+ Default settings for Resource Control Response - - - + + + Field @@ -913,12 +939,12 @@ typedef struct Z_ext_typeent
- Default settings for Access - Control Request +
+ Default settings for Access Control Request - - - + + + Field @@ -944,12 +970,12 @@ typedef struct Z_ext_typeent
- Default settings for Access - Control Response +
+ Default settings for Access Control Response - - - + + + Field @@ -978,11 +1004,12 @@ typedef struct Z_ext_typeent
- Default settings for Segment +
+ Default settings for Segment - - - + + + Field @@ -1010,11 +1037,12 @@ typedef struct Z_ext_typeent
- Default settings for Close +
+ Default settings for Close - - - + + + Field @@ -1060,7 +1088,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: -->