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:
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:
<para>
A structure representing a complex ASN.1 type doesn't in itself contain the
members of that type. Instead, the structure contains
<para>
A structure representing a complex ASN.1 type doesn't in itself contain the
members of that type. Instead, the structure contains
taste, there are at least three different approaches that you may take
when you allocate the structures.
</para>
taste, there are at least three different approaches that you may take
when you allocate the structures.
</para>
<para>
You can use static or automatic local variables in the function that
prepares the PDU. This is a simple approach, and it provides the most
<para>
You can use static or automatic local variables in the function that
prepares the PDU. This is a simple approach, and it provides the most
some of its elements, while you leave other elements pointing to global
or per-session default variables.
</para>
some of its elements, while you leave other elements pointing to global
or per-session default variables.
</para>
<para>
The &asn; module provides an important aid in creating new PDUs. For
each of the PDU types (say, <function>Z_InitRequest</function>), a
<para>
The &asn; module provides an important aid in creating new PDUs. For
each of the PDU types (say, <function>Z_InitRequest</function>), a
<function>zget_APDU()</function> is provided, which allocates
a top-level Z-APDU of the type requested:
</para>
<function>zget_APDU()</function> is provided, which allocates
a top-level Z-APDU of the type requested:
</para>
<para>
The <varname>which</varname> parameter is (of course) the discriminator
belonging to the <varname>Z_APDU</varname> <literal>CHOICE</literal> type.
All of the interface described here is provided by the &asn; module, and
you access it through the <filename>proto.h</filename> header file.
<para>
The <varname>which</varname> parameter is (of course) the discriminator
belonging to the <varname>Z_APDU</varname> <literal>CHOICE</literal> type.
All of the interface described here is provided by the &asn; module, and
you access it through the <filename>proto.h</filename> header file.
<para>
In order to achieve extensibility and adaptability to different
application domains, the new version of the protocol defines many
<para>
In order to achieve extensibility and adaptability to different
application domains, the new version of the protocol defines many
specialized version of the EXTERNAL construct, called
<literal>Z_External</literal>.It is defined thus:
</para>
specialized version of the EXTERNAL construct, called
<literal>Z_External</literal>.It is defined thus:
</para>
<para>
When decoding, the &asn; module will attempt to determine which
syntax describes the data by looking at the reference fields
<para>
When decoding, the &asn; module will attempt to determine which
syntax describes the data by looking at the reference fields
For non-ASN.1 data such as MARC records, use the
<literal>octet_aligned</literal> arm of the union.
</para>
For non-ASN.1 data such as MARC records, use the
<literal>octet_aligned</literal> arm of the union.
</para>
<para>
Some servers return ASN.1 structured data values (eg. database
records) as BER-encoded records placed in the
<para>
Some servers return ASN.1 structured data values (eg. database
records) as BER-encoded records placed in the
<para>
The <literal>what</literal> member contains the
<literal>Z_External</literal> union discriminator value for the
<para>
The <literal>what</literal> member contains the
<literal>Z_External</literal> union discriminator value for the
record syntax, the value of <literal>fun</literal> would be
<literal>z_SUTRS</literal> (a function pointer).
</para>
record syntax, the value of <literal>fun</literal> would be
<literal>z_SUTRS</literal> (a function pointer).
</para>
<para>
If you receive an EXTERNAL which contains an octet-string value that
you suspect of being an ASN.1-structured data value, you can use
<para>
If you receive an EXTERNAL which contains an octet-string value that
you suspect of being an ASN.1-structured data value, you can use
<para>
If you want to <emphasis>send</emphasis> EXTERNALs containing
ASN.1-structured values in the occtet-aligned branch of the CHOICE, this
<para>
If you want to <emphasis>send</emphasis> EXTERNALs containing
ASN.1-structured values in the occtet-aligned branch of the CHOICE, this
<para>
We include, for reference, a listing of the fields of each top-level
PDU, as well as their default settings.
</para>
<para>
We include, for reference, a listing of the fields of each top-level
PDU, as well as their default settings.
</para>
<table frame="top" id="asn.default.initialize.request">
<title>Default settings for PDU Initialize Request</title>
<tgroup cols="3">
<table frame="top" id="asn.default.initialize.request">
<title>Default settings for PDU Initialize Request</title>
<tgroup cols="3">
<table frame="top" id="asn.default.present.response">
<title>Default settings for PDU Present Response</title>
<tgroup cols="3">
<table frame="top" id="asn.default.present.response">
<title>Default settings for PDU Present Response</title>
<tgroup cols="3">
<table frame="top" id="asn.default.delete.result.set.request">
<title>Default settings for Delete Result Set Request
</title>
<table frame="top" id="asn.default.delete.result.set.request">
<title>Default settings for Delete Result Set Request
</title>
<table frame="top" id="asn.default.access.control.request">
<title>Default settings for Access Control Request</title>
<tgroup cols="3">
<table frame="top" id="asn.default.access.control.request">
<title>Default settings for Access Control Request</title>
<tgroup cols="3">