X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fodr.xml;h=38d300e61ff3daa77662abe574ab8dfe882ec48a;hb=69d044abe3d3a3560267a16dc4db13386974d5e1;hp=f7734c0009671850a40aa2dc25e1f8abdd8a858f;hpb=f0fff840ae259cab0b1c17297c4367172a7cd229;p=yaz-moved-to-github.git diff --git a/doc/odr.xml b/doc/odr.xml index f7734c0..38d300e 100644 --- a/doc/odr.xml +++ b/doc/odr.xml @@ -1,4 +1,4 @@ - + The ODR Module Introduction @@ -39,7 +39,7 @@ Using ODR - ODR Streams + ODR Streams Conceptually, the ODR stream is the source of encoded data in the @@ -74,7 +74,7 @@ - Memory Management + Memory Management Two forms of memory management take place in the &odr; system. The first @@ -169,7 +169,7 @@ - Encoding and Decoding Data + Encoding and Decoding Data When encoding data, the ODR stream will write the encoded octet string @@ -260,7 +260,8 @@ z_APDU()). - Encoding and decoding functions + + Encoding and decoding functions int odr_integer(ODR o, int **p, int optional, const char *name); @@ -298,7 +299,8 @@ last call to odr_reset() will be released. - Encoding and decoding of an integer + + Encoding and decoding of an integer The use of the double indirection can be a little confusing at first (its purpose will become clear later on, hopefully), @@ -355,7 +357,7 @@ void do_nothing_useful(int value) - Printing + Printing When an ODR stream is created of type ODR_PRINT the ODR module will print the contents of a PDU in a readable format. @@ -396,7 +398,7 @@ void do_nothing_useful(int value) ar[n] is the last. The last element has the property that ar[n+1] == NULL. - + Element Path for record For a database record part of a PresentResponse the @@ -406,7 +408,7 @@ void do_nothing_useful(int value) - Diagnostics + Diagnostics The encoding/decoding functions all return 0 when an error occurs. @@ -440,7 +442,8 @@ void do_nothing_useful(int value) one of these constants: - ODR Error codes +
+ ODR Error codes @@ -498,7 +501,8 @@ void do_nothing_useful(int value) - Summary and Synopsis + + Summary and Synopsis #include <odr.h> @@ -568,14 +572,15 @@ void do_nothing_useful(int value) SEQUENCE members which don't exist in XDR. - The Primitive ASN.1 Types + + The Primitive ASN.1 Types ASN.1 defines a number of primitive types (many of which correspond roughly to primitive types in structured programming languages, such as C). - INTEGER + INTEGER The &odr; function for encoding or decoding (or printing) the ASN.1 @@ -633,21 +638,21 @@ void do_nothing_useful(int value) similar manners: - BOOLEAN + BOOLEAN int odr_bool(ODR o, bool_t **p, int optional, const char *name); - REAL + REAL Not defined. - NULL + NULL int odr_null(ODR o, bool_t **p, int optional, const char *name); @@ -660,7 +665,7 @@ int odr_null(ODR o, bool_t **p, int optional, const char *name); - OCTET STRING + OCTET STRING typedef struct odr_oct @@ -707,7 +712,7 @@ int odr_visiblestring(ODR o, char **p, int optional, - BIT STRING + BIT STRING int odr_bitstring(ODR o, Odr_bitmask **p, int optional, @@ -745,7 +750,7 @@ int ODR_MASK_GET(Odr_bitmask *b, int bitno); - OBJECT IDENTIFIER + OBJECT IDENTIFIER int odr_oid(ODR o, Odr_oid **p, int optional, const char *name); @@ -762,7 +767,7 @@ int odr_oid(ODR o, Odr_oid **p, int optional, const char *name); - Tagging Primitive Types + Tagging Primitive Types The simplest way of tagging a type is to use the @@ -813,7 +818,7 @@ int myInt(ODR o, int **p, int optional, const char *name) - Constructed Types + Constructed Types Constructed types are created by combining primitive types. The @@ -900,16 +905,18 @@ int mySequence(ODR o, MySequence **p, int optional, const char *name) - Tagging Constructed Types + + Tagging Constructed Types - See for information on how to tag + See for information on how to tag the primitive types, as well as types that are already defined. - Implicit Tagging + + Implicit Tagging Assume the type above had been defined as @@ -957,7 +964,7 @@ int mySequence(ODR o, MySequence **p, int optional, const char *name) - Explicit Tagging + Explicit Tagging Explicit tagging of constructed types is a little more complicated, @@ -1032,7 +1039,7 @@ int mySequence(ODR o, MySequence **p, int optional, const char *name) - SEQUENCE OF + SEQUENCE OF To handle sequences (arrays) of a specific type, the function @@ -1088,7 +1095,7 @@ int myArray(ODR o, MyArray **p, int optional, const char *name) - CHOICE Types + CHOICE Types The choice type is used fairly often in some ASN.1 definitions, so @@ -1289,9 +1296,17 @@ void odr_choice_bias(ODR o, int what); - - +