reverting to sgml mode
[yaz-moved-to-github.git] / doc / asn.xml
index 453e856..9ef1576 100644 (file)
@@ -1,9 +1,9 @@
-<!-- $Id: asn.xml,v 1.6 2001-08-08 19:33:21 adam Exp $ -->
- <chapter><title>The ASN Module</title>
-  <sect1><title>Introduction</title>
+<!-- $Id: asn.xml,v 1.17 2006-04-25 11:25:08 marc Exp $ -->
+ <chapter id="asn"><title>The Z39.50 ASN.1 Module</title>
+  <sect1 id="asn.introduction"><title>Introduction</title>
    <para>
     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 <literal>int</literal>. For ASN.1 constructs that have no direct
     the &odr; module (see section <link linkend="odr">The ODR Module</link>)
     provides auxiliary definitions.
    </para>
+   <para>
+    The &asn; module is located in sub directory <filename>z39.50</filename>.
+    There you'll find C files that implements encoders and decoders for the
+    Z39.50 types. You'll also find the protocol definitions:
+    <filename>z3950v3.asn</filename>, <filename>esupdate.asn</filename>, 
+    and others.
+   </para>
   </sect1>
-  <sect1><title>Preparing PDUs</title>
+  <sect1 id="asn.preparing"><title>Preparing PDUs</title>
    
    <para>
     A structure representing a complex ASN.1 type doesn't in itself contain the
@@ -47,8 +54,8 @@
     structure before freeing the structure itself.
    </para>
    <para>
-    You can use the <function>odr_malloc()</function> function (see section 
-    <link linkend="odr-use">Using ODR</link> for details). When you use
+    You can use the <function>odr_malloc()</function> function (see
+    <xref linkend="odr.use"/> for details). When you use
     <function>odr_malloc()</function>, you can release all of the
     allocated data in a single operation, independent of any pointers and
     relations between the data. <function>odr_malloc()</function> is based on a
    <para>
    As well as the individual PDU functions, a function
     <function>zget_APDU()</function> is provided, which allocates
-    a toplevel Z-APDU of the type requested:
+    a top-level Z-APDU of the type requested:
    </para>
    
    <synopsis>
     
    </para>
   </sect1>
-  <sect1><title id="oid">Object Identifiers</title>
+  <sect1 id="asn.oid"><title>Object Identifiers</title>
   <para>
     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 +194,7 @@ struct oident *oid_getentbyoid(int *o);
    </note>
   
   </sect1>
-  <sect1><title>EXTERNAL Data</title>
+  <sect1 id="asn.external"><title>EXTERNAL Data</title>
    
    <para>
     In order to achieve extensibility and adaptability to different
@@ -301,8 +308,8 @@ typedef struct Z_ext_typeent
     <literal>z_ext_gettypebyref</literal> 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 <link linkend="odr-use">
-     Using ODR</link>).
+    function to decode the BER string (see <xref linkend="odr.use"/>
+    ).
    </para>
    
    <para>
@@ -333,7 +340,7 @@ typedef struct Z_ext_typeent
    </note>
   
   </sect1>
-  <sect1><title>PDU Contents Table</title>
+  <sect1 id="asn.pdu"><title>PDU Contents Table</title>
    
   <para>
     We include, for reference, a listing of the fields of each top-level
@@ -342,9 +349,9 @@ typedef struct Z_ext_typeent
    
    <table frame="top"><title>Default settings for PDU Initialize Request</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-    <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
     <thead>
      <row>
       <entry>Field</entry>
@@ -372,10 +379,10 @@ typedef struct Z_ext_typeent
        idAuthentication</entry><entry>Z_IdAuthentication</entry><entry>NULL
       </entry></row>
      <row><entry>
-       implementationId</entry><entry>char*</entry><entry>"YAZ (id=81)"
+       implementationId</entry><entry>char*</entry><entry>"81"
       </entry></row>
      <row><entry>
-       implementationName</entry><entry>char*</entry><entry>"Index Data/YAZ"
+       implementationName</entry><entry>char*</entry><entry>"YAZ"
       </entry></row>
      <row><entry>
        implementationVersion</entry><entry>char*</entry><entry>YAZ_VERSION
@@ -393,9 +400,9 @@ typedef struct Z_ext_typeent
   <table frame="top"><title>Default settings for PDU Initialize
     Response</title>
    <tgroup cols="3">
-    <colspec colname="field"></colspec>
-    <colspec colname="type"></colspec>
-    <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
     <thead>
       <row>
        <entry>Field</entry>
@@ -423,10 +430,10 @@ typedef struct Z_ext_typeent
        result</entry><entry>bool_t</entry><entry>TRUE
        </entry></row>
       <row><entry>
-       implementationId</entry><entry>char*</entry><entry>"YAZ (id=81)"
+       implementationId</entry><entry>char*</entry><entry>"id)"
        </entry></row>
       <row><entry>
-       implementationName</entry><entry>char*</entry><entry>"Index Data/YAZ"
+       implementationName</entry><entry>char*</entry><entry>"YAZ"
        </entry></row>
       <row><entry>
        implementationVersion</entry><entry>char*</entry><entry>YAZ_VERSION
@@ -443,9 +450,9 @@ typedef struct Z_ext_typeent
 
    <table frame="top"><title>Default settings for PDU Search Request</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -505,9 +512,9 @@ typedef struct Z_ext_typeent
 
    <table frame="top"><title>Default settings for PDU Search Response</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -554,9 +561,9 @@ typedef struct Z_ext_typeent
 
    <table frame="top"><title>Default settings for PDU Present Request</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -607,9 +614,9 @@ typedef struct Z_ext_typeent
    
    <table frame="top"><title>Default settings for PDU Present Response</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -628,7 +635,7 @@ typedef struct Z_ext_typeent
        nextResultSetPosition</entry><entry>int</entry><entry>0
        </entry></row>
       <row><entry>
-       presentStatus</entry><entry>int</entry><entry>Z_PRES_SUCCESS
+       presentStatus</entry><entry>int</entry><entry>Z_PresentStatus_success
        </entry></row>
       <row><entry>
        records</entry><entry>Z_Records</entry><entry>NULL
@@ -643,9 +650,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Delete Result Set Request
     </title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -658,7 +665,7 @@ typedef struct Z_ext_typeent
        </entry><entry>Z_ReferenceId</entry><entry>NULL
        </entry></row>
       <row><entry>
-       deleteFunction</entry><entry>int</entry><entry>Z_DeleteRequest_list
+       deleteFunction</entry><entry>int</entry><entry>Z_DeleteResultSetRequest_list
        </entry></row>
       <row><entry>
        num_ids</entry><entry>int</entry><entry>0
@@ -676,9 +683,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Delete Result Set Response
     </title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -721,9 +728,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Scan Request
     </title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -766,9 +773,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Scan Response
     </title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -809,9 +816,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Trigger Resource
      Control Request </title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -845,9 +852,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Resource
      Control Request</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -885,9 +892,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Resource
      Control Response</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -916,9 +923,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Access
      Control Request</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -947,9 +954,9 @@ typedef struct Z_ext_typeent
    <table frame="top"><title>Default settings for Access
      Control Response</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -980,9 +987,9 @@ typedef struct Z_ext_typeent
 
    <table frame="top"><title>Default settings for Segment</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -1012,9 +1019,9 @@ typedef struct Z_ext_typeent
 
    <table frame="top"><title>Default settings for Close</title>
     <tgroup cols="3">
-     <colspec colname="field"></colspec>
-     <colspec colname="type"></colspec>
-     <colspec colname="value"></colspec>
+     <colspec colwidth="7*" colname="field"></colspec>
+     <colspec colwidth="5*" colname="type"></colspec>
+     <colspec colwidth="7*" colname="value"></colspec>
      <thead>
       <row>
        <entry>Field</entry>
@@ -1060,7 +1067,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:
  -->